anchor.diff:    unfold().filter(select(values).count(local).is(input.tail().size())).  <5>
     order().by(select(values).
     unfold().sum()).                                                       <6>
  -  select(keys).limit(1).valueMap(true)                                   <7>
  +  select(keys).limit(1)                                                  <7>
   ----
   
   <1> The start of the traversal is not so different than the previous one and starts with vertex A.
  
positive.code: 
  [gremlin-groovy]
  ----
  g.addV('name', 'A').as('a').
    addV('name', 'B').as('b').
    addV('name', 'C').as('c').
    addV('name', 'D').as('d').
    addV('name', 'E').as('e').
    addV('name', 'F').as('f').
    addV('name', 'G').as('g').
    addE('hasParent').from('a').to('b').
    addE('hasParent').from('b').to('c').
    addE('hasParent').from('d').to('c').
  
negative.code: [gremlin-groovy,existing]
  ----
  input = ['A','B','D']
  g.V(input.head()).
    repeat(out('hasParent')).emit().as('x').                               <1>
    V().has(id, within(input.tail())).                                     <2>
    repeat(out('hasParent')).emit(where(eq('x'))).                         <3>
    group().
      by(select('x')).
  