Induced paths in graphs without anticomplete cycles

Let us say a graph is $s\mathcal{O}$-free, where $s\ge 1$ is an integer, if there do not exist $s$ cycles of the graph that are pairwise vertex-disjoint and have no edges joining them. The structure of such graphs, even when $s=2$, is not well understood. For instance, until now we did not know how to test whether a graph is $2\mathcal{O}$-free in polynomial time; and there was an open conjecture, due to Ngoc Khang Le, that $2\mathcal{O}$-free graphs have only a polynomial number of induced paths. In this paper we prove Le's conjecture; indeed, we will show that for all $s\ge 1$, there exists $c>0$ such that every $s\mathcal{O}$-free graph $G$ has at most $|G|^c$ induced paths. This provides a poly-time algorithm to test if a graph is $s\mathcal{O}$-free, for all fixed $s$. The proof has three parts. First, there is a short and beautiful proof, due to Le, that reduces the question to proving the same thing for graphs with no cycles of length four. Second, there is a recent result of Bonamy, Bonnet, D\'epr\'es, Esperet, Geniet, Hilaire, Thomass\'e and Wesolek, that in every $s\mathcal{O}$-free graph $G$ with no cycle of length four, there is a set of vertices that intersects every cycle, with size logarithmic in $|G|$. And third, there is an argument that uses the result of Bonamy et al. to deduce the theorem. The last is the main content of this paper.


