On the maximum diameter of $k$-colorable graphs

Erd\H{o}s, Pach, Pollack and Tuza [J. Combin. Theory, B 47, (1989), 279-285] conjectured that the diameter of a $K_{2r}$-free connected graph of order $n$ and minimum degree $\delta\geq 2$ is at most $\frac{2(r-1)(3r+2)}{(2r^2-1)}\cdot \frac{n}{\delta} + O(1)$ for every $r\ge 2$, if $\delta$ is a multiple of $(r-1)(3r+2)$. For every $r>1$ and $\delta\ge 2(r-1)$, we create $K_{2r}$-free graphs with minimum degree $\delta$ and diameter $\frac{(6r-5)n}{(2r-1)\delta+2r-3}+O(1)$, which are counterexamples to the conjecture for every $r>1$ and $\delta>2(r-1)(3r+2)(2r-3)$. The rest of the paper proves positive results under a stronger hypothesis, $k$-colorability, instead of being $K_{k+1}$-free. We show that the diameter of connected $k$-colorable graphs with minimum degree $\geq \delta$ and order $n$ is at most $\left(3-\frac{1}{k-1}\right)\frac{n}{\delta}+O(1)$, while for $k=3$, it is at most $\frac{57n}{23\delta}+O\left(1\right)$.


Introduction
The following theorem was discovered several times [1,5,7,8]: Theorem 1. For a fixed minimum degree δ ≥ 2 and n → ∞, for every n-vertex connected graph G, we have diam(G) ≤ 3n δ+1 + O(1). Note that the upper bound is sharp (even for δ-regular graphs [2]), but the constructions have complete subgraphs whose order increases with δ. Erdős, Pach, Pollack, and Tuza [5] conjectured that the upper bound in Theorem 1 can be strengthened for graphs not containing complete subgraphs: Conjecture 1. [5] Let r, δ ≥ 2 be fixed integers and let G be a connected graph of order n and minimum degree δ.
(i) If G is K 2r -free and δ is a multiple of (r − 1)(3r + 2) then, as n → ∞, (ii) If G is K 2r+1 -free and δ is a multiple of 3r − 1, then, as n → ∞, Set k = 2r or k = 2r + 1 according the cases. As connected δ-regular graphs are K δ+1free (apart from K δ+1 itself), we need δ ≥ k (at least) to make improvement on Theorem 1. Furthermore, as the conjectured constants in the bounds are at most 3 − 2 k , Theorem 1 implies that the conjectured inequalities hold trivially, unless δ ≥ 3k 2 − 1. Erdős et al. [5] constructed graph sequences for every r, δ ≥ 2, where δ satisfies the divisibility condition, which meet the upper bounds in Conjecture 1. We show these construction them in Section 2.
Part (ii) of Conjecture 1 for r = 1 was proved in Erdős et al. [5]. Conjecture 1 is included in the book of Fan Chung and Ron Graham [6], which collected Erdős's significant problems in graph theory.
For the rest of the paper, we follow the restrictive approach of Czabarka, Dankelman and Székely [3], and work towards the weaker version of Conjecture 2. In other words, we use a stronger hypothesis (k-colorable instead of K k+1 -free) than what Erdős, Pach, Pollack, and Tuza [5] used. In our work towards upper bounds on the diameter, we only assume minimum degree at least δ, a weaker assumption than minimum degree δ. Section 4 shows that some k-colorable (in particular 3-colorable) connected graphs realizing the maximum diameter among such graphs with given order and minimum degree have some canonical properties. Hence at proving upper bounds on the diameter, we can assume those canonical properties.
Section 5 gives a linear programming duality approach to the maximum diameter problem. With this approach, proving upper bounds to the diameter boils down to solve a packing problem in a graph, such that a certain value is reached by the objective function. If a packing with that value is given, the task of checking whether the packing is feasible is trivial. Using this approach we obtain Theorem 3. Assume k ≥ 3. If G is a connected k-colorable graph of minimum degree at least δ, then This corroborates the conjecture of Erdős et al. in the sense that the maximum diameter among all graphs investigated in Theorem 3 is 3 − Θ 1 k n δ . As a corollary, we arrive at the conclusion of Theorem 2, if the graph is 3-colorable (instead of 4-colorable).
Section 6 applies the inclusion-exclusion (sieve) formula to give upper bounds locally for the number of vertices in graphs with the canonical properties. In Section 7, we define a number of global variables that play a role in the diameter problem, and turn the upper bounds from Section 6 into linear constraints for the global variables. (This approach was motivated by the flag algebra method of Razborov [10].) A linear program of fixed size for the global variables arises, and solving this linear program proves our main positive result: Theorem 4. For every connected 3-colorable graph G of order n and minimum degree at least δ ≥ 1, Note that as 57/23 ≈ 2.47826..., this is an improvement on the 5 2 · n δ + O(1) upper bound for 4-colorable graphs (see Theorem 2 cited from [3]). In Theorem 11, in a restricted case we prove the weaker version of Conjecture 2 for k = 3.
The first and third authors thank Peter Dankelmann for introducing them to the problem and for suggesting the approach of using k-colorability instead of forbidden cliques.

Clump Graphs and the Constructions for Conjecture 1
Let us be given a k-colorable connected graph G of order n and minimum degree at least δ. Let the eccentricity of vertex x realize the eccentricity of the graph G, diam(G).
Take a fixed good k-coloring of G. Let layer L i denote the set of vertices at distance i from x, and a clump in L i be the set of vertices in L i that have the same color. The number of layers is diam(G) + 1.
Let c(i) ∈ {1, 2, . . . , k} denote the number of colors used in layer L i by our fixed coloration. We can assume without loss of generality that in G, two vertices in layer L i , which are differently colored, are joined by an edge in G, and also that two vertices in consecutive layers, which are differently colored, are also joined by an edge in G. We call this assumption saturation. Assuming saturation does not make loss of generality, as adding these edges does not decrease degrees, keeps the fixed good k-coloration, and does not reduce the diameter, while making the graph more structured for our convenience.
From a graph G above, we create a (weighted) clump graph H. Vertices of H correspond to the clumps of G. Two vertices of H are connected by an edge if there were edges between the corresponding clumps in G. H is naturally k-colored and layered based on the coloration and layering of G. With a slight abuse of notation, we denote the layers of H by L i as well. We assign as weights to each vertex of the clump graph the number of vertices in the corresponding clump in G.
Given a (natural number)-weighted graph H, it defines a graph G whose weighted clump graph is H by blowing up vertices of H into as many copies as their weight is. The degrees in G correspond to the sum of the weights of neighbors of the vertices in H, diam(G) = diam(H), and the number of vertices in G is the sum of the weights of all vertices in H.
It is convenient to describe the constructions of Erdős et al. [5] in terms of clump graphs. Any two consecutive layers of the clump graphs will form a complete graph, and, as the order of these complete graphs will be at most 2r − 1 (resp. 2r), the graphs will be (2r − 1)-colorable and K 2r -free (resp. 2r-colorable and K 2r+1 -free).
For the construction for K 2r -free graphs, when δ is a multiple of (r − 1)(3r + 2): Layer L 0 and has one clump, for 1 ≤ i ≤ D, for every odd i, layer L i has r clumps, and for every even i, layer L i has r − 1 clumps The clump in L 0 gets weight 1, and for 3 ≤ i ≤ D − 1, for every odd i, the clumps in layer L i get and for 2 ≤ i ≤ D − 1, for every even i, the clumps in layer L i get of weight (r+1)δ (r−1)(3r+2) . Use weight δ for clumps in L 1 and L D . (In case of r = 1 and even D, use weight δ in the clumps of L D−1 as well.) For the construction for K 2r+1 -free graphs, when δ is a multiple of 3r − 1: Layer L 0 has one clump,1 ≤ i ≤ D, layer L i has r clumps.The clump in L 0 gets weight 1, and clumps in layers L i for 2 ≤ i ≤ D − 1 get weight δ 3r−1 . Use weight δ for clumps in L 1 and L D . The diameters of these constructions obviously meet the upper bounds of Conjecture 1 within a constant term that depends on r.

