# Queue Layouts of Planar 3-Trees

A queue layout of a graph G consists of a linear order of the vertices of G and a partition of the edges of G into queues, so that no two independent edges of the same queue are nested. The queue number of G is the minimum number of queues required by any queue layout of G. In this paper, we continue the study of the queue number of planar 3-trees. As opposed to general planar graphs, whose queue number is not known to be bounded by a constant, the queue number of planar 3-trees has been shown to be at most seven. In this work, we improve the upper bound to five. We also show that there exist planar 3-trees, whose queue number is at least four; this is the first example of a planar graph with queue number greater than three.

## Authors

• 24 publications
• 11 publications
• 23 publications
• 15 publications
• ### On the Queue Number of Planar Graphs

A k-queue layout is a special type of a linear layout, in which the line...
06/15/2021 ∙ by Michael A. Bekos, et al. ∙ 0

• ### Planar Graphs of Bounded Degree have Constant Queue Number

A queue layout of a graph consists of a linear order of its vertices and...
11/02/2018 ∙ by Michael A. Bekos, et al. ∙ 0

• ### Parameterized Algorithms for Queue Layouts

An h-queue layout of a graph G consists of a linear order of its vertice...
08/19/2020 ∙ by Sujoy Bhore, et al. ∙ 0

• ### The Local Queue Number of Graphs with Bounded Treewidth

A queue layout of a graph G consists of a vertex ordering of G and a par...
08/12/2020 ∙ by Laura Merker, et al. ∙ 0

• ### On Mixed Linear Layouts of Series-Parallel Graphs

A mixed s-stack q-queue layout of a graph consists of a linear order of ...
08/24/2020 ∙ by Patrizio Angelini, et al. ∙ 0

• ### Queue Layouts of Graphs with Bounded Degree and Bounded Genus

We prove that graphs with bounded degree and bounded Euler genus have bo...
01/17/2019 ∙ by Vida Dujmovic, et al. ∙ 0

• ### The queue-number of posets of bounded width or height

Heath and Pemmaraju conjectured that the queue-number of a poset is boun...
06/12/2018 ∙ by Kolja Knauer, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

In a queue layout [14], the vertices of a graph are restricted to a line and the edges are drawn at different half-planes delimited by this line, called queues. The task is to find a linear order of the vertices along the underlying line and a corresponding assignment of the edges of the graph to the queues, so that no two independent edges of the same queues are nested; see Fig. 3. Recall that two edges are called independent if they do not share an endvertex. The queue number of a graph is the smallest number of queues that are required by any queue layout of the graph. Note that queue layouts form the “dual” concept of stack layouts [16], which do not allow two edges of the same stack to cross.

Apart from the intriguing theoretical interest, queue layouts find applications in several domains [1, 13, 17, 22]. As a result, they have been studied extensively over the years [22, 20, 14, 2, 18, 5, 9, 12, 21, 23, 19]. An important open problem in this area is whether the queue number of planar graphs is bounded by a constant. A positive answer to this problem would have several important implications, e.g., (i) that every -vertex planar graph admits a straight-line grid drawing [24], (ii) that every Hamiltonian bipartite planar graph admits a -layer drawing and an edge-coloring of bounded size, such that edges of the same color do not cross [8], and (iii) that the queue number of -planar graphs is also bounded by a constant [9]. The best-known upper bound is due to Dujmović [4], who showed that the queue number of an -vertex planar graph is at most (improving upon an earlier bound by Di Battista et al. [2]).

It is worth noting that many subclasses of planar graphs have bounded queue number. Every tree has queue number one [14], outerplanar graphs have queue number at most two [13], and series-parallel graphs have queue number at most three [20]. Surprisingly, planar 3-trees have queue number at most seven [23], although they were conjectured to have super-constant queue number by Pemmaraju [18]. As a matter of fact, every graph that admits a -queue layout is planar with at most edges; however, testing this property is -complete [13]; for a survey refer to [9].

Our Contribution. In Section 2, we improve the upper bound on the queue number of planar -trees from seven [23] to five; recall that a planar -tree is a triangulated plane graph with vertices, such that is either a -cycle, if , or has a vertex whose deletion gives a planar -tree with vertices, if . In Section 3, we show that there exist planar -trees, whose queue number is at least four, thus strengthening a corresponding result of Wiechert [23] for general (that is, not necessarily planar) -trees. We stress that our lower bound is also the best known for planar graphs. Table 1 puts our results in the context of existing bounds. We conclude in Section 4 with open problems.

### Preliminaries.

For a pair of distinct vertices and , we write , if precedes in a linear order. We also write to denote that precedes for all . Assume that is a set of independent edges with , for all . If the linear order is , then we say that is a -rainbow, while if the linear order is , we say that is a -twist. The edges of form a -necklace, if ; see Fig. (a)a. A preliminary result for queue layouts is the following.

###### Lemma 1 (Heath and Rosenberg [14])

A linear order of the vertices of a graph admits a -queue layout if and only if there exists no -rainbow.

Central in our approach is also the following contruction by Dujmović et al. [7] for internally-triangulated outerplane graphs; for an illustration see Figs. (b)b(c)c.

###### Lemma 2 (Dujmović, Morin, Wood [7])

Every internally-triangulated outerplane graph, , admits a straight-line outerplanar drawing, , such that the -coordinates of vertices of are integers, and the absolute value of the difference of the -coordinates of the endvertices of each edge of is either one or two. Furthermore, the drawing can be used to construct a -queue layout of .

Let be a face of a drawing produced by the construction of Lemma 2, where is an internally triangulated outerplane graph. Up to renaming of the vertices of this face, we may assume that , and . We refer to vertex as to the anchor of the face of ; and are referred to as top and bottom, respectively. It is easy to verify that drawing can be converted to a -queue layout of as follows: (i) for any two distinct vertices and of , , if and only if the -coordinate of is strictly greater than the one of , or the -coordinate of is equal to the one of , and is to the left of in , (ii) edge is assigned to the first (second) queue if and only if the absolute value of the difference of the -coordinates of and is one (two, respectively) in .

Finally, let and be two faces of , such that and are their anchors, and are their top vertices, and and are their bottom vertices. If and are distinct and in the -queue layout, then (if ) and (if ). The property clearly holds, if and do not have the same -coordinate. Otherwise, the property holds, since  is planar.

## 2 The Upper Bound

In this section, we prove that the queue number of every planar -tree is at most five. Our approach is inspired by the algorithm of Wiechert [23] to compute -queue layouts for general (not necessarily planar) -trees. To reduce the number of required queues in the produced layouts, we make use of structural properties of the input graph. In particular, we put the main ideas of the algorithm of Wiechert [23] into a peeling-into-levels approach (see, e.g., [25]), according to which the vertices and the edges of the input graph are partitioned as follows: (i) vertices incident to the outerface are at level zero, (ii) vertices incident to the outerface of the graph induced by deleting all vertices of levels are at level , (iii) edges between same-level vertices are called level edges, and (iv) edges between vertices of different levels are called binding edges.

To keep the description simple, we first show how to compute a -queue layout of a planar -tree , assuming that  has only two levels. Then, we extend our approach to more than two levels. We conclude by discussing the differences between the approach of Wiechert [23] and ours; we also describe which properties of planar -trees we exploited to reduce the required number of queues.

The Two-Level Case. We start with the (intuitively easier) case in which the given planar -tree consists of two levels, and . Since we use this case as a tool to cope with the general case of more than two levels, we consider a slightly more general scenario. In particular, we make the following assumptions (see Fig. (b)b): (A.1) the graph induced by the vertices of level is outerplane and internally-triangulated, and (A.2) each connected component of the graph induced by the vertices of level is outerplane and resides within a (triangular) face of . Without loss of generality we may also assume that is biconnected, as otherwise we can augment it to being biconnected by adding (level-) edges without affecting its outerplanarity. Note that in a planar -tree, graph is simply a triangle (and not an outerplane graph, as we have assumed), and as a result is a single outerplane component. Our algorithm maintains the following invariants:

1. the linear order is such that all vertices of precede all vertices of ;

2. the level edges use two queues, and ;

3. the binding edges use three queues, , , and .

In the following lemma, we show how to determine a (partial) linear order of the vertices of levels and that satisfies the first two invariants of our algorithm.

###### Lemma 3

There is an order of vertices of level and a partial order of vertices of level such that I.1 and I.2 are satisfied.

###### Proof

To compute an order that satisfies I.1, we construct two orders, one for the vertices of level (that satisfies I.2) and one for the vertices of level (that also satisfies I.2), and then we concatenate them so that the vertices of precede the vertices of .

