-1

I am looking for the easiest way to find the shortest cycle in a graph.

Ann
  • 1
  • 2
  • 1
    Off the top of my head, you could use a shortest-path algorithm for the path between a node and itself, and do this for every node. Sounds pretty darn easy... (it might not be efficient though) –  Apr 18 '11 at 08:18

1 Answers1

-1
"By the power of Google!" - Heman

You can find it here http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm

mark-cs
  • 4,677
  • 24
  • 32
  • Is the Floyd-Warshall particularly suited for finding minimal cycles? I don't see immediately how it's superior to, say, Djikstra's. –  Apr 18 '11 at 08:43
  • No reason, im just saying its easier to google it. That is the result i got from copying the question into google... (Yes I know of Dijkstras), its an inane question for SO... – mark-cs Apr 18 '11 at 09:11