Introduction
Graphs in this paper are finite and simple (we will occasionally need parallel edges, but then we speak of "multigraphs"). Two subsets X, Y of the vertex set of a graph G are anticomplete if they are disjoint and there is no edge of G between X and Y ; and we say two subgraphs of G are anticomplete if their vertex sets are anticomplete. If s ≥ 1 is an integer, a graph G is sO-free if no s cycles of G are pairwise vertex-disjoint and anticomplete. We do not understand such graphs very well: for instance, until now we did not know a polynomial-time algorithm to recognize 2O-free graphs. In an attempt to find such an algorithm, several years ago Ngoc Khang Le proposed the (unpublished) conjecture [4] that there exists c > 0 such that every 2O-free graph G has at most |G| c induced cycles; and the stronger conjecture that the same is true for paths, that is: 1.1 Conjecture. There exists c > 0 such that every 2O-free graph G has at most |G| c induced paths.
If 1.1 is true, it is easy to derive a poly-time algorithm to test for being 2O-free. Here is a sketch of such an algorithm: • For each vertex v, find all the induced paths with first vertex v.
• For each induced path P , find all induced cycles that consist of P and one extra vertex.
• Check whether any two of these cycles are disjoint and have no edges betweeen them.
The total running time is proportional to the number of induced paths (times some polynomial in |G|), and so is polynomial, by 1.1.
In this paper we will prove the stronger conjecture (and hence both conjectures) for 2O-free graphs, and indeed for sO-free graphs. More exactly: 1. 2 Theorem. For all integers s ≥ 1 there exists c > 0 such that, if G is sO-free, then G has at most |G| c induced paths.
(We remark that by definition, every path has at least one vertex; so the one-vertex graph has only one induced path.) We will use a short and elegant argument, due to Ngoc Khang Le, that deduces 1.2 from the following weaker result: 1. 3 Theorem. For all integers s ≥ 1 there exists c > 0 such that, if G is sO-free, and has no cycle of length four, then G has at most |G| c induced paths.
A subset Z ⊆ V (G) is cycle-hitting if every cycle of G has a vertex in Z. We will show that: 1.4 Theorem. Let s ≥ 1 be an integer; then there exist c 1 , c 2 , c 3 such that if G is sO-free, and Z ⊆ V (G) is a cycle-hitting set, then G has at most |G| c 1 2 c 2 |Z|+c 3 induced paths.
If G has no cycle of length four then it does not contain K 2,2 as a subgraph; so to complete the proof of 1.3 and hence of 1.2, we will use the t = 2 case of a recent result due to Bonamy, Bonnet, Déprés, Esperet, Geniet, Hilaire, Thomassé and Wesolek [1], the following: 1.5 Theorem. For all integers s, t ≥ 0, there exists c > 0 such that if G is sO-free and does not contain K t,t as a subgraph, there is a cycle-hitting set of cardinality at most c log |G|. Clearly 1.3 follows from 1.4 and 1.5, so the main goal of this paper is to prove 1.4. Let us sketch the idea of its proof. Let G be an sO-free graph, and let Z ⊆ V (G) be a cycle-hitting set. Thus G \ Z is a forest F say. It suffices to count the number of induced paths P of G with both ends in Z and with Z ⊆ V (P ); because then we can bound the total number of induced paths P by enumerating all possibilities for V (P ) ∩ Z, and for each one, deleting the vertices in Z \ V (P ), and enumerating all possibilities for the two minimal subpaths of P between an end of P and Z. So we will focus on such paths P , which we call "Z-covering". If we want to bound the number of Z-covering paths, we can delete any vertices with at least three neighbours in Z; and we can arrange that Z is stable, by contracting any edges with both ends in Z. (The number of Z-covering paths does not decrease under such contraction, although it might increase.) We need to be careful with vertices in V (G) \ Z that have two neighbours in Z, and we will treat such vertices separately. For this sketch, let us assume that every vertex in V (G) \ Z has at most one neighbour in Z, that is, (G, Z) is "monic". Let N be the set of vertices in F with a neighbour in Z. We are interested in paths of F that join distinct vertices in N and have no internal vertices in N (we call them "transitions"). For each transition there are two vertices in Z adjacent to the end of the path (its "feet"), or maybe only one such vertex, if it is adjacent to both ends of the path. We will show that, by deleting a bounded number of vertices in F , and deleting the neighbours of a bounded number of vertices in Z, we can arrange that every surviving transition has two feet, and at most constantly many of them have the same two feet. (And it suffices to count the Z-covering paths in the part of the graph that survives.) Next we show (not quite; we will explain later) that we can choose a "normal" set of transitions with cardinality proportional to |N | ("normal" means basically that any two of the transitions that are not anticomplete have a common end). But now look at the multigraph with vertex set N defined by the pairs of feet of the members of the normal set. We can show that this multigraph does not have s vertex-disjoint cycles; because if it does, then G would have s anticomplete cycles (this is why we wanted the set to be normal; this statement is not true for general sets of transitions, but it works for normal sets). There is a theorem of Erdős and Pósa that says that in such a graph, there is a set of vertices of bounded size that meets all cycles; so there exists X ⊆ Z of bounded size such that only |Z| of the transitions in the normal set have no foot in X. The number that do have a foot in X is also only some constant times Z, since only a bounded number have the same pair of feet; so the normal set has cardinality O(|Z|). But its cardinality was proportional to |N |, and this tells us that |N | ≤ O(|Z|), and so there are only O(|Z|) edges between Z, N . Each Z-covering path is determined by the set of edges between Z, N that it uses, and there are only 2 O(|Z|) such subsets, so there are only 2 O(|Z|) Z-covering paths, which is what we wanted to show.
Except we cheated in the above; our claim that we can find a large normal set of transitions is not actually true. What is true is that we can find such a set with size proportional to the number of vertices in N that belong to components of F that have at least two vertices in N . We need a special argument to dispose of components of F that only contain one vertex in N that we do not describe here. We also cheated in assuming that (G, Z) is monic, but the argument we sketched above is the basic idea, and it just needs a few technical patches to make it work.
We recently learned that 1.3 was proved independently in the unpublished paper [4]; however, we are told that there are currently no plans to publish it.
2 Reducing 1.2 to 1.3 In this section we give the beautiful argument of Ngoc Khang Le, that reduces 1.2 to 1.3. Our thanks to Le for allowing us to include this proof.
Let us say an ordered induced path is an induced path with one end distinguished as its first vertex. We will show the following: 2.1 Theorem. Let s, c ≥ 1, and suppose that every sO-free graph G with no cycle of length four has at most |G| c ordered induced paths. Then every sO-free graph G has at most |G| d ordered induced paths, where d = 2 + (s − 1)(c + 6).
Proof. For 1 ≤ r ≤ s, let d r = 2 + (r − 1)(c + 6). We prove a stronger statement, that for 1 ≤ r ≤ s, every rO-free graph G has at most |G| dr ordered induced paths. We proceed by induction on r. If r = 1 then G is a forest, and so has only at most |G| 2 ordered induced paths and the claim is true. So we assume that r ≥ 2 and the claim holds for r − 1. A 4-cycle means a cycle of length four.
Let |G| be some rO-free graph. For each 4-cycle C of G, let X C be the set of all vertices of G that are not in V (C) and have no neighbour in V (C). Let P be an ordered induced path of G, with vertices p 1 -· · · -p k in order, where p 1 is its first vertex. If there is a 4-cycle C with p 1 ∈ X C , then we may choose j ∈ {1, . . . , k} maximum such that there is a 4-cycle C with p 1 , . . . , p j ∈ X C , and we call the path p 1 -· · · -p j the head of P .
Let us first count the number of choices of P that have no head. There are at most |G| 2 choices of P with k ≤ 2, so let us assume k ≥ 3. There are only |G| 2 choices for p 1 and p 2 ; let us fix some choice of p 1 , p 2 , and let Y be the set of vertices different from and nonadjacent to p 1 . Thus p 3 -· · · -p k is an ordered induced path of G[Y ]; but since P has no head, it follows that G[Y ] has no cycle of length four, and so there are only at most |Y | c ≤ (|G| − 2) c choices for p 3 -· · · -p k . Hence altogether there are at most |G| 2 (|G| − 2) c + |G| 2 ≤ |G| c+2 choices of ordered induced paths P with no head. Now let us count the number of choices of P that have a head. If some ordered induced path p 1 -· · · -p j is the head of some ordered induced path P , then there is a 4-cycle C such that p 1 -· · · -p j is a path of G[X C ]. But G[X C ] is (r − 1)O-free, and so, from the inductive hypothesis, it contains at most |X C | d r−1 ≤ (|G| − 1) d r−1 ordered induced paths; and there are at most |G| 4 ≤ (|G| − 1) 4 choices for C. Consequently there are at most (|G| − 1) d r−1 +4 choices for the head p 1 -· · · -p j .
For each choice of head p 1 -· · · -p j , let us count the number of ordered induced paths p 1 -· · · -p k with head p 1 -· · · -p j . There are at most |G| 2 with k ≤ j+2, so let us assume that k ≥ j+3. Again, there are only |G| 2 choices for p j+1 and p j+2 ; having selected them, let us count the possibilities for p j+3 -· · · -p k . Let Z be the set of vertices of G different from and nonadjacent to all of p 1 , . . . , p j+1 . From the maximality of j in the definition of a head, G[Z] has no 4-cycle, and p j+3 -· · · -p k is an ordered induced path of G[Z]. Consequently, having selected p 1 -· · · -p j+2 , there are only (|G| − 2) c choices for p j+3 -· · · -p k with k ≥ j + 3. Hence, having selected p 1 -· · · -p j , there are at most |G| 2 (1 + (|G| − 2) c ) ≤ |G| c+2 choices for p j+1 -· · · -p k . Thus, altogether there are at most (|G| − 1) d r−1 +4 |G| c+2 choices for p 1 -· · · -p k that have a head. Including the paths with no head, we have a total of at most

Some lemmas about forests
The remainder of the paper is devoted to proving 1.4. We will need several lemmas about collections of subtrees in a forest. We begin with 3.1 Theorem. Let F be a forest, let T 1 , . . . , T be trees of F , and let H be the graph with vertex set {1, . . . , } in which i, j are adjacent in H if and only if T i , T j are not anticomplete. If H is bipartite then H is a forest.

and hence included in
Since F is a forest, it follows that Q 1 = Q 2 , and so every vertex of Q 1 not in V (T 1 ∪ · · · ∪ T k ) belongs to both i∈I 1 V (T i ) and to i∈I 2 V (T i ), which is impossible since these two sets are disjoint.
, which is also impossible since T 1 , . . . , T k are anticomplete, and Q 1 has an end in T 1 and an end in T 2 . This proves 3.1.

The next result is related to a result (Theorem 7) of [3]:
3.2 Theorem. Let H be a forest, let (A, B) be a bipartition of H with |A| = |B|, and let in be an integer with 0 ≤ n ≤ |A|. Then there is a stable set X of H with |X| = |A| and with |X ∩ A| = n.
Proof. We may assume that 1 ≤ n ≤ |A| − 1, because otherwise we may take X ∈ {A, B}. We use induction on |A|. Let v ∈ V (H) have degree at most one. From the symmetry we may assume that v ∈ B; let u ∈ A be the neighbour of v, if there is one, and otherwise choose u ∈ A arbitrarily. Let A = A \ {u}, and B = B \ {v}. From the inductive hypothesis, there is a stable set X ⊆ A ∪ B with |X| = |A | and with |X ∩ A | = n. But then X ∪ {v} satisfies the theorem. This proves 3.2.
These are used to prove the following: 3.3 Theorem. Let F be a forest, let k, s ≥ 0 be integers, and for 1 ≤ i ≤ s let F i be a set of s!k paths of F , pairwise anticomplete. Then there exist P i 1 , . . . , P i k ∈ F i for 1 ≤ i ≤ s, such that these sk paths are pairwise anticomplete.
Proof. We use induction on s. For 1 ≤ i ≤ s let A i be the set of all pairs (i, j) with 1 ≤ j ≤ s!k; and let H be the graph with vertex set A 1 ∪ · · · ∪ A s , where (i, j) and (i , j ) are adjacent if the jth member of F i is not anticomplete to the j th member of F i . By 3.1 applied to F 1 and F 2 , for 2 ≤ j ≤ s the subgraph of H induced on A 1 ∪ A i is a forest, with a bipartition (A 1 , A i ); and by 3.2, there is a stable set X i of H with cardinality s!k, containing (s! − (s − 1)!)k vertices of A 1 and (s − 1)!k vertices of A i . The sets A 1 , X 2 , . . . , X s have at least (s − 1)!k vertices in common; and so for 1 ≤ i ≤ s there is a subset F i of F i with cardinality (s − 1)!k, such that all the paths in F 1 are anticomplete to all the paths in F i for 2 ≤ i ≤ s. But then the result follows from the inductive hypothesis applied to the sets F i for 2 ≤ i ≤ s. This proves 3.3.
We will also need: 3.4 Theorem. Let F be a forest, let n ≥ 0 be an integer, and let T 1 , . . . , T k be trees of F .
Proof. The first claim is well-known and easy, and we assume it without proof. For the second, let F be the forest obtained from F by subdividing once each edge e of F (let v e be the new vertex that subdivides e). For 1 ≤ i ≤ k, let T i be the tree of F induced on the union of V (T i ) and the set of all v e such that e ∈ E(F ) has an end in V (T i ). The hypothesis implies that no n of T 1 , . . . , T k are pairwise vertex-disjoint, and so the result follows by applying the first bullet of the theorem to F and T 1 , . . . , T k . This proves 3.4.

Plantations and transitions
Let G be an sO-free graph, and let Z ⊆ V (G) be a cycle-hitting set. We call (G, Z) a plantation.
(So the definition of a plantation depends on s, but we leave this implicit: s will be fixed throughout anyway.) Let F be the forest G \ Z, and let N be the set of vertices in V (G) \ Z with a neighbour in Z. We say (G, Z) is monic if Z is stable and each vertex in N has a unique neighbour in Z. Let us say a transition of (G, Z) is a path of F of length at least one, with both ends in N and with no internal vertex in N . Let P be a transition. If z ∈ Z is adjacent to an end of P , we say z is a foot of P . If (G, Z) is monic, every transition P has one or two feet, and these are the only vertices in Z that have a neighbour in V (P ). We remark that distinct transitions cannot have the same pair of ends, since F is a forest, but they may have the same pair of feet. If P only has one foot, P is a self-transition. We say (G, Z) is selfless if there is no self-transition. Starting with a monic plantation, our first objective is to eliminate self-transitions. We will use two operations to eliminate self-transitions: deletion and explosion. If (G, Z) is a plantation, and v ∈ V (G) \ Z, then (G \ {v}, Z) is a plantation, monic if (G, Z) is monic. Moreover, each transition of (G \ {v}, Z) is a transition of (G, Z), so deleting vertices in V (G) \ Z may be used to eliminate some self-transitions, without introducing new ones. Second, if v ∈ Z, let G be obtained from G by deleting v and all its neighbours in V (G) \ Z. Then again (G , Z \ {z}) is a plantation, monic if (G, Z) is monic, and each of its transitions is a transition of (G, Z). This operation is called exploding v. We will show: 4.1 Theorem. Let (G, Z) be a monic plantation. Then there exist X ⊆ Z and Y ⊆ V (G) \ Z, with |X| < s and |Y | < 2s · s!, such that exploding the vertices in X and deleting the vertices in Y yields a selfless plantation.
Proof. As before, let F = G \ Z, and let N be the set of vertices in V (G) \ Z with a neighbour in Z. Let us say z ∈ Z is k-self-important if there are k self-transitions, pairwise anticomplete and each with foot z.
(1) There do not exist s distinct vertices in Z that are s!-self-important.
Suppose that z 1 , . . . , z s ∈ Z are each s!-self-important, and for 1 ≤ i ≤ s let F i be a set of s! self-transitions, each with foot z and pairwise anticomplete. By 3.3 with k = 1, there exist P i ∈ F i for 1 ≤ i ≤ k, such that P 1 , . . . , P s are pairwise anticomplete. Thus V (P i ) ∪ {z i } induces a cycle C i say, for each i, and since (G, Z) is monic, z i has no neighbour in C j if i, j are distinct, and so C 1 , . . . , C s are pairwise anticomplete, a contradiction. This proves (1).
(2) If there is no s!-self-important vertex in Z, then there exists Y ⊆ V (F ) with |Y | ≤ 2s · s! such that deleting the vertices in Y yields a selfless plantation.
We claim that there do not exist s · s! self-transitions that are pairwise anticomplete; for if there are, then since no s! of them have the same foot, we could choose s of them all with distinct feet (each with only one foot, but all distinct); and again that gives us s pairwise anticomplete cycles, a contradiction. From 3.4, there exists Y ⊆ V (F ) with |Y | < 2s · s! such that every self-transition contains a vertex in Y ; and so deleting the vertices in Y yields a selfless plantation. This proves (2).
But from (1), by exploding at most s − 1 vertices in Z, we can produce a plantation with no s!-self-important vertex; and so the result follows from (2). This proves 4.1.
If P is a path, we denote the interior of P (that is, the set of vertices that have degree two in P ) by P * . Let (G, Z) be a monic selfless plantation. If z, z ∈ Z, the multiplicity of the pair (z, z ) is the number of transitions with feet z, z . Thus the multiplicity of (z, z) is zero, since (G, Z) is selfless. We say that (G, Z) has thickness k if k is the maximum of the multiplicity of pairs of elements of Z. Our next objective is to obtain a plantation with bounded thickness, again by deleting and exploding a bounded number of vertices. We will show the following.

Theorem.
Let (G, Z) be a monic selfless plantation. Then there exists X ⊆ Z with |X| ≤ 6s − 4 such that exploding the vertices in X yields a plantation with thickness at most 2 · s!(2 · s! + s).
Proof. Let N be the set of vertices in V (G) \ Z with a neighbour in Z, and let F be the forest G \ Z. We observe first: (1) Let z, z ∈ Z. If P 1 , P 2 are distinct transitions both with feet z, z , then P * 1 , P * 2 are anticomplete, and either • P 1 , P 2 are anticomplete; or • P 1 , P 2 have a common end and P 1 ∪ P 2 is an induced path; or • V (P 1 ), V (P 2 ) are disjoint and there is a unique edge between them, joining an end of P 1 and an end of P 2 .
Let P i have ends a i , b i for i = 1, 2, where a 1 , a 2 are adjacent to z, and b 1 , b 2 to z . Since P 1 , P 2 are distinct, and they are both paths in the forest F , they do not have the same pairs of ends; and so we may assume that a 1 = a 2 . Let T 1 be the maximal tree of F that contains P 1 and has the property that every vertex in N ∩ V (T 1 ) has degree one in T 1 . Since (G, Z) is selfless, a 1 is the only neighbour of z in V (T 1 ), and so a 2 / ∈ V (T 1 ); and consequently P * 2 ∩ V (T 1 ) = ∅. Similarly, either b 2 / ∈ V (T 1 ) or b 2 = b 1 . The vertices of P * 1 are not leaves of T 1 , and so every vertex of G with a neighbour in P * 1 belongs to V (T 1 ). Consequently P * 1 , P * 2 are anticomplete, and a 2 has no neighbour in P * 1 , and b 2 has no neighbour in P * 1 unless b 1 = b 2 . Similarly a 1 has no neighbour in P * 2 , and b 1 has no neighbour in If V (P 1 ) ∩ V (P 2 ) = ∅, then P 1 , P 2 have a common end, and so b 1 = b 2 ; but then the second outcome holds. Thus we may assume that V (P 1 ), V (P 2 ) are disjoint. If they are anticomplete, then the first outcome holds; and if not, the edge between V (P 1 ), V (P 2 ) is unique (since F is a forest) and the third outcome holds. This proves (1).
Let z, z ∈ Z. If P 1 , . . . , P k are transitions that are pairwise anticomplete, and all with the same feet z, z , we call {P 1 , . . . , P k } a (z, z )-linkage. If P 1 , . . . , P k all have a common end, we call {P 1 , . . . , P k } a (z, z )-star, and the common end of P 1 , . . . , P k is called the centre.
(2) Let z, z ∈ Z, let p, q ≥ 0 be integers, and let (z, z ) have multiplicity at least 2pq. Then there is either a (z, z )-linkage of cardinality p, or a (z, z )-star of cardinality q.
Let P i (i ∈ I) all be distinct transitions, with the same feet z, z , where |I| = 2pq. For each i ∈ I let P i have ends a i , b i , where a i is adjacent to z and b i to z . Every bipartite graph with 2pq edges has a matching of size 2p or a vertex of degree at least q, from König's theorem; and because of this, applied to the bipartite graph with bipartition ({a i : i ∈ I}, {b i : i ∈ I}) and edge set {{a i , b i } : i ∈ I}, we may assume that either a 1 , . . . , a 2p , b 1 , . . . , b 2p are all distinct, or a 1 = · · · = a q . In the second case, {P 1 , . . . , P q } is a (z, z )-star by (1), so we assume the first holds. Let H be the graph with vertex set {1, . . . , 2p}, in which i, j are adjacent if P i , P j are not anticomplete (and hence they are vertex-disjoint and there is a unique edge between them, by (1)). A graph isomorphic to H can be obtained from F by deleting all vertices not in P 1 , . . . , P 2p and contracting the edges of P 1 , . . . , P 2p ; and so H is a forest. Hence it has a stable set of cardinality p, say {1, . . . , p}; and then {P 1 , . . . , P p } is a (z, z )-linkage. This proves (2).
(3) There do not exist distinct z 1 , z 1 , z 2 , z 2 , . . . , z s , z s ∈ Z such that for 1 ≤ i ≤ s there is a (z i , z i )linkage of cardinality 2 · s!.
Suppose such vertices exist, and for 1 ≤ i ≤ s let F i be a set of 2 · s! transitions each with feet z i , z i , and pairwise anticomplete. By 3.3 with k = 2, for 1 ≤ i ≤ s there exist distinct P i , Q i ∈ F i such that P 1 , Q 1 , . . . , P s , Q s are pairwise anticomplete. But then the cycles induced on V (P i ) ∪ V (Q i ) ∪ {z i , z i } are pairwise anticomplete, a contradiction. This proves (3).
Suppose such vertices exist. The centres of the 2s stars are distinct vertices of F , and hence some s of them are pairwise nonadjacent; thus we may assume that S i is a (z i , z i )-star of cardinality 2 · s! + s with centre a i for 1 ≤ i ≤ s, and a 1 , . . . , a s are pairwise nonadjacent. Let i, j ∈ {1, . . . , s} be distinct. Since a i ∈ N , it does not belong to the interior of any member of S j ; and since z 1 , z 1 , z 2 , z 2 , . . . , z s , z s ∈ Z are distinct and (G, Z) is monic, a i is not an end of any member of S j .
Since F is a forest, a i has a neighbour in at most one member of S j . Thus for 1 ≤ i ≤ s, there are at most s − 1 members of S i that contain a neighbour of a j for some j ∈ {1, . . . , s} \ {i}; and so we may choose S i ⊆ S i of cardinality 2 · s! such that no member of S i contains any vertex adjacent to some a j with j = i. For each P ∈ S i , let us say P \ {a i } is its truncation; and let F i be the set of truncations of the members of S i . Thus the members of F i are pairwise anticomplete. By 3.3 with k = 2, there exist distinct Q i , Q i ∈ F i for 1 ≤ i ≤ s, such that Q 1 , Q 1 , . . . , Q s , Q s are pairwise anticomplete. But for 1 and these s cycles are pairwise anticomplete, a contradiction. This proves (4).

