Graphs with many Vertex-Disjoint Cycles

We study graphs G in which the maximum number of vertex-disjoint cycles nu(G) is close to the cyclomatic number mu(G), which is a natural upper bound for nu(G). Our main result is the existence of a finite set P(k) of graphs for all k is an element of N-0 such that every 2-connected graph G with mu(G)-nu(G) = k arises by applying a simple extension rule to a graph in P(k). As an algorithmic consequence we describe algorithms calculating minmu(G)-nu(G), k + 1 in linear time for fixed k.


Introduction
We consider finite and undirected graphs G with vertex set V (G) and edge set E(G) that may contain multiple edges but no loops.We use standard terminology [15] and only recall a few notions.If an edge e ∈ E(G) is incident with the two vertices u and v in V (G), then we write e = uv.The neighbourhood N G (u) of a vertex u ∈ V (G) is the set of vertices v ∈ V (G) with e = uv for some e ∈ E(G).The degree d G (u) of a vertex u ∈ V (G) is the number of edges incident with u.A cycle of G is a connected 2-regular subgraph of G.A block of G is a maximal 2-connected subgraph of G.A block is an endblock if it contains at most one cutvertex of G.A cactus is a connected graph all cycles of which are edge-disjoint, i.e. each of its blocks is a bridge or a cycle.An ear of G is a path in G whose internal vertices are all of degree 2.An ear is maximal, if it is not properly contained in another ear of G.If P is an ear of G and I is the set of internal vertices of P , then we say that G arises from G = (V (G) \ I, E(G) \ E(P )) by adding the ear P and that G arises from G by removing the ear P .
The cyclomatic number µ(G) of G is where c(G) is the number of components of G.A set C of vertex-disjoint cycles of G is a cycle packing.
The set of edges of the cycles in C is denoted by E(C).The maximum cardinality of a cycle packing of G is denoted by ν(G) and a cycle packing of cardinality ν(G) is called optimal.
Packing vertex-disjoint cycles in graphs is a very well-studied and classical graph-theoretical problem.
There is a vast amount of literature concerning conditions in terms of for instance order, size, vertex degrees, degree sums, independence number, chromatic number, feedback vertex sets that are sufficient for the existence of some number of vertex-disjoint cycles, which may additionally contain specified elements or satisfy certain length conditions.We refer the reader to [2, 4-9, 11, 17-21], which is just a small selection.The algorithmic problems concerning cycle packings are typically hard [1,10,13,14] and approximation algorithms were described [14].Several authors mention practical applications in computational biology such as reconstruction of evolutionary trees or genomic analysis.
In the present paper we study graphs G in which the maximum number of vertex-disjoint cycles ν(G) is close to the cyclomatic number µ(G), which is a natural upper bound for ν(G).In fact µ(G) equals the minimum number of edges whose removal from G deletes all cycles of G, which easily implies µ(G) ≥ ν(G) with equality if and only if every component of G is a cactus and all cycles of G are vertex-disjoint.
As our main result we prove the existence of a finite set P(k) of graphs for all k ∈ N 0 such that every 2-connected graph G with µ(G) − ν(G) = k arises by applying a simple extension rule to a graph in P(k).As an algorithmic consequence we describe algorithms calculating min{µ(G) − ν(G), k + 1} in linear time for fixed k, that is in time [3,12] we considered similar results concerning edge-disjoint cycles, the problem to find many vertex-disjoint cycles in a graph can not be reduced to its blocks unlike in the edge-disjoint case.

Results
In this section we will give a constructive characterization of the graphs in For l ∈ N 0 , a graph P is an l-cycle-chain between u and v, if • P is a cactus with at most two endblocks, • the set C(P ) of cycles of P consists of l vertex-disjoint cycles, If G is a graph and e = uv ∈ E(G), then the graph H is said to arise from G by replacing the edge e with an l-cycle-chain P (cf. Figure 1), if H arises from the disjoint union of G and an l-cycle-chain P between u and v by removing the edge e and identifying u with u and v with v .In this case H is said to contain the l-cycle-chain P .Note that subdividing an edge is the same as replacing it with a 0-cycle-chain.It is easy to see that if H arises from G by replacing the edge e with an l-cycle-chain P , then We say that a graph H extends a graph G, if H arises from G by replacing every edge e ∈ E(G) with an l e -cycle-chain The next lemma summarizes some important properties of the above extension notion.C(P e ).
= l and every optimal cycle packing of H contains all l cycles in C.
(ii) H extends G if and only if G has an optimal cycle packing C G such that l e = 0 for all e ∈ E(C G ).
Proof: Let C H be an optimal cycle packing of H. Let E be a set of l edges intersecting every cycle in C.
Removing the edges in E can delete at most l different cycles in C H , which implies Clearly, µ(H) − µ(G) = l.By definition, extending a graph in G(k) results in a larger graph in G(k).Another important feature of the extension notion is that iterated extensions are not more powerful than a single extension as proved in the next lemma.
(ii) For k ∈ N 0 every graph in G(k) extends a graph in P(k).
Proof: for every e ∈ E(G), then G 2 extends G 0 by replacing every edge e ∈ E(G 0 ) with an l e -cycle-chain.
and H = G s .Repeated application of (i) implies that H extends G 0 and the proof is complete.2 In view of the observation about graphs G with µ(G) = ν(G) made in the introduction it is easy to determine G(0) and P(0).Let P n and C n denote the chordless path and chordless cycle of order n ∈ N. Proof: , then contracting an edge incident with u results in a graph G such that H extends G, which is a contradiction.If H contains a 2-cycle-chain P , then every optimal cycle packing of H contains both cycles contained in P .Therefore, if G arises from H by contracting one cycle C in P together with one further edge incident with C (cf. Figure 2), then H extends G, which is a contradiction.
(ii) Let G ∈ G(0).As noted in the introduction, µ(G) = ν(G) implies that every component of G is a cactus.Since G is 2-connected, it follows that G is either P 1 , or P 2 , or a chordless cycle C n for n ≥ 2. By ( i), P 1 , P 2 , and C 2 are the only reduced graphs in G(0), which implies ( ii). 2 After these preparations, we are ready to prove our main result.
Theorem 1 P(k) is finite for every k ∈ N 0 .
Proof: We prove the result by induction on k.For k = 0, the result follows from Lemma 3( ii).
If k > 0, we argue that the number of edges in any graph H ∈ P(k) is bounded in terms of the number of edges in some graph in P(k − 1).
Whitney [22] proved that a graph of order at least 2 is 2-connected if and only if it has an ear decomposition, i.e. it arises from P 2 by iteratively adding ears.Since removing an ear from H reduces µ(H) by exactly 1 and ν(H) by at most 1, iteratively removing the ears of an ear decomposition of H, we obtain a sequence of 2-connected graphs G 0 , G 1 , . . ., G l = H, such that H C G Fig. 2: Contraction in the proof of Lemma 3( i) • for each i ∈ {1, . . ., l}, G i arises by adding the ear P i to The second condition implies that G 0 ∈ G(k − 1) and G i ∈ G(k) for i ∈ {1, . . ., l}.By Lemma 2( ii), G 0 extends some graph G ∈ P(k − 1).
Let C l be an optimal cycle packing of G l .If l ≥ 2, then the ear P l is contained in a unique cycle C l of C l and C l \ {C l } is an optimal cycle packing of G l−1 .Repeating this argument for indices from l down to 2, we obtain vertex-disjoint cycles C 2 , . . ., C l ∈ C l such that P i is contained in C i for 2 ≤ i ≤ l.Since H is reduced, Lemma 3( i) implies that E := {P 2 , . . ., P l } is a set of edges.
Claim.The graph G 1 does not contain a 2-cycle-chain.
Proof of the Claim: For contradiction, we assume that G 1 contains a 2-cycle-chain P .Since G l = H is reduced, Lemma 3( i) implies that l ≥ 2. It suffices to show that G 2 contains a 2-cycle-chain.Repeating this argument, it follows that H contains a 2-cycle-chain, which is a contradiction.
Let C and C denote the two cycles in P .Clearly, the optimal cycle packing C 1 of G 1 contains both these cycles.Let P denote the path in P between C and C .Recall that P 2 is contained in the cycle C 2 , which is vertex-disjoint to all cycles in C 1 .Therefore, if P 2 has no endvertex in P , then G 2 contains a 2-cycle-chain contained in P , and, if P 2 has an endvertex in P , then P 2 has both its endvertices in P and G 2 contains even a 3-cycle-chain, which completes the proof of the claim. 2 Since G 1 arises from G 0 by adding the ear P 1 , the claim implies that the graph G 0 does not contain a 6-cycle-chain.Since every l-cycle-chain for l ≤ 5 contains at most 2 • 5 + 6 = 16 maximal ears, the number of maximal ears of G 0 is at most 16|E(G)|.Hence the number of maximal ears of G 1 is at most Since H is reduced, all internal vertices of a maximal ear P of G 1 must be endvertices of edges in E. At most two internal vertices can be contained in some P i ∈ E such that C i contains an endvertex of P .Each further internal vertex must be incident with an edge P i ∈ E such that C i consists of P i and a subpath of P .Hence, since H is reduced, Lemma 3( i) implies that each maximal ear of G 1 contains at most four internal vertices.Therefore, each maximal ear contributes at most five edges to G 1 , i.   Proof of correctness: By induction on the recursive depth, we may assume that the output of the recursive call performed in line 21 is correct.Up to line 9, G is modified such that the difference µ(G) − ν(G) does not change (cf. the argument in the proof of Lemma 3( i)).Note that after these preprocessing steps, G contains neither a bridge, nor a vertex u with d G (u) = |N G (u)| = 2, nor a 2-cycle-chain, nor a component that is an isolated vertex or a chordless cycle.
If u is contained in every optimal cycle packing of B, then there is an optimal cycle packing of G that is the union of an optimal cycle packing of G − V (B) and an optimal cycle packing of B. Since and the return value in line 18 or line 22 is correct.
If u is not contained in every optimal cycle packing of B, then there is an optimal cycle packing of G that is the union of an optimal cycle packing of G − (V (B) \ {u}) and an optimal cycle packing of and the return value in line 22 is correct.
This completes the proof of correctness.2 Proof of linear running time: If B is a component of G or u is not contained in every optimal cycle packing of B, then, by Lemma 3( ii) and the preprocessing, µ(B) − ν(B) > 0. If B is contained in s ≥ 2 blocks of G, then, by the preprocessing, G has no bridge and hence d G−E(B) (u) − (s − 1) > 0. This implies that ∆k > 0 in line 21.Therefore, the recursive depth is at most k and it suffices to show that all steps until line 20 can be done in linear time.
Since the block-cutvertex tree of G can be determined in linear time [16], the deletion of bridges (line 3), the deletion of trivial components (line 9), the selection of B (line 11) and the selection of u (line 13) can be done in linear time.Furthermore, it is easy to see that the contractions in the preprocessing (lines 5 and 7) can be done in linear time.