Counterexamples
We will make use of a clump graph to create a (2r − 1)-colorable (and hence K 2r -free) graphs with minimum degree δ for every r ≥ 2 that refute Conjecture 1 (i).
To make our quantities slightly more palatable in the description, we make the shift s = r − 1, and work with (2s + 1)-colorable graphs for s ≥ 1.
For positive integers p, s and δ ≥ 2s, we will create a weighted clump graph H s,δ,p with p(6s + 1) layers, such that the number of vertices in two consecutive layers is at most 2s + 1, each vertex is adjacent to all other vertices in its own layer and in the layers immediately before and after it. The layer structure of H s,δ,p is basically periodic, up to a tiny modification in the weights. We are going to define a symmetric block C s,δ of 6s + 1 layers, and H s,δ,p is the juxtaposition of p copies of C s,δ , with the modification of increasing by 1 the weight of one vertex in the second layer L 1 and one vertex in the next-to-last layer L p(6s+1)−1 .
Let 0 ≤ d ≤ 2s − 1 be the remainder, when we divide δ with 2s. We define C s,δ by the number of points and their weights in the layers L m for 0 ≤ m ≤ 3s + 1 as detailed below; for 3s + 2 ≤ m ≤ 6s, L m and the weights will be the same as in L 6s−m . In layers L 3i±1 , every weight will be ⌊ δ 2s ⌋ or ⌈ δ 2s ⌉ before adjustment, and in layers L 3i the weights will be 1. More precisely: (A) For each i : 0 ≤ i ≤ s, let the layer L 3i contain a single vertex with weight 1. Figure 1. The repetitive block C 1,δ for the weighted clump graph of the counterexample for 3-colorable/K 4 -free graphs. The letters X, Y, Z give a 3-coloration and the label above the vertex gives the weight of the vertex.
(B) For each i : 0 ≤ i ≤ s − 1, let the layer L 3i+1 contain 2s − i vertices, and assign them the following weights: (a) If d = 0, let the weight of each of these vertices be δ 2s . The adjustment is that for a single vertex in L 1 , whose weight is reduced to δ 2s − 1. (By symmetry, the same adjustment happens in L 6s−1 .) (b) If d ≥ 1, then let min(2s − i, d − 1) vertices have weight ⌈ δ 2s ⌉, and the rest have weight ⌊ δ 2 ⌋. (C) For each i : 0 ≤ i < s − 1, let the layer L 3i+2 contain i + 1 vertices, and assign them the following weights: (a) If d = 0, let the weight of each of them be δ 2s .
2s ⌉, and the rest gets weight ⌊ δ 2s ⌋. (This weight assignment is feasible. Note that L 3i+2 contains i + 1 vertices, and, as d ≤ 2s (D) Let layer L 3s−1 (and symmetrically layer L 3s+1 ) have s vertices each. In these layers, let ⌊ d 2 ⌋ vertices (resp. ⌈ d 2 ⌉ vertices) have weight ⌈ δ 2s ⌉, and the remaining vertices get weight ⌊ δ 2s ⌋. (This weight assignment is feasible. Since d ≤ 2s − 1, ⌈ d 2 ⌉ ≤ s.) Note that min(d − 1, 2s − i) = d − 1 for i ∈ {0, 1, 2}. We use this minimization for i ≤ s − 2. When s ≤ 4, we have s − 2 ≤ 2, consequently there is no need to use the minimization formula for s ≤ 4. Therefore we show C 5,δ in Figure 2, which is the first instance to show all complexities of the counterexamples. The case s = 1, when d ∈ {0, 1}, is even simpler: it is possible to describe the weights without reference to d, see Figure 1 for C 1,δ .
Lemma 5. Let p ≥ 1 and s ≥ 2. The weighted clump graph H s,δ,p has the following properties: The sum of the weights of all vertices is p (2s + 1)δ + 2s − 1 +2. (c) For any vertex y ∈ V (H s,δ,p ), the sum of the weights of its neighbors is at least δ.
The repetitive block C 5,δ of the weighted clump graph of the for 11-colorable/K 12 -free counterexample graphs. The vertices within a layer are connected with a vertical line. Two vertices are connected, if they are in the same layer or in consecutive layers. The numbers in the vertices give a good 11-coloration. Before adjustment, white rectangular vertices have weight 1 and gray vertices have either weight ⌈ δ 10 ⌉ or weight ⌊ δ 10 ⌋; and the numbers, from which dotted arrows point to columns, give the number of vertices in the column that have weight ⌈ δ 10 ⌉. Recall d = δ − 10⌊ δ 10 ⌋. The adjustment: if d = 0, the weight of the two diamond shaped vertices are decreased by 1.
Proof. (a) The statement on the diameter is trivial. As the number of vertices in any two consecutive layer of H s,δ,p is at most 2s + 1, we can (2s + 1)-color H s,δ,p with (2s + 1) colors from left to right greedily.
(b) If W is the sum the weights of vertices in the block C s,δ , then the total sum of weights in H s,δ,p is pW + 2 (the 2 is due to the modification), so we need to show that W = (2s + 1)δ + 2s − 1. Consider 2s ⌉, and the rest have weight ⌊ δ 2s ⌋. So the sum of the weight of the vertices in L 3i−1 ∪ L 3i ∪ L 3i+1 is δ + 1, and so is in 2s ⌉, the rest ⌊ δ 2s ⌋, so the sum of the weights of the vertices in L 3s−1 ∪ L 3s ∪ L 3s+1 is also δ + 1.
So W = 2δ + (2s − 1)(δ + 1) = (2s + 1)δ + 2s − 1, which finishes the proof of (b). For (c): Let y be a vertex of H s,δ,p . Then for some j (0 ≤ j < p), y is in the j-th block C s,δ , and for some m (0 ≤ m ≤ 6s), y is in the layer L m of C s,δ . Because of symmetry, we may assume that 0 ≤ m ≤ 3s. The weights in the layer L 3s−1 are less or equal than the weights in the layer L 3s+1 , but may not be equal, breaking the symmetry, but still handling cases with 0 ≤ m ≤ 3s gives a δ lower bound to the degrees of all vertices of H s,δ,p . In addition, layer (j, m) = (p − 1, 6s − 1), where a modification happened, is symmetric to the layer (j, m) = (0, 1), where identical modification happened. Therefore checking the degrees of the vertices in the first half of the first (and modified) copy of C s,δ in H s,δ,p covers checking the degrees in the second half of the last (and modified) copy of C s,δ in H s,δ,p .
If y ∈ L 3i for some 0 < i ≤ 2s, then y has weight 1 and is adjacent to all vertices but itself in L 3i−1 ∪ L 3i ∪ L 3i+1 . As we have already shown in the proof of part (b), L 3i−1 ∪ L 3i ∪ L 3i+1 has total weight δ + 1, the neighbors of y have total weight δ.
If y ∈ L 0 , then as we showed in the proof of part (b), the total weight of the vertices in L 0 in an unmodified block, which is not the first or the last block, is δ − 1. Either y is adjacent to a vertex of weight 1 outside of its own block, or y is in a modified block where the total weight of L 1 got increased by 1: in both cases the sum of the weights of the neighbors of y is δ.
Assume now that y is a vertex of L 3i+1 ∪ L 3i+2 for some 0 ≤ i ≤ s − 1. Note L 3i+1 ∪ L 3i+2 contains 2s + 1 vertices, 2s of which is the neighbor of y, plus y has a neighbor of weight 1 outside of L 3i+1 ∪ L 3i+2 . We consider two cases for d: If d = 0 and 0 < i ≤ s − 1, then each neighbor of y in L 3i+1 ∪ L 3i+2 has weight δ 2s , so the sum of the weights of the neighbors of y is δ + 1. If d = 0 and i = 0, because of the adjustment, the sum of the weights of the neighbors may decrease by 1, and is still ≥ δ. If This finishes the proof of (c).

Canonical Clump Graphs
We use the letters X, Y, Z to denote three unspecified but different colors from our k colors.
Theorem 7. Assume k ≥ 3. Let G ′ be a k-colorable connected graph of order n, diameter D and minimum degree at least δ. Then there is a k-colored connected graph G of the same parameters, with layers L 0 , . . . , L D , for which the following hold for every i.e., L i contains two vertices of the same color, then i > 0 and Proof. After having proved a part of the Theorem, we will assume that G ′ itself satisfies that property when we complete the proof of the remaining parts. When we create new G ′ graphs, they will still satisfy the already checked parts, in other words, we do not regress to issues that we already resolved. We fix a k-coloration of G ′ , let x 0 be a vertex of eccentricity D in G ′ , and let L 0 , . . . , L D be the distance layering of G ′ . Without loss of generality, we assume that G ′ is saturated.
(i) Select G = G ′ with the same k-coloration, The statement follows from the fact that every vertex in L i+1 has a neighbor in L i ; therefore if color X appears in L i+1 , then L i has at least one color different from X.
If (ii) or (iv) is not satisfied in G ′ , our general strategy is the following: create a new k-coloring of the vertices of G ′ such that the set of the vertices in any layer does not change, vertices of different color will remain differently colored, and in the new coloring the already proven statements still hold. We saturate G ′ in the new coloring (by adding new edges, if needed) to obtain G. Now we complete this strategy for (ii), and postpone the proof of (iv) till the end.
If (ii) fails in G ′ , consider the smallest i, such that the set L i ∪ L i+1 contains fewer than min(k, c(i) + c(i + 1)) colors. By (i), i > 0. Observe that there are different colors X, Y such that X is used in both of L i and L i+1 , while Y is not used in L i ∪ L i+1 . We define a new coloration by switching colors X and Y in all L j for all j ≥ i + 1. This is a good coloration, in which L i ∪ L i+1 uses one more color. Repeated application of this procedure yields a k-coloration where (ii) holds.
The hard part of this theorem is (iii). If c(i) = k, then by (i) i ≥ 2. If c(i + 1) = 1 (i.e., if (iii) fails), then we will move clumps within L i−1 ∪ L i , and recolor of the graph, such that the resulting layered colored graph will have the same required parameters as G ′ , creating no violations of (i), (ii), and reducing the number of violations of (iii) in G ′ .
Let X be the color used on L i+1 . Assume first that L i−2 contains a color different from X. Set S be the set of vertices in L i that is colored X. Move the vertices of S from L i to L i−1 without recoloring them, either merging them into the X-colored clump of L i−1 or creating one, if no such clump existed in L i−1 . Add new edges to achieve saturation. In the resulting graph, the layer indexed by i contains k − 1 colors, reducing the number of violations of (iii) in G ′ , and not creating any violation of (i) or (ii).
Hence in the following we may assume that c(i − 2) = 1 and L i−2 is colored with color X.
Recolor G ′ by switching colors X and Y in L j (0 ≤ j ≤ i − 2) and recover saturation. In the new coloring L i−2 has a color different from X, and we are back to the case we already handled above.
Hence in the rest we may assume that c(i − 2) = c(i + 1) = 1, c(i) = k, c(i − 1) = k − 1, and both L i−2 and L i+1 are colored with X. Let Y, Z be two arbitrary colors different from X, and S be the set of vertices in L i−1 ∪ L i colored with X, Y or Z. We will repartition and recolor (only with colors X, Y, Z) the vertices in S, and possibly recolor L i+1 from color X to color Y . If we recolor L i+1 , then we exchange the colors X and Y in all layers L j for j ≥ i + 2. After these steps, we recover saturation in G ′ . After the changes, in G ′ both L i−1 and L i will contain fewer than k colors, and in the resulting k-colored graph the diameter, the order and minimum degree condition do not change, and no instances violating (i) and (ii) will be created, and we reduced the number of violations of (iii). The difficulty is in maintaining the minimum degree condition in G ′ along these operations. This is what we check next, and the repartitioning and recoloring of the vertices in S will depend on some inequalities between certain clump sizes.
If y is a vertex not in L i−2 ∪L i−1 ∪L i ∪L i+1 or y is not colored with X, Y or Z in the graph before the operations, then the neighborhood set of y does not change. If y is a vertex in L i−2 ∪ L i−1 ∪ L i ∪ L i+1 colored with one of X, Y, Z, then the symmetric difference between the new and old neighborhood set of Y is a subset of S. Therefore we only need to check the minimum degree condition for vertices colored X, Y or Z in L i−2 ∪ L i−1 ∪ L i ∪ L i+1 , and we have to show that after the operations they have at least as many X, Y, Z colored neighbors in L i−2 ∪ L i−1 ∪ L i ∪ L i+1 as before the operations. For any j (1 ≤ j ≤ 4), we will denote by x j , y j and z j the number of vertices in L i+j−3 colored X, Y and Z in G ′ respectively, before the operations. The k ≥ 3 assumption, together with the fact that L i−1 has no color X by (ii), implies that x 1 , y 2 , z 2 , y 3 , z 3 and x 4 are positive.
We have several cases to consider: It suffices to handle the case x 3 ≥ y 3 , as the case x 3 ≥ z 3 can be handled similarly. Let the operations create in L i−1 a clump of size y 2 + y 3 of color Y , and a clump of size z 2 of color Z; in L i a clump of size x 3 of color X and a clump of size z 3 of color Z. Recolor L i+1 with Y , and switch colors X and Y in every L j for j ≥ i + 2, see Fig. 3. Note that, as claimed, |L i−1 ∪ L i | did not change. We verify the minimum degree condition. Let d(W i ) to denote the number of neighbors of a vertex w from the clump colored W in layer L i among the X, Y, Z colored vertices of L i−2 ∪ L i−1 ∪ L i ∪ L i+1 before the operations, and d ′ (W i ) to denote the degree of a vertex w ′ from the clump colored W in layer L i among the X, Y, Z colored vertices of L i−2 ∪ L i−1 ∪ L i ∪ L i+1 after the operations. We have: Figure 3. When x 3 ≥ y 3 , before and after the operations (left and right). 2 x 3 < y 3 and x 3 < z 3 and (x 3 ≥ y 2 or x 3 ≥ z 2 ).
We may assume x 3 ≥ y 2 , as x 3 ≥ z 2 can be handled similarly. Let the operations create in L i−1 a clump of size x 3 of color Y and a clump of size z 2 of color Z; and in L i create a clump of size y 3 + y 2 of color X and a clump z 3 of color Z; recolor L i+1 to color Y and switch colors X and Y in L j for j ≥ i + 2, see Figure 4. Figure 4. The case when x 3 < min(y 3 , z 3 ), and x 3 ≥ y 2 , before and after the operations (left and right).
Note that |L i−1 ∪ L i | did not change. When we verify the minimum degree condition, we use the notation of Case 1 . We have: At this point, we are left with checking the satement for x 3 < min(y 3 , z 3 , y 2 , z 2 ). We split this into two cases. 3 x 3 < min(y 3 , z 3 , y 2 , z 2 ) and z 2 ≥ y 3 .
The operations are shown in Figure 5. When we check the degrees, we use the notation introduced in Case 1 : 4 x 3 < min(y 3 , z 3 , y 2 , z 2 ) and z 2 < y 3 .
First note that the clump colored X in L i can simply be moved into L i−1 keeping the minimum degree condition. After this move on the left side of Figure 6, we see the mirror image of the left side of Figure 5, just the numbers are different. The operations for this case, which are the "mirror image", of the operations in the previous case, is shown in Figure 6. Because of the symmetry, we do not delve into the details. Figure 5. The case x 3 ≤ max(y 2 , y 3 , z 2 , z 3 ) and z 2 ≥ y 3 , before and after the operations. Figure 6. The case x 3 ≤ max(y 2 , y 3 , z 2 , z 3 ) and z 2 < y 3 , before and after the operations.

12ÉVA CZABARKA, INNE SINGGIH, AND LÁSZLÓ SZÉKELY
This concludes the proof of (iii) Finally, to prove part (iv), take the least i, such that |L i | > c(i), but c(i) + max c(i − 1), c(i + 1) < k. As |L 0 | = c(0) = 1, this means i > 0. First we show that we may assume that L i−1 ∪ L i ∪ L i+1 misses some color X. Indeed, if all colors appear in L i−1 ∪ L i ∪ L i+1 , let X be a color not used in L i−1 ∪ L i and Y be a color not used in L i ∪ L i+1 . Create a new coloring of G by switching the colors X, Y in L j for all j ≥ i + 1. After the switch, X is missing from Since |L i | > c(i), there are two vertices x, y in L i that are colored the same. Recolor x with color X. This is a valid coloring, in which L i contains one more color then before. Repeating this procedure produces a coloring, in which |L i | = c i or c(i)+max c(i−1), c(i+ 1) = k. Repeating this procedure recursively for the next least i, we can eliminate one after the other the i's that fail (iv), not creating any instances where the first three statements would fail. Definition 1. We call a k-colored weighted clump graph H canonical, if there is a graph G, whose clump graph is H, and H satisfies the four statements in Theorem 7, i.e., H has D + 1 layers L 0 , L 1 , . . . , L D , where D = diam(H), and for each 1 ≤ i < D we have (i) If |L i | = 1, then L i+1 ≤ k − 1.
(ii) The number of colors used to color the set L i ∪ L i+1 is min k, c(i) + c(i + 1) . In particular, when c(i) + c(i + 1) ≤ k, then L i and L i+1 do not share any color. (iii) If |L i | = k, then i ≥ 2 and |L i+1 | ≥ 2. (iv) If L i has a weight that is bigger than 1, then i > 0 and |L i |+max |L i−1 |, |L i+1 | ≥ k.
Note that (ii) implies that the edges missing between L i and L i+1 form a matching of size max 0, |L i | + |L i+1 | − k . In particular, when |L i ∪ L i+1 | ≤ k then all edges between L i and L i+1 are present.
Corollary 8. In the canonical clump graph of a 3-colored connected graph, the following color sets are possible in two consecutive layers: (1) X Y, X Y Z, Y Z X, XY XZ, XY XY Z, XY Z XY, XY Z XY Z.

Duality
In this Section, k is fixed. Look differently at our diameter problem: assume that the diameter D, and the lower bound δ for the degrees of the graph are fixed (in addition to k), how small n can be, such that connected k-colorable graphs of order n, minimum degree at least δ, and diameter D exist? Let H denote the family of canonical clump graphs of diameter D that arises from connected k-colorable graphs with diameter D and minimum degree at least δ, of unspecified order. Fix an H ∈ H, and consider the following packing problem for H: assign non-negative real dual weights u(y) ≥ 0 to y ∈ V (H), and Theorem 9. Assume that there exist constantsũ > 0, C ≥ 0, such that for all D and δ, and all H ∈ H, in the linear program (2) the optimum is at least Then, for any H ∈ H, we have w(x) ≥ δ.
We face the trivial inequality of the duality of linear programming [4]: namely, for any u and w feasible solutions, by (5) and (2), we have: As the objective function reaches δ y∈V (H) u(y) ≥ũδ(D+1)−Cδ, the theorem follows.
Proof of Theorem 3. Assume k ≥ 3. Consider a k-colorable canonical clump graph H with layers L 0 , . . . , L D . . We are going to find a good packing u on the vertices of H as required to use Theorem 9. The dual weighting u will take at most 2k − 2 different values, and every layer will get the same total dual weight.
This makes the total dual weight of L i exactly k−1 3k−4 , and the dual weight of every v ∈ L i at least 1 3k−4 . If |L i | = k, let X i be the (possibly empty) set of vertices in L i connected to every vertex in Set the dual weight of every v ∈ X i to 1 3k−4 , and the dual weight of every v ∈ Y i to Moreover, as k − |X i | ≥ 2, the dual weight of v ∈ Y i is at least 1 2(3k−4) . Now take vertex x of H. Then x ∈ L j for some 0 ≤ j ≤ D. We are going to check that the neighbors of x have a total dual weight of at most 1.
If |L j | ≤ k − 1, or (|L j | = k and x ∈ X j ), then the weight of x is at least 1 3k−4 . Since the open neighborhood of x is a subset of (L j−1 ∪ L j ∪ L j+1 ) \ {x}, the sum of the weight of its neighbors is at most 3(k−1) 3k−4 − 1 3k−4 = 1. If |L j | = k and x ∈ Y j , then there is a y ∈ L j−1 ∪ L j+1 such that the open neighborhood of x is contained by (L j−1 ∪ L j ∪ L j+1 ) \ {x, y}. As the sum of the weights of x and y is at least 1 3k−4 , the total weight of the neighbors of x at at most 3(k−1) 3k−4 − 1 3k−4 = 1. The total dual weight of the vertices in H is k−1 3k−4 (D + 1). Now Theorem 3 follows from Theorem 9.

Inclusion-Exclusion (Sieve)
Let us be given a 3-colorable saturated connected graph G of order n and minimum degree at least δ, which maximizes the diameter D among such graphs. By Theorem 7, we may assume without loss of generality that the clump graph of G is canonical. Furthermore, Corollary 8 tells what kind of color sets can be in consecutive layers. We often use these facts without explicit reference in the future. Let ℓ i = |L i | denote the cardinality of the i th layer of G. As we are about to prove Theorem 4, we can assume without loss of generality that ℓ i ≤ 3δ. Indeed, if G does not satisfy this inequality, eliminate vertices from clumps with excess above δ, to obtain the graph G ′ on n ′ vertices. G ′ still satisfy the conditions of Theorem 4, and therefore its conclusion with n ′ replacing n. Hence G also satisfies the conclusion of Theorem 4. We are going to build lower bounds for the sum of a couple of consecutive ℓ i 's, from which we derive lower bounds for n. The key tool is the inclusionexclusion formula for the size of the union of the open neighborhoods of some vertices. Note that a vertex in L i can have neighbors only in L i−1 , L i , L i+1 . We denote the open neighborhood of vertex z by N(z). In Subsection 6.1 we do this approach when the vertices are taken from different clumps from the same L i , in Subsection 6.2 we do this for vertices taken from two consective layers. Recall that c(i) denotes the number of clumps in L i . Let S = {i : c(i) = 1} be the set of singles. We use the notation x i , y i , z i to represent vertices in the clumps with color X i , Y i , Z i , respectively. Here X i , Y i , Z i can be any of the colors A, B, C, but they must be different colors. For the ease of computation we introduce L −1 = L D+1 = ∅, so ℓ −1 = ℓ D+1 = 0. 6.1. Sieve for neighborhoods of vertices from one layer.
Case 2. We have 2ℓ i−1 + ℓ i + 2ℓ i+1 ≥ 2δ from the fact that vertices from either color in the i th layer have at least δ neighbors. We prefer to write this as 6.2. Sieve by two consecutive layers. Now we assume 0 ≤ i < D, so i + 1 ≤ D. Case 1. i ∈ S, i + 1 ∈ S. We have (8) ℓ . Apply (6) to L i to obtain 2ℓ i−1 + 2ℓ i+1 ≥ 2δ, apply (7) to L i+1 to obtain 2ℓ i + ℓ i+1 + 2ℓ i+2 ≥ 2δ, and average into (9) ℓ Case 3. i / ∈ S, i + 1 ∈ S. Like in Case 2, we obtain Case 4. i / ∈ S, i + 1 / ∈ S. In this case L i and L i+1 must share a color, and their union must use all 3 colors. We can assume without loss of generality that none of considering the neighborhood of x i+1 , we have considering the neighborhood of y i , we have considering the neighborhood of z i+1 , we have Weighting (11) and (12) with 1/3, (13) and (14) with 2/3, and summing them up, we obtain Adding up (8) The O(δ) error term arises from the fact that certain ℓ i terms, at the front and at the end, do not arise four times, as many times they are counted in 4n.
6.3. Sieve for neighborhoods of vertices from three consecutive layers.
We are going to give lower bounds to using inclusion-exclusion, based on a case analysis of the color content of This boils down to two subcases: Subcase 1.1. L i−1 and L i+1 share at least two colors. We may assume in this case that none of Similarly, take x i−1 ∈ X i−1 , z i ∈ Z i , y i+1 ∈ Y i+1 and use inclusion-exclusion to get Combining the two inequalities above we obtain Subcase 1.2. L i−1 and L i+1 share only one color. We may assume that Apply inclusion-exclusion for the neighborhoods of and doing it again for We obtain (18), like in the previous subcase.
This can be handled like Subcase 1.1 to obtain (18). Case 3. i − 1 ∈ S, i ∈ S, i + 1 ∈ S. We can assume As the clump graph is canonical, c(i + 1) = 2. Hence we can assume L i−1 = X i−1 , L i = Y i , L i+1 = X i+1 ∪ Z i+1 . Applying inclusion-exclusion for the neighborhoods of representative elements, we obtain Combining the last two displayed formulae, we obtain which is even stronger than (18). Case 5. i − 1 / ∈ S, i ∈ S, i + 1 ∈ S. This is a mirror image of Case 4, so we have to obtain This gives 7. Optimization µ α 1 or α 2 Figure 7. Visual representation for some variables denoted with Greek letters. Layers with black filled circles represent the layers whose vertices we count, the empty circles show how many colors are present in the nearby layers. Gray filled circles represent a third color that may or may not be present in the layer.
The inequalities (16) and (20) are key constraints for our linear program. The linear program is in global variables, which are mostly the fraction of vertices of G in certain type of layers, which live in a neighborhood of certain type of layers. The global variables, denoted by Greek letters, will be: Figure 7 illustrate the variables whose definition involves sums. Clearly, all variables are non-negative. We use Corollary 8 on what kind of layers can be consecutive. From the definitions, it easily follows that (21) µ + α 1 + α 2 ≤ 1 and ψ ≤ 2 3 .
We have since (except possibly for i = D) ℓ i 's accounted for in the definition of µ and α i do not contribute to the sum on the left side, ℓ i -s accounted for in α 2 appear once, and all other ℓ i 's appear twice. In addition, Using these observations, simple algebra derives from (16) From 20, using Let D denote the set of layers with 2 colors, with singles on both side. (Their cardinalities added up to α 1 .) Let E denote the set of layers that are adjacent to at least one layer from D. Hence all layers in E are singles. Let F denote the set of remaining layers, i.e. not in D ∪ E. First note that (24) |D| + |E| + |F | = D + 1.
Our standard reference to linear programming is [4]. Note that (27) is identical to the displayed linear program, and that (27) and (29), and (28) and (30) are dual linear programs, respectively, and the Duality Theorem of Linear Programming applies to them. Utilizing the open source online tool [9], we solved (28) with optimum φ = 57 23 attained at ( 57 23 , 0, 13 22 , 17 23 , 6 23 ) T . By duality, 57 23 is the optimum of (30) as well. The polytope defined by the constraints of (28) has a feasible solution x * , for which inequalities in the 3 rd , 4 th and 5 th constraints hold strictly-just modify the optimal solution by reducing φ a bit. We want to show that (27) has a finite optimum, if n is sufficiently large. By the first constraint in (27), φ ≤ 3 for n sufficiently large. Our only concern is whether (27) has a feasible solution at all, as negative error terms might eliminate it. Clearly x * is a feasible solution, if n is sufficiently large. By the Duality Theorem, (29) has a finite minimum value, which is equal to the maximum value for (27). As the polytopes of (29) and (30) are the same, this finite minimum is achieved in one of the finitely many vertices of this polytope, say y (1) , ..., y (m) , as these linear programs only differ in their objective functions. Now we have max x 1 in (27) = min On the other hand, We concluded the proof of Theorem 4. The linear programming arguments above should be well-known, but we were unable to find a reference.
The following theorem proves the weaker version of Conjecture 2 for k = 3, in a restricted case of no single layers: Theorem 11. For every connected 3-colorable graph G of order n and minimum degree at least δ ≥ 1, such that in the canonical clump graph of G no layer L i is a single for 0 < i < D, we have diam(G) ≤ 7n 3δ + O(1).
Proof. If there are no single color layers besides L 0 and L D , in (16) the second and third sums are zero, and the first is upper bounded by 2 3 n. This yields 14n/3 ≥ 2Dδ + O(δ). An alternative proof of the theorem is from 20, in which s = 0 and the sum is O(δ) in this case.
The theorem also holds if the number of single layers is bounded as n → ∞. We are not aware of constructions getting close to this upper bound without single layers.