Applying the Erdős-Pósa theorem
Let (G, Z) be a plantation; we say a set S of transitions in (G, Z) is normal if • for all P, Q ∈ S, either P, Q are anticomplete or P, Q have a common end; and • for each P ∈ S, there is an edge e of P that does not belong to any other member of S.
We need first: Proof. Let F be the forest G \ Z. By choosing transitions from each component of F separately, we may assume that F is a tree, and |N | ≥ 2. If |N | ≤ 3 the result is clear, so we may assume that |N | ≥ 4. Choose some vertex r ∈ N , call it the root of F , and direct every edge of F towards r. Let R be the set of all transitions of (G, Z) that are directed paths. Thus |R| = |N | − 1, since every vertex in N different from r is the first vertex of a unique directed transition. Moreover, for the same reason, every member of R has an edge that does not belong to any other member of R. We will show that there is a normal subset of R with cardinality at least |R|/3.
Let P be a directed transition, and let Q be the directed path of F from the first vertex of P to the root of F . It follows that P is an initial subpath of Q. We define the height of P to be the number of vertices of Q that belong to N .
(1) Let P 1 , P 2 be directed transitions, with heights h 1 , h 2 where h 1 − h 2 is a multiple of three. Then either P, Q are anticomplete, or they have the same last vertex and therefore the same height.
Let P i have first vertex a i and last vertex b i for i = 1, 2. We may assume that b 1 = b 2 , and so V (P 1 ) ∩ V (P 2 ) = ∅. Hence we may assume that there is an edge of F with one end in V (P 1 ) and the other in V (P 2 ), and we may assume this edge is directed from its end c 1 ∈ V (P 1 ) to its end c 2 ∈ V (P 2 ), by exchanging P 1 , P 2 if necessary. Since c 1 has at most one out-neighbour in F , and c 2 / ∈ V (P 1 ), it follows that c 1 = b 1 . For i = 1, 2, let Q i be the directed path of F from a i to the root of F . It follows that the edge c 1 c 2 belongs to Q 1 , and so Q 1 contains all the vertices of N ∩ V (Q 2 ) except possibly a 2 , and in addition contains a 1 , b 1 . Thus h 1 − h 2 ∈ {1, 2}, contradicting that h 1 − h 2 is a multiple of three. This proves (1).
For i = 1, 2, 3, let S i be the set of all directed transitions with height congruent to i modulo three. By (1), each of these sets is normal, and every directed transition belongs to one of them, so one of them has cardinality at least |R|/3 = (|N | − 1)/3, and hence at least |N |/4, since |N | ≥ 4. This proves 5.1.
We need the following result, a theorem of Erdős and Pósa [2]: 5.2 Theorem. If s ≥ 0 is an integer, there exists φ(s) ≥ 0 with the following property. If G is a multigraph in which no s cycles are pairwise vertex-disjoint, there is a subset X ⊆ V (G) with |X| ≤ φ(s) such that every cycle of G contains a vertex in X.
Erdős and Pósa showed there exist c 1 , c 2 such that c 1 s log s ≤ φ(s) ≤ c 2 s log s for all s, but that does not matter for us. Through the rest of the paper, we use the notation φ(s) with its meaning in 5.2.
We need anticomplete cycles, not just disjoint cycles: but by selecting some transitions carefully, we can make a derived graph, disjoint cycles in which would yield anticomplete cycles in the original graph. We use 5.2 to show the following: 5.3 Theorem. Let (G, Z) be a monic plantation, and let N be the set of vertices in V (G) \ Z with a neighbour in Z. Let S be a normal set of transitions. Then there exists X ⊆ Z with |X| ≤ φ(s) such that at most |Z| members of S have no foot in X.
Proof. Let H be the multigraph with vertex set Z, edge set S, and incidence relation defined as follows: for each P ∈ S, and each z ∈ Z, P is incident with z in H if z is a foot of P . We observe: (1) If C is a cycle of H, there is a cycle C of G with V (C ) ∩ Z ⊆ V (C), and V (C ) \ Z is a subset of the union of the vertex sets of the transitions in E(C).
Let the vertices and edges of C in order be u 1 , P 1 , u 2 , P 2 , . . . , u m , P m , u m+1 = u 1 . Thus u 1 , . . . , u m ∈ Z are distinct, and for 1 ≤ i ≤ m, P i ∈ S is a transition with feet u i , u i+1 , and P 1 , . . . , P m are all distinct. Suppose that m = 1; then H has a loop P 1 , incident with u 1 in H. Let p, q be the ends of the path P 1 in G; then the union of P 1 with the path p-u 1 -q is the desired cycle. Thus we may assume that m ≥ 2.
For 1 ≤ i ≤ m, let P + i be the path between u i , u i+1 with interior V (P i ). Since S is normal, there is an edge e of P 1 that belongs to none of P 2 , . . . , P m . But the union of P + 1 \ {e} and P + 2 ∪ · · · ∪ P + k is a connected graph, containing both ends of e; and so contains a path joining the ends of e. Adding e to this path gives the desired cycle C . This proves (1).
(2) No s cycles of H are vertex-disjoint.
Suppose that C 1 , . . . , C s are s cycles of H that are vertex-disjoint. By (1), there is a cycle C i of G with V (C i ) ∩ Z ⊆ V (C i ), and V (C i ) \ Z is a subset of the union of the vertex sets of the transitions in E(C i ). Since G is sO-free, we may assume that C 1 is not anticomplete to C 2 . Since C 1 , C 2 are vertex-disjoint, and Z is stable, it follows that V (C 1 ) ∩ Z is anticomplete to V (C 2 ) ∩ Z. Let the vertices and edges of C 1 in order be u 1 , P 1 , u 2 , P 2 , . . . , u m , P m , u m+1 = u 1 , and define v 1 , Q 1 , v 2 , Q 2 , . . . , v n , Q n , u n+1 = v 1 similarly for C 2 . For 1 ≤ i ≤ m, two vertices in V (C 1 )∩Z are adjacent to ends of P i , and since (G, Z) is monic, no other vertices in Z have neighbours in V (P i ). Consequently V (C 2 ) ∩ Z is anticomplete to V (C 1 ) and similarly V (C 1 ) ∩ Z is anticomplete to V (C 2 ). Therefore we may assume that P 1 is not anticomplete to Q 1 . Since S is normal, it follows that P 1 , Q 1 have a common end a say; but then the unique neighbour z ∈ Z of a belongs to both V (C 1 ), V (C 2 ), a contradiction. This proves (2).
From 5.2, there exists X ⊆ Z with |X| ≤ φ(s) such that H \ X is a forest, and therefore has at most |Z \ X| − 1 ≤ |Z| edges; and so at most |Z| members of S have no neighbour in X. This proves 5.3.
We use this to show: 5.4 Theorem. Let (G, Z) be a monic selfless plantation, with thickness k, and let N be the set of vertices in V (G) \ Z with a neighbour in Z. Suppose that every component of G \ Z contains at least two vertices in N . Then |N | ≤ 4(kφ(s) + 1)|Z|.
Proof. By 5.1, there is a normal set S of transitions with |S| ≥ |N |/4. From 5.3, there exists X ⊆ Z with |X| ≤ φ(s) such that at most |Z| members of S have no neighbour in X. But since (G, Z) has thickness k, for each x ∈ X and z ∈ Z, there are at most k transitions with feet x, z, and therefore for each x ∈ X, at most k|Z| transitions in S contain a neighbour of x. Since |X| ≤ φ(s), it follows that |S| ≤ kφ(s)|Z| + |Z|. But |S| ≥ |N |/4, and so |N | ≤ 4(kφ(s) + 1)|Z|. This proves 5.4.

Non-monic plantations
The result 5.4 brings us close to what we want, but only for monic plantations. In this section we extend it to more general plantations. Let us say a plantation (G, Z) is dyadic if Z is stable and every vertex in V (G) \ Z has at most two neighbours in Z. We say v ∈ V (G) \ Z is binary if it has two neighbours in Z.
6.1 Theorem. Let (G, Z) be a dyadic plantation. Then there exists X ⊆ Z with |X| ≤ 2φ(s) such that exploding X yields a dyadic plantation with at most 2|Z| binary vertices.
Proof. We claim first: (1) Let Y be a stable set of binary vertices. Then there exists X ⊆ Z with |X| ≤ 2φ(s) such that at most |Z| vertices in Y have no neighbour in X.
Let H be the multigraph with vertex set Z and edge set Y , where y ∈ Y is incident in H with z ∈ Z if y is adjacent to z in G. For every cycle C of H, there is a cycle C of G induced on the vertices of C that are vertices or edges of C; and if C, D are vertex-disjoint cycles of H, the corresponding cycles C , D of G are anticomplete (since Y is stable, Z is stable, and each vertex in Y has exactly two neighbours in Z). Consequently no s cycles of H are pairwise vertex-disjoint, and so by 5.2, there exists X ⊆ Z with |X| ≤ φ(s) such that H \ X is a forest, and so has at most |Z| edges. Hence at most |Z| vertices in Y have no neighbour in X. This proves (1).
Let N 2 be the set of all binary vertices. Since G \ Z is a forest and hence bipartite, it follows that N 2 is the union of two stable sets; and so by (1) applied to each of these sets, we deduce that there exists X ⊆ Z with |X| ≤ 2φ(s) such that at most 2|Z| vertices in N 2 have no neighbour in X. But then X satisfies the theorem. This proves 6.1.
For z ∈ Z, N (z) denotes the set of neighbours of z, and for Z ⊆ Z, N (Z ) denotes the union of the sets N (z)(z ∈ Z ). We deduce: 6.2 Theorem. Let (G, Z) be a dyadic plantation. Then there exist X ⊆ Z with |X| ≤ 2φ(s) + 7s − 4 and Y ⊆ V (G) \ Z with |Y | ≤ 2s · s! and with the following property.
Let X = X 1 ∪ X 2 ∪ X 3 ; we will show that X, Y satisfy the theorem. Certainly and |Y | ≤ 2s · s!. We recall that (G 3 , Z \ X) is obtained from (G, Z) by exploding the vertices in X and deleting the vertices in Y 1 ∪ Y . Let (G , Z \ X) be obtained from (G, Z) by exploding the vertices in X and deleting the vertices in Y . There are only 2|Y 1 | ≤ 4|Z| edges of G between Y 1 and |Z| since |Y 1 | ≤ 2|Z| and each of its members has only two neighbours in Z. Thus there are at most 4(2 · s!(2 · s! + s)φ(s) + 2)|Z| edges of G between V (G ) \ (Y 3 ∪ Z) and Z \ X, that is, between V (F ) \ (N (X) ∪ Y ∪ N 0 ) and Z \ X. Since |Y | ≤ 2s · s!, there are only 4s · s! edges between Y and Z. This proves 6.2.

Counting paths
Let (G, Z) be a plantation. We denote by n(G, Z) the number of induced paths P of G with Z ⊆ V (P ) such that both ends of P belong to Z. Let us call such a path P a Z-covering path. Our objective is to show that n(G, Z) is at most the product of a polynomial in |G| and an exponential in |Z|.
It is enough to work with dyadic plantations, because of the following.
Proof. We prove this by induction on |G|. We observe first: • If some vertex v ∈ V (G) \ Z has more than two neighbours in Z, this vertex does not belong to any Z-covering path, and so we may delete it without changing the number of Z-covering paths. Hence in this case we can win by induction on |G|; so we may assume there is no such vertex.
• If some vertex v ∈ V (G) \ Z has two neighbours z, z ∈ Z, and z, z are adjacent, then again v does not belong to any Z-covering path, and we can delete it and win as before. So we may assume that there is no such vertex.
• If some three vertices in Z are pairwise adjacent, then n(G, Z) = 0, so we may assume there is no such triangle.
If some two vertices z, z ∈ Z are adjacent, then they have no common neighbour, by the assumptions of the second and third bullets above; so contracting zz = e (say) will not make any parallel edges. Let G be the graph obtained from G by contracting e into a new vertex z say, and let Z = (Z \ {z, z }) ∪ {z }. Then it is easy to see that • (G , Z ) is a plantation; • every Z-covering path of (G, Z) contains e; so for every Z-covering path P of (G, Z), there is a Z -covering path P of (G , Z ) with E(P ) = E(P ) ∪ {e}; and • for every Z -covering path P of (G , Z ), there is at most one Z-covering path P of (G, Z) with E(P ) = E(P ) ∪ {e}.
Consequently, in this case n(G, Z) ≤ n(G , Z ) and we can again win by induction on |G|. This proves 7.1.
A multiset is a set together with a positive integer assigned to each member of the set, called its multiplicity. The next result implies that if (G, Z) is dyadic, every Z-covering path P is determined by the set of edges of P with an end in Z. A linear forest is a forest in which every component is a path; and the end-multiset of a linear forest H is the multiset of ends of the components of H, where an end of a component P of H has multiplicity one if E(P ) = ∅, and multiplicity two if E(P ) = ∅.
7.2 Theorem. Let F be a forest, and let X be a multiset of vertices of V (F ). Then there is at most one linear forest that is a subgraph of F with end-multiset equal to X.
Proof. We proceed by induction on |V (F )|. If some vertex in X has multiplicity at least three in X, then there is no linear forest with end-multiset X. If some vertex v in X has multiplicity two in X, then v is a component of every linear forest in F with end-multiset X, so the result follows by deleting v. Hence we may assume that every vertex in X has multiplicity one. Also, from the inductive hypothesis applied to each component, we may assume that F is connected. A leaf of F means a vertex with degree one in F . If some leaf of F is not in X, we may delete it and apply the inductive hypothesis, so we assume all leaves of F belong to X. If F is a path, the result is clear, so we assume F is not a path. Let us say a shoot of F is a path of F with one end a leaf of F , such that all its internal vertices have degree two in F , and maximal with both these properties. Every shoot has length at least one, one of its ends is a leaf of F , and the other has degree at least three in F , from the maximality of the shoot and since F is not a path. (Let us call the end of degree at least three the inner end.) Let F be obtained from F by deleting all vertices of F that belong to shoots and have degree at most two in F . Then F is non-null, and therefore a tree; let u be a vertex of F with degree at most one in F . Since u is not a leaf of F , it is the inner end of some shoot of F ; and therefore it has degree at least three in F ; and so is the inner end of at least two shoots of F , say P, P . But then P ∪ P is a component of every linear forest in F with end-multiset X, and the result follows from the inductive hypothesis by deleting V (P ∪ P ). This proves 7.2.
Proof. By 7.1 we may assume that (G, Z) is dyadic. Let δ G (Z) be the set of edges of G between Z and V (G) \ Z.
(1) For each subset D of δ G (Z), there is at most one Z-covering path P with E(P ) ∩ δ G (Z) = D.
To see this, let X be the set of vertices in V (G) \ Z incident with a vertex in D, made into a multiset by declaring that the multiplicity of a vertex v in X is the number of edges in D incident with v. If P is a Z-covering path with E(P ) ∩ δ G (Z) = D, then P \ Z is a linear forest with end-multiset X, and so P is unique by 7.2. This proves (1).