1 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 colouring of a graph is a function that assigns one of colours to each vertex of . A path of even order in is repetitively coloured by if for . A colouring of is nonrepetitive if no path of is repetitively coloured by . Observe that a nonrepetitive colouring is proper, in the sense that adjacent vertices are coloured differently. The nonrepetitive chromatic number is the minimum integer such that admits a nonrepetitive colouring.
The classical result in this area is by Thue [48], who proved in 1906 that every path is nonrepetitively 3colourable. Starting with the seminal work of Alon et al. [3], nonrepetitive colourings of general graphs have recently been widely studied; see the surveys [27, 28, 11, 26] and other references [23, 32, 12, 33, 27, 28, 17, 42, 16, 2, 7, 5, 20, 10, 30, 9, 13, 40, 36, 21, 41, 6, 25, 3, 31, 38, 4, 37, 8, 22, 29, 49, 51, 35, 14, 1, 43, 44, 47, 34, 26, 50].
Several graph classes are known to have bounded nonrepetitive chromatic number. In particular, cycles are nonrepetitively 3colourable (except for a finite number of exceptions) [12], trees are nonrepetitively 4colourable [9, 36], outerplanar graphs are nonrepetitively colourable [36, 5], and more generally, every graph with treewidth is nonrepetitively colourable [36]. Graphs with maximum degree are nonrepetitively colourable [3, 27, 32, 17], and graphs excluding a fixed immersion have bounded nonrepetitive chromatic number [50].
It is widely recognised that the most important open problem in the field of nonrepetitive graph colouring is whether planar graphs have bounded nonrepetitive chromatic number. It was first asked by Alon et al. [3]. The best known lower bound is , due to Ochem (see [16]). The best known upper bound is where is the number of vertices, due to Dujmović, Frati, Joret, and Wood [16]. Note that several works have studied colourings of planar graphs in which only facial paths are required to be nonrepetitively coloured [33, 43, 44, 4, 47, 34, 8].
This paper proves that planar graphs have bounded nonrepetitive chromatic number.
Theorem 1.
Every planar graph satisfies .
We generalise this result for graphs of bounded Euler genus, for graphs excluding any fixed minor, and for graphs excluding any fixed topological minor.^{1}^{1}1The Euler genus of the orientable surface with handles is . The Euler genus of the nonorientable surface with crosscaps is . The Euler genus of a graph is the minimum integer such that embeds in a surface of Euler genus . Of course, a graph is planar if and only if it has Euler genus 0; see [39] for more about graph embeddings in surfaces. A graph is a minor of a graph if a graph isomorphic to can be obtained from a subgraph of by contracting edges. A graph is a topological minor of a graph if a subdivision of is a subgraph of . If contains as a topological minor, then contains as a minor. If contains no minor, then is minorfree. If contains no topological minor, then is topologicalminorfree.
Theorem 2.
Every graph with Euler genus satisfies .
Theorem 3.
For every graph , there is an integer such that every minorfree graph satisfies .
Theorem 4.
For every graph , there is a constant such that every topologicalminorfree graph satisfies .
The proofs of Theorems 2 and 1 are given in Section 3, and the proofs of Theorems 4 and 3 are given in Section 4. Before that in Section 2 we introduce the tools used in our proofs, namely socalled strongly nonrepetitive colourings, treedecompositions and treewidth, and strong products. With these tools in hand, the above theorems quickly follow from recent results of Dujmović et al. [18] that show that planar graphs and other graph classes are subgraphs of certain strong products.
2 Tools
Undefined terms and notation can be found in [15].
2.1 Strongly Nonrepetitive Colourings
A key to all our proofs is to consider a strengthening of nonrepetitive colouring defined below.
For a graph , a lazy walk in is a sequence of vertices such that for each , either is an edge of , or . A lazy walk can be thought of as a walk in the graph obtained from by adding a loop at each vertex. For a colouring of , a lazy walk is repetitive if for each .
A colouring is strongly nonrepetitive if for every repetitive lazy walk , there exists such that . Let be the minimum number of colours in a strongly nonrepetitive colouring of . Since a path has no repeated vertices, every strongly nonrepetitive colouring is nonrepetitive, and thus for every graph .
2.2 Layerings
A layering of a graph is a partition of such that for every edge , if and , then . If is a vertex in a connected graph and is the set of vertices at distance exactly from in for all , then the layering is called a BFS layering of .
Consider a layering of a graph . Let be a connected component of , for some . The shadow of is the set of vertices in adjacent to some vertex in . The layering is shadowcomplete if every shadow is a clique. This concept was introduced by Kündgen and Pelsmajer [36] and implicitly by Dujmović et al. [19].
We will need the following result.
2.3 Treewidth
A treedecomposition of a graph consists of a collection of subsets of , called bags, indexed by the vertices of a tree , and with the following properties:

for every vertex of , the set induces a nonempty (connected) subtree of , and

for every edge of , there is a vertex for which .
The width of such a treedecomposition is . The treewidth of a graph is the minimum width of a treedecomposition of . Treedecompositions were introduced by Robertson and Seymour [45]. 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 [36] independently proved that graphs of bounded treewidth have bounded nonrepetitive chromatic number. Specifically, Kündgen and Pelsmajer [36] proved that every graph with treewidth is nonrepetitively 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 [36] and depends on the following lemma. A lazy walk is boring if for each .
Lemma 6 ([36]).
Every path has a colouring such that every repetitive lazy walk is boring.
Theorem 7.
For every graph of treewidth at most , we have .
Proof.
The proof proceeds by induction on . If , then 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 . By adding edges if necessary, we may assume that is connected and chordal, with cliquenumber at most .
Let be a BFSlayering of . We refer to as the set of vertices at depth . Note that the subgraph of induced by each layer has treewidth at most , and thus the spanning subgraph of induced by all edges whose endpoints have the same depth also has treewidth at most . By the induction hypothesis, has a strongly nonrepetitive colouring with colours. The graph obtained from by contracting each set (which might not induce a connected graph) into a single vertex is a path, and thus, by Lemma 6, has a colouring such that every repetitive walk is boring. For each and each vertex , set . The colouring of uses at most colours.
We now prove that is strongly nonrepetitive. Let be a repetitive lazy walk . Our goal is to prove that for some . Let be the minimum depth of a vertex in .
Let be the sequence of vertices obtained from by removing all vertices at depth greater than . We claim that is a lazy walk. To see this, consider vertices of such that and have depth but all have depth greater than ; thus, were removed when constructing . Then, the vertices lie in a connected component of the graph induced by the vertices of depth greater than , thus it follows that and are adjacent or equal by Lemma 5. This shows that is a lazy walk in .
The projection of on is a repetitive lazy walk in , and is thus boring by Lemma 6. It follows that the vertices and of have the same depth for every . In particular, was removed from if and only if was. Hence, there are indices such that . Since is repetitive, it follows that is also repetitive and in particular is repetitive. By the definition of , there is an index such that , which completes the proof. ∎
2.4 Strong Products
The strong product of graphs and , denoted by , is the graph with vertex set , where distinct vertices are adjacent if (1) and , or (2) and , or (3) and . Nonrepetitive colourings of graph products have been studied in [36, 35, 7]. Indeed, Kündgen and Pelsmajer [36] note that their method shows that the strong product of paths is nonrepetitively colourable, which is a precursor to the following results.
Lemma 8.
Let be a graph with an colouring such that every repetitive lazy walk is boring. For every graph , we have .
Proof.
Consider a strongly nonrepetitive colouring of with colours. For any two vertices and , we define the colour of the vertex by . We claim that this is a strongly nonrepetitive colouring of . To see this, consider a repetitive lazy walk in . By the definition of the strong product and the definition of , the projection of on is a repetitive lazy walk in and the projection of on is a repetitive lazy walk in . By the definition of , there is an index such that . By the definition of , we have for every . In particular, and , which completes the proof. ∎
Applying Lemma 6, we obtain the following immediate corollary.
Corollary 9.
For every graph and every path , we have .
By taking and a proper colouring of , we also obtain the following direct corollary to Lemma 8.
Corollary 10.
For every graph and every integer , we have .
3 Planar Graphs and Graphs of Bounded Genus
The following recent result by Dujmović et al. [18] is a key theorem.
Theorem 11 ([18]).
Every planar graph is a subgraph of for some graph with treewidth at most and some path .
For graphs of bounded Euler genus, Dujmović et al. [18] proved the following strengthening of Theorem 11.
Theorem 12 ([18]).
Every graph of Euler genus is a subgraph of for some graph with treewidth at most and some path .
4 Excluded Minors
Our results for graphs excluding a minor depend on the following graph minor structure theorem of Robertson and Seymour [46].
Theorem 13 ([46]).
For every graph , there is an integer such that every minorfree graph has a treedecomposition in which each torso is almostembeddable.
We omit the definition of almost embeddable from this paper, since we do not need it. All we need to know is the following theorem of Dujmović et al. [18].
Theorem 14 ([18]).
Every almost embeddable graph is a subgraph of for some graph with treewidth at most .
Theorems 7, 9 and 14 imply that for every almost embeddable graph ,
(1) 
Dujmović et al. [20] proved the following lemma, which generalises a result of Kündgen and Pelsmajer [36]. A treedecomposition of a graph is rich if is a clique in on at most vertices, for each edge .
Lemma 15 ([20]).
Let be a graph that has an rich tree decomposition such that the subgraph induced by each bag is nonrepetitively colourable. Then .
Rich treedecompositions are implicit in the graph minor structure theorem, as demonstrated by the following lemma, which is little more than a restatement of the graph minor structure theorem.
Lemma 16 ([20]).
For every graph , there are constants and such that every minorfree graph is a spanning subgraph of a graph that has an rich treedecomposition such that each bag induces an almostembeddable subgraph of .
Lemmas 15 and 16 and (1) with imply that for every graph and every minorfree graph ,
which implies Theorem 3 since and depend only on .
To obtain our result for graphs excluding a fixed topological minor, we use the following structure theorem due to Grohe and Marx [24].
Theorem 17 ([24]).
For every graph , there is a constant such that every graph excluding as a topological minor has a tree decomposition such that each torso is almostembeddable or has at most vertices with degree greater than .
Alon et al. [3] proved that graphs with maximum degree are nonrepetitively colourable. The best known bound is due to Dujmović et al. [17].
Theorem 18 ([17]).
Every graph with maximum degree is nonrepetitively colourable.
Theorem 17 leads to the next lemma.
Lemma 19 ([20]).
For every graph , there are integers and such that every topologicalminorfree graph is a spanning subgraph of a graph that has an rich tree decomposition such that the subgraph induced by each bag is almostembeddable or has at most vertices with degree greater than .
Theorem 18 implies that if a graph has at most vertices with degree greater than , then it is nonrepetitively colourable. Lemmas 15 and 19 and (1) with imply that for every graph , every topologicalminorfree graph satisfies , which implies Theorem 4, since and depend only on .
Acknowledgements
This research was completed at the Workshop on Graph Theory held at Bellairs Research Institute in April 2019. Thanks to the other workshop participants for creating a productive working atmosphere.
References
 Alon and Grytczuk [2005] Noga Alon and Jarosław Grytczuk. Nonrepetitive colorings of graphs. Electronic Notes in Discrete Math., 22:353–355, 2005. doi: 10.1016/j.endm.2005.06.077.
 Alon and Grytczuk [2008] Noga Alon and Jarosław Grytczuk. Breaking the rhythm on graphs. Discrete Math., 308:1375–1380, 2008. doi: 10.1016/j.disc.2007.07.063. MR: 2392054.
 Alon et al. [2002] Noga Alon, Jarosław Grytczuk, Mariusz Hałuszczak, and Oliver Riordan. Nonrepetitive colorings of graphs. Random Structures Algorithms, 21(34):336–346, 2002. doi: 10.1002/rsa.10057. MR: 1945373.
 Barát and Czap [2013] János Barát and Július Czap. Facial nonrepetitive vertex coloring of plane graphs. J. Graph Theory, 74(1):115–121, 2013. doi: 10.1002/jgt.21695.
 Barát and Varjú [2007] János Barát and Péter P. Varjú. On squarefree vertex colorings of graphs. Studia Sci. Math. Hungar., 44(3):411–422, 2007. doi: 10.1556/SScMath.2007.1029. MR: 2361685.
 Barát and Varjú [2008] János Barát and Péter P. Varjú. On squarefree edge colorings of graphs. Ars Combin., 87:377–383, 2008. MR: 2414029.
 Barát and Wood [2008] János Barát and David R. Wood. Notes on nonrepetitive graph colouring. Electron. J. Combin., 15:R99, 2008. http://www.combinatorics.org/v15i1r99. MR: 2426162.
 Bose et al. [2017] Prosenjit Bose, Vida Dujmović, Pat Morin, and Lucas RiouxMaldague. New bounds for facial nonrepetitive colouring. Graphs Combin., 33(4):817–832, 2017. doi: 10.1007/s0037301718161.
 Brešar et al. [2007] Boštjan Brešar, Jarosław Grytczuk, Sandi Klavžar, Stanisław Niwczyk, and Iztok Peterin. Nonrepetitive colorings of trees. Discrete Math., 307(2):163–172, 2007. doi: 10.1016/j.disc.2006.06.017. MR: 2285186.
 Brešar and Klavžar [2004] Boštjan Brešar and Sandi Klavžar. Squarefree colorings of graphs. Ars Combin., 70:3–13, 2004. MR: 2023057.
 Cheilaris et al. [2010] Panagiotis Cheilaris, Ernst Specker, and Stathis Zachos. Neochromatica. Comment. Math. Univ. Carolin., 51(3):469–480, 2010. http://www.dml.cz/dmlcz/140723. MR: 2741880.
 Currie [2002] James D. Currie. There are ternary circular squarefree words of length for . Electron. J. Combin., 9(1):#N10, 2002. http://www.combinatorics.org/v9i1n10. MR: 1936865.
 Currie [2005] James D. Currie. Pattern avoidance: themes and variations. Theoret. Comput. Sci., 339(1):7–18, 2005. doi: 10.1016/j.tcs.2005.01.004. MR: 2142070.
 Czerwiński and Grytczuk [2007] Sebastian Czerwiński and Jarosław Grytczuk. Nonrepetitive colorings of graphs. Electronic Notes in Discrete Math., 28:453–459, 2007. doi: 10.1016/j.endm.2007.01.063. MR: 2324051.
 Diestel [2010] Reinhard Diestel. Graph theory, vol. 173 of Graduate Texts in Mathematics. Springer, 4th edn., 2010. http://diestelgraphtheory.com/. MR: 2744811.
 Dujmović et al. [2013] Vida Dujmović, Fabrizio Frati, Gwenaël Joret, and David R. Wood. Nonrepetitive colourings of planar graphs with colours. Electron. J. Combin., 20(1):#P51, 2013. http://www.combinatorics.org/v20i1p51.
 Dujmović et al. [2016] Vida Dujmović, Gwenaël Joret, Jakub Kozik, and David R. Wood. Nonrepetitive colouring via entropy compression. Combinatorica, 36(6):661–686, 2016. doi: 10.1007/s0049301530706.
 Dujmović et al. [2019] Vida Dujmović, Gwenaël Joret, Piotr Micek, Pat Morin, Torsten Ueckerdt, and David R. Wood. Planar graphs have bounded queuenumber, 2019. arXiv: 1904.04791.
 Dujmović et al. [2005] Vida Dujmović, Pat Morin, and David R. Wood. Layout of graphs with bounded treewidth. SIAM J. Comput., 34(3):553–579, 2005. doi: 10.1137/S0097539702416141. MR: 2137079.
 Dujmović et al. [2017] Vida Dujmović, Pat Morin, and David R. Wood. Layered separators in minorclosed graph classes with applications. J. Combin. Theory Ser. B, 127:111–147, 2017. doi: 10.1016/j.jctb.2017.05.006. MR: 3704658.
 Fiorenzi et al. [2011] Francesca Fiorenzi, Pascal Ochem, Patrice Ossona de Mendez, and Xuding Zhu. Thue choosability of trees. Discrete Applied Math., 159(17):2045–2049, 2011. doi: 10.1016/j.dam.2011.07.017. MR: 2832329.
 Gągol et al. [2016] Adam Gągol, Gwenaël Joret, Jakub Kozik, and Piotr Micek. Pathwidth and nonrepetitive list coloring. Electron. J. Comb., 23(4):P4.40, 2016. http://www.combinatorics.org/v23i4p40.
 Gonçalves et al. [2014] Daniel Gonçalves, Mickaël Montassier, and Alexandre Pinlou. Entropy compression method applied to graph colorings, 2014. arXiv: 1406.4380.
 Grohe and Marx [2015] Martin Grohe and Dániel Marx. Structure theorem and isomorphism test for graphs with excluded topological subgraphs. SIAM J. Comput., 44(1):114–159, 2015. doi: 10.1137/120892234. MR: 3313569.
 Grytczuk [2002] Jarosław Grytczuk. Thuelike sequences and rainbow arithmetic progressions. Electron. J. Combin., 9(1):R44, 2002. http://www.combinatorics.org/v9i1r44. MR: 1946146.
 Grytczuk [2004] Jarosław Grytczuk. Thue type colorings of graphs. In Graph Theory 2004: A conference in memory of Claude Berge. 2004.
 Grytczuk [2007] Jarosław Grytczuk. Nonrepetitive colorings of graphs—a survey. Int. J. Math. Math. Sci., 74639, 2007. doi: 10.1155/2007/74639. MR: 2272338.
 Grytczuk [2008] Jarosław Grytczuk. Thue type problems for graphs, points, and numbers. Discrete Math., 308(19):4419–4429, 2008. doi: 10.1016/j.disc.2007.08.039. MR: 2433769.
 Grytczuk et al. [2016] Jarosław Grytczuk, Karol Kosiński, and Michał Zmarz. Nonrepetitive colorings of line arrangements. Eur. J. Combin., 51:275–279, 2016. doi: 10.1016/j.ejc.2015.05.013.
 Grytczuk et al. [2013] Jarosław Grytczuk, Jakub Kozik, and Piotr Micek. A new approach to nonrepetitive sequences. Random Structures Algorithms, 42(2):214–225, 2013. doi: 10.1002/rsa.20411.
 Grytczuk et al. [2011] Jarosław Grytczuk, Jakub Przybyło, and Xuding Zhu. Nonrepetitive list colourings of paths. Random Structures Algorithms, 38(12):162–173, 2011. doi: 10.1002/rsa.20347. MR: 2768888.
 Haranta and Jendro’l [2012] Jochen Haranta and Stanislav Jendro’l. Nonrepetitive vertex colorings of graphs. Discrete Math., 312(2):374–380, 2012. doi: 10.1016/j.disc.2011.09.027. MR: 2852595.
 Havet et al. [2011] Frédéric Havet, Stanislav Jendro’l, Roman Soták, and Erika Škrabu’láková. Facial nonrepetitive edgecoloring of plane graphs. J. Graph Theory, 66(1):38–48, 2011. doi: 10.1002/jgt.20488.
 Jendro’l and Škrabu’láková [2009] Stanislav Jendro’l and Erika Škrabu’láková. Facial nonrepetitive edge colouring of semiregular polyhedra. Acta Univ. M. Belii Ser. Math., 15:37–52, 2009. http://actamath.savbb.sk/acta1503.shtml. MR: 2589669.
 Keszegh et al. [2014] Balázs Keszegh, Balázs Patkós, and Xuding Zhu. Nonrepetitive colorings of lexicographic product of graphs. Discrete Math. Theor. Comput. Sci., 16(2):97–110, 2014. http://dmtcs.episciences.org/2077.
 Kündgen and Pelsmajer [2008] André Kündgen and Michael J. Pelsmajer. Nonrepetitive colorings of graphs of bounded treewidth. Discrete Math., 308(19):4473–4478, 2008. doi: 10.1016/j.disc.2007.08.043. MR: 2433774.
 Kündgen and Talbot [2017] André Kündgen and Tonya Talbot. Nonrepetitive edgecolorings of trees. Discrete Math. Theor. Comput. Sci., 19(1), 2017. http://dmtcs.episciences.org/3724.
 Marx and Schaefer [2009] Dániel Marx and Marcus Schaefer. The complexity of nonrepetitive coloring. Discrete Appl. Math., 157(1):13–18, 2009. doi: 10.1016/j.dam.2008.04.015. MR: 2479374.
 Mohar and Thomassen [2001] Bojan Mohar and Carsten Thomassen. Graphs on surfaces. Johns Hopkins University Press, 2001. MR: 1844449.
 Nešetřil et al. [2011] Jaroslav Nešetřil, Patrice Ossona de Mendez, and David R. Wood. Characterisations and examples of graph classes with bounded expansion. Eur. J. Combin., 33(3):350–373, 2011. doi: 10.1016/j.ejc.2011.09.008. MR: 2864421.
 Pegden [2011] Wesley Pegden. Highly nonrepetitive sequences: winning strategies from the local lemma. Random Structures Algorithms, 38(12):140–161, 2011. doi: 10.1002/rsa.20354. MR: 2768887.
 Pezarski and Zmarz [2009] Andrzej Pezarski and Michał Zmarz. Nonrepetitive 3coloring of subdivided graphs. Electron. J. Combin., 16(1):N15, 2009. http://www.combinatorics.org/v16i1n15. MR: 2515755.
 Przybyło [2014] Jakub Przybyło. On the facial Thue choice index via entropy compression. J. Graph Theory, 77(3):180–189, 2014. doi: 10.1002/jgt.21781.
 Przybyło et al. [2016] Jakub Przybyło, Jens Schreyer, and Erika Škrabu’láková. On the facial Thue choice number of plane graphs via entropy compression method. Graphs Combin., 32(3):1137–1153, 2016. doi: 10.1007/s0037301516422.
 Robertson and Seymour [1986] Neil Robertson and Paul Seymour. Graph minors. II. Algorithmic aspects of treewidth. J. Algorithms, 7(3):309–322, 1986. doi: 10.1016/01966774(86)900234. MR: 0855559.
 Robertson and Seymour [2003] Neil Robertson and Paul Seymour. Graph minors. XVI. Excluding a nonplanar graph. J. Combin. Theory Ser. B, 89(1):43–76, 2003. doi: 10.1016/S00958956(03)00042X.
 Schreyer and Škrabu’láková [2012] Jens Schreyer and Erika Škrabu’láková. On the facial Thue choice index of plane graphs. Discrete Math., 312(10):1713–1721, 2012. doi: 10.1016/j.disc.2012.01.023.
 Thue [1906] Axel Thue. Über unendliche Zeichenreihen. Norske Vid. Selsk. Skr. I. Mat. Nat. Kl. Christiania, 7:1–22, 1906.
 Wenus and Węsek [2016] Przemysław Wenus and Krzysztof Węsek. Nonrepetitive and patternfree colorings of the plane. Eur. J. Combin., 54:21–34, 2016. doi: 10.1016/j.ejc.2015.12.002.
 Wollan and Wood [2018] Paul Wollan and David R. Wood. Nonrepetitive colourings of graphs excluding a fixed immersion or topological minor. J. Graph Theory, 2018. doi: 10.1002/jgt.22430.
 Zhao and Zhu [2016] Huanhua Zhao and Xuding Zhu. (2+)nonrepetitive list colouring of paths. Graphs Combin., 32(4):1635–1640, 2016. doi: 10.1007/s0037301516520.