I would like to decompose undirected graph into a minimum number of paths and cycles that are edge-disjoint.
My idea is to first take longest paths, but it is not polynomial.
Do you know any polynomial algorithm?
I would like to decompose undirected graph into a minimum number of paths and cycles that are edge-disjoint.
My idea is to first take longest paths, but it is not polynomial.
Do you know any polynomial algorithm?
Copyright © 2021 Jogjafile Inc.
You might be interested in the "chain decomposition" of a graph, as described by Jens Schmidt.
It's mentioned in this wikipedia article on Ear Decompositions. I've implemented it myself, and it's a nice simple algorithm.