|
|
back to boardCommon Boardmin weight cycle in undirected graph Can someone tell me how to find minimal weight cycle in undirected graph in O(n^3). I know for directed graph using modified Floyd, but I spend more than 2 hours on this and nothing (in O (n^4) with deleting every edge and Dijkstra)? Help me! Re: min weight cycle in undirected graph I still don't know how to proove my solution. I will just kinda lead you to the idea I m using. What do we get after we run Dijkstra? We don't just get shortest paths to every vertex - we get a TREE of shortest paths... When you add an edge to a tree you get what??? |
|
|