Upper density of monochromatic infinite paths

We prove that in every $2$-colouring of the edges of $K_\mathbb{N}$ there exists a monochromatic infinite path $P$ such that $V(P)$ has upper density at least ${(12+\sqrt{8})}/{17} \approx 0.87226$ and further show that this is best possible. This settles a problem of Erd\H{o}s and Galvin.


Introduction
Given a complete graph K n , whose edges are coloured in red and blue, what is the longest monochromatic path one can find?Gerencsér and Gyárfás [4] proved that there is always a monochromatic path on (2n + 1)/3 vertices, which is best possible.It is natural to consider a density analogue of this result for 2-colourings of K N .The upper density of a graph G with V (G) ⊆ N is defined as The lower density is defined similarly in terms of the infimum and we speak of the density, whenever lower and upper density coincide.Erdős and Galvin [3] described a 2-colouring of K N in which every monochromatic infinite path has lower density 0 and thus we restrict our attention to upper densities.Rado [9] proved that every r-edge-coloured K N contains r vertex-disjoint monochromatic paths which together cover all vertices.In particular, one of them must have upper density at least 1/r.Erdős and Galvin [3] proved that in every 2-colouring of K N there is a monochromatic path P with d(P) ≥ 2/3.Moreover, they constructed a 2-colouring of K N in which every monochromatic path P has upper density at most 8/9.DeBiasio and McKenney [2] recently improved the lower bound to 3/4 and conjectured the correct value to be 8/9.Progress towards this conjecture was made by Lo, Sanhueza-Matamala and Wang [8], who raised the lower bound to (9 + √ 17)/16 ≈ 0.82019.We prove that the correct value is in fact (12 + √ 8)/17 ≈ 0.87226.
Theorem 1.1.There exists a 2-colouring of the edges of K N such that every monochromatic path has upper density at most (12 + √ 8)/17.
Theorem 1.2.In every 2-colouring of the edges of K N , there exists a monochromatic path of upper density at least (12 + √ 8)/17.Now that we have solved the problem for two colours, it would be very interesting to make any improvement on Rado's lower bound of 1/r for r ≥ 3 colours (see [2,Corollary 3.5] for the best known upper bound).In particular for three colours, the correct value is between 1/3 and 1/2.

Notation
We write N to be the positive integers with the standard ordering.Throughout the paper when referring to a finite graph on n vertices, it is always assumed that the vertex set is [n] = {1, 2, . . ., n} and that it is ordered in the natural way.An infinite path P is a graph with vertex set V (P) = {v i : i ∈ N} and edge set E(P) = {v i v i+1 : i ∈ N}.While paths are defined to be one-way infinite, all of the results mentioned above on upper density of monochromatic infinite paths apply equally well to two-way infinite paths.For a graph G with V (G) ⊆ N and t ∈ N, we define Thus we can express the upper density of G as d(G) = lim sup t→∞ d(G,t).

