简体   繁体   中英

Algorithm for finding minimal cycle basis of planar graph

I have a planar graph, where all nodes represent (X, Y) coordinates. The edges never intersect on the plane. The graph represents roads on of a city. Is there a Python library that provides an algorithm available for finding the minimal cycle basis, ie the enclosed regions. Or a relatively simple algorithm (efficiency is not the main problem currently) I'm currently using NetworkX, which only has cycle_basis , but no function for a minimal cycle basis. The only reference I have found is this algorithm , but I don't have the time to read/implement this in full.

Wait if the graph is actually a representation of a city, then there's one embedding of it, already. Just take t the faces of that embedding. You can't remove one face (ie. It's minimal) and the minimal cycle base is unique (first lemma of the paper you cite), so there's your solution!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM