<<

Planar Graphs have Bounded Queue-Number∗

§ Vida Dujmović † Gwenaël Joret ‡ Piotr Micek Pat Morin ¶ Torsten Ueckerdt k David R. Wood ‡‡

April 9, 2019 revised: May 1, 2020

Abstract

We show that planar graphs have bounded queue-number, thus proving a conjecture of Heath, Leighton and Rosenberg from 1992. The key to the proof is a new structural tool called layered partitions, and the result that every has a vertex-partition and a layering, such that each part has a bounded number of vertices in each layer, and the quotient graph has bounded . This result generalises for graphs of bounded Euler genus. Moreover, we prove that every graph in a minor-closed class has such a layered partition if and only if the class excludes some . Building on this work and using the structure theorem, we prove that every proper minor-closed class of graphs has bounded queue-number. Layered partitions have strong connections to other topics, including the following two examples. First, they can be interpreted in terms of strong products. We show that every planar graph is a subgraph of the strong product of a path with some graph of bounded treewidth. Similar statements hold for all proper minor-closed classes. Second, we give a simple proof of the result by DeVos et al. (2004) that graphs in a proper minor-closed class have low treewidth colourings.

†School of and Electrical Engineering, University of Ottawa, Ottawa, Canada arXiv:1904.04791v5 [cs.DM] 30 Apr 2020 ([email protected]). Research supported by NSERC and the Ontario Ministry of Research and In- novation. ‡Département d’Informatique, Université Libre de Bruxelles, Brussels, Belgium ([email protected]). Research supported by an ARC grant from the Wallonia-Brussels Federation of Belgium. §Theoretical Computer Science Department, Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland ([email protected]). Research partially supported by the Polish National Science Center grant (SONATA BIS 5; UMO-2015/18/E/ST6/00299). ¶School of Computer Science, Carleton University, Ottawa, Canada ([email protected]). Research supported by NSERC. kInstitute of Theoretical Informatics, Karlsruhe Institute of Technology, Germany ([email protected]). ‡‡School of Mathematics, Monash University, Melbourne, Australia ([email protected]). Research sup- ported by the Australian Research Council. ∗An extended abstract of this paper appeared in Proceedings 60th Annual Symposium on Foundations of Computer Science (FOCS ’19), pp. 862–875, IEEE. https://doi.org/10.1109/FOCS.2019.00056.

1 Contents

1 Introduction 3 1.1 Main Results ...... 5 1.2 Outline ...... 6

2 Tools 6 2.1 Layerings ...... 7 2.2 Treewidth and Layered Treewidth ...... 7 2.3 Partitions and Layered Partitions ...... 8

3 Queue Layouts via Layered Partitions 10

4 Proof of Theorem1: Planar Graphs 12 4.1 Reducing the Bound ...... 15

5 Proof of Theorem2: Bounded-Genus Graphs 19

6 Proof of Theorem3: Excluded Minors 23 6.1 Characterisation ...... 25

7 Strong Products 28

8 Non-Minor-Closed Classes 31 8.1 Allowing Crossings ...... 32 8.2 Map Graphs ...... 32 8.3 String Graphs ...... 33

9 Applications and Connections 33 9.1 Low Treewidth Colourings ...... 33 9.2 Track Layouts ...... 35 9.3 Three-Dimensional ...... 36

10 Open Problems 37

2 1 Introduction

Stacks and queues are fundamental data structures in computer science. But what is more powerful, a stack or a queue? In 1992, Heath, Leighton, and Rosenberg [67] developed a graph- theoretic formulation of this question, where they defined the graph parameters stack-number and queue-number which respectively measure the power of stacks and queues to represent a given graph. Intuitively speaking, if some class of graphs has bounded stack-number and unbounded queue-number, then we would consider stacks to be more powerful than queues for that class (and vice versa). It is known that the stack-number of a graph may be much larger than the queue-number. For example, Heath et al. [67] proved that the n-vertex ternary 1/9  has queue-number at most O(log n) and stack-number at least Ω(n − ). Nevertheless, it is open whether every graph has stack-number bounded by a function of its queue-number, or whether every graph has queue-number bounded by a function of its stack-number [55, 67]. Planar graphs are the simplest class of graphs where it is unknown whether both stack and queue-number are bounded. In particular, Buss and Shor [20] first proved that planar graphs have bounded stack-number; the best known upper bound is 4 due to Yannakakis [116]. However, for the last 27 years of research on this topic, the most important open question in this field has been whether planar graphs have bounded queue-number. This question was first proposed by Heath et al. [67] who conjectured that planar graphs have bounded queue-number.1 This paper proves this conjecture. Moreover, we generalise this result for graphs of bounded Euler genus, and for every proper minor-closed class of graphs.2 First we define the stack-number and queue-number of a graph G. Let V (G) and E(G) respectively denote the vertex and set of G. Consider disjoint edges vw, xy ∈ E(G) and a linear ordering 4 of V (G). Without loss of generality, v ≺ w and x ≺ y and v ≺ x. Then vw and xy are said to cross if v ≺ x ≺ w ≺ y and are said to nest if v ≺ x ≺ y ≺ w.A stack (with respect to 4) is a set of pairwise non-crossing edges, and a queue (with respect to 4) is a set of pairwise non-nested edges. Stacks resemble the stack data structure in the following sense. In a stack, traverse the vertex ordering left-to-right. When visiting vertex v, because of the non-crossing property, if x1, . . . , xd are the neighbours of v to the left of v in left-to-right order, then the edges xdv, xd 1v, . . . , x1v − will be on top of the stack in this order. Pop these edges off the stack. Then if y1, . . . , yd0 are the neighbours of v to the right of v in left-to-right order, then push vyd0 , vyd0 1, . . . , vy1 onto the stack in this order. In this way, a stack of edges with respect to a linear ordering− resembles a stack data structure. Analogously, the non-nesting condition in the definition of a queue implies that a queue of edges with respect to a linear ordering resembles a queue data structure.

For an integer k > 0, a k-stack layout of a graph G consists of a linear ordering 4 of V (G) and a partition E1,E2,...,Ek of E(G) into stacks with respect to 4. Similarly, a k-queue layout of G 1Curiously, in a later paper, Heath and Rosenberg [70] conjectured that planar graphs have unbounded queue- number. 2The 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 [87] for more about graph embeddings in surfaces. A graph H is a minor of a graph G if a graph isomorphic to H can be obtained from a subgraph of G by contracting edges. A class G of graphs is minor-closed if for every graph G ∈ G, every minor of G is in G. A minor-closed class is proper if it is not the class of all graphs. For example, for fixed g > 0, the class of graphs with Euler genus at most g is a proper minor-closed class.

3 consists of a linear ordering 4 of V (G) and a partition E1,E2,...,Ek of E(G) into queues with respect to 4. The stack-number of G, denoted by sn(G), is the minimum integer k such that G has a k-stack layout. The queue-number of a graph G, denoted by qn(G), is the minimum integer k such that G has a k-queue layout. Note that k-stack layouts are equivalent to k-page book embeddings, first introduced by Ollmann [90], and stack-number is also called page-number, book , or fixed outer-thickness. Stack and queue layouts are inherently related to depth-first search and breadth-first search respectively. For example, a DFS ordering of the vertices of a has no two crossing edges, and thus defines a 1-stack layout. Similarly, a BFS ordering of the vertices of a tree has no two nested edges, and thus defines a 1-queue layout. So every tree has stack-number 1 and queue-number 1. For another example, consider the n × n grid graph with vertex set {(x, y): x, y ∈ [n]} and edges of the form (x, y)(x + 1, y) and (x, y)(x, y + 1). Order the vertices first by x-coordinate and then by y-coordinate. Edges of the first type do not nest and edges of the second type do not nest. Thus the n × n grid graph has a 2-queue layout. In fact, as illustrated in Figure1, if we order the vertices by x + y and then by x-coordinate, then no two edges nest. So the n × n grid graph has queue-number 1.

Figure 1: 1-Queue layout of grid graph.

As mentioned above, Heath et al. [67] conjectured that planar graphs have bounded queue-number. This conjecture has remained open despite much research on queue layouts [2, 3, 12, 32, 33, 48, 49, 52, 53, 55, 66, 67, 69, 94, 99, 108]. We now review progress on this conjecture. Pemmaraju [94] studied queue layouts and wrote that he “suspects” that a particular planar graph with n vertices has queue-number Θ(log n). The example he proposed had treewidth 3; see Section 2.2 for the definition of treewidth. Dujmović et al. [48] proved that graphs of bounded treewidth have bounded queue-number. So Pemmaraju’s example in fact has bounded queue- number. The first bound on the queue-number of planar graphs with vertices was proved by Heath o(n) √ n et al. [67], who observed that every graph with edges has a -queue layout using a random m O( m) √ vertex ordering. Thus every planar graph with n vertices has queue-number O( n), which can also be proved using the Lipton-Tarjan separator theorem. Di Battista et al. [32] proved the first breakthrough on this topic, by showing that every planar graph with n vertices has queue-number O(log2 n). Dujmović [41] improved this bound to O(log n) with a simpler proof. Building on this work, Dujmović et al. [49] established (poly-)logarithmic bounds for more general classes of graphs. For example, they proved that every graph with n vertices and Euler genus g has queue-number O(g + log n), and that every graph with n vertices excluding a fixed minor has queue-number logO(1) n.

4 Recently, Bekos et al. [12] proved a second breakthrough result, by showing that planar graphs with bounded maximum degree have bounded queue-number. In particular, every planar graph with maximum degree ∆ has queue-number at most O(∆6). Subsequently, Dujmović, Morin, and Wood [50] proved that the of Bekos et al. [12] in fact produces a O(∆2)-queue layout. This was the state of the art prior to the current work.3

1.1 Main Results

The fundamental contribution of this paper is to prove the conjecture of Heath et al. [67] that planar graphs have bounded queue-number. Theorem 1. The queue-number of planar graphs is bounded.

The best upper bound that we obtain for the queue-number of planar graphs is 49. We extend Theorem1 by showing that graphs with bounded Euler genus have bounded queue- number. Theorem 2. Every graph with Euler genus g has queue-number at most O(g).

The best upper bound that we obtain for the queue-number of graphs with Euler genus g is 4g + 49. We generalise further to show the following: Theorem 3. Every proper minor-closed class of graphs has bounded queue-number.

These results are obtained through the introduction of a new tool, layered partitions, that have applications well beyond queue layouts. Loosely speaking, a layered partition of a graph G consists of a partition P of V (G) along with a layering of G, such that each part in P has a bounded number of vertices in each layer (called the layered width), and the quotient graph G/P has certain desirable properties, typically bounded treewidth. Layered partitions are the key tool for proving the above theorems. Subsequent to the initial release of this paper, layered partitions and the results in this paper have been used to solve the following well-known problems: • Dujmović, Esperet, Joret, Walczak, and Wood [45] prove that planar graphs have bounded non-repetitive chromatic number (resolving a conjecture of Alon, Grytczuk, Hałuszczak, and Riordan [6] from 2002). This result generalises for graphs excluding any fixed graph as a subdivision. • Dębski, Felsner, Micek, and Schröder [40] make dramatic improvements to the best known bounds for p-centered colourings of planar graphs and graphs excluding any fixed graph as a subdivision. • Bonamy, Gavoille, and Pilipczuk [16] find shorter adjacency labellings of planar graphs (improving on a sequence of results going back to 1988 [75, 76]). • Dujmović, Esperet, Joret, Gavoille, Micek, and Morin [44] find asymptotically optimal adjacency labellings of planar graphs. This result implies that, for every integer n > 0, there is a graph with n1+o(1) vertices that contains every n-vertex planar graph as an induced subgraph.

3Wang [107] claimed to prove that planar graphs have bounded queue-number, but despite several attempts, we have not been able to understand the claimed proof.

5 1.2 Outline

The remainder of the paper is organized as follows. In Section2 we review relevant background including treewidth, layerings, and partitions, and we introduce layered partitions. Section3 proves a fundamental lemma which shows that every graph that has a partition of bounded layered width has queue-number bounded by a function of the queue-number of the quotient graph. In Section4, we prove that every planar graph has a partition of layered width 1 such that the quotient graph has treewidth at most 8. Since graphs of bounded treewidth are known to have bounded queue-number [48], this implies Theorem1 with an upper bound of 766. We then prove a variant of this result with layered width 3, where the quotient graph is planar with treewidth 3. This variant coupled with a better bound on the queue-number of treewidth-3 planar graphs [2, 3] implies Theorem1 with an upper bound of 49. In Section5, we prove that graphs of Euler genus g have partitions of layered width O(g) such that the quotient graph has treewidth O(1). This immediately implies that such graphs have queue-number O(g). These partitions are also required for the proof of Theorem3 in Section6.A more direct argument that appeals to Theorem1 proves the bound 4g + 49 in Theorem2. In Section6, we extend our results for layered partitions to the setting of almost-embeddable graphs with no apex vertices. Coupled with other techniques, this allows us to prove Theorem3. We also characterise those minor-closed graph classes with the property that every graph in the class has a partition of bounded layered width such that the quotient has bounded treewidth. In Section7, we provide an alternative and helpful perspective on layered partitions in terms of strong products of graphs. With this viewpoint, we derive results about universal graphs that contain all planar graphs. Similar results are obtained for more general classes. In Section8, we prove that some well-known non-minor-closed classes of graphs, such as k-planar graphs, also have bounded queue-number. Section9 explores further applications and connections. We start off by giving an example where layered partitions lead to a simple proof of a known and difficult result about low treewidth colourings in proper minor-closed classes. Then we point out some of the many connections that layered partitions have with other graph parameters. We also present other implications of our results such as resolving open problems on 3-dimensional graph drawing. Finally Section 10 summarizes and concludes with open problems and directions for future work.

2 Tools

Undefined terms and notation can be found in Diestel’s text [34]. Throughout the paper, we use −→ the notation X to refer to a particular linear ordering of a set X.

6 2.1 Layerings

The following well-known definitions are key concepts in our proofs, and that of several other papers on queue layouts [12, 48–50, 53]. A layering of a graph G is an ordered partition (V0,V1,... ) of V (G) such that for every edge vw ∈ E(G), if v ∈ Vi and w ∈ Vj, then |i − j| 6 1. If i = j then vw is an intra-level edge. If |i − j| = 1 then vw is an inter-level edge.

If r is a vertex in a connected graph G and Vi := {v ∈ V (G): distG(r, v) = i} for all i > 0, then (V0,V1,... ) is called a BFS layering of G rooted at r. Associated with a BFS layering is a BFS T obtained by choosing, for each non-root vertex v ∈ Vi with i > 1, a neighbour w in Vi 1, and adding the edge vw to T . Thus distT (r, v) = distG(r, v) for each vertex v of G. − These notions extend to disconnected graphs. If G1,...,Gc are the components of G, and rj is a Sc vertex in Gj for each j ∈ {1, . . . , c}, and Vi := j=1{v ∈ V (Gj): distGj (rj, v) = i} for all i > 0, then (V0,V1,... ) is called a BFS layering of G.

2.2 Treewidth and Layered Treewidth

First we introduce the notion of H-decomposition and tree-decomposition. For graphs H and G, an H-decomposition of G consists of a collection (Bx ⊆ V (G): x ∈ V (H)) of subsets of V (G), called bags, indexed by the vertices of H, and with the following properties:

• for every vertex v of G, the set {x ∈ V (H): v ∈ Bx} induces a non-empty connected subgraph of H, and • for every edge vw of G, there is a vertex x ∈ V (H) for which v, w ∈ Bx.

The width of such an H-decomposition is max{|Bx| : x ∈ V (H)} − 1. The elements of V (H) are called nodes, while the elements of V (G) are called vertices. A tree-decomposition is a T -decomposition for some tree T . The treewidth of a graph G is the minimum width of a tree-decomposition of G. Treewidth measures how similar a given graph is to a tree. It is particularly important in structural and algorithmic ; see [14, 65, 97] for surveys. Tree decompositions were introduced by Robertson and Seymour [100]; the more general notion of H-decomposition was introduced by Diestel and Kühn [35]. As mentioned in Section1, Dujmović et al. [ 48] first proved that graphs of bounded treewidth have bounded queue-number. Their bound on the queue-number was doubly exponential in the treewidth. Wiechert [108] improved this bound to singly exponential. Lemma 4 ([108]). Every graph with treewidth k has queue-number at most 2k − 1.

Alam, Bekos, Gronemann, Kaufmann, and Pupyrev [2] also improved the bound in the case of planar 3-trees. (A k-tree is an edge-maximal graph of tree-width k.) The following lemma that will be useful later is implied by this result and the fact that every planar graph of treewidth at most 3 is a subgraph of a planar 3-tree [83]. Lemma 5 ([2, 83]). Every planar graph with treewidth at most 3 has queue-number at most 5.

Graphs with bounded treewidth provide important examples of minor-closed classes. However, planar graphs have unbounded treewidth. For example, the n × n planar grid graph has treewidth

7 n. So the above results do not resolve the question of whether planar graphs have bounded queue-number. Dujmović et al. [49] and Shahrokhi [106] independently introduced the following concept. The layered treewidth of a graph G is the minimum integer k such that G has a tree-decomposition (Bx : x ∈ V (T )) and a layering (V0,V1,... ) such that |Bx ∩ Vi| 6 k for every bag Bx and layer Vi. Applications of layered treewidth include graph colouring [49, 74, 84], graph drawing [11, 49], book embeddings [47], and theory [106]. The related notion of layered has also been studied [11, 42]. Most relevant to this paper, Dujmović et al. [49] proved that every graph with n vertices and layered treewidth k has queue-number at most O(k log n). They then proved that planar graphs have layered treewidth at most 3, that graphs of Euler genus g have layered treewidth at most 2g + 3, and more generally that a minor-closed class has bounded layered treewidth if and only if it excludes some apex graph.4 This implies O(log n) bounds on the queue-number for all these graphs, and was the basis for the logO(1) n bound for proper minor-closed classes mentioned in Section1.

2.3 Partitions and Layered Partitions

The following definitions are central notions in this paper. A vertex-partition, or simply partition, of a graph G is a set P of non-empty sets of vertices in G such that each vertex of G is in exactly one element of P. Each element of P is called a part. The quotient (sometimes called the touching pattern) of P is the graph, denoted by G/P, with vertex set P where distinct parts A, B ∈ P are adjacent in G/P if and only if some vertex in A is adjacent in G to some vertex in B. A partition of G is connected if the subgraph induced by each part is connected. In this case, the quotient is the minor of G obtained by contracting each part into a single vertex. Most of our results for queue layouts do not depend on the connectivity of partitions. But we consider it to be of independent interest that many of the partitions constructed in this paper are connected. Then the quotient is a minor of the original graph. A partition P of a graph G is called an H-partition if H is a graph that contains a spanning subgraph isomorphic to the quotient G/P. Alternatively, an H-partition of a graph G is a partition (Ax : x ∈ V (H)) of V (G) indexed by the vertices of H, such that for every edge vw ∈ E(G), if v ∈ Ax and w ∈ Ay then x = y (and vw is called an intra-bag edge) or xy ∈ E(H) (and vw is called an inter-bag edge). The width of such an H-partition is max{|Ax| : x ∈ V (H)}. Note that a layering is equivalent to a path-partition. A tree-partition is a T -partition for some tree T . Tree-partitions are well studied with several applications [15, 36, 37, 105, 112]. For example, every graph with treewidth k and maximum degree ∆ has a tree-partition of width O(k∆); see [36, 112]. This easily leads to a O(k∆) upper bound on the queue-number [48]. However, dependence on ∆ seems unavoidable when studying tree-partitions [112], so we instead consider H-partitions where H has bounded treewidth greater than 1. This idea has been used by many authors in a variety of applications, including cops and robbers [8], fractional colouring [98, 104], generalised colouring numbers [72], and defective and clustered colouring [74]. See [38, 39] for more on partitions of graphs in a proper minor-closed class. 4A graph G is apex if G − v is planar for some vertex v.

8 A key innovation of this paper is to consider a layered variant of partitions (analogous to layered treewidth being a layered variant of treewidth). The layered width of a partition P of a graph G is the minimum integer ` such that for some layering (V0,V1,... ) of G, each part in P has at most ` vertices in each layer Vi. The n × n grid graph G provides an instructive example. The columns determine a partition P of layered width 1 with respect to the layering determined by the rows. The quotient G/P is an n-vertex path. Throughout this paper we consider partitions with bounded layered width such that the quotient has bounded treewidth. We therefore introduce the following definition. A class G of graphs is said to admit bounded layered partitions if there exist k, ` ∈ N such that every graph G ∈ G has a partition P with layered width at most ` such that G/P has treewidth at most k. We first show that this property immediately implies bounded layered treewidth. Lemma 6. If a graph G has an H-partition with layered width at most ` such that H has treewidth at most k, then G has layered treewidth at most (k + 1)`.

Proof. Let (Bx : x ∈ V (T )) be a tree-decomposition of H with bags of size at most k + 1. Replace each instance of a vertex v of H in a bag Bx by the part corresponding to v in the H-partition. Keep the same layering of G. Since |Bx| 6 k + 1, we obtain a tree-decomposition of G with layered width at most (k + 1)`.

Lemma6 means that any property that holds for graph classes with bounded layered treewidth also holds for graph classes that admit bounded layered partitions. For example, Norin√ proved that every n-vertex graph with layered treewidth at most k has treewidth less than 2 kn (see [49]). With Lemma6, this implies that if an n-vertex graph G has a partition with layered width ` such that the quotient graph has treewidth at most , then has treewidth at most p . This √ k G 2 (k + 1)`n in turn leads to O( n) balanced separator theorems for such graphs. Lemma6 suggests that having a partition of bounded layered width, whose quotient has bounded treewidth, seems to be a more stringent requirement than having bounded layered treewidth. Indeed the former structure leads to O(1) bounds on the queue-number, instead of O(log n) bounds obtained via layered treewidth. That said, it is open whether graphs of bounded layered treewidth have bounded queue-number. Before continuing, we show that if one does not care about the exact treewidth bound, then it suffices to consider partitions with layered width 1.

Lemma 7. If a graph G has an H-partition of layered width ` with respect to a layering (V0,V1,... ), for some graph H of treewidth at most k, then G has an H0-partition of layered width 1 with respect to the same layering, for some graph H0 of treewidth at most (k + 1)` − 1.

Proof. Let (Av : v ∈ V (H)) be an H-partition of G of layered width ` with respect to (V0,V1,... ), for some graph H of treewidth at most k. Let (Bx : x ∈ V (T )) be a tree-decomposition of H with width at most k. Let H0 be the graph obtained from H by replacing each vertex v of H by an `- Xv and replacing each edge vw of H by a complete K`,` between Xv and Xw. For each x ∈ V (T ), let Bx0 := ∪{Xv : v ∈ Bx}. Observe that (Bx0 : x ∈ V (T )) is a tree-decomposition of H0 of width at most (k + 1)` − 1. For each vertex v of H, and layer Vi,

9 there are at most ` vertices in Av ∩ Vi. Assign each vertex in Av ∩ Vi to a distinct element of Xv. We obtain an H0-partition of G with layered width 1, and the treewidth of H is at most (k + 1)` − 1.

3 Queue Layouts via Layered Partitions

The next lemma is at the heart of all our results about queue layouts.

Lemma 8. For all graphs H and G, if H has a k-queue layout and G has an H-partition of  3  layered width ` with respect to some layering (V0,V1,... ) of G, then G has a (3`k + ` )-queue −→ −→ −→ 2 layout using vertex ordering V0, V1,... , where Vi is some ordering of Vi. In particular,

 3  qn(G) 6 3` qn(H) + 2 ` .

The next lemma is useful in the proof of Lemma8.

Lemma 9. Let v1, . . . , vn be the vertex ordering in a 1-queue layout of a graph H. Define a graph G with vertex-set B1 ∪ · · · ∪ Bn, where B1,...,Bn are pairwise disjoint sets of vertices (called ‘blocks’), each with at most ` vertices. For each edge vivj ∈ E(H), add an edge to G between each vertex in Bi and each vertex in Bj. Then the vertex-ordering of G obtained from v1, . . . , vn by replacing each vi by Bi admits an `-queue layout of G.

Proof. A rainbow in a vertex ordering of a graph G is a set of pairwise nested edges (and thus a ). Say R is a rainbow in the ordering of V (G). Heath and Rosenberg [69] proved that a vertex ordering of any graph admits a k-queue layout if and only if every rainbow has size at most k. Thus it suffices to prove that |R| 6 `. If the right endpoints of R belong to at least two different blocks, and the left endpoints of R belong to at least two different blocks, then no endpoint of the innermost edge in R and no endpoint of the outermost edge in R are in a common block, implying that the corresponding edges in H have no endpoint in common, and therefore are nested. Since no two edges in H are nested, without loss of generality, the left endpoints of R belong to one block. Hence there are at most ` left endpoints of R, implying |R| 6 `, as desired.

In what follows, the graph G in Lemma9 is called an `-blowup of H.

Proof of Lemma8. Let (Ax : x ∈ V (H)) be an H-partition of G of layered width ` with respect to some layering (V0,V1,... ) of G; that is, |Ax ∩ Vi| 6 ` for all x ∈ V (H) and i > 0. Let (x1, . . . , xh) be the vertex ordering and E1,...,Ek be the queue assignment in a k-queue layout of H.  3  We now construct a (3`k + 2 ` )-queue layout of G. Order each layer Vi by −→ Vi := Ax1 ∩ Vi,Ax2 ∩ Vi,...,Axh ∩ Vi, −→ −→ where each set Axj ∩ Vi is ordered arbitrarily. We use the ordering V0, V1,... of V (G) in our queue layout of G. It remains to assign the edges of G to queues. We consider four types of edges, and use distinct queues for edges of each type.

10 Intra-level intra-bag edges: Let G(1) be the subgraph formed by the edges vw ∈ E(G), where v, w ∈ Ax ∩ Vi for some x ∈ V (H) and i > 0. Heath and Rosenberg [69] noted that the complete ` ` graph on ` vertices has queue-number b 2 c. Since |Ax ∩ Vi| 6 `, at most b 2 c queues suffice for edges −→ −→ ` in the subgraph of G induced by Ax ∩ Vi. These subgraphs are separated in V0, V1,... . Thus b 2 c queues suffice for all intra-level intra-bag edges. (2) Intra-level inter-bag edges: For α ∈ {1, . . . , k} and i > 0, let Gα,i be the subgraph of G formed by those edges vw ∈ E(G) such that v ∈ Ax ∩ Vi and w ∈ Ay ∩ Vi for some edge xy ∈ Eα. Let (2) Zα be the 1-queue layout of the subgraph (V (H),Eα) of H on all edges in queue α. Observe (2) (2) −→ −→ that Gα,i is a subgraph of the graph isomorphic to the `-blowup of Zα . By Lemma9, V0, V1,... (2) (2) admits an `-queue layout of Gα,i. As the subgraphs Gα,i for fixed α but different i are separated in −→ −→ −→ −→ V , V ,... , ` queues suffice for edges in S G(2) for each α ∈ {1, . . . , k}. Hence V , V ,... admits 0 1 i>0 α,i 0 1 an `k-queue layout of the intra-level inter-bag edges. Inter-level intra-bag edges: Let G(3) be the subgraph of G formed by those edges vw ∈ E(G) (3) such that v ∈ Ax ∩ Vi and w ∈ Ax ∩ Vi+1 for some x ∈ V (H) and i > 0. Consider the graph Z with ordered vertex set

z0,x1 , . . . , z0,xh ; z1,x1 , . . . , z1,xh ; ... (3) and edge set {zi,xzi+1,x : i > 0, x ∈ V (H)}. Then no two edges in Z are nested. Observe that (3) (3) −→ −→ G is isomorphic to a subgraph of the `-blowup of Z . By Lemma9, V0, V1,... admits an `-queue layout of the intra-level inter-bag edges. Inter-level inter-bag edges: We partition these edges into 2k sets. For α ∈ {1, . . . , k}, let (4a) Gα be the spanning subgraph of G formed by those edges vw ∈ E(G) where v ∈ Ax ∩ Vi and w ∈ Ay ∩ Vi+1 for some i > 0 and for some edge xy of H in Eα, with x ≺ y in the ordering of (4b) H. Similarly, for α ∈ {1, . . . , k}, let Gα be the spanning subgraph of G formed by those edges vw ∈ E(G) where v ∈ Ax ∩ Vi and w ∈ Ay ∩ Vi+1 for some i > 0 and for some edge xy of H in Eα, with y ≺ x in the ordering of H. (4a) For α ∈ {1, . . . , k}, let Zα be the graph with ordered vertex set

z0,x1 , . . . , z0,xh ; z1,x1 , . . . , z1,xh ; ...

(4a) and edge set {zi,xzi+1,y : i > 0, x, y ∈ V (H), xy ∈ Eα, x ≺ y}. Suppose that two edges in Z nest. This is only possible for edges zi,xzi+1,y and zi,pzi+1,q, where zi,x ≺ zi,p ≺ zi+1,q ≺ zi+1,y. Thus, in H, we have x ≺ p and q ≺ y. By the definition of Z(4a), we have x ≺ y and p ≺ q. Hence (4a) x ≺ p ≺ q ≺ y, which contradicts that xy, pq ∈ Eα. Therefore no two edges are nested in Z . (4a) (4) −→ −→ Observe that Gα is isomorphic to a subgraph of the `-blowup of Zα . By Lemma9, V0, V1,... (4a) −→ −→ admits an `-queue layout of Gα . An analogous argument shows that V0, V1,... admits an `-queue (4b) −→ −→ layout of Gα . Hence V0, V1,... admits a 2k`-queue layout of all the inter-level inter-bag edges.  `  In total, we use 2 + k` + ` + 2k` queues.

 3  The upper bound of 3` qn(H) + 2 ` in Lemma8 is tight, in the sense that it is possible that the  3  vertex ordering produced by Lemma8 has 3` qn(H) + 2 ` pairwise nested edges, and thus at least this many queues are needed.

11 Lemmas4 and8 imply that a graph class that admits bounded layered partitions has bounded queue-number. In particular:

Corollary 10. If a graph G has a partition P of layered width ` such that G/P has treewidth at k  3  most k, then G has queue-number at most 3`(2 − 1) + 2 ` .

4 Proof of Theorem1: Planar Graphs

Our proof that planar graphs have bounded queue-number employs Corollary 10. Thus our goal is to show that planar graphs admit bounded layered partitions, which is achieved in the following key contribution of the paper.

Theorem 11. Every planar graph G has a connected partition P with layered width 1 such that G/P has treewidth at most 8. Moreover, there is such a partition for every BFS layering of G.

This theorem and Corollary 10 imply that planar graphs have bounded queue-number (Theorem1) 8  3  with an upper bound of 3(2 − 1) + 2 3 = 766. We now set out to prove Theorem 11. The proof is inspired by the following elegant result of Pilipczuk and Siebertz [95]: Every planar graph G has a partition P into geodesics such that G/P has treewidth at most 8. Here, a geodesic is a path of minimum length between its endpoints. We consider the following particular type of geodesic. If T is a tree rooted at a vertex r, then a non-empty path (x1, . . . , xp) in T is vertical if for some d > 0 for all i ∈ {0, . . . , p} we have distT (xi, r) = d + i. The vertex x1 is called the upper endpoint of the path and xp is its lower endpoint. Note that every vertical path in a BFS spanning tree is a geodesic. Thus the next theorem strengthens the result of Pilipczuk and Siebertz [95].

Theorem 12. Let T be a rooted spanning tree in a connected planar graph G. Then G has a partition P into vertical paths in T such that G/P has treewidth at most 8.

Proof of Theorem 11 assuming Theorem 12. We may assume that G is connected (since if each component of G has the desired partition, then so does G). Let T be a BFS spanning tree of G. By Theorem 12, G has a partition P into vertical paths in T such that G/P has treewidth at most 8. Each path in P is connected and has at most one vertex in each BFS layer corresponding to T . Hence P is connected and has layered width 1.

The proof of Theorem 12 is an inductive proof of a stronger statement given in Lemma 13 below. A graph is a graph embedded in the plane with no crossings. A near-triangulation is a plane graph, where the outer-face is a simple , and every internal face is a triangle. For a cycle C, we write C = [P1,...,Pk] if P1,...,Pk are pairwise disjoint non-empty paths in C, and the endpoints of each path Pi can be labelled xi and yi so that yixi+1 ∈ E(C) for i ∈ {1, . . . , k}, where Sk xk+1 means x1. This implies that V (C) = i=1 V (Pi). Lemma 13. Let G+ be a plane triangulation, let T be a spanning tree of G+ rooted at some + vertex r on the outer-face of G , and let P1,...,Pk for some k ∈ {1, 2,..., 6}, be pairwise disjoint + vertical paths in T such that F = [P1,...,Pk] is a cycle in G . Let G be the near-triangulation consisting of all the edges and vertices of G+ contained in F and the interior of F .

12 Then G has a partition P into paths in G that are vertical in T , such that P1,...,Pk ∈ P and the quotient H := G/P has a tree-decomposition in which every bag has size at most 9 and some bag contains all the vertices of H corresponding to P1,...,Pk.

Proof of Theorem 12 assuming Lemma 13. The result is trivial if |V (G)| < 3. Now assume + |V (G)| > 3. Let r be the root of T . Let G be a plane triangulation containing G as a spanning subgraph with r on the outer-face of G. The three vertices on the outer-face of G are vertical (singleton) paths in T . Thus G+ satisfies the assumptions of Lemma 13 with k = 3, which implies that G+ has a partition P into vertical paths in T such that G+/P has treewidth at most 8. Note that G/P is a subgraph of G+/P. Hence G/P has treewidth at most 8.

Our proof of Lemma 13 employs the following well-known variation of Sperner’s Lemma (see [1]):

Lemma 14 (Sperner’s Lemma). Let G be a near-triangulation whose vertices are coloured 1, 2, 3, with the outer-face F = [P1,P2,P3] where each vertex in Pi is coloured i. Then G contains an internal face whose vertices are coloured 1, 2, 3.

Proof of Lemma 13. The proof is by induction on n = |V (G)|. If n = 3, then G is a 3-cycle and k 6 3. The partition into vertical paths is P = {P1,...,Pk}. The tree-decomposition of H consists of a single bag that contains the k 6 3 vertices corresponding to P1,...,Pk. For n > 3 we wish to make use of Sperner’s Lemma on some (not necessarily proper) 3-colouring of the vertices of G. We begin by colouring the vertices of F , as illustrated in Figure2. There are three cases to consider:

1. If k = 1 then, since F is a cycle, P1 has at least three vertices, so P1 = [v, P10, w] for two distinct vertices v and w. We set R1 := v, R2 := P10 and R3 := w. 2. If k = 2 then we may assume without loss of generality that P1 has at least two vertices so P1 = [v, P10]. We set R1 := v, R2 := P10 and R3 := P2. 3. If k ∈ {3, 4, 5, 6} then we group consecutive paths by taking R1 := [P1,...,P k/3 ], R2 := b c [P k/3 +1,...,P 2k/3 ] and R3 := [P 2k/3 +1,...,Pk]. Note that in this case each Ri consists b c b c b c of one or two of P1,...,Pk.

For i ∈ {1, 2, 3}, colour each vertex in Ri by i. Now, for each remaining vertex v in G, consider + the path Pv from v to the root of T . Since r is on the outer-face of G , Pv contains at least one vertex of F . If the first vertex of Pv that belongs to F is in Ri then assign the colour i to v. In this way we obtain a 3-colouring of the vertices of G that satisfies the conditions of Sperner’s Lemma. Therefore, by Sperner’s Lemma there exists a triangular face τ = v1v2v3 of G whose vertices are coloured 1, 2, 3 respectively.

For each i ∈ {1, 2, 3}, let Qi be the path in T from vi to the first ancestor vi0 of vi in T that is contained in F . Observe that Q1, Q2, and Q3 are disjoint since Qi consists only of vertices coloured i. Note that Qi may consist of the single vertex vi = vi0. Let Qi0 be Qi minus its final vertex vi0. Imagine for a moment that the cycle F is oriented clockwise, which defines an orientation of R1, R2 and R3. Let Ri− be the subpath of Ri that contains vi0 and all vertices that precede it, and let + Ri be the subpath of Ri that contains vi0 and all vertices that succeed it. Consider the subgraph of G that consists of the edges and vertices of F , the edges and vertices of τ, and the edges and vertices of Q1 ∪ Q2 ∪ Q3. This graph has an outer-face, an inner face τ, and up

13 + to three more inner faces F1,F2,F3 where Fi = [Qi0 ,Ri ,Ri−+1,Qi0+1], where we use the convention + that Q4 = Q1 and R4 = R1. Note that Fi may be degenerate in the sense that [Qi0 ,Ri ,Ri−+1,Qi0+1] may consist only of a single edge vivi+1. + Consider any non-degenerate Fi = [Qi0 ,Ri ,Ri−+1,Qi0+1]. Note that these four paths are pairwise disjoint, and thus Fi is a cycle. If Qi0 and Qi0+1 are non-empty, then each is a vertical path in T .

r r

P4 R3 P1 R1

P3 τ

P2 R2

(a) (b) r

R3 0 Q R1 1 G3

τ 0 G1 Q2

0 Q3

G2 R2

(c) (d)

Figure 2: The inductive proof of Lemma 13: (a) the spanning tree T and the paths P1,...,P4; (b) the paths R1, R2, R3, and the Sperner triangle τ; (c) the paths Q10 , Q20 and Q30 ; (d) the near-triangulations G1, G2, and G3, with the vertical paths of T on F1, F2, and F3.

14 + Furthermore, each of Ri− and Ri+1 consists of at most two vertical paths in T . Thus, Fi is the concatenation of at most six vertical paths in T . Let Gi be the near-triangulation consisting of all + the edges and vertices of G contained in Fi and the interior of Fi. Observe that Gi contains vi and vi+1 but not the third vertex of τ. Therefore Fi satisfies the conditions of the lemma and has fewer than n vertices. So we may apply induction on Fi to obtain a partition Pi of Gi into vertical i paths in T , such that Hi := Gi/Pi has a tree-decomposition (Bx : x ∈ V (Ji)) in which every bag i has size at most 9, and some bag Bui contains the vertices of Hi corresponding to the at most six vertical paths that form Fi. We do this for each non-degenerate Fi.

We now construct the desired partition P of G. Initialise P := {P1,...,Pk}. Then add each non-empty Qi0 to P. Now for each non-degenerate Fi, each path in Pi is either an external path (that is, fully contained in Fi) or is an internal path with none of its vertices in Fi. Add all the internal paths of Pi to P. By construction, P partitions V (G) into vertical paths in T and P contains P1,...,Pk.

Let H := G/P. Next we exhibit the desired tree-decomposition (Bx : x ∈ V (J)) of H. Let J be the tree obtained from the disjoint union of Ji, taken over the i ∈ {1, 2, 3} such that Fi is non-degenarate, by adding one new node u adjacent to each ui. (Recall that ui is the node of i Ji for which the bag Bui contains the vertices of Hi corresponding to the paths that form Fi.) Let the bag Bu contain all the vertices of H corresponding to P1,...,Pk,Q10 ,Q20 ,Q30 . For each i non-degenerate Fi, and for each node x ∈ V (Ji), initialise Bx := Bx. Recall that vertices of Hi correspond to contracted paths in Pi. Each internal path in Pi also lies in P. Each external path P in Pi is a subpath of Pj for some j ∈ {1, . . . , k} or is one of the paths among Q10 ,Q20 ,Q30 . For each such path P , for every x ∈ V (J), in bag Bx, replace each instance of the vertex of Hi corresponding to P by the vertex of H corresponding to the path among P1,...,Pk,Q10 ,...,Q30 that contains P . This completes the description of (Bx : x ∈ V (J)). By construction, |Bx| 6 9 for every x ∈ V (J).

First we show that for each vertex a in H, the set X := {x ∈ V (J): a ∈ Bx} forms a subtree of J. If a corresponds to a path distinct from P1,...,Pk,Q10 ,Q20 ,Q30 then X is fully contained in Ji for some i ∈ {1, 2, 3}. Thus, by induction X is non-empty and connected in Ji, so it is in J. If a corresponds to P which is one of the paths among P1,...,Pk,Q10 ,Q20 ,Q30 then u ∈ X and whenever X contains a vertex of Ji it is because some external path of Pi was replaced by P . In particular, we would have ui ∈ X in that case. Again by induction each X ∩ Ji is connected and since uui ∈ E(T ), we conclude that X induces a (connected) subtree of J.

Finally we show that, for every edge ab of H, there is a bag Bx that contains a and b. If a and b are both obtained by contracting any of P1,...,Pk,Q10 ,Q20 ,Q30 , then a and b both appear in Bu. i If a and b are both in Hi for some i ∈ {1, 2, 3}, then some bag Bx contains both a and b. Finally, when a is obtained by contracting a path Pa in Gi − V (Fi) and b is obtained by contracting a path Pb not in Gi, then the cycle Fi separates Pa from Pb so the edge ab is not present in H. This concludes the proof that (Bx : x ∈ V (J)) is the desired tree-decomposition of H.

4.1 Reducing the Bound

We now set out to reduce the constant in Theorem1 from 766 to 49. This is achieved by proving the following variant of Theorem 11.

15 Theorem 15. Every planar graph G has a partition P with layered width 3 such that G/P is planar and has treewidth at most 3. Moreover, there is such a partition for every BFS layering of G.

This theorem with Lemmas5 and8 imply that planar graphs have bounded queue-number  3  (Theorem1) with an upper bound of 3 · 3 · 5 + 2 · 3 = 49. Note that Theorem 15 is stronger than Theorem 11 in that the treewidth bound is smaller, whereas Theorem 11 is stronger than Theorem 15 in that the partition is connected and the layered width is smaller. Also note that Theorem 15 is tight in terms of the treewidth of H: For every `, there exists a planar graph G such that, if G has a partition P of layered width `, then G/P has treewidth at least 3. We give this construction at the end of this section, and prove Theorem 15 first. Theorem 11 was proved via an inductive proof of a stronger statement given in Lemma 13. Similarly, the proof of Theorem 15 is via an inductive proof of a stronger statement given in Lemma 17, below. While Theorem 12 partitions the vertices of a planar graph into vertical paths, to prove Theorem 15 we instead partition the vertices of a triangulation G+ into parts each of which is a union of up to three vertical paths. Formally, in a rooted spanning tree T of a graph G, a tripod consists of up to three pairwise disjoint vertical paths in T whose lower endpoints form a clique in G. Theorem 15 quickly follows from the next result.

Theorem 16. Let T be a rooted spanning tree in a triangulation G. Then G has a partition P into tripods in T such that G/P has treewidth at most 3.

Proof of Theorem 15 assuming Theorem 16. We may assume that G is connected (since if each component of G has the desired partition, then so does G). Let T be a BFS spanning tree of G. Let (V0,V1,... ) be the BFS layering corresponding to T . Let G0 be a plane triangulation containing G as a spanning subgraph. By Theorem 16, G0 has a partition P into tripods in T such that G0/P is planar with treewidth at most 3. Then P is a partition of G such that G/P is planar with treewidth at most 3. Each part in P corresponds to a tripod, which has at most three vertices in each layer Vi. Hence P has layered width at most 3.

Theorem 16 is proved via the following lemma.

Lemma 17. Let G+ be a plane triangulation, let T be a spanning tree of G+ rooted at some vertex + r on the boundary of the outer-face of G , and let P1,...,Pk, for some k ∈ {1, 2, 3}, be pairwise + disjoint bipods such that F = [P1,...,Pk] is a cycle in G with r in its exterior. Let G be the near triangulation consisting of all the edges and vertices of G+ contained in F and the interior of F .

Then G has a partition P into tripods such that P1,...,Pk ∈ P, and the graph H := G/P is planar and has a tree-decomposition in which every bag has size at most 4 and some bag contains all the vertices of H corresponding to P1,...,Pk.

Proof of Theorem 16 assuming Lemma 17. Let T be a spanning tree in a triangulation G rooted at vertex v. We may assume that v is on the boundary of the outer-face of G. Let G+ be the plane triangulation obtained from G by adding one new vertex r into the outer-face of G and adjacent to each vertex on the boundary of the outer-face of G. Let T + be the spanning tree of G+

16 + obtained from T by adding r and the edge rv. Consider T to be rooted at r. Let P1,P2,P3 be the singleton paths consisting of the three vertices on the boundary of the outer-face of G. Then + P1,P2,P3 are disjoint bipods such that F = [P1,P2,P3] is a cycle in G with r in its exterior. Moreover, the near triangulation consisting of all the edges and vertices of G+ contained in F and the interior of F is G itself. Thus G and G+ satisfy the assumptions of Lemma 17, which implies that G has a partition P into tripods in T such G/P has treewidth at most 3.

The remainder of this section is devoted to proving Lemma 17.

Proof of Lemma 17. This proof follows the same approach as the proof of Lemma 13, by induction on n = |V (G)|. We focus mainly on the differences here. The base case n = 3 is trivial.

As before we partition the vertices of F into paths R1, R2, and R3. If k = 3, then Ri := Pi for i ∈ {1, 2, 3}. Otherwise, as before, we split P1 into two (when k = 2) or three (when k = 1) paths. We apply the same colouring as in the proof of Lemma 13. Then Sperner’s Lemma gives a face τ = v1v2v3 of G whose vertices are coloured 1, 2, 3 respectively. As in the proof of Lemma 13, we obtain vertical paths Q1, Q2, and Q3 where each Qi is a path in T from vi to Ri. Remove the last vertex from each Qi to obtain (possibly empty) paths Q10 , Q20 , and Q30 . Let Y be the tripod consisting of Q10 ∪ Q20 ∪ Q30 plus the edges of τ between non-empty Q10 ,Q20 ,Q30 . As before we consider the graph consisting of the edges and vertices of τ, the edges and vertices of F and the edges and vertices of Q1,Q2,Q3. This graph has up to three internal faces F1,F2,F3 + + where each Fi = [Qi0 ,Ri ,Ri−+1,Qi0+1] and Ri and Ri− are the same portions of Ri as defined in + + Lemma 13. Observe that Fi = [Ri ,Ri−+1,Ii], where Ri and Ri−+1 are bipods, and Ii is the bipod formed by Qi0 ∪ Qi0+1. As before, let Gi be the subgraph of G whose vertices and edges are in Fi or its interior. + For i ∈ {1, 2, 3}, if Fi is non-empty, then Gi and Fi = [Ri ,Ri−+1,Ii] satisfy the conditions of the lemma, and Gi has fewer vertices than G. Thus we may apply induction to Gi. (Note that one + or two of Ri , Ri−+1 and Ii may be empty, in which case we apply the inductive hypothesis with k = 2 or k = 1, respectively.) This gives a partition Pi of Gi such that Hi := Gi/Pi satisfies the i conclusions of the lemma. Let (Bx : x ∈ V (Ji)) be a tree-decomposition of Hi, in which every bag has size at most 4, and some bag i contains the vertices of corresponding to +, and Bui Hi Ri Ri−+1 Ii (if they are non-empty).

We construct P as before. Initialise P := {P1,...,Pk,Y }. Then, for i ∈ {1, 2, 3}, each tripod in Pi is either fully contained in Fi or it is internal with none of its vertices in Fi. Add all these internal tripods in Pi to P. By construction, P partitions V (G) into tripods. The graph H := G/P is planar since G is planar and each tripod in P induces a connected subgraph of G.

Next we produce the tree-decomposition (Bx : x ∈ V (J)) of H that satisfies the requirements of the lemma. Let J be the tree obtained from the disjoint union of J1, J2 and J3 by adding one new node u adjacent to u1, u2 and u3. Let Bu be the set of at most four vertices of H corresponding i to Y,P1,...,Pk. For i ∈ {1, 2, 3} and for each node x ∈ V (Ji), initialise Bx := Bx.

As in the proof of Lemma 13, the resulting structure, (Bx : x ∈ V (J)), is not yet a tree- decomposition of H since some bags may contain vertices of Hi that are not necessarily vertices of H. Note that unlike in Lemma 13 this does not only include elements of Pi that are contained

17 in F . In particular, Ii is also not an element of P and thus does not correspond to a vertex of H. We remedy this as follows. For x ∈ V (J), in bag Bx, replace each instance of the vertex of + Hi corresponding to Ii by the vertex of H corresponding to Y . Similarly, by construction, Ri is

a subgraph of Pαi for some αi ∈ {1, . . . , k}. For x ∈ V (J), in bag Bx, replace each instance of + the vertex of Hi corresponding to Ri by the vertex of H corresponding to Pαi . Finally, Ri−+1 is a

subgraph of Pβi for some βi ∈ {1, . . . , k}. For x ∈ V (J), in bag Bx, replace each instance of the

vertex of Hi corresponding to Ri−+1 by the vertex of H corresponding to Pβi .

This completes the description of (Bx : x ∈ V (J)). Clearly, every bag Bx has size at most 4. The proof that (Bx : x ∈ V (J)) is indeed a tree-decomposition of H is completely analogous to the proof in Lemma 13.

The following lemma, which is implied by Theorem 15 and Lemmas4 and8, will be helpful for generalising our results to bounded genus graphs.

Lemma 18. For every BFS layering (V ,V ,... ) of a planar graph G, there is a 49-queue layout −→ −→ 0 1 −→ of G using vertex ordering V0, V1,...,, where Vi is some ordering of Vi, i > 0.

As promised above, we now show that Theorem 15 is tight in terms of the treewidth of H.

Theorem 19. For all integers k > 2 and ` > 1 there is a graph G with treewidth k such that if G has a partition P with layered width at most `, then G/P contains Kk+1 and thus has treewidth at least k. Moreover, if k = 2 then G is outer-planar, and if k = 3 then G is planar.

Proof. We proceed by induction on k. Consider the base case with k = 2. Let G be the graph obtained from the path on 9`2 + 3` vertices by adding one dominant vertex v (the so-called fan graph). Consider an H-partition (Ax : x ∈ V (H)) of G with layered width at most `. Since v is dominant in G, each vertex is on the layer containing v, the previous layer, or the subsequent layer. Thus we may assume there are at most three layers, and each part Ax has at most 3` vertices. Say v is in part Ax. Consider deleting Ax from G. This deletes at most 3` − 1 vertices from the 2 path G − v. Thus G − Ax is the union of at most 3` paths, with at least 9` + 1 vertices in total. Thus, one such path P in G − Ax has at least 3` + 1 vertices. Thus there is an edge yz in H − x, such that P ∩ Ay =6 ∅ and P ∩ Az =6 ∅. Since v is dominant, x is dominant in H. Hence {x, y, z} induces K3 in H. Now assume the result for k − 1. Thus there is a graph Q with treewidth k − 1 such that if Q has an H-partition with width at most `, then H contains Kk. Let G be obtained by taking 3` copies of Q and adding one dominant vertex v. Thus G has treewidth k. Consider an H-partition (Ax : x ∈ V (H)) of G with layered width at most `. Since v is dominant there are at most three layers, and each part has at most 3` vertices. Say v is in part Ax. Since |Ax| 6 3`, some copy of Q avoids Ax. Thus this copy of Q has an (H − x)-partition of layered width at most `. By assumption, H − x contains Kk. Since v is dominant, x is dominant in H. Thus H contains Kk+1, as desired. In the k = 2 case, G is outer-planar. Thus, in the k = 3 case, G is planar.

18 5 Proof of Theorem2: Bounded-Genus Graphs

As was the case for planar graphs, our proof that bounded genus graphs have bounded queue- number employs Corollary 10. Thus the goal of this section is to show that our construction of bounded layered partitions for planar graphs can be generalised for graphs of bounded Euler genus. In particular, we show the following theorem of independent interest.

Theorem 20. Every graph G of Euler genus g has a connected partition P with layered width at most max{2g, 1} such that G/P is apex and has treewidth at most 9. Moreover, there is such a partition for every BFS layering of G.

This theorem and Corollary 10 imply that graphs of Euler genus g have bounded queue-number 9  3  (Theorem2) with an upper bound of 3 · 2g · (2 − 1) + 2 2g = O(g). Note that Theorem 20 is best possible in the following sense. Suppose that every graph G of Euler genus g has a partition P with layered width at most ` such that G/P has treewidth at most k. By Lemma6, G has layered treewidth O(k`). Dujmović et al. [49] showed that the maximum layered treewidth of graphs with Euler genus g is Θ(g). Thus k` > Ω(g). The rest of this section is devoted to proving Theorem 20. The next lemma is the key to the proof. Many similar results are known in the literature (for example, [60] or [21, Lemma 8] or [87, Section 4.2.4]), but none prove exactly what we need.

Lemma 21. Let G be a connected graph with Euler genus g. For every BFS spanning tree T of G rooted at some vertex r with corresponding BFS layering (V0,V1,... ), there is a subgraph Z ⊆ G with at most 2g vertices in each layer Vi, such that Z is connected and G − V (Z) is planar. Moreover, there is a connected planar graph G+ containing G − V (Z) as a subgraph, and there is a BFS spanning tree T + of G+ rooted at some vertex r+ with corresponding BFS layering + (W0,W1,... ) of G , such that Wi ∩(V (G)\V (Z)) = Vi \V (Z) for all i > 0, and P ∩(V (G)\V (Z)) is a vertical path in T for every vertical path P in T +.

+ + Proof. The result is trivial if g = 0 (just take Z = ∅ and G = G and r = r and Wi = Vi). Now assume that g > 1. Fix an embedding of G in a surface of Euler genus g. Say G has n vertices, m edges, and f faces. By Euler’s formula, n − m + f = 2 − g. Let D be the multigraph with vertex-set the set of faces in G, where for each edge e of G − E(T ), if f1 and f2 are the faces of G with e on their boundary, then there is an edge joining f1 and f2 in D. (Think of D as the spanning subgraph of the consisting of those edges that do not cross edges in T .) Note that |V (D)| = f = 2 − g − n + m and |E(D)| = m − (n − 1) = |V (D)| − 1 + g. Since T is a tree, D is connected; see [49, Lemma 11] for a proof. Let T ∗ be a spanning tree of D. Thus |E(D) \ E(T ∗)| = g. Let Q = {a1b1, a2b2, . . . , agbg} be the set of edges in G dual to the edges in E(D) \ E(T ∗). For i ∈ {1, 2, . . . , g}, let Zi be the union of the air-path and the bir-path in T , plus the edge aibi. Let Z := Z1 ∪ Z2 ∪ · · · ∪ Zg. By construction, Z is a connected subgraph of G. Say Z has p vertices and q edges. Since Z consists of a subtree of T plus the g edges in Q, we have q = p − 1 + g.

We now describe how to ‘cut’ along the edges of Z to obtain a new graph G0; see Figure3. First, each edge e of Z is replaced by two edges e0 and e00 in G0. Each vertex of G that is incident with no edges in Z is untouched. Consider a vertex v of G incident with edges e1, e2, . . . , ed in Z in

19 clockwise order. In G0 replace v by new vertices v1, v2, . . . , vd, where vi is incident with ei0 , ei00+1 and all the edges incident with v clockwise from ei to ei+1 (exclusive). Here ed+1 means e1 and ed00+1 means e100. This operation defines a cyclic ordering of the edges in G0 incident with each vertex (where ei00+1 is followed by ei0 in the cyclic order at vi). This in turn defines an embedding of G0 in some orientable surface. (Note that if G is embedded in a non-orientable surface, then the edge signatures for G are ignored in the embedding of G0.) Let Z0 be the set of vertices introduced in G0 by cutting through vertices in Z.

We now show that G0 is connected. Consider vertices x1 and x2 of G0. Select faces f1 and f2 of G0 respectively incident to x1 and x2 that are also faces of G. Let P be a path joining f1 and f2 in the dual tree T ∗. Then the edges of G dual to the edges in P were not split in the construction of G0. Therefore an x1x2-walk in G0 can be obtained by following the boundaries of the faces corresponding to vertices in P . Hence G0 is connected.

e 1 e1′′ e1′

degZ (v) = 1 v v1

e 1 e1′′ e1′

degZ (v) = 2 v v2 v1

e2 e2′ e2′′

e 1 e1′′ e1′

v3 v1 degZ (v) = 3 v v2 e3′ e2′′ e3 e2 e3′′ e2′

Figure 3: Cutting the blue edges in Z at each vertex.

20 Say G0 has n0 vertices and m0 edges, and the embedding of G0 has f 0 faces and Euler genus g0. Each vertex v in G with degree d in Z is replaced by d vertices in G0. Each edge in Z is replaced by two edges in G0, while each edge of G − E(Z) is maintained in G0. Thus X n0 = n − p + degZ (v) = n + 2q − p = n + 2(p − 1 + g) − p = n + p − 2 + 2g v V (G) ∈ and m0 = m + q = m + p − 1 + g. Each face of G is preserved in G0. Say s new faces are created by the cutting. Thus f 0 = f + s. Since G0 is connected, n0 − m0 + f 0 = 2 − g0 by Euler’s formula. Thus (n + p − 2 + 2g) − (m + p − 1 + g) + (f + s) = 2 − g0, implying (n − m + f) − 1 + g + s = 2 − g0. Hence (2 − g) − 1 + g + s = 2 − g0, implying g0 = 1 − s. Since g0 > 0, we have s 6 1. Since g > 1, by construction, s > 1. Thus s = 1 and g0 = 0. Thus G0 is planar and all the vertices in Z0 are on the boundary of a single face, f, of G0.

Note that G − V (Z) is a subgraph of G0, and thus G − V (Z) is planar. By construction, each path Zi has at most two vertices in each layer Vj. Thus Z has at most 2g vertices in each Vj.

Now construct a supergraph G00 of G0 by adding a vertex r0 in f and some paths from r0 to vertices in Z0. Specifically, for each vertex vi ∈ Z0 corresponding to some vertex v ∈ V (Z), add to G00 a path Qvi from r0 to vi of length 1 + distG(r, v). Note that G00 is planar.

Claim 1. distG00 (r0, v0) = 1 + distG(r, v) for every vertex v0 in G0 corresponding to v ∈ V (Z).

Proof. By construction, distG00 (r0, v0) 6 1 + distG(r, v), so it is sufficient to show that distG00 (r0, v0) > 1 + distG(r, v), which we now do. Let P be a shortest path from r0 to v0 in G00. By construction P = P1P2, where P1 is a path from r0 to w0 of length 1 + distG(r, w) for some vertex w0 in G0 corresponding to w ∈ V (Z), and P2 is a path in G0 from w0 to v0 of length distG00 (r0, v0) − 1 − distG(r, w). By construction, distG(v, w) 6 distG0 (v0, w0) 6 distG00 (r0, v0) − 1 − distG(r, w). Thus distG(v, r) 6 distG(v, w) + distG(w, r) 6 distG00 (r0, v0) − 1, as desired.

Claim 2. distG00 (r0, x) = 1 + distG(r, x) for each vertex x ∈ V (G) \ V (Z).

Proof. We first prove that distG00 (r0, x) 6 1 + distG(r, x). Let P be a shortest path from x to r in G. Let v be the first vertex in Z on P (which is well defined since r is in Z). So distG(x, r) = distG(x, v) + distG(v, r). Let z be the vertex prior to v on the xv-subpath of P . Then z is adjacent to some copy v0 of v in G0. In G00, there is a path from r0 to v0 of length 1 + distG(r, v). Thus distG00 (r0, x) 6 1 + distG(r, v) + distG(v, x) = 1 + distG(r, x).

We now prove that distG00 (r0, x) > 1 + distG(r, x). Let P be a shortest path from x to r0 in G00. Let v0 be the first vertex not in G on P . Then v0 corresponds to some vertex v in Z. Since P is shortest, distG00 (r0, x) = distG00 (r0, v0) + distG00 (v0, x). By Claim1, distG00 (r0, v0) = 1 + distG(r, v). By the choice of v, the subpath of P from x to v0 corresponds to a shortest path in G from x to v. Thus distG00 (v0, x) = distG(v, x). Combining these equalities, distG00 (r0, x) = 1 + distG(r, v) + distG(v, x) > 1 + distG(r, x), as desired.

Let T 00 be the following spanning tree of G00 rooted at r0. Initialise T 00 to be the union of the above-defined paths Qvi taken over all vertices vi ∈ Z0. Consider each edge vw ∈ E(T ) where v ∈ Z and w ∈ V (G) \ V (Z). Then w is adjacent to exactly one vertex vi introduced when cutting

21 through v. Add the edge wvi to T 00. Finally, add the induced forest T [V (G)\V (Z)] to T 00. Observe that T 00 is a spanning tree of G00. + Construct the desired graph G by contracting r0 and all its neighbours in G00 into a single vertex + + + + r . Let T be the spanning tree of G obtained from T 00 by the same contraction. Then G is + + planar because G00 is planar. By Claim2, the BFS layering of G from r satisfies the conditions of the lemma.

Every maximal vertical path in T 00 consists of some path Qvi (where vi ∈ Z0), followed by some edge viw (where w ∈ V (G) \ V (Z), followed by a path in T [V (G) \ V (Z)] from w to a leaf in T . + Since every vertical path P in T is contained in some maximal vertical path in T 00, it follows that P ∩ V (G) \ V (Z) is a vertical path in T .

We are now ready to complete the proof of Theorem 20.

Proof of Theorem 20. We may assume that G is connected (since if each component of G has the desired partition, then so does G). Let T be a BFS spanning tree of G rooted at some vertex r with corresponding BFS layering (V0,V1,... ). By Lemma 21, there is a subgraph Z ⊆ G with at + most 2g vertices in each layer Vi, a connected planar graph G containing G − V (Z) as a subgraph, and a BFS spanning tree T + of G+ rooted at some vertex r+ with corresponding BFS layering (W0,W1,... ), such that Wi ∩ V (G) \ V (Z) = Vi \ V (Z) for all i > 0, and P ∩ V (G) \ V (Z) is a vertical path in T for every vertical path P in T +. By Theorem 12, G+ has a partition P+ into vertical paths in T + such that G+/P+ has treewidth at most 8. Let P := {P ∩ V (G) \ V (Z): P ∈ P+} ∪ {V (Z)}. Thus P is a partition of G. Since P ∩ V (G) \ V (Z) is a vertical path in T and Z is a connected subgraph of G, P is a connected partition. Note that the quotient G/P is obtained from a subgraph of G+/P+ by adding one vertex corresponding to Z. Since G+/P+ is planar and has treewidth at most 8, G/P is apex and has treewidth at most 9. Thus G/P has treewidth at most 9. Since P ∩ V (G) \ V (Z) is a vertical path in T , it has at most one vertex in each layer Vi. Thus each part of P has at most max{2g, 1} vertices in each layer Vi. Hence P has layered width at most max{2g, 1}.

The same proof in conjunction with Theorem 15 instead of Theorem 12 shows the following.

Theorem 22. Every graph of Euler genus g has a partition P with layered width at most max{2g, 3} such that G/P is apex and has treewidth at most 4. Moreover, there is such a partition for every BFS layering of G.

Note that Theorem 22 is stronger than Theorem 20 in that the treewidth bound is smaller, whereas Theorem 20 is stronger than Theorem 22 in that the partition is connected (and the layered width is smaller for g ∈ {0, 1}). Both Theorems 20 and 22 (with Lemma8) imply that graphs with Euler genus g have O(g) queue-number, but better constants are obtained by the following more direct argument that uses Lemma 21 and Theorem1 to circumvent the use of Theorem 20 and obtain a proof of Theorem2 with the best known bound.

Proof of Theorem2 with a 4g + 49 upper bound. Let G be a graph G with Euler genus g. We may assume that G is connected. Let (V0,V1,...,Vt) be a BFS layering of G. By Lemma 21, there is

22 a subgraph Z ⊆ G with at most 2g vertices in each layer Vi, such that G − V (Z) is planar, and there is a connected planar graph G+ containing G − V (Z) as a subgraph, such that there is a + BFS layering (W0,...,Wt) of G such that Wi ∩ V (G) \ V (Z) = Vi \ V (Z) for all i ∈ {0, 1, . . . , t}.

+ −→ −→ −→ By Lemma 18, there is a 49-queue layout of G with vertex ordering W0,..., Wt, where Wi is some ordering of W . Delete the vertices of G+ not in G − V (Z) from this queue layout. We obtain i −−−−−−→ −−−−−−→ −−−−−−−→ a 49-queue layout of G − V (Z) with vertex ordering V \ V (Z),..., V \ V (Z), where V − V (Z) is 0 t −−−−−−−→i some ordering Vi − V (Z). Recall that |Vj ∩ V (Z)| 6 2g for all j ∈ {0, 1, . . . , t}. Let Vj ∩ V (Z) be an arbitrary ordering of Vj ∩ V (Z). Let 4 be the ordering −−−−−−−→ −−−−−−→ −−−−−−−→ −−−−−−→ −−−−−−−→ −−−−−−→ V0 ∩ V (Z), V0 \ V (Z), V1 ∩ V (Z), V1 \ V (Z),..., Vt ∩ V (Z), Vt \ V (Z) of V (G). Edges of G − V (Z) inherit their queue assignment. We now assign edges incident with vertices in V (Z) to queues. For i ∈ {1,..., 2g} and odd j 1, put each edge incident with the −−−−−−−→ > i-th vertex in V ∩ V (Z) in a new queue S . For i ∈ {1,..., 2g} and even j 0, put each edge j −−−−−−−→ i > incident with the i-th vertex in Vj ∩ V (Z) (not already assigned to a queue) in a new queue Ti. Suppose that two edges vw and pq in Si are nested, where v ≺ p ≺ q ≺ w. Say v ∈ Va and p ∈ Vb and q ∈ Vc and w ∈ Vd. By construction, a 6 b 6 c 6 d. Since vw is an edge, d 6 a + 1. At least one endpoint of vw is in Vj ∩ V (Z) for some odd j, and one endpoint of pq is in V` ∩ V (Z) for some odd `. Since v, w, p, q are distinct, j 6= `. Thus |i − j| > 2. This is a contradiction since a 6 b 6 c 6 d 6 a + 1. Thus Si is a queue. Similarly Ti is a queue. Hence this step introduces 4g new queues, and in total we have 4g + 49 queues.

6 Proof of Theorem3: Excluded Minors

This section first introduces the graph minor structure theorem of Robertson and Seymour, which shows that every graph in a proper minor-closed class can be constructed using four ingredients: graphs on surfaces, vortices, apex vertices, and clique-sums. We then use this theorem to prove that every proper minor-closed class has bounded queue-number (Theorem3).

Let G0 be a graph embedded in a surface Σ. Let F be a facial cycle of G0 (thought of as a subgraph of G0). An F -vortex is an F -decomposition (Bx ⊆ V (H): x ∈ V (F )) of a graph H such that V (G0 ∩ H) = V (F ) and x ∈ Bx for each x ∈ V (F ). For g, p, a, k > 0, a graph G is (g, p, k, a)- almost-embeddable if for some set A ⊆ V (G) with |A| 6 a, there are graphs G0,G1,...,Gs for some s ∈ {0, . . . , p} such that:

• G − A = G0 ∪ G1 ∪ · · · ∪ Gs, • G1,...,Gs are pairwise vertex-disjoint; • G0 is embedded in a surface of Euler genus at most g, • there are s pairwise vertex-disjoint facial cycles F1,...,Fs of G0, and • for i ∈ {1, . . . , s}, there is an Fi-vortex (Bx ⊆ V (Gi): x ∈ V (Fi)) of Gi of width at most k. The vertices in A are called apex vertices. They can be adjacent to any vertex in G. A graph is k-almost-embeddable if it is (k, k, k, k)-almost-embeddable.

Let C1 = {v1, . . . , vk} be a k-clique in a graph G1. Let C2 = {w1, . . . , wk} be a k-clique in a graph G2. Let G be the graph obtained from the disjoint union of G1 and G2 by identifying vi and wi

23 for i ∈ {1, . . . , k}, and possibly deleting some edges in C1 (= C2). Then G is a clique-sum of G1 and G2. The following graph minor structure theorem by Robertson and Seymour [101] is at the heart of graph minor theory.

Theorem 23 ([101]). For every proper minor-closed class G, there is a constant k such that every graph in G is obtained by clique-sums of k-almost-embeddable graphs.

Every clique in a strongly k-almost-embeddable graph has size at most 8k (see [49, Lemma 21]). Thus the clique-sums in Theorem 23 are of size in {0, 1,..., 8k}. We now set out to show that graphs that satisfy the ingredients of the graph minor structure theorem have bounded queue-number. First consider the case of no apex vertices.

Lemma 24. Every (g, p, k, 0)-almost-embeddable graph G has a connected partition P with layered width at most max{2g + 4p − 4, 1} such that G/P has treewidth at most 11k + 10.

Proof. By definition, G = G0 ∪ G1 ∪ · · · ∪ Gs for some s 6 p, where G0 has an embedding in a surface of Euler genus g with pairwise disjoint facial cycles F1,...,Fs, and there is an Fi-vortex i (Bx ⊆ V (Gi): x ∈ V (Fi)) of Gi of width at most k. If s = 0 then Theorem 20 implies the result. Now assume that s > 1. + We may assume that G0 is connected. Fix an arbitrary vertex r in F1. Let G0 be the graph obtained from G0 by adding an edge between r and every other vertex in F1 ∪ · · · ∪ Fs. Note that + + we may add s − 1 handles, and embed G0 on the resulting surface. Thus G0 has Euler genus at most g + 2(s − 1) 6 g + 2p − 2. + Let (V0,V1,... ) be a BFS layering of G0 rooted at r. So V0 = {r} and V (F1)∪· · ·∪V (Fs) ⊆ V0 ∪V1. By Theorem 20, there is a graph H0 with treewidth at most 9, and there is a connected H0-partition + (Ax : x ∈ V (H0)) of G0 of layered width at most max{2g + 4p − 4, 1} with respect to (V0,V1,... ). Let (Cy : y ∈ V (T )) be a tree-decomposition of H0 with width at most 9. Ss Let X := i=1 V (Gi) \ V (G0). Note that (V0 ∪ X,V1,V2,... ) is a layering of G (since all the neighbours of vertices in X are in V0 ∪ V1 ∪ X). We now add the vertices in X to the partition of + G0 to obtain the desired partition of G. We add each such vertex as a singleton part. Formally, let H be the graph with V (H) := V (H0) ∪ X. For each vertex v ∈ X, let Av := {v}. Initialise E(H) := E(H0). For each edge vw in some vortex Gi, if x and y are the vertices of H for which v ∈ Ax and w ∈ Ay, then add the edge xy to H. Now (Ax : x ∈ V (H)) is a connected H-partition of G with width max{2g + 4p − 4, 1} with respect to (V0 ∪ X,V1,V2,V3,... ) (since each new part is a singleton).

We now modify the tree-decomposition of H0 to obtain the desired tree-decomposition of H. Let (Cy0 : y ∈ V (T )) be the tree-decomposition of H obtained from (Cy : y ∈ V (T )) as follows. Initialise Cy0 := Cy for each y ∈ V (T ). For i ∈ {1, . . . , s} and for each vertex u ∈ V (Fi) and for each node i i y ∈ V (T ) with u ∈ Cy, add Bu to Cy0 . Since |Cy| 6 10 and |Bu| 6 k + 1, we have |Cy0 | 6 11(k + 1). We now show that (Cy0 : y ∈ V (T )) is a tree-decomposition of H. Consider a vertex v ∈ X. So v is in Gi for some i ∈ {1, . . . , s}. Let u1, . . . , ut be the sequence of vertices in Fi for which i i v ∈ Bu1 ∩ · · · ∩ But . Then u1, . . . , ut is a path in G0. Say xj is the vertex of H for which uj ∈ Axj . Let Tj be the subtree of T corresponding to bags that contain xj. Since ujuj+1 is an edge of G0,

24 either xj = xj+1 or xjxj+1 is an edge of H. In each case, by the definition of tree-decomposition, Tj and Tj+1 share a vertex in common. Thus T1 ∪ · · · ∪ Tt is a (connected) subtree of T . By construction, T1 ∪ · · · ∪ Tt is precisely the subtree of T corresponding to bags that contain v. This show the ‘vertex-property’ of (Cy0 : y ∈ V (T )) holds. Since each edge of G1 ∪ · · · ∪ Gs has both its i i endpoints in some bag Bu, and some bag Cy0 contains Bu, the ‘edge-property’ of (Cy0 : y ∈ V (T )) also holds. Hence (Cy0 : y ∈ V (T )) is a tree-decomposition of H with width at most 11k + 10.

Lemmas8 and 24 imply the following result, where the edges incident to each apex vertex are put in their own queue:

Lemma 25. Every (g, p, k, a)-almost-embeddable graph has queue-number at most

11k+10  3  a + 3 max{2g + 4p − 4, 1} 2 − 2 max{2g + 4p − 4, 1} . 11(k+1) In particular, for k > 1, every k-almost-embeddable graph has queue-number less than 9k · 2 .

We now extend Lemma 25 to allow for clique-sums using some general-purpose machinery of Dujmović et al. [49]. A tree-decomposition (Bx ⊆ V (G): x ∈ V (T )) of a graph G is k-rich if Bx ∩ By is a clique in G on at most k vertices, for each edge xy ∈ E(T ). Rich tree-decomposition 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 26 ([49]). For every proper minor-closed class G, there are constants k > 1 and ` > 1, such that every graph G0 ∈ G is a spanning subgraph of a graph G that has a k-rich tree-decomposition such that each bag induces an `-almost-embeddable subgraph of G.

Dujmović et al. [49] used so-called shadow-complete layerings to establish the following result.5

Lemma 27 ([49]). Let G be a graph that has a k-rich tree-decomposition such that the subgraph induced by each bag has queue-number at most c. Then G has an f(k, c)-queue layout for some function f.

Theorem3, which says that every proper minor-closed class has bounded queue-number, is an immediate corollary of Lemmas 25 to 27.

6.1 Characterisation

Bounded layered partitions are the key structure in this paper. So it is natural to ask which minor-closed classes admit bounded layered partitions. The following definition leads to the answer to this question. A graph G is strongly (g, p, k, a)-almost-embeddable if it is (g, p, k, a)-almost- embeddable and (using the notation in the definition of (g, p, k, a)-almost-embeddable) there is no edge between an apex vertex and a vertex in G0 − (G1 ∪ · · · ∪ Gs). That is, each apex vertex is only adjacent to other apex vertices or vertices in the vortices. A graph is strongly k-almost-embeddable if it is strongly (k, k, k, k)-almost-embeddable. Lemma 24 generalises as follows:

5In [49], Lemma 27 is expressed in terms of the track-number of a graph. However, it is known that the track-number and the queue-number of a graph are tied; see Section 9.2. So Lemma 27 also holds for queue-number.

25 Lemma 28. Every strongly (g, p, k, a)-almost-embeddable graph G has a connected partition P with layered width at most max{2g + 4p − 4, 1} such that G/P has treewidth at most 11k + a + 10.

Proof. By definition, G − A = G0 ∪ G1 ∪ · · · ∪ Gs for some s 6 p, and for some set A ⊆ V (G) of size at most a, where G0 has an embedding in a surface of Euler genus g with pairwise disjoint i facial cycles F1,...,Fs, such that there is an Fi-vortex (Bx ⊆ V (Gi): x ∈ V (Fi)) of Gi of width Ss at most k, and NG(v) ⊆ A ∪ i=1 V (Gi) for each v ∈ A. As proved in Lemma 24, G − A has a connected partition P with layered width at most max{2g + Ss 4p − 4, 1} with respect to some layering (V0,V1,V2,... ) with i=1 V (Gi) ⊆ V0 ∪ V1, such that G/P has treewidth at most 11k + 10. Thus (A ∪ V0,V1,V2,... ) is a layering of G. Add each vertex in A to the partition as a singleton part. That is, let P0 := P ∪ {{v} : v ∈ A}. The treewidth of G/P0 is at most the treewidth of (G − A)/P plus |A|. Thus P0 is a connected partition with layered width at most max{2g + 4p − 4, 1} with respect to (A ∪ V0,V1,V2,... ), such that G/P has treewidth at most 11k + a + 10.

Let C be a clique in a graph G, and let {C0,C1} and {P1,...,Pc} be partitions of C. An H-partition (Ax : x ∈ V (H)) and layering (V0,V1,... ) of G is (C, {C0,C1}, {P1,...,Pc})-friendly if C0 ⊆ V0

and C1 ⊆ V1 and there are vertices x1, . . . , xc of H, such that Axi = Pi for all i ∈ {1, . . . , c}.A graph class G admits clique-friendly (k, `)-partitions if for every graph G ∈ G, for every clique C in G, for all partitions {C0,C1} and {P1,...,Pc} of C, there is a (C, {C0,C1}, {P1,...,Pc})-friendly H-partition of G with layered width at most `, such that H has treewidth at most k.

Lemma 29. Let (Ax : x ∈ V (H)) be an H-partition of G with layered width at most ` with respect to some layering (W0,W1,... ) of G, for some graph H with treewidth at most k. Let C be a clique in G, and let {C0,C1} and {P1,...,Pc} be partitions of C such that |Cj ∩ Pi| 6 2` for each j ∈ {0, 1} and i ∈ {1, . . . , c}. Then G has a (C, {C0,C1}, {P1,...,Pc})-friendly (k + c, 2`)-partition.

Proof. Since C is a clique, C ⊆ Wi ∪ Wi+1 for some i. Let Vj := (Wi j+1 ∪ Wi+j) \ C0 for j > 1. − Let V0 := C0. Thus (V0,V1,... ) is a layering of G and C1 ⊆ V1. Let H0 be obtained from H by adding c dominant vertices x1, . . . , xc. Thus H0 has treewidth at most k + c. Let Ax0 := Ax \ C

for x ∈ V (H). By construction, |Ax0 ∩ Vj| 6 2` for x ∈ V (H) and j > 0. Let Ax0 i := Pi for each i ∈ {1, . . . , c}. Thus (Ax0 : x ∈ V (H0)) is a (C, {C0,C1}, {P1,...,Pc})-friendly H0-partition of G with layered width at most 2` with respect to (V0,V1,... ).

Every clique in a strongly k-almost-embeddable graph has size at most 8k (see [49, Lemma 21]). Thus Lemmas 28 and 29 imply:

Corollary 30. For k ∈ N, the class of strongly k-almost-embeddable graphs admits clique-friendly (20k + 10, 12k)-partitions.

Lemma 31. Let G be a class of graphs that admit clique-friendly (k, `)-partitions. Then the class of graphs obtained from clique-sums of graphs in G admits clique-friendly (k, `)-partitions.

Proof. Let G be obtained from summing graphs G1 and G2 in G on a clique K. Let C be a clique in G, and let {C0,C1} and {P1,...,Pc} be partitions of C. Our goal is to produce a (C, {C0,C1}, {P1,...,Pc})-friendly (k, `)-partition of G. Without loss of generality, C is in G1.

26 1 By assumption, there is a (C, {C0,C1}, {P1,...,Pc})-friendly H1-partition (Ax : x ∈ V (H1)) of G1 with layered width ` with respect to some layering (V0,V1,... ) of G1, for some graph H1 of

treewidth at most k. Thus, for some vertices x1, . . . , xc of H, we have Axi = Pi for all i ∈ {1, . . . , c}.

Since K is a clique, K ⊆ Vκ ∪Vκ+1 for some κ > 0. Let Kj := K ∩Vκ+j for j ∈ {0, 1}. Thus K0,K1 1 1 is a partition of K. Let y1, . . . , yb be the vertices of H1 such that Ayi ∩ K =6 ∅. Let Qi := Ayi ∩ K. Thus Q1,...,Qb is a partition of K. By assumption, there is a (K, {K0,K1}, {Q1,...,Qb})-friendly 2 H2-partition (Ax : x ∈ V (H2)) of G2 with layered width at most ` with respect to some layering (W0,W1,... ) of G2, for some graph H2 of treewidth at most k. Thus, for some vertices z1, . . . , zb 2 of H2, we have Azi = Qi for all i ∈ {1, . . . , b}.

Let H be obtained from H1 and H2 by identifying yi and zi into yi for i ∈ {1, . . . , b}. Since K is a clique, y1, . . . , yb is a clique in H1 and z1, . . . , zb is a clique in H2. Given tree-decompositions of H1 and H2 with width at most k, we obtain a tree-decomposition of H by simply adding an edge between a bag that contains y1, . . . , yb and a bag that contains z1, . . . , zb. Thus H has treewidth at most k.

Let Xa := Va ∪ Wa κ for a > 0 (where Wa κ = ∅ if a − κ < 0). Then (X0,X1,... ) is a layering of − − G, since K0 ⊆ Vκ ∩ W0 and K1 ⊆ Vκ+1 ∩ W1. By construction, C0 ⊆ V0 ⊆ X0 and C1 ⊆ V1 ⊆ X1, as desired.

1 2 For x ∈ V (H1), let Ax := Ax. For x ∈ V (H2) \{z1, . . . , zb}, let Ax := Ax. For i ∈ {1, . . . , b}, we 2 1 have Azi = Qi ⊆ Ayi . Thus (Ax : x ∈ V (H)) is an H-partition of G with layered width at most 1 ` with respect to (X0,X1,... ). Moreover, since (Ax : x ∈ V (H1)) is (C, {C0,C1}, {P1,...,Pc})- friendly with respect to (V0,V1,... ), and Vi ⊆ Xi, the partition (Ax : x ∈ V (H)) is (C, {C0,C1}, {P1,...,Pc})-friendly with respect to (X0,X1,... ).

The following is the main result of this section. See [29, 49, 59] for the definition of (linear) local treewidth.

Theorem 32. The following are equivalent for a minor-closed class of graphs G:

(1) there exist k, ` ∈ N such that every graph G ∈ G has a partition P with layered width at most `, such that G/P has treewidth at most k. (2) there exists k ∈ N such that every graph G ∈ G has a partition P with layered width at most 1, such that G/P has treewidth at most k. (3) there exists k ∈ N such that every graph in G has layered treewidth at most k, (4) G has linear local treewidth, (5) G has bounded local treewidth, (6) there exists an apex graph not in G, (7) there exists k ∈ N such that every graph in G is obtained from clique-sums of strongly k-almost- embeddable graphs.

Proof. Lemma7 says that (1) implies (2). Lemma6 says that (2) implies (3). Dujmović et al. [ 49] proved that (3) implies (4), which implies (5) by definition. Eppstein [59] proved that (5) and (6) are equivalent; see [28] for an alternative proof. Dvořák and Thomas [58] proved that (6) implies (7); see Theorem 33 below. Lemma 31 and Corollary 30 imply that every graph obtained from clique-sums of strongly k-almost-embeddable graphs has a partition of layered width 12k such that the quotient has treewidth at most 20k + 10. This says that (7) implies (1).

27 Several notes about Theorem 32 are in order: • Demaine and Hajiaghayi [29] previously proved that (4) and (5) are equivalent. • While the partitions P for strongly k-almost-embeddable graphs provided by Lemma 28 are connected, the partitions P in Theorem 32 are no longer guaranteed to be connected. • The assumption of a minor-closed class in Theorem 32 is essential: Dujmović, Eppstein, and Wood [43] proved that the n × n × n grid Gn has bounded local treewidth but has unbounded, indeed Ω(n), layered treewidth. By Lemma6, if Gn has a partition with layered width ` such that the quotient has treewidth at most k, then k` > Ω(n). The above proof that (6) implies (7) employed a structure theorem for apex-minor-free graphs by Dvořák and Thomas [58]. Dvořák and Thomas [58] actually proved the following strengthening of the graph minor structure theorem. For a graph X and a surface Σ, let a(X, Σ) be the minimum size of a set S ⊆ V (X), such that X − S can be embedded in Σ. Let a(X) := a(X, S0) where S0 is the . Note that a(X) = 1 for every apex graph. Theorem 33 ([58]). For every graph X, there are integers p, k, a, such that every X-minor-free graph G is a clique-sum of graphs G1,G2,...,Gn such that for i ∈ {1, . . . , n} there exists a surface Σi and a set Ai ⊆ V (Gi) satisfying the following:

•| Ai| 6 a, • X cannot be embedded in Σi, • Gi − Ai can be almost embedded in Σi with at most p vortices of width at most k, • all but at most a(X, Σi) − 1 vertices of Ai are only adjacent in Gi to vertices contained either in Ai or in the vortices.

Theorem 33 leads to the following result of interest. Theorem 34. For every graph X there is an integer k such that every X-minor-free graph G can be obtained from clique-sums of graphs G1,G2,...,Gn such that for i ∈ {1, 2, . . . , n} there is a set Ai ⊆ V (Gi) of size at most max{a(X) − 1, 0} such that Gi − Ai has a connected partition Pi with layered width at most 1, such that (Gi − Ai)/Pi has treewidth at most k.

Proof. In Theorem 33, since X cannot be embedded in Σi, there is an integer g depending only on X such that Σi has Euler genus at most g. Thus each graph Gi has a set Ai of at most max{a(X, Σi) − 1, 0} 6 max{a(X) − 1, 0} vertices, such that Gi − Ai is strongly (g, p, k, a)-almost- embeddable. By Lemma 28, Gi − Ai has a connected partition Pi with layered width at most max{2g + 4p − 4, 1}, such that (Gi − Ai)/Pi has treewidth at most 11k + a + 10. The result follows from Lemma7.

7 Strong Products

This section provides an alternative and helpful perspective on layered partitions. 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: • v = w and xy ∈ E(B), or • x = y and vw ∈ E(A), or

28 • vw ∈ E(A) and xy ∈ E(B). The next observation follows immediately from the definitions. Observation 35. For every graph H, a graph G has an H-partition of layered width at most ` if and only if G is a subgraph of H  P  K` for some path P .

Note that a general result about the queue-number of strong products by Wood [109] implies that ` qn(H  P ) 6 3 qn(H) + 1. Lemma9 and the fact that qn(K`) = b 2 c implies that qn(Q  K`) 6 ` ` ` · qn(Q) + b 2 c. Together these results say that qn(H  P  K`) 6 `(3 qn(H) + 1) + b 2 c, which is equivalent to Lemma8. Several papers in the literature study minors in graph products [22, 80, 81, 113–115]. The results in this section are complementary: they show that every graph in certain minor-closed classes is a subgraph of a particular graph product, such as a subgraph of H  P for some bounded treewidth graph H and path P . First note that Observation 35 and Theorems 11 and 15 imply the following result conjectured by Wood [111].6 Theorem 36. Every planar graph is a subgraph of:

(a) H  P for some planar graph H with treewidth at most 8 and some path P . (b) H  P  K3 for some planar graph H with treewidth at most 3 and some path P .

Theorem 36 generalises for graphs of bounded Euler genus as follows. Let A + B be the complete join of graphs A and B. That is, take disjoint copies of A and B, and add an edge between each vertex in A and each vertex in B. Theorem 37. Every graph of Euler genus g is a subgraph of:

(a) H  P  Kmax 2g,1 for some apex graph H of treewidth at most 9 and for some path P . { } (b) H  P  Kmax 2g,3 for some apex graph H of treewidth at most 4 and for some path P . { } (c) (K2g + H)  P for some planar graph H of treewidth at most 8 and some path P .

Proof. Parts (a) and (b) follow from Observation 35 and Theorems 20 and 22. It remains to prove (c). We may assume that G is edge-maximal with Euler genus g > 1, and is thus connected. Let (V0,V1,... ) be a BFS layering of G. By Lemma 21, there is a subgraph Z ⊆ G with at most 2g + vertices in each layer Vi, such that G − V (Z) is planar, and there is a connected planar graph G + containing G − V (Z) as a subgraph, such that there is a BFS layering (W0,W1,... ) of G such that Wi ∩ V (G) \ V (Z) = Vi \ V (Z) for all i > 0. By Theorem 11, there is a planar graph H with treewidth at most 8, such that G+ has an H-partition (Ax : x ∈ V (H)) of layered width 1 with respect to (W0,...,Wn). Let Ax0 := Ax ∩ V (G) \ V (Z) for each x ∈ V (H). Thus (Ax0 : x ∈ V (H)) is an H-partition of G − V (Z) of layered width 1 with respect to (V0 \ V (Z),V1 \ V (Z),... ) (since Wi ∩ V (G) \ V (Z) = Vi \ V (Z)).

Let z1, . . . , z2g be the vertices of a K2g. Say vi,1, . . . , vi,2g are the vertices in

V (Z) ∩ Vi for i > 0. (Here some vi,j might be undefined.) Define Az0 j := {vi,j : i > 0}}. Now,

6To be precise, Wood [111] conjectured that for every planar graph G there are graphs X and Y , such that both X and Y have bounded treewidth, Y has bounded maximum degree, and G is a minor of X  Y , such that the preimage of each vertex of G has bounded radius in X  Y . Theorem 36(a) is stronger than this conjecture since it has a subgraph rather than a , and Y is a path.

29 (Ax0 : x ∈ V (H + K2g)) is an (H + K2g)-partition of G of layered width 1, which is equivalent to the claimed result by Observation 35.

Note that in Theorems 36(a) and 37(a), the graph H is a minor of the given graph (because the corresponding partition in connected). But we cannot make this conclusion in Theorems 36(b), 37(b) and 37(c). These results are generalised for (g, p, k, a)-almost-embeddable graphs as follows.

Theorem 38. Every (g, p, k, a)-almost-embeddable graph is a subgraph of:

(a) (H  P  Kmax 2g+4p,1 ) + Ka for some graph H with treewidth at most 11k + 10 and some path P , { } (b) ((H + K(2g+4p)(k+1))  P ) + Ka for some graph H with treewidth at most 9k + 8 and some path P .

Proof. Lemma 24 and Observation 35 imply (a). It remains to prove (b). Let G be a (g, p, k, a)- almost-embeddable graph. We use the notation from the definition of (g, p, k, a)-almost-embeddable. + In the proof of Lemma 24, since G0 has Euler genus at most g + 2p, by Theorem 37(c) there is + + a graph H0 with treewidth at most 8, such that G0 ⊆ (H0 + K2g+4p)  P . That is, G0 has an (H0 + K2g+4p)-partition of layered width 1. Apply the proof in Lemma 24 to obtain a graph H with treewidth at most 9k + 8, such that G has an (H + K(2g+4p)(k+1))-partition of layered width 1. That is, G ⊆ (H + K(2g+4p)(k+1))  P . Adding apex vertices, every (g, p, k, a)-almost-embeddable graph is a subgraph of ((H + K(2g+4p)(k+1))  P ) + Ka for some graph H with treewidth at most 9k + 8.

Corollary 39. For k > 1 every k-almost-embeddable graph is a subgraph of:

(a) (H  P  K6k) + Kk for some graph H with treewidth at most 11k + 10 and some path P , (b) ((H + K(6k)(k+1))  P ) + Kk for some graph H with treewidth at most 9k + 8 and some path P .

Theorem 32 and Observation 35 imply:

Corollary 40. For every apex graph X there exists c ∈ N such that every X-minor-free graph is a subgraph of H  P for some graph H with treewidth at most c and for some path P .

Theorems 23 and 38 imply the following result for any proper minor-closed class.

Theorem 41. For every proper minor-closed class G there are integers k and a such that every graph G ∈ G can be obtained by clique-sums of graphs G1,...,Gn such that for i ∈ {1, . . . , n},

Gi ⊆ (Hi  Pi) + Ka,

for some graph Hi with treewidth at most k and some path Pi.

Theorem 34 and Observation 35 imply the following precise bound on a for X-minor-free graphs.

30 Theorem 42. For every graph X there is an integer k such that every X-minor-free graph G can be obtained by clique-sums of graphs G1,...,Gn such that for i ∈ {1, . . . , n},

Gi ⊆ (Hi  Pi) + Kmax a(X) 1,0 , { − } for some graph Hi with treewidth at most k and some path Pi.

Note that it is easily seen that in all of the above results, the graph H and the path P have at most |V (G)| vertices. We can interpret these results as saying that strong products and complete joins form universal graphs for the above classes. For all n and k there is a graph Hn,k with treewidth k that contains every graph with n vertices and treewidth k as a subgraph (for example, take the disjoint union of all such graphs). The proof of Theorem 36 then shows that Hn,8  Pn contains every planar graph with n vertices. There is a substantial literature on universal graphs for planar graphs and other classes [4, 5, 9, 13, 18, 19]. For example, Babai, Chung, Erdős, Graham, and Spencer [9] constructed a graph on O(n3/2) edges that contains every planar graph on n vertices as a subgraph. 3/2 While Hn,8  Pn contains much more than O(n ) edges, it has the advantage of being highly structured and with bounded average degree. Taking this argument one step further, there is an infinite graph Tk with treewidth k that contains every (finite) graph with treewidth k as a subgraph. Similarly, the infinite path Q contains every (finite) path as a subgraph. Thus our results imply that T8  Q contains every planar graph. Analogous statements can be made for the other classes above.

8 Non-Minor-Closed Classes

This section gives three examples of non-minor-closed classes of graphs that have bounded queue- number. The following lemma will be helpful.

Lemma 43. Let G0 be a graph with a k-queue layout. Fix integers c > 1 and ∆ > 2. Let G be the graph with V (G) := V (G0) where vw ∈ E(G) whenever there is a vw-path P in G0 of length at most c, such that every internal vertex on P has degree at most ∆. Then

qn(G) < 2(2k(∆ + 1))c+1.

Proof. Consider a k-queue layout of G0. Let 4 be the corresponding vertex ordering and let E1,...,Ek be the partition of E(G0) into queues with respect to 4.

For each edge xy ∈ Ei, let q(xy) := i. For distinct vertices a, b ∈ V (G0), let f(a, b) := 1 if a ≺ b and let f(a, b) := −1 if b ≺ a. For ` ∈ {1, . . . , c}, let X` be the set of edges vw ∈ E(G) such that the corresponding vw-path P in G0 has length exactly `. We will use distinct sets of queues for the X` in our queue layout of G. By Vizing’s Theorem, there is an edge-colouring h of G with ∆ + 1 colours, such that any two edges incident with a vertex of degree at most ∆ receive distinct colours. (Edges incident with a vertex of degree greater than ∆ can be assigned the same colour.)

31 Consider an edge vw in X` with v ≺ w. Say (v = x0, x1, . . . , x`, x`+1 = w) is the corresponding path in G0. Let

f(vw) := (f(x0, x1), . . . , f(x`, x`+1))

q(vw) := (q(x0, x1), . . . , q(x`, x`+1))

h(vw) := (h(x0, x1), . . . , h(x`, x`+1)).

Consider edges vw, pq ∈ X` with v, w, p, q distinct and f(vw) = f(pq) and g(vw) = g(pq) and h(vw) = h(pq). Assume v ≺ p. Say (v = x0, x1, . . . , x`, x`+1 = w) and (p = y0, y1, . . . , x`, x`+1 = q) are the paths respectively corresponding to vw and pq in G0. Thus f(xi, xi+1) = f(yi, yi+1) and q(xixi+1) = q(yiyi+1) and h(xixi+1) = h(yiyi+1) for i ∈ {0, 1, . . . , `}. Thus xixi+1 and yiyi+1 are not nested. Since v = x0 ≺ y0 = p, we have x1 4 y1. Since h(x0x1) = h(y0y1) and both x1 and y1 have degree at most ∆ in G0, we have x1 ≺ y1. It follows by induction that xi ≺ yi for i ∈ {0, 1, . . . , ` + 1}, where in the last step we use the assumption that w =6 q. In particular, `+1 `+1 w = x`+1 ≺ y`+1 = q. Thus vw and pq are not nested. There are 2 values for f, and k `+1 `+1 values for q, and (∆ + 1) values for h. Thus (2k(∆ + 1)) queues suffice for X`. The total Pc `+1 c+1 number of queues is `=1(2k(∆ + 1)) < 2(2k(∆ + 1)) .

8.1 Allowing Crossings

Our result for graphs of bounded Euler genus generalises to allow for a bounded number of crossings per edge. A graph is (g, k)-planar if it has a drawing in a surface of Euler genus g with at most k crossings per edge and with no three edges crossing at the same point. A (0, k)-planar graph is called k-planar; see [79] for a survey about 1-planar graphs. Even in the simplest case, there are 1-planar graphs that contain arbitrarily large complete graph minors [43]. Nevertheless, such graphs have bounded queue-number. Proposition 44. Every (g, k)-planar graph G has queue-number at most 2(40g + 490)k+2.

Proof. Let G0 be the graph obtained from G by replacing each crossing point by a vertex. Thus G0 has Euler genus at most g, and thus has queue-number at most 4g + 49 by Theorem2. Note that for every edge vw in G there is a vw-path P in G0 of length at most k + 1, such that every internal vertex has degree 4. The result follows from Lemma 43 with c = k + 1 and ∆ = 4.

Proposition 44 can also be concluded from a result of Dujmović and Wood [55] in conjunction with Theorem2.

8.2 Map Graphs

Map graphs are defined as follows. Start with a graph G0 embedded in a surface of Euler genus g, with each face labelled a ‘nation’ or a ‘lake’, where each vertex of G0 is incident with at most d nations. Let G be the graph whose vertices are the nations of G0, where two vertices are adjacent in G if the corresponding faces in G0 share a vertex. Then G is called a (g, d)-.A (0, d)-map graph is called a (plane) d-map graph; such graphs have been extensively studied [23–25, 27, 62]. The (g, 3)-map graphs are precisely the graphs of Euler genus at most g (see [43]). So (g, d)-map graphs provide a natural generalisation of graphs embedded in a surface.

32 Proposition 45. Every (g, d)-map graph G has queue-number at most 28g + 98)(d + 1)3.

Proof. It is known that G is the half-square of a bipartite graph G0 with Euler genus g (see [43]). This means that G0 has a bipartition {A, B}, such that every vertex in B has degree at most k, V (G) = A, and for every edge vw ∈ E(G), there is a common neighbour of v and w in B. By Theorem2, G0 has a (4g + 49)-queue layout. The result follows from Lemma 43 with c = 2 and ∆ = d.

8.3 String Graphs

A is the intersection graph of a set of curves in the plane with no three curves meeting at a single point [63, 64, 82, 93, 102, 103]. For an integer k > 2, if each curve is in at most k intersections with other curves, then the corresponding string graph is called a k-string graph.A (g, k)-string graph is defined analogously for curves on a surface of Euler genus at most g.

Proposition 46. For all integers g > 0 and k > 2, every (g, k)-string graph has queue-number at most 2(40g + 490)2k+1.

Proof. We may assume that in the representation of G, no curve is self-intersecting, no three curves intersect at a common point, and no two curves intersect at an endpoint of one of the curves. Let G0 be the graph obtained by adding a vertex at the intersection point of any two distinct curves, and at the endpoints of each curve. Each section of a curve between two such vertices becomes an edge in G0. So G0 is embedded without crossings and has Euler genus at most g. Associate each vertex v of G with a vertex v0 of G0 at the endpoint of the curve representing v. For each edge vw of G, there is v0w0-path in G0 of length at most 2k, such that every internal vertex on P has degree at most 4. By Theorem2, G0 has a (4g + 49)-queue layout. The result then follows from Lemma 43 with ∆ = 4 and c = 2k.

9 Applications and Connections

In this section, we show that layered partitions lead to a simple proof of a known result about low treewidth colourings, and we discuss implications of our results such as resolving open problems about 3-dimensional graph drawings.

9.1 Low Treewidth Colourings

DeVos, Ding, Oporowski, Sanders, Reed, Seymour, and Vertigan [31] proved that every graph in a proper minor-closed class can be edge 2-coloured so that each monochromatic subgraph has bounded treewidth, and more generally, that for fixed c > 2, every such graph can be edge c-coloured such that the union of any c − 1 colour classes has bounded treewidth. They also showed analogous vertex-colouring results. (Of course, in both cases, by a colouring we mean a non-proper colouring). Here we show that these results can be easily proved using layered partitions. The reader should not confuse this result with a different result by DeVos et al. [31]

33 that has subsequently been generalised for any class by Nešetřil and Ossona de Mendez [89].

Lemma 47. For every k-almost-embeddable graph G and integer c > 2, there are induced subgraphs Sc G1,...,Gc of G, such that G = j=1 Gj, and for j ∈ {1, . . . , c} if

Xj := G1 ∪ · · · ∪ Gj 1 ∪ Gj+1 ∪ · · · ∪ Gc, − j then Xj is an induced subgraph of G and Xj has a tree-decomposition (Bx : x ∈ V (Tj)) of width at most 66k(k + 1)(2c − 1) + k − 1.

Proof. Note that we allow Gi and Gj to have vertices and edges in common. Let A be the set of apex vertices in G (as described in the definition of k-almost-embeddable). Thus |A| 6 k. By Lemma 24, G − A has an H-partition (Zh : h ∈ V (H)) of layered width at most 6k, for some graph H with treewidth at most 11k + 10. Let (V0,V1,... ) be the corresponding layering of G − A. Let Vi := ∅ if i < 0. For j ∈ {1, . . . , c}, let h [ i Gj := G A ∪ V2ci+2j 2 ∪ V2ci+2j 1 ∪ V2ci+2j . − − i>0 Sc Note that G = j=1 Gj, as claimed. For i ∈ Z and j ∈ {1, . . . , c}, let

Xi,j := G[V2ci+2j ∪ V2ci+2j+1 ∪ · · · ∪ V2c(i+1)+2j 2]. − Note that is the induced subgraph S ∪ . Xj G[ i Z V (Xi,j) A] ∈ Let (Hx : x ∈ V (T )) be a tree-decomposition of H in which every bag has size at most 11(k + 1). For ∈ and ∈ { }, let be a copy of , and let S ∩ for each i Z j 1, . . . , c Ti,j T Dx := h Hx Zh V (Xi,j) ∈ node x ∈ V (Ti,j). Then (Dx : x ∈ V (Ti,j)) is a tree-decomposition of Xi,j because: (1) each vertex v of Xi,j is in one part Zh of our H-partition, and thus v is in precisely those bags corresponding to nodes x of T for which h ∈ Hx, which form a subtree of T ; and (2) for each edge vv0 of Xi,j, v is in one part Zh and v0 is in one part Zh0 of our H-partition, and thus h = h0 or hh0 ∈ E(H), implying that h and h0 are in a common bag Hx, and thus v and v0 are in a common bag Dx. Since Xi,j consists of 2c − 1 layers, and our H-partition has layered width at most 6k, we have |Zh ∩ V (Xi,j)| 6 6k(2c − 1). Thus (Dx : x ∈ V (Ti,j)) has width at most 66k(k + 1)(2c − 1) − 1. j For j ∈ {1, . . . , c}, let (Bx : x ∈ V (Tj)) be the tree-decomposition of Xj obtained as follows: First, let be the tree obtained from the disjoint union S by adding an edge between Tj i Z Ti,j ∈ j Ti,j and Ti+1,j for all i ∈ Z. Then for each node x of Tj, let Bx := Dx ∪ A, where Dx is the bag corresponding to x in the tree-decomposition of Xi,j where i is such that x ∈ V (Ti,j). Since j Xi,j and Xi0,j are disjoint for i =6 i0, and A is a subset of every bag, (Bx : x ∈ V (Tj)) is a tree-decomposition of Xj with width at most 66k(k + 1)(2c − 1) + k − 1.

i Lemma 48. Fix an integer c > 2. For i ∈ {1, 2}, let G be a graph for which there are induced i i 1 2 subgraphs G1,...,Gc satisfying Lemma 47. Let G be a clique-sum of G and G . Then G has induced subgraphs G1,...,Gc satisfying Lemma 47.

Proof. Let C1 and C2 be the cliques respectively in G1 and G2 involved in the clique-sum. For i i i i i i Sc i i i ∈ {1, 2}, let Xj := G1 ∪ · · · ∪ Gj 1 ∪ Gj+1 ∪ · · · ∪ Gc. By assumption, G = j=1 Gj, and Xj − 34 i i,j is an induced subgraph of G that has a tree-decomposition (Bx : x ∈ V (Tj)) of width at most 1 2 1 66k(k+1)(2c−1)+k−1. For j ∈ {1, . . . , c}, let Gj := Gj ∪Gj . This means that for vertices v1 ∈ C 2 1 2 and v2 ∈ C , if v1 and v2 are identified into v in the clique-sum, and v1 ∈ V (Gj ) or v2 ∈ V (Gj ), 1 2 then v is in V (Gj). Similarly, for vertices v1, w1 ∈ C and v2, w2 ∈ C , if v1 and v2 are identified 1 into v in the clique-sum, and w1 and w2 are identified into w in the clique-sum, and v1w1 ∈ E(Gj ) 2 1 or v2w2 ∈ E(Gj ), then vw is in E(Gj). Take the disjoint union of the tree-decompositions of Xj 2 1 1 2 2 and Xj and add an edge between a bag containing C ∩ V (Xj ) and a bag containing C ∩ V (Xj ) to obtain a tree-decomposition of Xj of width 66k(k + 1)(2c − 1) + k − 1. Such bags exist since i i i C ∩ V (Xj) is a clique of Xj and is thus a subset of some bag.

We now prove the main result of this section.

Theorem 49 ([31]). For every proper minor-closed class G and integer c > 2, there is a constant k such that every graph in G can be edge c-coloured or vertex c-coloured so that the union of any c − 1 colour classes has treewidth at most k.

Proof. Theorem 23 and Lemmas 47 and 48 imply that there exists an integer k such that every Sc graph G ∈ G has subgraphs G1,...,Gc, such that G = j=1 Gj, and for j ∈ {1, . . . , c} the subgraph Xj := G1 ∪ · · · ∪ Gj 1 ∪ Gj+1 ∪ · · · ∪ Gc has treewidth at most 66k(k + 1)(2c − 1) + k − 1. − First we prove the edge-colouring result. Colour each edge e of G by an integer j for which e ∈ E(Gj). The subgraph of G induced by the edges not coloured j is a subgraph of Xj, and thus has treewidth at most 66k(k + 1)(2c − 1) + k − 1.

For the vertex-colouring result, colour each vertex v of G by an integer j for which v ∈ V (Gj). The subgraph of G induced by the vertices not coloured j is a subgraph of Xj, and thus has treewidth at most 66k(k + 1)(2c − 1) + k − 1.

9.2 Track Layouts

Track layouts are a type of graph layout closely related to queue layouts. A vertex k-colouring of a graph G is a partition {V1,...,Vk} of V (G) into independent sets; that is, for every edge vw ∈ E(G), if v ∈ V and w ∈ V then i =6 j.A track in G is an independent set equipped i j −→ −→ with a linear ordering. A partition {V ,..., V } of V (G) into k tracks is a k-track layout if for 1 k −→ −→ distinct i, j ∈ {1, . . . , k} no two edges of G cross between V and V . That is, for all distinct edges −→i j −→ vw, xy ∈ E(G) with v, x ∈ Vi and w, y ∈ Vj, if v ≺ x in Vi then w 4 y in Vj . The minimum k such that G has a k-track layout is called the track-number of G, denoted by tn(G). Dujmović et al. [48] proved the following connection to queue-number.

Lemma 50 ([48]). For every graph G, qn(G) 6 tn(G) − 1.

The proof of Lemma 50 simply puts the tracks one after the other to produce a queue layout. In this sense, track layouts can be thought of as a richer structure than queue layouts. This structure was the key to an inductive proof by Dujmović et al. [48] that graphs of bounded treewidth have bounded track-number (which implies bounded queue-number by Lemma 50). Nevertheless, Dujmović et al. [52] proved the following converse to Lemma 50:

35 Lemma 51 ([52]). There is a function f such that tn(G) 6 f(qn(G)) for every graph G. In particular, every graph with queue-number at most k has track-number at most

k(2k 1)(4k 1) 4k · 4 − − .

Lemmas 50 and 51 together say that queue-number and track-number are tied. The following lemma often gives better bounds on the track-number than Lemma 51. A proper graph colouring is acyclic if every cycle gets at least three colours. The acyclic chromatic number of a graph G is the minimum integer c such that G has an acyclic c-colouring.

Lemma 52 ([48]). Every graph G with acyclic chromatic number at most c and queue-number at c 1 most k has track-number at most c(2k) − .

Borodin [17] proved that planar graphs have acyclic chromatic number at most 5, which with Lemma 52 and Theorem1 implies:

Theorem 53. Every planar graph has track-number at most 5(2 · 49)4 = 461, 184, 080.

Note that the best lower bound on the track-number of planar graphs is 8, due to Pupyrev [96]. Heawood [71] and Alon, Mohar, and Sanders [7] respectively proved that every graph with Euler genus g has chromatic number O(g1/2) and acyclic chromatic number O(g4/7). Lemma 52 and Theorem2 then imply:

4/7 Theorem 54. Every graph with Euler genus g has track-number at most gO(g ).

For proper minor-closed classes, Lemma 51 and Theorem3 imply:

Theorem 55. Every proper minor-closed class has bounded track-number.

We now briefly show that (g, k)-planar graphs have bounded track-number. First note that every graph with layered treewidth k has acyclic chromatic number at most 5k [Proof. Van den Heuvel and Wood [73] proved that every graph with layered treewidth k has strong r-colouring number at most k(2r + 1), and Kierstead and Yang [77] proved that every graph has acyclic chromatic number at most its strong 2-colouring number.] Dujmović et al. [43] proved that every (g, k)-planar graph G has layered treewidth at most (4g + 6)(k + 1). Thus G has acyclic chromatic number at most 5(4g + 6)(k + 1), and has bounded track-number by Lemma 52 and Proposition 44. Dujmović et al. [43] also proved that every (g, d)-map graph and every (g, k)-planar graph has bounded layered treewidth. By the same argument, such graphs have bounded track-number.

9.3 Three-Dimensional Graph Drawing

Further motivation for studying queue and track layouts is their connection with 3-dimensional graph drawing. A 3-dimensional grid drawing of a graph G represents the vertices of G by distinct grid points in Z3 and represents each edge of G by the open segment between its endpoints so that no two edges intersect. The volume of a 3-dimensional grid drawing is the number of grid points in the smallest axis-aligned grid-box that encloses the drawing. For example, Cohen, Eades,

36 Lin, and Ruskey [26] proved that the complete graph Kn has a 3-dimensional grid drawing with volume O(n3) and this bound is optimal. Pach, Thiele, and Tóth [92] proved that every graph with bounded chromatic number has a 3-dimensional grid drawing with volume O(n2), and this bound is optimal for Kn/2,n/2. Track layouts and 3-dimensional graph drawings are connected by the following lemma.

Lemma 56 ([48, 54]). If a c-colourable n-vertex graph G has a t-track layout, then G has 3- dimensional grid drawings with O(t2n) volume and with O(c7tn) volume. Conversely, if a graph G has a 3-dimensional grid drawing with A × B × C bounding box, then G has track-number at most 2AB.

Lemma 56 is the foundation for all of the following results. Dujmović and Wood [54] proved that every graph with bounded maximum degree has a 3-dimensional grid drawing with volume O(n3/2), and the same bound holds for graphs from a proper minor-closed class. In fact, for fixed d, every d-degenerate graph7 has a 3-dimensional grid drawing with O(n3/2) volume [56]. Dujmović et al. [48] proved that every graph with bounded treewidth has a 3-dimensional grid drawing with volume O(n). Prior to this work, whether planar graphs have 3-dimensional grid drawings with O(n) volume was a major open problem, due to Felsner, Liotta, and Wismath [61]. The previous best known bound on the volume of 3-dimensional grid drawings of planar graphs was O(n log n) by Dujmović [41]. Lemma 56 and Theorem 53 together resolve the open problem of Felsner et al. [61].

Theorem 57. Every planar graph with n vertices has a 3-dimensional grid drawing with O(n) volume.

Lemma 56 and Theorems 54 and 55 imply the following strengthenings of Theorem 57.

Theorem 58. Every graph with Euler genus g and n vertices has a 3-dimensional grid drawing 4/7 with gO(g )n volume.

Theorem 59. For every proper minor-closed class G, every graph in G with n vertices has a 3-dimensional grid drawing with O(n) volume.

As shown in Section 9.2, (g, k)-planar graphs, (g, d)-map graphs and (g, k)-string graphs have bounded track-number (for fixed g, k, d). By Lemma 56, such graphs have 3-dimensional grid drawings with O(n) volume.

10 Open Problems

1. What is the maximum queue-number of planar graphs? We can tweak our proof of Theorem1 to show that every planar graph has queue-number at most 48, but it seems new ideas are required to obtain a significant improvement. The best lower bound on the maximum queue-number of planar graphs is 4, due to Alam et al. [2].

7A graph is d-degenerate if every subgraph has minimum degree at most d.

37 More generally, does every graph with Euler genus g have o(g) queue-number? Complete √ √ graphs provide a Θ( g) lower bound. Note that every graph with Euler genus g has O( g) stack-number [85].

2. As discussed in Section1 it is open whether there is a function f such that sn(G) 6 f(qn(G)) for every graph G. Heath et al. [67] proved that every 1-queue graph has stack-number at most 2. Dujmović and Wood [55] showed that there is such a function f if and only if every 2-queue graph has bounded stack-number. Similarly, it is open whether there is a function f such that qn(G) 6 f(sn(G)) for every graph G. Heath et al. [67] proved that every 1-stack graph has queue-number at most 2. Since 2-stack graphs are planar, this paper solves the first open case of this question. Dujmović and Wood [55] showed that there is such a function f if and only if every 3-stack graph has bounded queue-number.

3. Ossona de Mendez, Oum, and Wood [91] introduced the following definition: A graph G is said to be k-close to Euler genus g if every subgraph H of G has a drawing in a surface of Euler genus g with at most k |E(H)| crossings (that is, with O(k) crossings per edge on average). Does every such graph have queue-number at most f(g, k) for some function f?

4. Is there a proof of Theorem3 that does not use the graph minor structure theorem and with more reasonable bounds?

5. Queue layouts naturally extend to posets. The cover graph GP of a poset P is the undirected graph with vertex set P , where vw ∈ E(G) if v

6. It is natural to ask for the largest class of graphs with bounded queue-number. First note that Theorem3 cannot be extended to the setting of an excluded topological minor, since graphs with bounded degree have arbitrarily high queue-number [67, 110]. However, it is possible that every class of graphs with strongly sub-linear separators has bounded queue- number. Here a class G of graphs has strongly sub-linear separators if G is closed under taking subgraphs, and there exists constants c, β > 0, such that every n-vertex graph in G 1 β 1 has a balanced separator of order cn − . Already the β = 2 case looks challenging, since this would imply Theorem3.

7. Is there a polynomial function f such that every graph with treewidth k has queue-number at most f(k)? The best lower and upper bounds on f(k) are k + 1 and 2k − 1, both due to

38 Wiechert [108].

8. Do the results in the present paper have algorithmic applications? Consider the method of Baker [10] for designing polynomial-time approximation schemes for problems on planar graphs. This method partitions the graph into BFS layers, such that the problem can be solved optimally on each layer (since the induced subgraph has bounded treewidth), and then combines the solutions from each layer. Our results (Theorem 11) give a more precise description of the layered structure of planar graphs (and other more general classes). It is conceivable that this extra structural information is useful when designing . Note that all our proofs lead to polynomial-time algorithms for computing the desired decomposition and queue layout. Pilipczuk and Siebertz [95] claim O(n2) for their decomposition. The same is true for Lemma 13: Given the colours of the vertices on F , we can walk down the BFS tree T in linear time and colour every vertex. Another linear-time enumeration of the faces contained in F finds the trichromatic triangle. It is easily seen that Lemma 21 has polynomial time complexity (given the embedding). Polynomial-time algorithms for our other results follow based on the linear-time algorithm of Mohar [86] to test if a given graph has Euler genus at most any fixed number g, and the polynomial-time algorithm of Demaine, Hajiaghayi, and Kawarabayashi [30] for computing the decomposition in the graph minor structure theorem (Theorem 23).

Acknowledgements

This research was completed at the 7th Annual Workshop on Geometry and Graphs held at Bellairs Research Institute in March 2019. Thanks to the other workshop participants for creating a productive working atmosphere.

Note Added in Proof

This paper has motivated several follow-up works. Analogues of Theorems 36 and 37 have been proved for bounded degree graphs in any minor-closed class [46] and for k-planar graphs and several other non-minor-closed classes of interest [51]. See [57] for a survey of such ‘product structure theorems’. Morin [88] presents O(n log n) time algorithms for finding the partitions in Theorems 11 and 15. Pupyrev [96] improves the bound on the track-number of planar graphs in Theorem 53 (by constructing a track layout directly from Theorem 11 instead of using an intermediate queue layout).

References

[1] Martin Aigner and Günter M. Ziegler. Proofs from The Book. Springer, 4th edn., 2010. [p. 13] [2] Jawaherul Md. Alam, Michael A. Bekos, Martin Gronemann, Michael Kauf- mann, and Sergey Pupyrev. Queue layouts of planar 3-trees. In Therese C. Biedl and Andreas Kerren, eds., Proc. 26th International Symposium on Graph Drawing and

39 Network Visualization (GD ’18), vol. 11282 of Lecture Notes in Comput. Sci., pp. 213–226. Springer, 2018. https://doi.org/10.1007/978-3-030-04414-5_15. [pp.4,6,7, 37] [3] Jawaherul Md. Alam, Michael A. Bekos, Martin Gronemann, Michael Kauf- mann, and Sergey Pupyrev. Queue layouts of planar 3-trees. Algorithmica, 2020. https://doi.org/10.1007/s00453-020-00697-4. [pp.4,6] [4] and Vera Asodi. Sparse universal graphs. J. Comput. Appl. Math., 142(1):1– 11, 2002. https://doi.org/10.1016/S0377-0427(01)00455-1. MR: 1910514. [p. 31] [5] Noga Alon and Michael Capalbo. Sparse universal graphs for bounded-degree graphs. Random Structures Algorithms, 31(2):123–133, 2007. https://doi.org/10.1002/rsa.20143. [p. 31] [6] Noga Alon, Jarosław Grytczuk, Mariusz Hałuszczak, and Oliver Riordan. Nonrepetitive colorings of graphs. Random Structures Algorithms, 21(3–4):336–346, 2002. https://doi.org/10.1002/rsa.10057. MR: 1945373. [p.5] [7] Noga Alon, Bojan Mohar, and Daniel P. Sanders. On acyclic colorings of graphs on surfaces. Israel J. Math., 94:273–283, 1996. https://doi.org/10.1007/BF02762708. [p. 36] [8] Thomas Andreae. On a pursuit game played on graphs for which a minor is excluded. J. Comb. Theory, Ser. B, 41(1):37–47, 1986. https://doi.org/10.1016/0095-8956(86)90026-2. MR: 0854602. [p.8] [9] László Babai, Fan R. K. Chung, Paul Erdős, Ron L. Graham, and Joel H. Spencer. On graphs which contain all sparse graphs. In Theory and practice of combinatorics, vol. 60 of North-Holland Math. Stud., pp. 21–26. 1982. MR: 806964. [p. 31] [10] Brenda S. Baker. Approximation algorithms for NP-complete problems on planar graphs. J. ACM, 41(1):153–180, 1994. https://doi.org/10.1145/174644.174650. MR: 1369197. [p. 39] [11] Michael J. Bannister, William E. Devanny, Vida Dujmović, David Eppstein, and David R. Wood. Track layouts, layered path decompositions, and leveled planarity. Algorithmica, 81(4):1561–1583, 2019. https://doi.org/10.1007/s00453-018-0487-5. MR: 3936168. [p.8] [12] Michael A. Bekos, Henry Förster, Martin Gronemann, Tamara Mchedlidze, Fabrizio Montecchiani, Chrysanthi N. Raftopoulou, and Torsten Ueckerdt. Planar graphs of bounded degree have bounded . SIAM J. Comput., 48(5):1487– 1502, 2019. https://doi.org/10.1137/19M125340X. [pp.4,5,7] [13] Sandeep N. Bhatt, Fan R. K. Chung, Frank Thomson Leighton, and Arnold L. Rosenberg. Universal graphs for bounded-degree trees and planar graphs. SIAM J. Discrete Math., 2(2):145–155, 1989. https://doi.org/10.1137/0402014. MR: 990447. [p. 31] [14] Hans L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theoret. Comput. Sci., 209(1-2):1–45, 1998. https://doi.org/10.1016/S0304-3975(97)00228-4. MR: 1647486. [p.7] [15] Hans L. Bodlaender and Joost Engelfriet. Domino treewidth. J. Algorithms, 24(1):94–123, 1997. https://doi.org/10.1006/jagm.1996.0854. MR: 1453952. [p.8] [16] Marthe Bonamy, Cyril Gavoille, and Michał Pilipczuk. Shorter labeling schemes for planar graphs. In Shuchi Chawla, ed., Proc. ACM-SIAM Symposium on Discrete Algo- rithms (SODA ’20), pp. 446–462, 2020. https://doi.org/10.1137/1.9781611975994.27. arXiv: 1908.03341. [p.5] [17] Oleg V. Borodin. On acyclic colorings of planar graphs. Discrete Math., 25(3):211–236, 1979. https://doi.org/10.1016/0012-365X(79)90077-3. [p. 36]

40 [18] Oleg V. Borodin, Alexandr V. Kostochka, Jaroslav Nešetřil, André Raspaud, and Éric Sopena. On universal graphs for planar oriented graphs of a given . Discrete Math., 188(1–3):73–85, 1998. https://doi.org/10.1016/S0012-365X(97)00276-8. [p. 31] [19] Julia Böttcher, Klaas Paul Pruessmann, Anusch Taraz, and Andreas Würfl. Bandwidth, expansion, treewidth, separators and universality for bounded-degree graphs. Eu- ropean J. Combin., 31(5):1217–1227, 2010. https://doi.org/10.1016/j.ejc.2009.10.010. [p. 31] [20] Jonathan F. Buss and Peter Shor. On the pagenumber of planar graphs. In Proc. 16th ACM Symp. on Theory of Computing (STOC ’84), pp. 98–100. ACM, 1984. https://doi.org/10.1145/800057.808670. [p.3] [21] Sergio Cabello, Éric Colin de Verdière, and Francis Lazarus. Algorithms for the edge-width of an embedded graph. Comput. Geom., 45(5-6):215–224, 2012. https://doi.org/10.1016/j.comgeo.2011.12.002. [p. 19] [22] L. Sunil Chandran, Alexandr Kostochka, and J. Krishnam Raju. and the Cartesian product of graphs. Graphs Combin., 24(4):291–301, 2008. https://doi.org/10.1007/s00373-008-0795-7. [p. 29] [23] Zhi-Zhong Chen. Approximation algorithms for independent sets in map graphs. J. Algorithms, 41(1):20–40, 2001. https://doi.org/10.1006/jagm.2001.1178. [p. 32] [24] Zhi-Zhong Chen. New bounds on the edge number of a k-map graph. J. Graph Theory, 55(4):267–290, 2007. https://doi.org/10.1002/jgt.20237. MR: 2336801. [p. 32] [25] Zhi-Zhong Chen, Michelangelo Grigni, and Christos H. Papadimitriou. Map graphs. J. ACM, 49(2):127–138, 2002. https://doi.org/10.1145/506147.506148. MR: 2147819. [p. 32] [26] Robert F. Cohen, Peter Eades, Tao Lin, and Frank Ruskey. Three-dimensional graph drawing. Algorithmica, 17(2):199–208, 1996. https://doi.org/10.1007/BF02522826. [p. 37] [27] Erik D. Demaine, Fedor V. Fomin, Mohammadtaghi Hajiaghayi, and Dimitrios M. Thilikos. Fixed-parameter algorithms for (k, r)-center in planar graphs and map graphs. ACM Trans. Algorithms, 1(1):33–47, 2005. https://doi.org/10.1145/1077464.1077468. [p. 32] [28] Erik D. Demaine and MohammadTaghi Hajiaghayi. Diameter and treewidth in minor-closed graph families, revisited. Algorithmica, 40(3):211–215, 2004. https://doi.org/10.1007/s00453-004-1106-1. MR: 2080518. [p. 27] [29] Erik D. Demaine and MohammadTaghi Hajiaghayi. Equivalence of local treewidth and linear local treewidth and its algorithmic applications. In Proc. 15th Annual ACM- SIAM Symposium on Discrete Algorithms (SODA ’04), pp. 840–849. SIAM, 2004. https: //dl.acm.org/doi/abs/10.5555/982792.982919. [pp. 27, 28] [30] Erik D. Demaine, MohammadTaghi Hajiaghayi, and Ken-ichi Kawarabayashi. Algorithmic graph minor theory: Decomposition, approximation, and coloring. In Proc. 46th Annual IEEE Symposium on Foundations of Computer Science (FOCS ’05), pp. 637–646. IEEE, 2005. https://doi.org/10.1109/SFCS.2005.14. [p. 39] [31] Matt DeVos, Guoli Ding, Bogdan Oporowski, Daniel P. Sanders, Bruce Reed, Paul Seymour, and Dirk Vertigan. Excluding any graph as a minor allows a low tree-width 2-coloring. J. Combin. Theory Ser. B, 91(1):25–41, 2004. https://doi.org/10.1016/j.jctb.2003.09.001. MR: 2047529. [pp. 33, 35] [32] Giuseppe Di Battista, Fabrizio Frati, and János Pach. On the

41 queue number of planar graphs. SIAM J. Comput., 42(6):2243–2285, 2013. https://doi.org/10.1137/130908051. MR: 3141759. [p.4] [33] Emilio Di Giacomo and Henk Meijer. Track drawings of graphs with constant queue number. In Giuseppe Liotta, ed., Proc. 11th International Symp. on Graph Draw- ing (GD ’03), vol. 2912 of Lecture Notes in Comput. Sci., pp. 214–225. Springer, 2004. https://doi.org/10.1007/978-3-540-24595-7_20. [p.4] [34] Reinhard Diestel. Graph theory, vol. 173 of Graduate Texts in Mathematics. Springer, 5th edn., 2016. http://diestel-graph-theory.com/. MR: 3644391 [p.6] [35] Reinhard Diestel and Daniela Kühn. Graph minor hierarchies. Discrete Appl. Math., 145(2):167–182, 2005. https://doi.org/10.1016/j.dam.2004.01.010. [p.7] [36] Guoli Ding and Bogdan Oporowski. Some results on tree decomposition of graphs. J. Graph Theory, 20(4):481–499, 1995. https://doi.org/10.1002/jgt.3190200412. MR: 1358539. [p.8] [37] Guoli Ding and Bogdan Oporowski. On tree-partitions of graphs. Discrete Math., 149(1–3):45–58, 1996. https://doi.org/10.1016/0012-365X(94)00337-I. MR: 1375097. [p.8] [38] Guoli Ding, Bogdan Oporowski, Daniel P. Sanders, and Dirk Verti- gan. Partitioning graphs of bounded tree-width. Combinatorica, 18(1):1–12, 1998. https://doi.org/10.1007/s004930050001. MR: 1645638. [p.8] [39] Guoli Ding, Bogdan Oporowski, Daniel P. Sanders, and Dirk Vertigan. Surfaces, tree-width, clique-minors, and partitions. J. Combin. Theory Ser. B, 79(2):221–246, 2000. https://doi.org/10.1006/jctb.2000.1962. MR: 1769192. [p.8] [40] Michał Dębski, Stefan Felsner, Piotr Micek, and Felix Schröder. Im- proved bounds for centered colorings. In Shuchi Chawla, ed., Proc. ACM- SIAM Symposium on Discrete Algorithms (SODA ’20), pp. 2212–2226, 2020. https://doi.org/10.1137/1.9781611975994.136. arXiv: 1907.04586. [p.5] [41] Vida Dujmović. Graph layouts via layered separators. J. Combin. Theory Series B., 110:79–89, 2015. https://doi.org/10.1016/j.jctb.2014.07.005. MR: 3279388. [pp.4, 37] [42] Vida Dujmović, David Eppstein, Gwenaël Joret, Pat Morin, and David R. Wood. Minor-closed graph classes with bounded layered pathwidth. 2018. arXiv: 1810.08314. [p.8] [43] Vida Dujmović, David Eppstein, and David R. Wood. Structure of graphs with locally restricted crossings. SIAM J. Discrete Math., 31(2):805–824, 2017. https://doi.org/10.1137/16M1062879. MR: 3639571. [pp. 28, 32, 33, 36] [44] Vida Dujmović, Louis Esperet, Gwenaël Joret, Cyril Gavoille, Piotr Micek, and Pat Morin. Adjacency labelling for planar graphs (and beyond). 2020. arXiv: 2003.04280. [p.5] [45] Vida Dujmović, Louis Esperet, Gwenaël Joret, Bartosz Walczak, and David R. Wood. Planar graphs have bounded nonrepetitive chromatic number. Advances in Combi- natorics, 5, 2020. https://doi.org/10.19086/aic.12100. [p.5] [46] Vida Dujmović, Louis Esperet, Pat Morin, Bartosz Walczak, and David R. Wood. Clustered 3-colouring graphs of bounded degree. 2020. arXiv: 2002.11721. [p. 39] [47] Vida Dujmović and Fabrizio Frati. Stack and queue layouts via layered separators. J. Graph Algorithms Appl., 22(1):89–99, 2018. https://doi.org/10.7155/jgaa.00454. MR: 3757347. [p.8] [48] Vida Dujmović, Pat Morin, and David R. Wood. Layout of graphs with bounded tree-width. SIAM J. Comput., 34(3):553–579, 2005.

42 https://doi.org/10.1137/S0097539702416141. MR: 2137079. [pp.4,6,7,8, 35, 36, 37] [49] Vida Dujmović, Pat Morin, and David R. Wood. Layered separators in minor-closed graph classes with applications. J. Combin. Theory Ser. B, 127:111–147, 2017. https://doi.org/10.1016/j.jctb.2017.05.006. MR: 3704658. [pp.4,7,8,9, 19, 24, 25, 26, 27] [50] Vida Dujmović, Pat Morin, and David R. Wood. Queue layouts of graphs with bounded degree and bounded genus, 2019. arXiv: 1901.05594. [pp.5,7] [51] Vida Dujmović, Pat Morin, and David R. Wood. Graph product structure for non-minor-closed classes, 2019. arXiv: 1907.05168. [p. 39] [52] Vida Dujmović, Attila Pór, and David R. Wood. Track layouts of graphs. Discrete Math. Theor. Comput. Sci., 6(2):497–522, 2004. http://dmtcs.episciences.org/315. MR: 2180055. [pp.4, 35, 36] [53] Vida Dujmović and David R. Wood. On linear layouts of graphs. Discrete Math. Theor. Comput. Sci., 6(2):339–358, 2004. http://dmtcs.episciences.org/317. MR: 2081479. [pp.4,7] [54] Vida Dujmović and David R. Wood. Three-dimensional grid drawings with sub- quadratic volume. In János Pach, ed., Towards a Theory of Geometric Graphs, vol. 342 of Contemporary Mathematics, pp. 55–66. Amer. Math. Soc., 2004. MR: 2065252. [p. 37] [55] Vida Dujmović and David R. Wood. Stacks, queues and tracks: Layouts of graph subdi- visions. Discrete Math. Theor. Comput. Sci., 7:155–202, 2005. http://dmtcs.episciences. org/346. MR: 2164064. [pp.3,4, 32, 38] [56] Vida Dujmović and David R. Wood. Upward three-dimensional grid drawings of graphs. Order, 23(1):1–20, 2006. https://doi.org/10.1007/s11083-006-9028-y. MR: 2258457. [p. 37] [57] Zdeněk Dvořák, Tony Huynh, Gwenaël Joret, Chun-Hung Liu, David R. Wood. Notes on graph product structure theory. 2020. arXiv: 2001.08860. [p. 39] [58] Zdeněk Dvořák and Robin Thomas. List-coloring apex-minor-free graphs. 2014. arXiv: 1401.1399. [pp. 27, 28] [59] David Eppstein. Diameter and treewidth in minor-closed graph families. Algorithmica, 27(3–4):275–291, 2000. https://doi.org/10.1007/s004530010020. MR: 1759751. [p. 27] [60] Jeff Erickson and Kim Whittlesey. Greedy optimal homotopy and homology generators. In Proceedings 16th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1038–1046. ACM, 2005. [p. 19] [61] Stefan Felsner, Giussepe Liotta, and Stephen K. Wismath. Straight-line drawings on restricted integer grids in two and three dimensions. In Petra Mutzel, Michael Jünger, and Sebastian Leipert, eds., Proc. 9th International Symp. on Graph Draw- ing (GD ’01), vol. 2265 of Lecture Notes in Comput. Sci., pp. 328–342. Springer, 2002. https://doi.org/10.1007/3-540-45848-4_26. [p. 37] [62] Fedor V. Fomin, Daniel Lokshtanov, and Saket Saurabh. and geometric graphs. In Proc. 23rd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1563–1575. 2012. https://doi.org/10.1137/1.9781611973099.124. MR: 3205314. [p. 32] [63] Jacob Fox and János Pach. A separator theorem for string graphs and its applications. Combin. Probab. Comput., 19(3):371–390, 2010. https://doi.org/10.1017/S0963548309990459. [p. 33] [64] Jacob Fox and János Pach. Applications of a new separator the- orem for string graphs. Combin. Probab. Comput., 23(1):66–74, 2014.

43 https://doi.org/10.1017/S0963548313000412. [p. 33] [65] Daniel J. Harvey and David R. Wood. Parameters tied to treewidth. J. Graph Theory, 84(4):364–385, 2017. https://doi.org/10.1002/jgt.22030. MR: 3623383. [p.7] [66] Toru Hasunuma. Queue layouts of iterated line directed graphs. Discrete Appl. Math., 155(9):1141–1154, 2007. https://doi.org/10.1016/j.dam.2006.04.045. MR: 2321020. [p.4] [67] Lenwood S. Heath, F. Thomson Leighton, and Arnold L. Rosenberg. Comparing queues and stacks as mechanisms for laying out graphs. SIAM J. Discrete Math., 5(3):398–412, 1992. https://doi.org/10.1137/0405031. MR: 1172748. [pp.3,4,5, 38] [68] Lenwood S. Heath and Sriram V. Pemmaraju. Stack and queue layouts of posets. SIAM J. Discrete Math., 10(4):599–625, 1997. https://doi.org/10.1137/S0895480193252380. [p. 38] [69] Lenwood S. Heath and Arnold L. Rosenberg. Laying out graphs using queues. SIAM J. Comput., 21(5):927–958, 1992. https://doi.org/10.1137/0221055. MR: 1181408. [pp.4, 10, 11] [70] Lenwood S. Heath and Arnold L. Rosenberg. Graph layout using queues, 2011. https://www.researchgate.net/publication/220616637_Laying_Out_Graphs_ Using_Queues. [p.3] [71] Percy J. Heawood. Map colour theorem. Quart. J. Pure Appl. Math., 24:332–338, 1890. https://doi.org/10.1112/plms/s2-51.3.161. [p. 36] [72] Jan van den Heuvel, Patrice Ossona de Mendez, Daniel Quiroz, Ro- man Rabinovich, and Sebastian Siebertz. On the generalised colouring num- bers of graphs that exclude a fixed minor. European J. Combin., 66:129–144, 2017. https://doi.org/10.1016/j.ejc.2017.06.019. [p.8] [73] Jan van den Heuvel and David R. Wood. Improper colourings inspired by Hadwiger’s conjecture, 2017. arXiv: 1704.06536. [p. 36] [74] Jan van den Heuvel and David R. Wood. Improper colourings in- spired by Hadwiger’s conjecture. J. London Math. Soc., 98:129–148, 2018. https://doi.org/10.1112/jlms.12127. [p.8] [75] Sampath Kannan, , and . Implicit representation of graphs. In Proc. 20th Annual ACM Symposium on Theory of Computing (STOC 1988), pages 334–343. ACM, 1988. https://doi.org/10.1145/62212.62244. [p.5] [76] Sampath Kannan, Moni Naor, and Steven Rudich. Implicit representation of graphs. SIAM J. Discrete Math., 5(4):596–603, 1992. https://doi.org/10.1137/0405049. [p.5] [77] Hal A. Kierstead and Daqing Yang. Orderings on graphs and game coloring number. Or- der, 20(3):255–264, 2003. https://doi.org/10.1023/B:ORDE.0000026489.93166.cb. [p. 36] [78] Kolja Knauer, Piotr Micek, and Torsten Ueckerdt. The queue-number of posets of bounded width or height. In Therese C. Biedl and Andreas Kerren, eds., Proc. 26th International Symposium on Graph Drawing and Network Visualization (GD ’18), vol. 11282 of Lecture Notes in Comput. Sci., pp. 200–212. Springer, 2018. https://doi.org/10.1007/978-3-030-04414-5_14. [p. 38] [79] Stephen G. Kobourov, Giuseppe Liotta, and Fabrizio Montecchiani. An annotated bibliography on 1-planarity. Comput. Sci. Rev., 25:49–67, 2017. https://doi.org/10.1016/j.cosrev.2017.06.002. MR: 3697129. [p. 32] [80] Andre˘ı Kotlov. Minors and strong products. European J. Combin., 22(4):511–512, 2001. https://doi.org/10.1006/eujc.2000.0428. MR: 1829745. [p. 29]

44 [81] Kyohei Kozawa, Yota Otachi, and Koichi Yamazaki. Lower bounds for treewidth of product graphs. Discrete Appl. Math., 162:251–258, 2014. https://doi.org/10.1016/j.dam.2013.08.005. MR: 3128527. [p. 29] [82] Jan Kratochvíl. String graphs. II. Recognizing string graphs is NP-hard. J. Com- bin. Theory Ser. B, 52(1):67–78, 1991. https://doi.org/10.1016/0095-8956(91)90091-W. [p. 33] [83] Jan Kratochvíl and Michal Vaner. A note on planar partial 3-trees, 2012. arXiv: 1210.8113. [p.7] [84] Chun-Hung Liu and David R. Wood. Clustered and layered treewidth. 2019. arXiv: 1905.08969. [p.8] √ [85] Seth M. Malitz. Genus g graphs have pagenumber O( g). J. Algorithms, 17(1):85–109, 1994. https://doi.org/10.1006/jagm.1994.1028. MR: 1279270. [p. 38] [86] Bojan Mohar. A linear time algorithm for embedding graphs in an arbitrary surface. SIAM J. Discrete Math., 12(1):6–26, 1999. https://doi.org/10.1137/S089548019529248X. [p. 39] [87] Bojan Mohar and Carsten Thomassen. Graphs on surfaces. Johns Hopkins University Press, 2001. MR: 1844449. [pp.3, 19] [88] Pat Morin. A fast algorithm for the product structure of planar graphs, 2020. arXiv: 2004.02530. [p. 39] [89] Jaroslav Nešetřil and Patrice Ossona de Mendez. Sparsity, vol. 28 of Algo- rithms and Combinatorics. Springer, 2012. https://doi.org/10.1007/978-3-642-27875-4. MR: 2920058. [p. 34] [90] L. Taylor Ollmann. On the book thicknesses of various graphs. In Frederick Hoffman, Roy B. Levow, and Robert S. D. Thomas, eds., Proc. 4th Southeastern Conference on Combinatorics, Graph Theory and Computing, vol. VIII of Congr. Numer., p. 459. Utilitas Math., 1973. [p.4] [91] Patrice Ossona de Mendez, Sang-il Oum, and David R. Wood. Defective colouring of graphs excluding a subgraph or minor. Combinatorica, 39(2):377–410, 2019. https://doi.org/10.1007/s00493-018-3733-1. [p. 38] [92] János Pach, Torsten Thiele, and Géza Tóth. Three-dimensional grid drawings of graphs. In Bernard Chazelle, Jacob E. Goodman, and Richard Pollack, eds., Advances in discrete and computational geometry, vol. 223 of Contemporary Mathematics, pp. 251–255. Amer. Math. Soc., 1999. MR: 1661387. [p. 37] [93] János Pach and Géza Tóth. Recognizing string graphs is decidable. Discrete Comput. Geom., 28(4):593–606, 2002. https://doi.org/10.1007/s00454-002-2891-4. [p. 33] [94] Sriram V. Pemmaraju. Exploring the Powers of Stacks and Queues via Graph Layouts. Ph.D. thesis, Virginia Polytechnic Institute and State University, U.S.A., 1992. [p.4] [95] Michał Pilipczuk and Sebastian Siebertz. Polynomial bounds for centered col- orings on proper minor-closed graph classes. In Timothy M. Chan, ed., Proc. 30th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1501–1520. 2019. https://doi.org/10.1137/1.9781611975482.91. arXiv: 1807.03683. [pp. 12, 39] [96] Sergey Pupyrev. Improved bounds for track numbers of planar graphs, 2019. arXiv: 1910.14153. [pp. 36, 39] [97] Bruce A. Reed. Tree width and tangles: a new connectivity measure and some applications. In Surveys in combinatorics, vol. 241 of London Math. Soc. Lecture Note Ser., pp. 87– 162. Cambridge Univ. Press, 1997. https://doi.org/10.1017/CBO9780511662119.006.

45 MR: 1477746. [p.7] [98] Bruce A. Reed and Paul Seymour. Fractional colouring and Hadwiger’s conjecture. J. Combin. Theory Ser. B, 74(2):147–152, 1998. https://doi.org/10.1006/jctb.1998.1835. MR: 1654153. [p.8] [99] S. Rengarajan and C. E. Veni Madhavan. Stack and queue number of 2-trees. In Ding-Zhu Du and Ming Li, eds., Proc. 1st Annual International Conf. on Computing and Combinatorics (COCOON ’95), vol. 959 of Lecture Notes in Comput. Sci., pp. 203–212. Springer, 1995. https://doi.org/10.1007/BFb0030834. [p.4] [100] Neil Robertson and Paul Seymour. Graph minors. II. Algorithmic aspects of tree-width. J. Algorithms, 7(3):309–322, 1986. https://doi.org/10.1016/0196-6774(86)90023-4. MR: 0855559. [p.7] [101] Neil Robertson and Paul Seymour. Graph minors. XVI. Exclud- ing a non-planar graph. J. Combin. Theory Ser. B, 89(1):43–76, 2003. https://doi.org/10.1016/S0095-8956(03)00042-X. MR: 1999736. [p. 24] [102] Marcus Schaefer, Eric Sedgwick, and Daniel Štefankovič. Recog- nizing string graphs in NP. J. Comput. System Sci., 67(2):365–380, 2003. https://doi.org/10.1016/S0022-0000(03)00045-X. [p. 33] [103] Marcus Schaefer and Daniel Štefankovič. Decidability of string graphs. J. Comput. System Sci., 68(2):319–334, 2004. https://doi.org/10.1016/j.jcss.2003.07.002. [p. 33] [104] Alex Scott, Paul Seymour, and David R. Wood. Bad news for chordal partitions. J. Graph Theory, 90:5–12, 2019. https://doi.org/10.1002/jgt.22363. [p.8] [105] Detlef Seese. Tree-partite graphs and the complexity of algorithms. In Lothar Budach, ed., Proc. International Conf. on Fundamentals of Computation Theory, vol. 199 of Lecture Notes in Comput. Sci., pp. 412–421. Springer, 1985. https://doi.org/10.1007/BFb0028825. MR: 0821258. [p.8] [106] Farhad Shahrokhi. New representation results for planar graphs. In 29th European Workshop on Computational Geometry (EuroCG 2013), pp. 177–180. 2013. arXiv: 1502.06175. [p.8] [107] Jiun-Jie Wang. Layouts for plane graphs on constant number of tracks, 2017. arXiv: 1708.02114. [p.5] [108] Veit Wiechert. On the queue-number of graphs with bounded tree-width. Electron. J. Combin., 24(1):1.65, 2017. https://doi.org/10.37236/6429. MR: 3651947. [pp.4,7, 39] [109] David R. Wood. Queue layouts of graph products and powers. Discrete Math. Theor. Comput. Sci., 7(1):255–268, 2005. http://dmtcs.episciences.org/352. MR: 2183176. [p. 29] [110] David R. Wood. Bounded-degree graphs have arbitrarily large queue-number. Discrete Math. Theor. Comput. Sci., 10(1):27–34, 2008. http://dmtcs.episciences.org/434. MR: 2369152. [p. 38] [111] David R. Wood. The structure of Cartesian products, 2008. https://www.birs.ca/ workshops/2008/08w5079/report08w5079.pdf. [p. 29] [112] David R. Wood. On tree-partition-width. European J. Combin., 30(5):1245–1253, 2009. https://doi.org/10.1016/j.ejc.2008.11.010. MR: 2514645. [p.8] [113] David R. Wood. Clique minors in cartesian products of graphs. New York J. Math., 17:627–682, 2011. http://nyjm.albany.edu/j/2011/17-28.html. [p. 29] [114] David R. Wood. Treewidth of Cartesian products of highly connected graphs. J. Graph Theory, 73(3):318–321, 2013. https://doi.org/10.1002/jgt.21677. [p. 29]

46 [115] Zefang Wu, Xu Yang, and Qinglin Yu. A note on graph minors and strong products. Appl. Math. Lett., 23(10):1179–1182, 2010. https://doi.org/10.1016/j.aml.2010.05.007. MR: 2665591. [p. 29] [116] Mihalis Yannakakis. Embedding planar graphs in four pages. J. Comput. System Sci., 38(1):36–67, 1989. https://doi.org/10.1016/0022-0000(89)90032-9. MR: 0990049. [p.3]

47