Lemma 1
Let H arise from G by replacing every edge e ∈ E(G) with an l e -cycle-chain P e .Let l = e∈E(G) l e and C = e∈E(G) 1) holds with equality for every choice of E, we obtain E(C) ⊆ E(C H ). By the definition of a cycle-chain, this implies C ⊆ C H . (ii) If H extends G, then, by (i), the cycles in C H \ C are subdivisions of the cycles in an optimal cycle packing C G of G. Clearly, l e = 0 for all e ∈ E(C G ). Conversely, if C G is an optimal cycle packing of G such that l e = 0 for all e ∈ E(C G ), then the cycles in H that are subdivisions of the cycles in C G together with the cycles in C form a cycle packing of H, which implies ν(H) − ν(G) ≥ l.Together with (1) it follows that ν(H) − ν(G) = l and H extends G. 2

f ≥ 1 ,
1 by replacing every edge e ∈ E(G i−1 ) with an l (i) e -cycle-chain P (i) e .If e ∈ E(G 0 ), f ∈ E P then, by Lemma 1( i), f is a bridge of P

Theorem 2
an algorithmical consequence of Theorem 1: For fixed k the finiteness of the sets P(k) allows to decide µ(G) − ν(G) ≤ k in linear time.For every k ∈ N 0 the algorithm DIFFERENCE(k) works correctly and has linear running time.

k i=0 P
(i) such that B extends B .Since B contains at most one vertex v with d G (v) = |N G (v)| = 2 -the cutvertex uand since G contains no 2-cycle-chain after the preprocessing, B contains no 4-cycle-chain.Therefore, in order to obtain B each edge of B is replaced by a subgraph with at most 11 edges.Since, by Theorem 1,