To compute an order of the vertices of satisfying I.2, we apply Lemma 2, as by our initial assumption A.1, graph is internally-triangulated and outerplane. Thus, I.2 is satisfied for the vertices of level . To compute an order of the vertices of satisfying I.2, we apply Lemma 2 individually for every connected component of , which can be done by our initial assumption A.2. Then the resulting orders are concatenated (as defined by next Lemma 4). Since for every two connected components of , all vertices of the first one either precede or follow all vertices of the second one, we can use the same two queues (denoted by and in I.2) for all the vertices of . Therefore, I.2 is satisfied.

Next, we complete the order of the vertices of , in a way that the binding edges between and require at most three additional queues so as to satisfy I.3.

###### Lemma 4

Given the linear order of the vertices of level and the partial order of the vertices of level produced by Lemma 3, there is a total order of the vertices of and that extends their partial orders and an assignment of the binding edges between and into three queues such that I.3 is satisfied.

###### Proof

Consider a connected component of . By our initial assumption A.2, component resides within a triangular face of . Let , and be the anchor, top and bottom vertices of the face, respectively. We assign the binding edges incident to to queue , the ones incident to to queue and the ones incident to to queue ; see the blue, red, and green edges in Fig. 8.

Next we describe how to compute the relative order of the connected components of . Let and be two such components. By our initial assumption A.2, and reside within two triangular faces and of . Assume that and are the anchors of the two faces, are top and are bottom vertices. If , then precedes if and only if in the order of . If , we have or . If , then precedes if and only if in the order of . Otherwise (that is, and ), precedes if and only if in the order of . We claim that for the resulting order of , I.3 is satisfied, that is, no two edges of each of , and are nested.

We start our proof with . Consider two independent edges and , where and (see the blue edges in Fig. 8 incident to and ). By construction of , and are anchors of two different faces and of (see the faces of Fig. (c)c that contain and ). Without loss of generality we assume that in the order of . Then, the two components and of , that reside within and and contain and , are such that all vertices of precede all vertices of (in Fig. 8, precedes ; thus, precedes ). Since and , edges and do not nest.

We continue our proof with (the proof for is similar). Let and be two independent edges of , where and (see the red edges in Fig. 8 incident to and ). By construction of , and are the top vertices of two different faces and of (see the faces of Fig. (c)c that contain and ). Let and be the components of that reside within and and contain and . Finally, let and be the anchors of and , respectively. Suppose first that and assume that in the order of . Since , it follows that and that all vertices of precede all vertices of (in Fig. 8, precedes , which implies that precedes ; thus, precedes ). Since and , it follows that and are not nested. Suppose now that and assume that in the order of . Since and , all vertices of precede all vertices of . Since and , it follows that and are not nested. Hence, I.3 is satisfied, which concludes the proof.

Lemmas 3 and 4 conclude the two-level case. Before we proceed with the multi-level case, we make a useful observation. To satisfy I.3, we did not impose any restriction on the order of the vertices of each connected component of  (any order that satisfies I.2 for level would be suitable for us, that is, not necessarily the one constructed by Lemma 2). What we fixed, was the relative order of these components. We are now ready to proceed to the multi-level case.

The Multi-Level Case. We now consider the general case, in which our planar -tree consists of more than two levels, say with . Let be the subgraph of induced by the vertices of level ; . The connected components of each graph are internally-triangulated outerplane graphs that are not necessarily biconnected: Clearly, this holds for , which is a triangle. Assuming that for some , graph has the claimed property, we observe that each connected component of resides within a facial triangle of . Since each non-empty facial triangle of in induces a planar -tree [15], the claim follows by observing that the removal of the outer face of a planar -tree yields a plane graph, whose outer vertices induce an internally-triangulated outerplane graph.

For the recursive step of our algorithm, assume that for some we have a -queue layout for each of the connected components of the graph induced by the vertices of , that satisfies the following invariants.

1. the linear order is such that all vertices of precede all vertices of for every ;

2. the level edges of use two queues, and ;

3. for every , the binding edges between and use three queues, , , and .

Based on these layouts, we show how to construct a -queue layout (satisfying M.1–M.3) for each of the connected components of the graph induced by the vertices of . Let be such a component. By definition, is delimited by a connected component of which is internally-triangulated and outerplane. If none of the faces of contains a connected component of , then we compute a -queue layout of it using Lemma 2. Consider now the more general case, in which some of the faces of contain connected components of . By M.1–M.3, we have computed -queue layouts for all the connected components, say , of that reside within the faces of .

We proceed by applying the two-level algorithm to the subgraph of induced by the vertices of and the vertices incident to the outer faces of . By the last observation we made in the two-level case, this will result in: (a) a linear order of the vertices of , (b) a relative order of the components , (c) an assignment of the (level-) edges of into and , and (d) an assignment of the binding edges between and each of into , and . Up to renaming, we assume that is the computed order of these components; see Fig. (a)a.

By (c) and (d), all edges of are assigned to , since the edges of have been recursively assigned to these queues. Next, we partition the order of vertices of into disjoint intervals, say , such that precedes if and only if . All the (level-) vertices of are contained in in the order by (a). For , contains the vertices of of each of the components , such that the vertices of of precede the vertices of of if and only if ; see Fig. (b)b. The proof that M.1–M.3 are satisfied can be found in Appendix 0.A. We summarize in the following.

###### Theorem 2.1

Every planar 3-tree has queue number at most .

We note here that queue layouts are closely related to track layouts; for definitions refer to [7]. The following result follows immediately from a known result by Dujmović, Morin, Wood [6]; see Appendix 0.A for details.

###### Corollary 1

The track number of a planar 3-tree is at most .

Differences with Wiechert’s algorithm. Wiechert’s algorithm [23] builds upon a previous algorithm by Dujmović et al. [6]. Both yield queue layouts for general -trees, using the breadth-first search (BFS) starting from an arbitrary vertex of . For each and each connected component induced by the vertices at distance  from , create a node (called bag) “containing” all vertices of ; two bags are adjacent if there is an edge of  between them. For a -tree, the result is a tree of bags , called tree-partition, so that (P.1) every node of induces a connected -tree, and (P.2) for each non-root node , if is the parent of , then the vertices in having a neighbor in form a clique of size . Both algorithms order the bags of , such that the vertices of the bags at distance from precede those at distance . The vertices within each bag are ordered by induction using P.1.

The algorithms differ in the way the edges are assigned to queues; the more efficient one by Wiechert [23] uses queues ( for the inter- and for the intra-bag edges), which is worst-case optimal for - and -trees.

If is a planar -tree and the BFS is started from a dummy vertex incident to the three outervertices of , then the intra- and inter-bag edges correspond to the level and binding edges of our approach, while the bags at distance from in correspond to different connected components of level .

To reduce the number of queues, we observed that in (i) every node of induces a connected outerplanar graph, while (ii) each clique of size three by P.2 is a triangular face of . By the first observation, we reduced the number of queues for intra-bag edges; by the second, we combined orders from different bags more efficiently.

## 3 The Lower Bound

In the following, we prove that the queue number of planar 3-trees is at least four. To this end, we will define recursively a subgraph of a planar 3-tree and we will show that it contains at least one -rainbow in any ordering. Starting with a set of independent edges with and to be determined later, we connect their endpoints to two unique vertices, say and , which we assume to be neighboring. We refer to these edges as -edges.

As a next step, we stellate each triangle with a vertex , that is, we introduce vertex and connect it to , , and . Symmetrically, we also stellate each triangle with a vertex . Afterwards, we add one more level, that is, we stellate each of the triangles , , , , and with vertices , , , , and , respectively; see Fig. (b)b. We further stellate with and then with . Symmetrically, we stellate with and with .

Let be the graph constructed so far. We refer to vertices and as the poles of and we assume that admits a -queue layout . By symmetry, we may assume that and that for each edge . Consider a single edge and the relative order of its endvertices to and . Then, there exist six possible permutations: (P.1) , (P.2) , (P.3) , (P.4) , (P.5) , and (P.6) .

By the pigeonhole principle and by setting , we may claim that at least one of the permutations P.1-P.6 applies to at least edges. We will show that if too many -edges share one of the permutations P.1-P.5, then there exists a -rainbow, contradicting the fact that is a -queue layout for . This implies that if is large enough, then for at least one -edge of permutation P.6 applies. Based on this fact, we describe later how to augment the graph that we have constructed so far using a recursive construction such that we can also rule out permutation P.6. Thereby, proving the claimed lower bound of four. We start with an auxiliary lemma.

###### Lemma 5

In every queue that contains independent edges, there exists either an -twist or an -necklace.

###### Proof

Assume that no -twist exists, as otherwise the lemma holds. We will prove the existence of an -necklace. Let be the independent edges. Assume w.l.o.g. that for each . Consider the edge . Since is the first vertex in the order and no two edges nest, each vertex , with , is to the right of . Since no -twist exists, vertex is to the right of . Thus, and do not cross. The removal of makes first. By applying this argument times, we obtain that form an -necklace.

Applying the pigeonhole principle to a -queue layout, we obtain the following.

###### Corollary 2

Every -queue layout with at least independent edges contains at least one -twist or at least one -necklace.

We exploit this result for permutations P.1-P.6 as follows. Recall that is a -queue layout for . So, if we set for an of our choice, then at least -edges of share the same permutation. Moreover, these edges are by construction independent. Therefore, by Corollary 2 at least of them form a necklace or a twist (while also sharing the same permutation). In the following, we show that if -edges, say w.l.o.g. , form a necklace or a twist (for an appropriate choice of ) and simultaneously share one of the permutations P.1-P.5, then a -rainbow is inevitably induced, which contradicts the fact that is a -queue layout. We consider each case separately.

Case P.1: Let . It suffices to consider the case, in which form a twist, since in general for the necklace case is impossible. Hence, the order is . We show that always yields a 4-rainbow; Fig. 18 shows the three subcases arising when is such that  holds. Clearly, each yields a -rainbow. Since we did not use the edge , by symmetry, a -rainbow is also obtained when .

Case P.2: As in the previous case, we set and we only consider the case, in which form a twist, since the necklace case is again impossible. Hence, the order is . One may verify that placing and to the left of always results in a 4-rainbow (see Appendix 0.B for details). For the case in which and are preceded by , we distinguish between if holds or not. Both result in a -rainbow.

Case P.3: This case can be ruled out like Case P.2 due to symmetry.

Case P.4: Let . We distinguish two subcases based on whether the edges form a twist or a necklace (in contrast to the previous case, here both cases are possible).

We start with the twist case. Hence, the order is . Let and let be any element of . Similar to the previous case, we sweep from left to right and rule out easy subcases. However, we have to ensure that we do not use any edge from to or in order to keep the roles of and interchangeable. Fig. 25 shows that we may assume that , that is, all and are preceded by .

Next, we show that we can always construct a -rainbow spanning , which then yields the desired -rainbow. Let us take a closer look at the ordering of the 8 vertices in . To prevent the creation of a -rainbow that spans , we claim that the ordering has to comply with two requirements: (R.1) the indices of the first 7 elements of are non-decreasing, and (R.2) for the last 7 elements of , it must hold that all precede all . Assume to the contrary, that R.1 does not hold. Hence, there exists a pair of vertices, say w.l.o.g , with and is not the last element of . Then, forms a -rainbow and together with the last element of that is adjacent to either or , we obtain a -rainbow spanning ; a contradiction. Assume now that R.2 does not hold. Then, there exists a pair with not being the first element. Let the first element be . Then, is a -rainbow spanning ; a contradiction.

Now, we show that R.1 and R.2 cannot simultaneously hold, which implies the existence of a -rainbow. Consider the last element of . Assume that R.1 and R.2 both hold. By R.2, we may deduce that the last three elements of belong to . Let them be as they appear from left to right. Then, by R.1 we have that . Consider now . By R.1, must hold. This contradicts the fact that are the last three elements of .

We continue with the necklace case. Here, the order is . We make several observations about the ordering in the form of propositions; their formal proofs can be found in Appendix 0.B.

###### Proposition 1

Let be a neighbor of and for . Then, either holds, or .

###### Proposition 2

Let and be two vertices that form a with and , for . Then, at least one of the following holds: or .

###### Proposition 3

Let , be neighbors of both , , for . Then, at most one of and is between and or between and . Furthermore, if one of and is between and or between and , then the other is not between and .

###### Proposition 4

For , each vertex from the set is between and .

By Proposition 4, for , each vertex from is in . Then, the edges between these vertices cannot form a -rainbow, as otherwise this -rainbow along with the two edges and would form a -rainbow. Assume w.l.o.g. that . Then, by Proposition 3, one of the following two conditions hold: (i) , (ii) ; see Fig. 28. In both cases, must precede both and , as otherwise either , or would form a -rainbow; see Fig. 28. But then there is no valid position for without creating a -rainbow in either case, resulting together with and in a -rainbow.

Case P.5: This case can be ruled out like Case P.4 due to symmetry.

From the above case analysis it follows that if is at least (which implies that is at least 1,800), then for at least one -edge of permutation P.6 applies, that is, there exists such that . Notice that the edges and form a -rainbow.

We proceed by augmenting graph as follows. For each edge of , we introduce a new copy of , which has and as poles. Let be the augmented graph and let be the -edges of the copy of graph in corresponding to the edge of the original graph . Then, by our arguments above there exists such that . Hence, the edges , and form a -rainbow, since holds. If we apply the same augmentation procedure to graph , then we guarantee that the resulting graph , which is clearly a subgraph of a planar -tree, has inevitably a -rainbow. Hence, either does not admit a -queue layout, as we initially assumed, or does not admit a -queue layout. In both cases, Theorem 3.1 follows.

###### Theorem 3.1

There exist planar 3-trees that have queue number at least .

## 4 Conclusions

In this work, we presented improved bounds on the queue number of planar -trees. Three main open problems arise from our work. The first one concerns the exact upper bound on the queue number of planar -trees. Does there exist a planar -tree, whose queue number is five (as our upper bound) or the queue number of every planar -tree is four (as our lower bound example)? The second problem is whether the technique that we developed for planar -trees can be extended so to improve the upper bound for the queue number of general (that is, non-planar) -trees, which is currently exponential in  [23]. Finally, the third problem is the central question in the area. Is the queue number of general planar graphs (that is, that are not necessarily planar -trees) bounded by a constant?

## References

• [1] Bhatt, S.N., Chung, F.R.K., Leighton, F.T., Rosenberg, A.L.: Scheduling tree-dags using FIFO queues: A control-memory trade-off. J. Parallel Distrib. Comput. 33(1), 55–68 (1996)
• [2] Di Battista, G., Frati, F., Pach, J.: On the queue number of planar graphs. SIAM J. Comput. 42(6), 2243–2285 (2013)
• [3] Di Giacomo, E., Liotta, G., Meijer, H.: 3D straight-line drawings of k-trees. Tech. rep., 2003-473, School of Computing, Queens’s University, Kingston, Canada (2003)
• [4] Dujmović, V.: Graph layouts via layered separators. J. Comb. Theory, Ser. B 110, 79–89 (2015)
• [5] Dujmović, V., Frati, F.: Stack and queue layouts via layered separators. J. Graph Algorithms Appl. 22(1), 89–99 (2018)
• [6] Dujmović, V., Morin, P., Wood, D.R.: Layout of graphs with bounded tree-width. SIAM J. Comput. 34(3), 553–579 (2005)
• [7] Dujmović, V., Pór, A., Wood, D.R.: Track layouts of graphs. Discrete Mathematics & Theoretical Computer Science 6(2), 497–522 (2004)
• [8] Dujmović, V., Wood, D.R.: Tree-partitions of k-trees with applications in graph layout. In: Bodlaender, H.L. (ed.) WG. LNCS, vol. 2880, pp. 205–217. Springer (2003)
• [9] Dujmović, V., Wood, D.R.: Stacks, queues and tracks: Layouts of graph subdivisions. Discrete Mathematics & Theoretical Computer Science 7(1), 155–202 (2005)
• [10] Felsner, S., Liotta, G., Wismath, S.K.: Straight-line drawings on restricted integer grids in two and three dimensions. J. Graph Algorithms Appl. 7(4), 363–398 (2003)
• [11] Fertin, G., Raspaud, A., Reed, B.: On star coloring of graphs. In: International Workshop on Graph-Theoretic Concepts in Computer Science. pp. 140–153. Springer (2001)
• [12] Hasunuma, T.: Laying out iterated line digraphs using queues. In: Liotta, G. (ed.) Graph Drawing. LNCS, vol. 2912, pp. 202–213. Springer (2003)
• [13] Heath, L.S., Leighton, F.T., Rosenberg, A.L.: Comparing queues and stacks as mechanisms for laying out graphs. SIAM J. Discrete Math. 5(3), 398–412 (1992)
• [14] Heath, L.S., Rosenberg, A.L.: Laying out graphs using queues. SIAM J. Comput. 21(5), 927–958 (1992)
• [15] Mondal, D., Nishat, R.I., Rahman, M.S., Alam, M.J.: Minimum-area drawings of plane 3-trees. J. Graph Algorithms Appl. 15(2), 177–204 (2011)
• [16] Ollmann, T.: On the book thicknesses of various graphs. In: Hoffman, F., Levow, R., Thomas, R. (eds.) Southeastern Conference on Combinatorics, Graph Theory and Computing. Congressus Numerantium, vol. VIII, p. 459 (1973)
• [17] Pach, J., Thiele, T., Tóth, G.: Three-dimensional grid drawings of graphs. In: Battista, G.D. (ed.) Graph Drawing. LNCS, vol. 1353, pp. 47–51. Springer (1997)
• [18] Pemmaraju, S.V.: Exploring the powers of stacks and queues via graph layouts. Ph.D. thesis, Virginia Tech (1992)
• [19] Pupyrev, S.: Mixed linear layouts of planar graphs. In: Graph Drawing. Lecture Notes in Computer Science, vol. 10692, pp. 197–209. Springer (2017)
• [20] Rengarajan, S., Madhavan, C.E.V.: Stack and queue number of 2-trees. In: Du, D., Li, M. (eds.) COCOON. LNCS, vol. 959, pp. 203–212. Springer (1995)
• [21] Shahrokhi, F., Shi, W.: On crossing sets, disjoint sets, and pagenumber. J. Algorithms 34(1), 40–53 (2000)
• [22] Tarjan, R.E.: Sorting using networks of queues and stacks. J. ACM 19(2), 341–346 (1972)
• [23] Wiechert, V.: On the queue-number of graphs with bounded tree-width. Electr. J. Comb. 24(1), P1.65 (2017)
• [24] Wood, D.R.: Queue layouts, tree-width, and three-dimensional graph drawing. In: Agrawal, M., Seth, A. (eds.) FSTTCS. LNCS, vol. 2556, pp. 348–359. Springer (2002)
• [25] Yannakakis, M.: Embedding planar graphs in four pages. J. Comput. Syst. Sci. 38(1), 36–67 (1989)

## Appendix 0.A Omitted Proofs from Section 2

Theorem 2.1.Every planar 3-tree has queue number at most .

###### Proof

Since M.1 is clearly satisfied for , it remains to prove that the assignment of the edges of to is such that M.2 and M.3 are satisfied.

Since the edges of are partitioned into level and binding, the endvertices of each edge are either in the same or in two consecutive intervals; in the former (latter) case, it is assigned to or (to , or ), since it is a level (binding) edge. Edges assigned to and cannot nest, as otherwise our two-level algorithm has computed an invalid assignment for the level edges of or an invalid assignment in and has been recursively computed for . Similarly, any two (binding) edges of , or cannot be nested, if both bridge with the same component or with two different components of , or both belong to the same component , for some . It remains to prove that there exist no two nested edges of , or that belong to two different components and and their endvertices are in two consecutive intervals and , where and . The former holds because of the two-level algorithm. The latter holds because all vertices of either precede or follow all vertices of in both and (by the choice of the relative order). So, M.1–M.3 are satisfied and the proof follows.

## Appendix 0.B Omitted Proofs from Section 3

Details of Case P.2. Recall that in this case, the order is . Let us consider now every possible position of . Fig. 34 shows that a -rainbow is always obtained when . Hence, holds. Symmetrically, we can obtain that holds. However, we have no knowledge about the relative order of and . In the following, we distinguish two subcases depending on whether or . Both subcases are illustrated in Fig. 37, which also shows the existence of -rainbows, thus completing this case.

Details of Case P.4. In the following, we give the detailed proofs of Propositions 14 that we omitted in the main part.

Proposition 1.Let be a neighbor of and for . Then, either holds, or .

###### Proof

Let be the neighbor of . We prove in the following that for any placement of , such that neither nor hold, there is a -rainbow:

• if , then forms a -rainbow; see Fig. (a)a;

• if , then forms a -rainbow; see Fig. (b)b;

• if , then forms a -rainbow; see Fig. (c)c and

• if , then forms a -rainbow; see Fig. (d)d.

Since each case yields a -rainbow, the proof follows.

Proposition 2. Let and be two vertices that form a with and , for . Then, at least one of the following holds: or .

###### Proof

Since , , , form a , in any relative ordering of these four vertices, they form a -rainbow. By Proposition 1, each of and is either between and , or after . But if both of them were between and , then the -rainbow by the edges of the , along with the two edges , would form a -rainbow; a contradiction. Hence, or must hold, as desired.

Proposition 3.Let , be neighbors of both , , for . Then, at most one of and is between and or between and . Furthermore, if one of and is between and or between and , then the other is not between and .

###### Proof

In each of the cases where (i) b