Planar graphs have bounded nonrepetitive chromatic number

A colouring of a graph is"nonrepetitive"if for every path of even order, the sequence of colours on the first half of the path is different from the sequence of colours on the second half. We show that planar graphs have nonrepetitive colourings with a bounded number of colours, thus proving a conjecture of Alon, Grytczuk, Haluszczak and Riordan (2002). We also generalise this result for graphs of bounded Euler genus, graphs excluding a fixed minor, and graphs excluding a fixed topological minor.


Introduction
A vertex colouring of a graph is nonrepetitive if there is no path for which the first half of the path is assigned the same sequence of colours as the second half. More precisely, a k-colouring of a graph G is a function φ that assigns one of k colours to each vertex of G. A path (v 1 , v 2 , . . . , v 2t ) of even order in G is repetitively coloured by φ if φ (v i ) = φ (v t+i ) for i ∈ {1, . . . ,t}. A colouring φ of G is nonrepetitive if no 1 The Euler genus of the orientable surface with h handles is 2h. The Euler genus of the non-orientable surface with c cross-caps is c. The Euler genus of a graph G is the minimum integer k such that G embeds in a surface of Euler genus k. Of course, a graph is planar if and only if it has Euler genus 0; see [40] for more about graph embeddings in surfaces. A graph X is a minor of a graph G if a graph isomorphic to X can be obtained from a subgraph of G by contracting edges. A graph X is a topological minor of a graph G if a subdivision of X is a subgraph of G. If G contains X as a topological minor, then G contains X as a minor. If G contains no X minor, then G is X-minor-free. If G contains no X topological minor, then G is X-topological-minor-free.

Tools
Undefined terms and notation can be found in [15].

Strongly Nonrepetitive Colourings
A key to all our proofs is to consider a strengthening of nonrepetitive colouring defined below.
For a graph G, a lazy walk in G is a sequence of vertices v 1 , . . . , v k such that for each i ∈ {1, . . . , k}, either v i v i+1 is an edge of G, or v i = v i+1 . A lazy walk can be thought of as a walk in the graph obtained from G by adding a loop at each vertex. For a colouring φ of G, a lazy walk v 1 , .
A colouring φ is strongly nonrepetitive if for every φ -repetitive lazy walk v 1 , . . . , v 2k , there exists i ∈ {1, . . . , k} such that v i = v i+k . Let π * (G) be the minimum number of colours in a strongly nonrepetitive colouring of G. Since a path has no repeated vertices, every strongly nonrepetitive colouring is nonrepetitive, and thus π(G) π * (G) for every graph G.

Layerings
A layering of a graph G is a partition (V 0 ,V 1 , . . . ) of V (G) such that for every edge vw ∈ E(G), if v ∈ V i and w ∈ V j , then |i − j| 1. If r is a vertex in a connected graph G and V i is the set of vertices at distance exactly i from r in G for all i 0, then the layering Consider a layering (V 0 ,V 1 , . . . ) of a graph G. Let H be a connected component of G[V i ∪V i+1 ∪ · · · ], for some i 1. The shadow of H is the set of vertices in V i−1 adjacent to some vertex in H. The layering is shadow-complete if every shadow is a clique. This concept was introduced by Kündgen and Pelsmajer [37] and implicitly by Dujmović, Morin, and Wood [20].
We will need the following result. Lemma 5 ([20,37]). Every BFS-layering of a connected chordal graph is shadow-complete.

Treewidth
A tree-decomposition of a graph G consists of a collection {B x ⊆ V (G) : x ∈ V (T )} of subsets of V (G), called bags, indexed by the vertices of a tree T , and with the following properties: The width of such a tree-decomposition is max{|B x | : x ∈ V (T )} − 1. The treewidth of a graph G is the minimum width of a tree-decomposition of G. Tree-decompositions were introduced by Robertson and Seymour [47]. Treewidth measures how similar a given graph is to a tree, and is particularly important in structural and algorithmic graph theory. Barát and Varjú [5] and Kündgen and Pelsmajer [37] independently proved that graphs of bounded treewidth have bounded nonrepetitive chromatic number. Specifically, Kündgen and Pelsmajer [37] proved that every graph with treewidth k is nonrepetitively 4 k -colourable, which is the best known bound. Theorem 7 below strengthens this result. The proof is almost identical to that of Kündgen and Pelsmajer [37] and depends on the following lemma.
Theorem 7. For every graph G of treewidth at most k 0, we have π * (G) 4 k .
Proof. The proof proceeds by induction on k. If k = 0, then G has no edges, so assigning the same colour to all the vertices gives a strongly nonrepetitive colouring. For the rest of the proof, assume that k 1. Consider a tree-decomposition of G of width at most k. By adding edges if necessary, we may assume that every bag of the tree-decomposition is a clique. Thus, G is connected and chordal, with clique-number at most k + 1.
Let (V 0 ,V 1 , . . .) be a BFS-layering of G. We refer to V i as the set of vertices at depth i. Note that the subgraph G[V i ] of G induced by each layer V i has treewidth at most k − 1. 2 Thus the spanning subgraph H of G induced by all edges whose endpoints have the same depth also has treewidth at most k − 1. By the induction hypothesis, H has a strongly nonrepetitive colouring φ 1 with 4 k−1 colours. The graph P obtained from G by contracting each set V i (which might not induce a connected graph) into a single vertex x i is a path, and thus, by Lemma 6, P has a 4-colouring φ 2 such that every φ 2 -repetitive walk is boring. For each i 0 and each vertex u ∈ V i , set φ (u) := (φ 1 (u), φ 2 (x i )). The colouring φ of G uses at most 4 · 4 k−1 = 4 k colours.
We now prove that φ is strongly nonrepetitive. Let W be a φ -repetitive lazy walk v 1 , . . . , v 2k . Our goal is to prove that v j = v j+k for some j ∈ {1, . . . , k}. Let d be the minimum depth of a vertex in W .
Let W be the sequence of vertices obtained from W by removing all vertices at depth greater than d. We claim that W is a lazy walk. To see this, consider vertices v i , v i+1 , . . . , v i+t of W such that v i and v i+t have depth d but v i+1 , . . . , v i+t−1 all have depth greater than d; thus, v i+1 , . . . , v i+t−1 were removed when constructing W . Then, the vertices v i+1 , . . . , v i+t−1 lie in a connected component of the graph induced by the vertices of depth greater than d, thus it follows that v i and v i+t are adjacent or equal by Lemma 5. This shows that W is a lazy walk in G[V d ].
The projection of W on P is a φ 2 -repetitive lazy walk in P, and is thus boring by Lemma 6. It follows that the vertices v j and v j+k of W have the same depth for every j ∈ {1, . . . , k}. In particular, v j was removed from W if and only if v j+k was. Hence, there are indices 1 φ 2 )-repetitive and in particular W is φ 1 -repetitive. By the definition of φ 1 , there is an index i r such that v i r = v i r +k , which completes the proof.

