This might be a rookie Gremlin question :
Let's say I have this graph
A [knows---> ] B
A [knows---> ] C
D [knows---> ] C
I want to traverse this graph and find nodes whom only A knows , in this case B and not C because both A and D know C. Is there a way to do this with Gremlin ?
Edit : Sorry I should have been more explicit in the question initially The number of incoming edges can actually be variable.
g.addV('A').as('a')
.addV('B').as('b')
.addV('C').as('c')
.addV('D').as('d')
.addV('E').as('e')
.addV('F')as('f')
.addE('knows').from('a').to('c')
.addE('knows').from('b').to('c')
.addE('knows').from('a').to('f')
.addE('knows').from('b').to('f')
.addE('knows').from('d').to('f')
In this case I want only C and not F because A & B know C and F both but D also knows F so I don't want F.