A path-cycle matching is exactly an edge subset whose resulting subgraph has maximum degree at most two: every nontrivial connected component of a graph of this form is a graph path or a cycle in a graph. Thus the task is a bipartite b-matching problem with bound two at every vertex.
Find a bipartition , orient every original edge from to , and add a source and sink . Give each arc , for , flow network edge capacity two; each original arc flow network edge capacity one; and each arc , for , flow network edge capacity two. Compute an integral maximum flow and select the original edges whose flow is one. The integral max-flow theorem guarantees such an integral optimum.
By flow conservation, at most two selected edges touch each vertex, so they decompose into the required vertex-disjoint paths and cycles in a graph. Conversely, any permissible path-cycle matching gives a feasible flow: send one unit through its middle arc for each selected edge, with the outside arc amounts equal to the endpoint degrees. In both directions, the flow value equals the number of selected edges. Maximizing either quantity therefore maximizes the other.
Figure 1.
An original path-cycle matching example and its integral maximum flow representation
. Details.
The blue edges in this example form a four-cycle in a graph and a one-edge graph path; the dashed edge is unused. Their five units of flow are optimal: the two left vertices can each contribute at most two selected edges, and has only one incident edge.
The constructed flow network has vertices and arcs. A polynomial-time algorithm for maximum flow, such as the Edmonds–Karp algorithm, followed by a traversal of the selected subgraph, gives an efficient solution.
No. A counterexample works for every . Take the complete bipartite graph with vertex sets
It is a k-connected graph: deleting fewer than vertices leaves at least one vertex in each side, and the remaining complete bipartite graph is a connected graph.
Choose
and order these sets so that and . Order the other members arbitrarily. These are disjoint sets of cardinality , and every vertex of is one of the specified endpoints.
If the prescribed vertex-disjoint paths existed, no one of them could have an internal vertex, because every vertex must serve as the endpoint of one of the graph paths. Thus each graph path would have to be a single edge. But lie in the same side of the bipartite graph, so there is no edge . This contradicts the requirement on .
For this is the four-vertex cycle graph, with opposite vertices paired. The stronger property that every prescribed pairing can be realized is the linked graph property; vertex connectivity alone does not guarantee it.
Add two new vertices to , joining to every vertex of and to every vertex of , with no other new edges. The vertices are nonadjacent. Suppose has . Since is a k-connected graph, is a connected graph. Both and are nonempty because each original set has cardinality . Choose and ; a graph path between them in extends to an – graph path avoiding .
Consequently no fewer than vertices can form an – vertex separator. By Menger's theorem, there are at least internally vertex-disjoint paths from to . There cannot be more than , since has only neighbours.
Remove from these graph paths. The resulting graph paths in start at distinct vertices of , end at distinct vertices of , and are pairwise vertex-disjoint paths: any shared vertex would have been an internal vertex common to two of the original graph paths. Because there are exactly graph paths, they use every vertex of and as an endpoint. None can pass through another terminal internally, since that terminal already occurs as an endpoint of one of the vertex-disjoint paths. Thus there are vertex-disjoint paths from to , with some pairing of the endpoints. This is also an immediate application of the Set version of Menger theorem.
Path-cycle matching 2026-10-24
A path-cycle matching in a finite simple graph is a collection of mutually vertex-disjoint paths and cycles in a graph. Its used edges form a subgraph with every degree of a vertex at most two. Conversely, every finite connected component of a graph with maximum degree at most two is a graph path, a cycle in a graph, or an isolated vertex; following successive edges proves this classification. Discarding unused isolated vertices therefore converts any such subgraph into a path-cycle matching without changing its edge count. On a bipartite graph, maximizing the used edges is exactly bipartite b-matching with every .