Strong Products
The strong product of graphs A and B, denoted by A B, is the graph with vertex set V (A) ×V (B), where distinct vertices (v, x), (w, y) ∈ V (A) × V (B) are adjacent if (1) v = w and xy ∈ E(B), or (2) x = y and vw ∈ E(A), or (3) vw ∈ E(A) and xy ∈ E(B). Nonrepetitive colourings of graph products have been studied in [7,36,37,43]. Indeed, Kündgen and Pelsmajer [37] note that their method shows that the strong product of k paths is nonrepetitively 4 k -colourable, which is a precursor to the following results. Lemma 8. Let H be a graph with an -colouring φ 2 such that every φ 2 -repetitive lazy walk is boring. For every graph G, we have π * (G H) π * (G).
Proof. Consider a strongly nonrepetitive colouring φ 1 of G with π * (G) colours. For any two vertices . We claim that this is a strongly nonrepetitive colouring of G H. To see this, consider a φ -repetitive lazy walk W = (u 1 , v 1 ), . . . , (u 2k , v 2k ) in G H. By the definition of the strong product and the definition of φ , the projection W G = u 1 , u 2 , . . . , u 2k of W on G is a φ 1 -repetitive lazy walk in G and the projection W H = v 1 , v 2 , . . . , v 2k of W on H is a φ 2 -repetitive lazy walk in H. By the definition of φ 1 , there is an index i such that u i = u i+k . By the definition of φ 2 , we have v j = v j+k for every j ∈ {1, . . . , k}. In particular, v i = v i+k and (u i , v i ) = (u i+k , v i+k ), which completes the proof.
Applying Lemma 6, we obtain the following immediate corollary.
Corollary 9. For every graph G and every path P, we have π * (G P) 4π * (G).
By taking H = K and a proper -colouring φ 2 of K , we obtain the following corollary of Lemma 8.

Planar Graphs and Graphs of Bounded Genus
The following recent result by Dujmović et al. [19] is a key theorem.
Theorem 11 ([19]). Every planar graph is a subgraph of H P K 3 for some graph H with treewidth at most 3 and some path P.
For graphs of bounded Euler genus, Distel, Hickingbotham, Huynh, and Wood [16] proved the following strengthening of Theorem 11. Theorem 12 ([16]). Every graph G of Euler genus g is a subgraph of H P K max{2g,3} for some graph H with treewidth at most 3 and some path P.

Excluded Minors
Our results for graphs excluding a minor depend on the following version of the graph minor structure theorem of Robertson and Seymour [48]. A tree-decomposition (B x : x ∈ V (T )) of a graph G is r-rich if B x ∩ B y is a clique in G on at most r vertices, for each edge xy ∈ E(T ).
Theorem 13 ([21]). For every graph X, there are integers r 1 and k 1 such that every X-minor-free graph G 0 is a spanning subgraph of a graph G that has an r-rich tree-decomposition such that each bag induces a k-almost-embeddable subgraph of G.
We omit the definition of k-almost embeddable from this paper, since we do not need it. All we need to know is the following theorem of Dujmović et al. [19], where A + B is the complete join of graphs A and B.
(4.1) Dujmović et al. [21] proved the following lemma, which generalises a result of Kündgen and Pelsmajer [37]. Lemma 15 ([21]). Let G be a graph that has an r-rich tree-decomposition such that the subgraph induced by each bag is nonrepetitively c-colourable. Then π(G) c 4 r .
To obtain our result for graphs excluding a fixed topological minor, we use the following version of the structure theorem of Grohe and Marx [25]. Theorem 16 ([21]). For every graph X, there are integers r 1 and k 1 such that every X-topologicalminor-free graph G 0 is a spanning subgraph of a graph G that has an r-rich tree-decomposition such that the subgraph induced by each bag is k-almost-embeddable or has at most k vertices with degree greater than k.
Theorem 17 implies that if a graph has at most k vertices with degree greater than k, then it is nonrepetitively c -colourable for some constant c = k 2 + O(k 5/3 ) + k. Theorem 16 and Lemma 15 and (4.1) with c = max{k + 6k · 4 11(k+1) , c } imply that for every graph X, every X-topological-minor-free graph G satisfies π(G) π * (G) c · 4 r , which implies Theorem 4, since c and r depend only on X.