Follow a Dependency Without Following It Forever

Separate reachability from path enumeration, handle cycles explicitly and interpret bounded traversal results without promising complete discovery.

13 sections · 4 questions · 1 coding challenge

1 / 13

Unknown-Length Connections Needed Repeated Expansion

BOTIE

The early Neo4j use case described by the Cypher authors included access through variable-length relationships. A fixed sequence of joins or pattern segments cannot express every unknown chain length conveniently. Graph query languages therefore provide bounded or variable-length path matching.

The repeated step does not decide the answer’s grain. A list of reachable nodes, every distinct path and the shortest path are different questions. Our teaching traversal collects nodes once, which gives the visited set a clear purpose.

Sources for this history