Upper bound
In this section, we will prove Theorem 1.1.Let q > 1 be a real number, whose exact value will be chosen later on.We start by defining a colouring of the edges of the infinite complete graph.Let A 0 , A 1 , . . .be a partition of N, such that every element of A i precedes every element of A i+1 and |A i | = q i .We colour the edges of G = K N such that every edge uv with u ∈ A i and v ∈ A j is red if min{i, j} is odd, and blue if it is even.A straightforward calculation shows that for q = 2, every monochromatic path P in G satisfies d(P) ≤ 8/9 (see Theorem 1.5 in [3]).We will improve this bound by reordering the vertices of G and then optimizing the value of q.
For convenience, we will say that the vertex v ∈ A i is red if i is odd and blue if i is even.We also denote by B the set of blue vertices and by R be the set of red vertices.Let b i and r i denote the i-th blue  Next, let us define a bijection f : N → V (G), which will serve as a reordering of G. Let r * t denote the t-th red vertex not in M b , and b * t denote the t-th blue vertex not in M r .The function f is defined as follows.We start enumerating blue vertices, in their order, until we reach b * 1 .Then we enumerate red vertices, in their order, until we reach r * 1 .Then we enumerate blue vertices again until we reach b * 2 .We continue enumerating vertices in this way, changing colours whenever we find an r * t or a b * t .(See Figure 1.) Finally, for every H ⊆ G, we define Note that d(H; f ) is the upper density of H in the reordered graph f −1 (G).
Claim 3.1.Let P r and P b be infinite monochromatic red and blue paths in G, respectively.Then We can easily derive Theorem 1.1 from these two claims.Note that the rational function in Claim 3.2 evaluates to (12 + √ 8)/17 at q := √ 2 + 1.It then follows from Claim 3.1 and 3.2, that every monochromatic path P in G satisfies d(P; f ) ≤ (12 + √ 8)/17.Thus we can define the desired colouring of K N , by colouring each edge i j with the colour of the edge f (i) f ( j) in G.
It remains to prove Claim 3.1 and 3.2.The intuition behind Claim 3.1 is that in every monochromatic red path P r there is a red matching with the same vertex set, and that M r has the largest upper density among all red matchings, as it contains every red vertex and has the largest possible upper density of blue vertices.Note that the proof of Claim 3.1 only uses the property that f preserves the order of the vertices inside R and inside B.
Proof of Claim 3.1.We will show d(P r ; f ) ≤ d(M r ; f ).(The other case is analogous.)We prove that, for every positive integer k, we have Assume, for contradiction, that this is not the case and let k be the minimum positive integer for which the inequality does not hold.Every red vertex is saturated by M r , so By the minimality of k, f (k) must be in P r but not in M r , and in particular it must be blue. Let Therefore, since f preserves the order of the vertices inside B, f ([k]) contains the first |A 2i−1 | blue vertices in A 2i , and hence On the other hand, every edge between two blue vertices is blue, so the successor of every blue vertex in P r is red, and in particular there is a red matching between V (P r ) ∩ B and R saturating V (P r ) ∩ B. So by (3.1), the number of red neighbours of Proof of Claim 3.
) has exactly t − 1 vertices outside of M b and at least t − 1 vertices outside of M r .As a consequence, we obtain where Note that r (t) − t and b (t) − t are piecewise constant and non-decreasing.We claim that, in order to compute the right hand side of (3.2), it suffices to consider values of t for which r (t . This is because we can write .
In this expression, the second fraction has a positive, piecewise constant numerator and a positive increasing denominator.Therefore, the local maxima are attained precisely at the values for which the ADVANCES IN COMBINATORICS, 2019:4, 16pp.
numerator increases.We will do the calculations for the case when r (t) − t > r (t − 1) − (t − 1) (the other case is similar), in which we have Plugging this into (3.2) gives the desired result.

Lower bound
This section is dedicated to the proof of Theorem 1.2.A total colouring of a graph G is a colouring of the vertices and edges of G. Due to an argument of Erdős and Galvin, the problem of bounding the upper density of monochromatic paths in edge coloured graphs can be reduced to the problem of bounding the upper density of monochromatic path forests in totally coloured graphs.
Definition 4.1 (Monochromatic path forest).Given a totally coloured graph G, a forest F ⊆ G is said to be a monochromatic path forest if ∆(F) ≤ 2 and there is a colour c such that all leaves, isolated vertices, and edges of F receive colour c.
Lemma 4.2.For every γ > 0 and k ∈ N, there is some n 0 = n 0 (k, γ) so that the following is true for every n ≥ n 0 .For every total 2-colouring of K n , there is an integer t ∈ [k, n] and a monochromatic path forest F with d(F,t) ≥ (12 + √ 8)/17 − γ.
Some standard machinery related to Szemerédi's regularity lemma, adapted to the ordered setting, will allow us to reduce the problem of bounding the upper density of monochromatic path forests to the problem of bounding the upper density of monochromatic simple forests.Definition 4.3 (Monochromatic simple forest).Given a totally coloured graph G, a forest F ⊆ G is said to be a monochromatic simple forest if ∆(F) ≤ 1 and there is a colour c such that all edges and isolated vertices of F receive colour c and at least one endpoint of each edge of F receives colour c.Lemma 4.4.For every γ > 0, there exists k 0 , N ∈ N and α > 0 such that the following holds for every integer k ≥ k 0 .Let G be a totally 2-coloured graph on kN vertices with minimum degree at least (1 − α)kN.Then there exists an integer t ∈ [k/8, kN] and a monochromatic simple forest F such that d(F,t) ≥ (12 + √ 8)/17 − γ.
The heart of the proof is Lemma 4.4, which we shall prove in Section 4.3.But first, in the next two sections, we show how to deduce Theorem 1.2 from Lemmas 4.2 and 4.4.

From path forests to paths
In this section we use Lemma 4.2 to prove Theorem 1.2.Our exposition follows that of Theorem 1.6 in [2].
Proof of Theorem 1.2.Fix a 2-colouring of the edges of K N in red and blue.We define a 2-colouring of the vertices by colouring n ∈ N red if there are infinitely many m ∈ N such that the edge nm is red and blue otherwise.
Case 1. Suppose there are vertices x and y of the same colour, say red, and a finite set S ⊆ N such that there is no red path disjoint from S which connects x to y.
We partition N \ S into sets X,Y, Z, where x ∈ X if and only if there is a red path, disjoint from S, which connects x to x and y ∈ Y if and only if there is a red path disjoint from S which connects y to y .Note that every edge from X ∪Y to Z is blue.Since x and y are coloured red, both X and Y are infinite, and by choice of x and y all edges in the bipartite graph between X and Y ∪ Z are blue.Hence there is a blue path with vertex set X ∪Y ∪ Z = N \ S.
Case 2. Suppose that for every pair of vertices x and y of the same colour c, and every finite set S ⊆ N, there is a path from x to y of colour c which is disjoint from S.
Let γ n be a sequence of positive reals tending to zero, and let a n and k n be increasing sequences of integers such that where n 0 (k, γ) is as in Lemma 4.2.Let N = (A i ) be a partition of N into consecutive intervals with |A n | = a n .By Lemma 4.2 there are monochromatic path forests F n with V (F n ) ⊆ A n and initial segments I n ⊆ A n of length at least k n such that It follows that for any G ⊆ K N containing infinitely many F n 's we have .
By the pigeonhole principle, there are infinitely many F n 's of the same colour, say blue.We will recursively construct a blue path P which contains infinitely many of these F n 's.To see how this is done, suppose we have constructed a finite initial segment p of P. We will assume as an inductive hypothesis that p ends at a blue vertex v. Let n be large enough that min(A n ) is greater than every vertex in p, and F n is blue.Let F n = {P 1 , . . ., P s } for some s ∈ N and let w i , w i be the endpoints of the path P i (note that w i and w i could be equal) for every i ∈ [s].By the case assumption, there is a blue path q 1 connecting v to w 1 , such that q 1 is disjoint from A 1 ∪ • • • ∪ A n .Similarly, there is a blue path q 2 connecting w 1 to w 2 , such that q 2 is disjoint from Continuing in this fashion, we find disjoint blue paths q 3 , . . ., q s such that q i connects w i−1 to w i .Hence, we can extend p to a path p which contains all of the vertices of F n and ends at a blue vertex.both {W j } j∈[ ] and {R, B}.Suppose that V 0 ∪ • • • ∪V m is a partition obtained from Lemma 4.6 applied to G and {W j } j∈ [2 ] with parameters ε, m 0 , 2 and d.We define the (ε, d)-reduced graph G to be the graph with vertex set V (G ) = [m] where i j is an edge of G if and only if if (V i ,V j ) is an ε-regular pair of density at least d in the red subgraph of H or in the blue subgraph of H. Furthermore, we colour i j red if (V i ,V j ) is an ε-regular pair of density at least d in the red subgraph of H, otherwise we colour i j blue.As {V i } i∈[m] refines {R, B}, we can extend this to a total 2-colouring of G by colouring each vertex i red, if V i ⊆ R, and blue otherwise.By relabelling the clusters, we can furthermore assume that i < j if and only if max{V i } < max{V j }.Note that, by choice of {W j } j∈[ ] , any two vertices in V i differ by at most n/ .Moreover, a simple calculation (see [7,Proposition 42]) shows that G has minimum degree at least Given this setup, our strategy to prove Lemma 4.2 goes as follows.First, we apply Lemma 4.4 to obtain t ∈ [m] and a, red say, simple forest F ⊆ G with d(F ,t ) ≈ (12 + √ 8)/17.Next, we turn F into a red path forest F ⊆ G.For every isolated vertex i ∈ V (F ), this is straightforward as V i ⊆ R by the refinement property.For every edge i j ∈ E(F ) with i ∈ R, we apply Lemma 4.5 to obtain a red path that almost spans (V i ,V j ) and has both ends in V i .So the union F of these paths and vertices is indeed a red path forest.Since the vertices in each V i do not differ too much, it will follow that d(F,t) ≈ (12 + √ 8)/17 for t = max{V t }.We obtain M from Lemma 4.6 with input ε, m 0 and 2 .Finally, set n 0 = 16k MN.Now let n ≥ n 0 and suppose that K n is an ordered complete graph on vertex set [n] and with a total 2-colouring in red and blue.We have to show that there is an integer t ∈ [k, n] and a monochromatic path forest Denote the red and blue vertices by R and B, respectively.Let {W j } j∈[ ] refine {R, B} as explained in the above setting.Let {V 0 , . . .,V m } be a partition of [n] with respect to G = K n and {W j } j∈[ ] as detailed in Lemma 4.6 with totally 2-coloured For every edge i j ∈ E(F ) with V i ⊆ R, we apply Lemma 4.5 to choose a path P i j which starts and ends in V i and covers all but at most 2 √ ε|V 1 | vertices of each V i and V j .We denote the isolated vertices of F by I .For each i ∈ I we have V i ⊆ R. Hence the red path forest − γ t as desired.

Upper density of simple forests
In this section we prove Lemma 4.4.For a better overview, we shall define all necessary constants here.Suppose we are given γ > 0 as input and set γ = γ /4.Fix a positive integer N = N(γ) and let 0 < α ≤ γ/(8N).The exact value of N will be determined later on.Let k 0 = 8/γ and fix a positive integer k ≥ k 0 .Consider a totally 2-coloured graph G on n = kN vertices with minimum degree at least Denote the sets of red and blue vertices by R and B, respectively.As it turns out, we will not need the edges inside R and B. So let G be the spanning bipartite subgraph, obtained from G by deleting all edges within R and B. For each red vertex v, let d b (v) be the number of blue edges incident to v in G.To finish, it remains to show Claim 4.12.The proof uses König's theorem and is similar to the proof of Claim 4.8.

Sequences and oscillation
We now present the quite technical proof of Lemma 4.11.We will use the following definition and related lemma in order to describe the oscillation from the diagonal.Definition 4.13 (k-good, u o (k), u e (k)).Let a 1 , . . ., a n be a sequence of non-negative real numbers and let k be a positive real number.We say that the sequence is k-good if there exists an odd i and an even j such that a i ≥ k and a j ≥ k.If the sequence is k-good, we define for all 0 • For every odd i and every j ∈ I i , we have a j ≥ j.
• For every even i and every j ∈ I i , we have a j < j.
Define s i = max |a j − j| : j ∈ I i .Intuitively, this is saying that the values in the odd indexed intervals are "above the diagonal" and the values in the even indexed intervals are "below the diagonal" and s i is the largest gap between sequence values and the "diagonal" in each interval.Since a 1 , . . ., a n has oscillation at least kN, the sequence s 1 , . . ., s r is (kN)-good and thus by Lemma 4.14, there exists t ∈ [k, kN] such that Since the sequence a 1 , a 2 , . . ., a n is non-decreasing, a j − j can decrease by at most one in each step and thus we have . Moreover, we can find bounds on + (t) and − (t) in terms of the s i : • + (t) must lie in the interval I i with the smallest odd index i o such that s • − (t) must lie in the interval I j with the smallest even index i e such that s i e ≥ t.Moreover, it must be at least the t-th element in this interval, therefore Combining the previous two observations with ( • For every even i and every j ∈ I i , we have a j ≥ j.
• For every odd i and every j ∈ I i , we have a j < j.
From this point, the proof is analogous.
Finally, it remains to prove Lemma 4.14.The proof is by contradiction and the main strategy is to find a subsequence with certain properties which force the sequence to become negative eventually.
Proof of Lemma 4.14.Let ρ = 3 + √ 8 − γ and let m := m(ρ) be a positive integer which will be specified later.Suppose that the statement of the lemma is false for N = 6 • 4 m and let a 1 , . . ., a n be an (Nk)-good sequence without t as in the statement.We first show that a i has a long strictly increasing subsequence.Set I = {i : a i ≥ k, a i > a j for all j < i}, denote the elements of I by i 1 ≤ i 2 ≤ • • • ≤ i r and let a j = a i j .Consider any j ∈ [r − 1] and suppose without loss of generality that i j+1 is odd.For δ small enough, this implies u o (a . By assumption we have In particular, this implies a j+1 ≤ (ρ − 2)a j < 4a j .Moreover, we have and thus r ≥ m.Finally, we show that any sequence of reals satisfying (4.5), will eventually become negative, but since a i is non-negative this will be a contradiction.
We It is known that a second order linear recurrence relation whose characteristic polynomial has non-real roots will eventually become negative (see [1]).Indeed, the characteristic polynomial x 2 − (ρ − 1)x + ρ has discriminant ρ 2 − 6ρ + 1 < 0 and so its roots α, ᾱ are non-real.Hence the above recursively defined sequence has the closed form of b i = zα i + z ᾱi = 2Re zα i for some complex number z.By expressing zα i in polar form we can see that b m < 0 for some positive integer m.Note that the calculation of m only depends on ρ.Now let a 1 , . . ., a m be a sequence of non-negative reals satisfying (4.5).We will be done if we can show that a j ≤ a 1 b j for all 1 ≤ j ≤ m; so suppose a s > a 1 b s for some s, and such that {a j } m j=1 and {a 1 b j } m j=1 coincide on the longest initial subsequence.Let p be the minimum value such that a p = a 1 b p .Clearly p > 1. Applying (4.5) to j = p − 1 we see that Let β = (a 1 b p − a p )/a 1 > 0. Now consider the sequence a j where a j = a j for j < p and a j = a j + β a j−p+1 for j ≥ p. Then a p = a 1 b p = a 1 b p .Clearly, this new sequence satisfies (4.5) for every j < p.Furthermore, we have a p+ j = a p+ j + β a j+1 for every j ≥ 0. Hence, the whole sequence satisfies (4.5).We also have a s ≥ a s > a 1 b s = a 1 b s .This contradicts the fact that a j was such a sequence which coincided with a 1 b j on the longest initial subsequence.

Figure 1 :
Figure 1: The colouring for q = 2 and the reordering by f .

2 .
Let r (t) and b (t) denote the position of r * t among the red vertices and of b * t among the blue vertices, respectively.In other words, let r (t) = i where r * t = r i and b (t) = j where b * t = b j (so for example in Figure 1, r (4) = 9 and b

Let a 1
≤ • • • ≤ a |R| denote the degree sequence taken by d b (v).The whole proof of Lemma 4.4 revolves around analysing this sequence.Fix an integer t = t(γ, N, k) and subset R ⊆ R, B ⊆ B. The value of t and nature of R , B will be determined later.The following two observations explain our interest in the sequence a 1 ≤ • • • ≤ a |R| .ADVANCES IN COMBINATORICS, 2019:4, 16pp.
Thus we can apply Lemma 4.4 with input G , k , γ/4 to obtain an integer t ∈ [k /8, k N] and a monochromatic (say red) simple forest F ⊆ G such that Set t = maxV t .We have that V t ⊆ W j for some j ∈ [ ]. Recall that i < j if and only if max{V 1where i o = min{i : a i ≥ t, i odd},u e (t) = a 1 + • • • + a i e −1where i e = min{i : a i ≥ t, i even}.Lemma 4.14.For all γ ∈ R + there exists N ∈ N such that for all k ∈ R + and all (kN)-good sequences, there exists a real number t [k, kN] with First we use Lemma 4.14 to prove Lemma 4.11.Proof of Lemma 4.11.Given γ > 0, let N be obtained from Lemma 4.14.Let k ∈ R + and a 1 , . . ., a n be a sequence with oscillation at least kN.Suppose first that a 1 ≥ 1. Partition [n] into a family of non-empty intervals I 1 , . . ., I r with the following properties: