I have set of nodes and edges and i used Dijkstra’s algorithm to find the shortest closed cycles.My cycles are connected to each other (small black cycles in the graph). that mean, for 2 cycles, there is a common edge. Now, I want to get the Most outer cycles (red cycle in the figure), which contains all the shortest cycles. I think this is a kind of union. Not sure. is there any specific method or algorithmic method to obtain the most outer cycle from the available shortest closed cycles within the graph? How would be implement this?
Here, i tag the question under c++ also, as most programmers do know how to get the union of connected cycles and i also wish to implement this in c++. thank you in advance.
I have edited and upload a figure to my original post, as this was not clear for others.
As I understand your question, you’re trying to find an edge-maximal face of a connected planar graph. There’s an algorithm for enumerating faces of a planar graph in the Boost library: Planar Face Traversal. You may use it to iterate over graph’s faces and find the one with most edges involved.
Notes: