Log In Sign Up

The size Ramsey number of graphs with bounded treewidth

A graph G is Ramsey for a graph H if every 2-colouring of the edges of G contains a monochromatic copy of H. We consider the following question: if H has bounded treewidth, is there a `sparse' graph G that is Ramsey for H? Two notions of sparsity are considered. Firstly, we show that if the maximum degree and treewidth of H are bounded, then there is a graph G with O(|V(H)|) edges that is Ramsey for H. This was previously only known for the smaller class of graphs H with bounded bandwidth. On the other hand, we prove that the treewidth of a graph G that is Ramsey for H cannot be bounded in terms of the treewidth of H alone. In fact, the latter statement is true even if the treewidth is replaced by the degeneracy and H is a tree.


Product structure of graph classes with bounded treewidth

We show that many graphs with bounded treewidth can be described as subg...

Steepest ascent can be exponential in bounded treewidth problems

We investigate the complexity of local search based on steepest ascent. ...

Separating layered treewidth and row treewidth

Layered treewidth and row treewidth are recently introduced graph parame...

Glauber dynamics for colourings of chordal graphs and graphs of bounded treewidth

The Glauber dynamics on the colourings of a graph is a random process wh...

Treewidth of display graphs: bounds, brambles and applications

Phylogenetic trees and networks are leaf-labelled graphs used to model e...

Approximate Max-Flow Min-Multicut Theorem for Graphs of Bounded Treewidth

We prove an approximate max-multiflow min-multicut theorem for bounded t...

Edge-trewidth: Algorithmic and combinatorial properties

We introduce the graph theoretical parameter of edge treewidth. This par...

1 Introduction

A graph is Ramsey for a graph , denoted by , if every -colouring of the edges of contains a monochromatic copy of . In this paper we are interested in how sparse can be in terms of if . The two measures of sparsity that we consider are the number of edges in and the treewidth of .

The size Ramsey number of a graph , denoted by , is the minimum number of edges in a graph that is Ramsey for . The notion was introduced by Erdős, Faudree, Rousseau and Schelp [18]. Beck [3] proved , answering a question of Erdős [17]. The constant 900 was subsequently improved by Bollobás [7], and by Dudek and Prałat [16]. In these proofs the host graph is random. Alon and Chung [2] provided an explicit construction of a graph with edges that is Ramsey for .

Beck [3] also conjectured that the size Ramsey number of bounded-degree trees is linear in the number of vertices, and noticed that there are trees (for instance, double stars) for which it is quadratic. Friedman and Pippenger [24] proved Beck’s conjecture. The implicit constant was subsequently improved by Ke [31] and by Haxell and Kohayakawa [27]. Finally, Dellamonica Jr [13] proved that the size Ramsey number of a tree is determined by a simple structural parameter up to a constant factor, thus establishing another conjecture of Beck [4].

In the same paper, Beck asked whether all bounded degree graphs have a linear size Ramsey number, but this was disproved by Rödl and Szemerédi [39]. They constructed a family of graphs of maximum degree 3 with superlinear size Ramsey number.

In 1995, Haxell, Kohayakawa and Łuczak showed that cycles have linear size Ramsey number [28]. Conlon [11] asked whether, more generally, the -th power of the path has size Ramsey number at most , where the constant only depends on . Here the -th power of a graph is obtained by adding an edge between every pair of vertices at distance at most in . Conlon’s question was recently answered in the affirmative by Clemens, Jenssen, Kohayakawa, Morrison, Mota, Reding and Roberts [9].

Their result is equivalent to saying that graphs of bounded bandwidth have linear size Ramsey number. We show that the same conclusion holds in the following more general setting. The treewidth of a graph , denoted by , can be defined to be the minimum integer such that is a subgraph of a chordal graph with no -clique. While this definition is not particularly illuminating, the intuition is that the treewidth of measures how ‘tree-like’ is. For example, trees have treewidth 1. Treewidth is of fundamental importance in the graph minor theory of Robertson and Seymour and in algorithmic graph theory; see [6, 26, 38] for surveys on treewidth.

Theorem 1.1.

thm:tw For all integers there exists such that if is a graph of maximum degree and treewidth at most , then

thm:tw implies the above bounds on the size Ramsey number from [9], since powers of paths have bounded treewidth and bounded degree. Powers of complete binary trees are examples of graphs covered by our theorem, but not covered by any previous results in the literature. Note that the assumption of bounded degree in thm:tw cannot be dropped in general since, as mentioned above, there are trees of superlinear size Ramsey number [4]. Furthermore, the lower bound from [39] implies that an additional assumption on the structure of , such as bounded treewidth, is also necessary. We prove thm:tw in Section 3.

We actually prove an off-diagonal strengthening of thm:tw. For graphs and , the size Ramsey number is the minimum number of edges in a graph such that every red/blue-colouring of the edges of contains a red copy of or a blue copy of . We prove that if and both have vertices, bounded degree and bounded treewidth, then . Moreover, we show that there is a host graph that works simultaneously for all such pairs and and that has bounded degree.

Theorem 1.2.

thm:offdiagonal For all integers there exists such that for every integer there is a graph with vertices and maximum degree , such that for all graphs and with vertices, maximum degree and treewidth , every red/blue-colouring of the edges of contains a red copy of or a blue copy of .

The second contribution of this paper fits into the framework of parameter Ramsey numbers: for any monotone graph parameter , one may ask whether can be bounded in terms of . This line of research was conceived in the 1970s by Burr, Erdős and Lovász [8]. The usual Ramsey number and the size Ramsey number (where and respectively) are classical topics. Furthermore, the problem has been studied when is the clique number [20, 35], chromatic number [8, 43], maximum degree [29, 30] and minimum degree [8, 21, 22, 41] (the latter requires the additional assumption that the host graph is minimal with respect to subgraph inclusion, otherwise the problem is trivial).

It is therefore interesting to ask whether can be bounded in terms of . Our next theorem shows that the answer is negative, even when replacing treewidth by the weaker notion of degeneracy. For an integer , a graph is -degenerate if every subgraph of has minimum degree at most . The degeneracy of is the minimum integer such that is -degenerate. It is well known and easily proved that every graph with treewidth is -degenerate, but treewidth cannot be bounded in terms of degeneracy (for example, the 1-subdivision of is 2-degenerate, but has treewidth ).

Theorem 1.3.

thm:d-degenerate For every there is a tree such that if is -degenerate then .

A positive restatement of thm:d-degenerate is that the edges of every -degenerate graph can be 2-coloured with no monochromatic copy of a specific tree (depending on ). This is a significant strengthening of a theorem by Ding, Oporowski, Sanders and Vertigan [15, Theorem 3.9], who proved that the edges of every graph with treewidth at most can be -coloured with no monochromatic copy of a certain tree . We also note that a statement similar to Theorem LABEL:thm:d-degenerate does not hold in the online Ramsey setting, see Section 4 in [12] for more details.

Furthermore, thm:d-degenerate is tight in the following sense. If is a monotone graph class with unbounded degeneracy, then for every tree , there is a graph such that . Indeed, for a given tree , let be a graph in with average degree at least , which exists since is monotone with unbounded degeneracy. In any 2-colouring of , one colour class has average degree at least . Thus there is a monochromatic subgraph of with minimum degree at least , which contains as a subgraph by a folklore greedy algorithm.

2 Tools

Our proof of thm:offdiagonal relies on the following characterisation of graphs with bounded treewidth and bounded degree. The strong product of graphs and , denoted by , is the graph with vertex set , where is adjacent to in if and , or and , or and . Note that is obtained from by replacing each vertex by a clique and replacing each edge by a complete bipartite graph.

Lemma 2.1 ([14, 42]).

Every graph with treewidth and maximum degree is a subgraph of for some tree of maximum degree at most .

Our host graph in the proof of thm:offdiagonal is obtained from a random -regular graph on vertices, for a suitable constant , by taking the third power of , and then replacing every vertex by a clique of bounded size, and by replacing every edge by a complete bipartite graph. To show that has the desired Ramsey properties we will exploit certain expansion properties of .

An -graph is a -regular

-vertex graph in which every eigenvalue except the largest one is at most

in absolute value. The existence of graphs with is shown, for instance, by considering a random -regular graph on vertices, denoted by .

Lemma 2.2 ([23]).

thm:friedman Let be an integer and let

be even. With probability tending to 1 as

, every eigenvalue of except the largest one is at most in absolute value.

For a graph and sets , let be the number of edges with one endpoint in and the other one in . Each edge with both endpoints in

is counted twice. We will use the following well-known estimate on the edge distribution of a graph in terms of its eigenvalues, see, e.g.,

[33] for a proof.

Lemma 2.3 ([33]).

thm:ks:edgedist For every -graph and for all sets ,

The key tool that we use is the following implicit result of Friedman and Pippenger [24], which shows that every -graph with the appropriate parameters is ‘robustly universal’ for bounded-degree trees. Let be the set of all trees with vertices and maximum degree at most . The next lemma follows implicitly from the proofs of Theorems 2 and 3 in [24].

Lemma 2.4 ([24]).

thm:fp:vertex Let and be integers. Let and be integers such that and , and let be an -graph with . Then every induced subgraph of on at least  vertices contains every tree in .

We summarise the above results in the following lemma.

Lemma 2.5.

For every integer , every and for all even there exists such that for all integers with there exists an -vertex -regular graph with the following properties:

  • For every pair of disjoint sets with we have .

  • Every induced subgraph of on at least vertices contains every tree in .


Let be an even integer and . Let be an -graph where , which exists by thm:friedman. Property (2) follows from thm:fp:vertex. Moreover, for all sets with we have , which implies by thm:ks:edgedist, as desired. ∎

We also need the following lemma of Friedman and Pippenger [24]. For a graph and , let be the set of vertices in adjacent to some vertex in .

Lemma 2.6 ([24]).

lem:friedman If is a non-empty graph such that for each with ,

then contains every tree in .

Finally, we need the following standard tools.

Lemma 2.7 (Kövari, Sós, Turán [32]).

Every graph with vertices and no subgraph has at most edges.

Lemma 2.8 (Lovász Local Lemma [19]).

Let be a set of events in a probability space, each with probability at most , and each mutually independent of all except at most other events in . If then with positive probability no event in occurs.

3 Proof of thm:offdiagonal

We start with the following lemma that states that if a graph does not contain all trees in  then its complement contains a complete multipartite subgraph where the parts have ‘large’ size. In fact, our proof shows that if the second assertion does not hold, (i.e. there is no complete multipartite graph with large parts in the complement), then the graph contains a ‘large’ expander as a subgraph. The containment of every tree in then follows from lem:friedman. Statements of similar flavour are also proved and utilised in [36, 37].

Lemma 3.1.

Fix integers and let . In every red/blue-colouring of there is either a blue copy of every tree in , or a red copy of a complete -partite graph in which every part has size at least .


Let be the spanning subgraph of consisting of all the blue edges. We may assume that does not contain every tree in . By lem:friedman, for every non-empty set , there exists such that and . Note that for such and , all the edges of between and must be red. Let and be sets of vertices in such that and , and for :

  • with and , and

  • .

We stop when . Note that are pairwise disjoint. Since all the edges of between and are red, all the edges between distinct and are red. Let . Note that

Thus .

We now combine the parts to reach the required size. Let , where is the minimal index such that . Since , we have the upper bound, . Repeating the same argument starting at , and noting that , we construct , satisfying and such that all edges between any distinct and are red.

Let be a rooted tree with root . For each vertex of , let denote the parent of , where for convenience we let . Let denote the grandparent of ; that is, . We denote the set of children of by , and define to be the set of children and grandchildren of . Let be the distance between and , that is, the number of edges on the path from to . For each integer , let be the set of vertices with . In the above definitions, we may omit the subscript if is clear from the context.

Given a tree rooted at , define another tree rooted at as follows. The vertex set of is defined to be . A pair with is an edge of if or . In particular, .. We call the truncation of . Note that if has maximum degree , then has maximum degree at most .

Let and be integers. Suppose we are given a graph , a vertex partition of , and an edge-colouring . Define an auxiliary colouring of the complete graph with vertex set as follows. For distinct , colour the edge blue if there is a blue between and in , and red otherwise. We call this edge-colouring the -colouring of . This auxiliary coloring also appears in [1], and subsequently in [9].

Lemma 3.2.

lem:chopping Fix integers , , , . Let be a tree in rooted at , and let be the truncation of . Let . Suppose we are given a graph , a vertex partition of , and an edge-colouring such that, for all , all the edges of are present and are blue, and . If there exists a blue copy of in the -colouring of , then there exists a blue copy of in .

Figure 1: (a) tree , (b) truncation , (c) the corresponding bags, (d) embedding of where means

Let be the -colouring of and suppose is an embedding of in the blue subgraph of . Let be the vertices of ordered by their distance from the root in . We will find a blue copy of whose vertices are in for . We warn the reader that in this proof we often use notation to denote the image of , for some subset , under some embedding into , without precisely defining how acts on each vertex of , but rather claiming that such an embedding exists. This is done for brevity, and to keep the proof intuitive.

We define a collection of subsets of as follows. Let and for each , let . We call the bag of the vertex . Observe that the bags are pairwise disjoint, and they partition the entire vertex set . They will help us keep track of the embedding of in .

We will proceed iteratively, starting from the root and following the order of the vertices we fixed earlier. At each step , we will have a partial embedding of in , where is the subtree . Our final embedding will be . At step we will embed in some way; this will define . At step , will be defined as an extension of , and the extension will be defined only on so that the image of the latter ‘links’ back appropriately to the embedding of . Before specifying our embedding, we list the properties that will satisfy:

  • ,

  • ,

  • for every , ,

  • every edge of will be coloured blue.

Note that (P2) implies that at most vertices are embedded in , and every other (with ) will contain at most embedded vertices by (P3). Moreover, (P4) will be satisfied for edges of embedded inside one partition class . To guarantee that those edges of that go between distinct partition classes and are blue, we will make use of the properties of the auxiliary colouring . Finally, we define our iterative embedding scheme from which properties (P1)–(P4) can be easily read out, thus completing the proof.

Step 0: Let and embed into , by picking any vertices in ; this determines . Recall that all edges inside are blue, hence indeed this is a valid embedding of .

Step : Having defined , we now show how to extend it to . Recall that . Let be the grandparent of . Since there is an edge in and since is a blue embedding of in , there is a blue between and . Let be any such copy of . Define on to be a set of any vertices in disjoint from the image of . Define on to be any set of vertices in disjoint from the image of . This is possible since , and the total number of vertices embedded into during the procedure is at most . ∎

The next lemma is a standard application of the Lovász Local Lemma. Given a graph let denote the blowup of where each vertex is replaced by an independent set of size , and each edge is replaced by a complete bipartite graph between and .

Lemma 3.3.

lem:lifting Fix . Let be a graph with maximum degree . Let be a spanning subgraph of such that for every edge there are at least edges in between and . Then .


For each vertex of , independently choose a random vertex in . For each edge of , let be the event that is not an edge of . Since there are at least edges between and , the probability of is at most . Each event is mutually independent of all other events, except for the at most events corresponding to edges incident to or . Since , by Lemma 2.8, the probability that some event occurs is strictly less than 1. Thus, there exist choices for for all , such that is an edge of for every edge of . This yields a subgraph of isomorphic to . ∎

Both thm:tw and thm:offdiagonal are implied by Lemma 2.1 and the following result.

Theorem 3.4.

thm:mainsizezramsey For all integers there exists such that for all there is a graph with vertices and maximum degree , such that for all trees and with vertices and maximum degree , every red/blue-colouring of contains a red copy of or a blue copy of .


Let . Let be the smallest even number larger than . Let be derived from Lemma 2.5 applied with this choice of , and . Let and let be any -vertex -regular graph derived from Lemma 2.5. Set and . Denote the Ramsey number of by . Recall that is a graph on the same vertex set as where is an edge in whenever and are at distance at most three in . Let .

Since is -regular, has maximum degree at most , and has maximum degree at most . Let denote the copy of corresponding to . Let be any edge-colouring of . We will show that it must contain either a red copy of or a blue copy of .

By definition of , for each vertex , contains a monochromatic copy of , say on vertex set . Let be the set of vertices for which induces a blue . By symmetry between and , we may assume that . Let .

Let and let be the -colouring of . Root at an arbitrary vertex. Let be the truncation of . If there is a blue copy of in , then lem:chopping implies that contains a blue copy of , so we are done.

We henceforth assume that there is no blue copy of in . Since has maximum degree at most and there are sets of size at least such that all the edges in between two distinct parts and are red, by Lemma 3.1.

For , define an -matching to be a matching of edges in with one endpoint in and the other in . (Note that we are now considering the original graph not .) We will find a set satisfying , and a collection of -matchings such that each covers . We proceed by induction on . Assume at the end of step we have found a set with and a collection of -matchings , where each covers . At step , let be a maximum matching between and . If consists of fewer than edges, then, by Kőnig’s theorem, the bipartite graph between and has a vertex cover of order at most . But then we can find sets and with and . This contradicts property (1) from Lemma 2.5. Hence covers at least vertices of . We set and proceed. After steps, we reach the desired set , which we call .

For each vertex , for , let be the unique neighbour of in . Since , contains a copy of on some vertex set by property (2) from Lemma 2.5. Next we show that there is a red copy of in contained in the vertex set of and use this copy to find a red copy of in via lem:lifting.

Root at any vertex . For every vertex let if is at even distance from and , otherwise. Note that for any , the sets and are disjoint. Moreover, for every , induces a red clique in because the vertices of are elements of distinct partition classes . If and are adjacent in , then also edges between and are red in since all the vertices of lie in distinct partition classes . So this shows that the vertex set induces a red copy of in . It remains to ‘lift’ this copy to the graph with the colouring . First we observe that every edge in is in fact an edge of . Indeed, for any , and any , are at distance at most two in , hence is an edge in . Now if and are adjacent in , then for any and , the distance between and in is at most , so and are also adjacent in .

Recall that if is an edge of and is red in , then the complete bipartite graph between and in contains no blue copy of . Lemma 2.7 implies that has at most blue edges. Note that . Let and let be the subgraph of consisting of all the red edges of over all . It is now easy to see that and satisfy the assumptions of lem:lifting. Therefore contains a red copy of which finishes the proof. ∎

4 Proof of thm:d-degenerate

Let be the complete -ary tree of height with a root vertex ; that is, every non-leaf vertex has exactly children and every leaf is at distance from . thm:d-degenerate is implied by the following. Recall that, for a rooted tree , denotes the number of edges of the path from the root to in .

Theorem 4.1.

thm:main For every integer , every -degenerate graph is not Ramsey for the tree .


We proceed by induction on . For , is a tree, so fix an arbitrary vertex to be the root of and colour the edges of by their distance to the root modulo 2 (where the distance of an edge to the root is ). There is no monochromatic path of length 3, and in particular no monochromatic copy of .

Now let and set and for brevity. Let be a -degenerate graph. It follows from the definition of degeneracy that has a vertex-ordering , such that each vertex has at most neighbours with . Form an oriented graph by choosing the orientation for an edge if . Then each vertex has in-degree at most .

We now partition into sets and such that both and are -degenerate. Start by assigning to . For , assume that have been assigned to or . Add to if contains at most of the in-neighbours of . Otherwise add it to . Note that in the latter case, contains at most of the in-neighbours of , since has at most in-neighbours in . Clearly, this does not affect the in-degree of in and . Thus, this process produces the desired sets and .

By induction, there is a red/blue-colouring of the edges in not containing a monochromatic copy of . We extend to a red/blue-colouring of in the following way. For an edge assume without loss of generality that it is directed from to in , that is . Then colour red if , and blue if . In other words, the edge ‘inherits’ the colour from its source vertex in .

We claim that there is no monochromatic copy of in this colouring of . Assume the opposite and let be a monochromatic copy of in G. For each vertex in , we denote its copy in by . Without loss of generality we may assume that is red.

Claim 4.2.

If is a non-leaf vertex of that lies in , then there are at least children of in such that for all .


The number of children of the vertex in is . Out of these, the number of children such that is at most . Furthermore, each edge with is coloured blue in , by definition and since . That implies that none of these edges can be part of . It follows that at least neighbours of in are elements of . At most one of these vertices is the parent of , and the claim follows. ∎

Recall that is the root of .

Claim 4.3.

For every vertex at distance at most from in we have that .


Assume that and has distance at most in from . Apply Claim 4.2 iteratively to and all of its descendants that lie in . In iterations (before reaching the leaves of ), we construct a red copy of whose vertices all lie in ; that is, a red copy of . This contradicts the property of . ∎

It follows that all vertices in at distance at most from must lie in , forming a red copy of in , which again contradicts the property of . ∎

After the first preprint of this paper was finished we learned [40] that Maximilian Geißer, Jonathan Rollin and Peter Stumpf independently obtained a proof of thm:d-degenerate. This proof is unpublished, yet short and nice, so we include their argument here.

Second proof of thm:d-degenerate.

Let be a -degenerate graph. We show that is not Ramsey for . Assume without loss of generality that the vertex set of is , for some , and that every has at most neighbours with . Let denote a proper colouring of the vertices of using at most colours. Define an edge colouring by colouring an edge with red if and blue otherwise. A path in is called monotone if its vertices are ordered . Each monochromatic monotone path in has at most vertices, since the colours of its vertices are either increasing or decreasing under . On the other hand each copy of in contains a monotone path on