- Pick random vertex
q
- Traverse the graph breadth-first until a loop is detected, then stop traversing that branch entirely
- If loops that have the same paths are detected on the same level, count only one of those
- Delete vertex
q
and go to 1
Created
July 16, 2021 18:33
-
-
Save cognivore/4aae73fca9b7705fba88900ff684d89b to your computer and use it in GitHub Desktop.
Stupid algorithm to enumerate loops in a graph
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment