On the queue-number of graphs with bounded tree-width

A queue layout of a graph consists of a linear order on the vertices and an assignment of the edges to queues, such that no two edges in a single queue are nested. The minimum number of queues needed in a queue layout of a graph is called its queue-number. We show that for each $k\geq1$, graphs with tree-width at most $k$ have queue-number at most $2^k-1$. This improves upon double exponential upper bounds due to Dujmovi\'c et al. and Giacomo et al. As a consequence we obtain that these graphs have track-number at most $2^{O(k^2)}$. We complement these results by a construction of $k$-trees that have queue-number at least $k+1$. Already in the case $k=2$ this is an improvement to existing results and solves a problem of Rengarajan and Veni Madhavan, namely, that the maximal queue-number of $2$-trees is equal to $3$.


Introduction
A queue layout of a graph consists of a linear order on the vertices and an assignment of the edges to queues, such that no two edges in a single queue are nested. This is a dual concept to stack layouts, which are defined similarly, except that no two edges in a single stack may cross. The minimum number of queues (stacks) needed in a queue layout (stack layout) of a graph is called its queue-number (stack-number ).
The notion of queue-number was introduced by Heath and Rosenberg [19] in 1992. Queue layouts, however, have been implicitly studied long before and have applications in fault-tolerant processing, sorting with parallel queues, matrix computations, and scheduling parallel processors (see [18,19,21] for more details).
In their seminal paper, Heath and Rosenberg characterize graphs admitting a 1-queue layout as so-called arched leveled-planar graphs and show that it is NPhard to recognize them. This is contrasting the situation for graphs with a 1-stack layout, since these graphs are exactly the outerplanar graphs [2] and hence can be recognized in polynomial time. Several other results relating these two types of layouts are studied in [18]. While planar graphs have stack-number at most 4 [26], it remains open whether the queue-number of planar graphs can be bounded by a constant. This is one of the most tantalizing problems regarding queue layouts and it was conjectured to be true by Heath and colleagues [18,19]. In fact, they even conjecture that the queue-number can be bounded in terms of the stack-number; see [11] for a comprehensive study of this question.
There are some partial results towards a positive resolution of this conjecture. Improving on an earlier result by Di Battista et al. [5], Dujmović showed that planar graphs have queue-number O(log n) [7]. This result was extended to graphs with bounded Euler genus by Dujmović, Morin, and Wood [13]. In the more general case of graphs that exclude a fixed graph as a minor they obtained a log O(1) n bound on the queue-number.
In this paper we focus on queue layouts of bounded tree-width graphs. A comprehensive list of references to papers about further aspects of queue layouts can be found in [10].
1.1. Queue layouts and tree-width. For several graph classes it is known that they have bounded queue-number. For example, trees have a 1-queue layout [19], outerplanar graphs a 2-queue layout [18], partial 2-trees (that is, series-parallel graphs) have a 3-queue layout [23], and graphs of path-width at most p have a p-queue layout [25].
All these graphs have bounded tree-width and it was first asked by Ganley and Heath [15] whether there is a constant upper bound on the queue-number of bounded tree-width graphs (for the stack-number this is true as shown in [15]). This question was answered in the affirmative for graphs that additionally have bounded maximum degree by Wood [25], and later in full by Dujmović and Wood [9] (see also [8]). In the latter result, Dujmović and Wood establish the upper bound 3 k 6 (4 k −3k−1)/9 − 1 on the queue-number of graphs with tree-width at most k. In fact, they provide upper bounds as solutions of a system of equations. Giacomo et al. [6] present an improved system of equations with smaller solutions for each k 1 (without trying to find a nice expression for the corresponding upper bound), but still being double exponential in k. Answering a question of Dujmović et al. [8] we prove a single exponential upper bound. Theorem 1. Let k 0. For all graphs G of tree-width at most k, we have that where qn(G) denotes the queue-number of G.
Observe that this bound is not only asymptotically much smaller than previous best bounds, it is also strong for small values of k. As special cases we obtain the above mentioned results that trees and partial 2-trees have queue-number at most 1 and 3, respectively. (And as we will show, 3 is best possible in the latter case). Interestingly, in his PhD thesis Pemmaraju [21] supports a conjecture of him that a certain family of planar 3-trees (the stellated triangles) has queue-number Ω(log n). Of course, this conjecture has already been disproved by Dujmović et al. with their upper bound for k-trees. However, now with Theorem 1 we even get that planar 3-trees (and more generally partial 3-trees) have queue-number at most 7.

Track layouts.
For the proofs of their upper bounds, Dujmović et al. and Giacomo et al. use track layouts of graphs. A track layout is a partition of the vertex set into tracks together with a linear ordering on each track, such that no two tracks induce a crossing with respect to their orderings (see Section 2 for details). The minimum number of tracks in a track layout of a graph G is called the track-number of G, and denoted by tn(G).
In [8,9] the upper bound 3 k 6 (4 k −3k−1)/9 is actually shown for the track-number of graphs of tree-width at most k. Since the authors can also show that for all graphs G it holds that qn(G) tn(G) − 1, they obtain their bound for the queue-number from the track-number bound. In this paper we show the following result.
Theorem 2. Let k 0. For all graphs G of tree-width at most k, we have that Clearly, this 2 O(k 2 ) bound is asymptotically a big improvement upon the double exponential bound discussed before. However, for small values of k (that is, k ∈ {1, 2, 3}) better bounds are known. For example, Giacomo et al. [6] show that graphs of tree-width at most 2 admit a 15-track layout.
1.3. Three-dimensional drawings. Another reason to study queue-number and track-number is their connection to three-dimensional drawings of graphs. A threedimensional straight-line grid drawing is an embedding of the vertices onto distinct points of the grid Z 3 with edges being represented as straight lines that connect their end-vertices, such that any two straight lines intersect only if they share a common end-vertex, and a vertex can only be contained in a straight line if this vertex is the end-vertex of that line.
Using the moment curve one can show that each graph has such a drawing. Therefore, we would like to minimize the volume of the bounding box defined by the grid points used for the embedding. Cohen et al. [4] showed that the complete graph K n requires Θ(n 3 ) volume. Graphs with bounded chromatic number can be drawn on the three-dimensional grid with O(n 2 ) volume, as shown by Pach et al. [20], and this is best possible for complete bipartite graphs. The latter result was improved by Bose et al. [3], who showed that graphs with n vertices and m edges need at least 1 8 (n + m) volume. In particular, this implies that graphs with three-dimensional drawings of linear volume have only linear many edges. Dujmović and Wood [12] showed that graphs with bounded degeneracy admit drawings with O(n 3/2 ) volume. A major open problem in this area is due to Felsner et al. [14] and asks whether planar graphs can be drawn with linear volume. The best known volume bound for this problem is O(n log n) and was given by Dujmović [7] (see also [13] for an extension of this bound to apex-minor free graphs, and an n log O(1) n bound for proper minor-closed families). In [8] Dujmović et al. argue that if planar graphs have bounded queue-number, then this would imply a linear bound on the required volume for three-dimensional drawings of planar graphs.
Let us focus on graphs of bounded tree-width now. For outerplanar graphs, which have tree-width at most 2, Felsner et al. [14] proved a linear volume bound. Their argument is based on track layouts and a technique called "wrapping". Dujmović et al. [8] showed that graphs of track-number at most t have a O(t) × O(t) × O(n) drawing, implying that bounded tree-width graphs can be drawn with linear volume. To be more precise, using the bounds on the track-number obtained by Dujmović et al. one can deduce that graphs of tree-width at most k admit O(t k ) × O(t k ) × O(n) drawings, where t k = 3 k · 6 (4 k −3k−1)/9 . The resulting volume was slightly improved by Giacomo et al. [6] with their new bounds on track-number. Now, the aforementioned volume bound in terms of the track-number combined with our Theorem 2 significantly reduces the required volume for bounded treewidth graphs to 2 O(k 2 ) × 2 O(k 2 ) × O(n).

1.4.
Lower bounds on the queue-number. Not much is known with respect to lower bounds on the queue-number of graphs. Heath and Rosenberg [19] give a simple argument for the fact that the queue-number is always larger than half of the edge density. In particular, graph families with more than linear many edges have unbounded queue-number. Gregor et al. [16] show that the n-dimensional hypercube has queue-number at least ( 1 2 − ε)n − O(1/ε), for every ε > 0. To the author's knowledge, the best published lower bound on the queue-number of planar graphs is 2 [23]. In fact, the example given is an outerplanar graph and hence has tree-width at most 2. In the same paper it is conjectured that there are planar graphs with queue-number 5 (without providing deep evidence for this).
For graphs of tree-width at most k the situation is similar. It is easy to see that complete graphs and complete bipartite graphs yield examples with queuenumber at least k+1 2 , but besides that no lower bounds depending on k have been discussed. (On the other hand, this is the case for track-number [6,8].) For the special case of 2-trees we already mentioned that their queue-number is at most 3. The aforementioned example also shows that there are 2-trees with queuenumber 2. We close this gap and thereby answer a question of Rengarajan and Veni Madhavan [23] with the following general lower bound.
Theorem 3. For each k 2, there is a k-tree with queue-number at least k + 1.
Since 2-trees are planar, we particularly obtain that there are planar graphs with queue-number at least 3.
1.5. Proof ideas and organization. For the proof of Theorem 1 we make use of tree-partitions, which were introduced by Seese [24] and independently by Halin [17]. A tree-partition of a graph is a partition of its vertex set into "bags", combined with an underlying tree (or forest) on the bags so that each edge of the graph is either contained within a bag, or it goes along an edge of the tree. The fact that k-trees admit tree-partitions such that each bag induces a (k − 1)-tree (see [8]) allows us to apply induction. In contrast to the proofs of [6,8], we do not construct a track layout as an intermediate step, but directly build a queue layout of the given graph.
The rest of the paper is organized as follows. In Section 2 we provide necessary definitions and basic propositions for our proofs. In Section 3 we prove Theorem 1 and 2. Then we show the lower bound of Theorem 3 in Section 4. We conclude the paper with some open problems in Section 5.

Preliminaries
In this section we introduce the necessary definitions and basic concepts for our main result.
2.1. Queue and Track layouts. Let G = (V, E) be a graph and let L be a linear order on the vertices of G. We say that edges uv, u v ∈ E are nested with respect to L if u < u < v < v or u < u < v < v in L. A set Q of edges in G forms a queue with respect to L if no two edges of Q are nested in L. A queue layout of G is a linear order L on the vertices of G together with a partition of the edge set of G into queues with respect to L. The minimum number of queues in a queue layout of G is called the queue-number of G, and denoted by qn(G).
There is a different access to the queue-number via k-rainbows. Given a linear order L on the vertices of a graph G, we say that the edges a 1 b 1 , . . . , a k b k form a rainbow of size k (or k-rainbow ) if Clearly, if k is the maximum size of a rainbow in L, then each queue layout using L as the linear order will consist of at least k queues. It is not hard to see that k queues suffice in this case.

Proposition 4 ([19]
). If G has no rainbow of size k + 1 with respect to a given linear order L, then G has a queue layout using at most k queues with respect to L.
As a consequence, the queue-number can be described as the minimum number taken over the maximal size of a rainbow in a linear order of V (G).
We define track layouts now. Let G be graph and let {V i : i = 1, . . . , } be a partition of V (G) into independent set. A set V i combined with a linear order < i on its elements is a track of G. Then a set of tracks {(V i , < i ) : i = 1, . . . , } is called a track assignment of G. Two edges ab and cd form an X-crossing in a track assignment Figure 1. A tree-partition of a 3-tree whose vertices are labeled with a, b, . . . , m. The figure on the right shows the underlying tree of the tree-partition.
minimum number of tracks in a track layout of G is the track-number of G, which we denote by tn(G).
consisting of a tree T and a family of non-empty subtrees of T , such The vertices of T are called nodes, and each node u ∈ V (T ) induces a bag {x ∈ V : u ∈ T x }. The maximum size of a bag minus one is the width of the tree-decomposition. Then the tree-width of G can be defined as the minimum width of a tree-decomposition of G. For our purposes it is convenient to follow the work of Dujmovic et al. [8] and define k-trees as introduced by Reed [22]. Given some fixed integer k 0, a k-tree is defined recursively. The empty graph is a k-tree, and each graph obtained by adding a vertex v to a k-tree so that the adjacent vertices of v form a clique of size at most k is also a k-tree. (Arnborg and Proskurowski [1] introduced k-trees in a slightly more restrictive way. They start with defining a k-clique to be a k-tree, and each graph obtained from a k-tree by adding a vertex being adjacent to a k-clique is also a k-tree. Sometimes the notion of strict k-trees is used for this more restrictive version.) A subgraph of a k-tree is called a partial k-tree. It is well-known that a graph has tree-width at most k if and only if it is a partial k-tree. Moreover, k-trees are chordal graphs, that is, they do not contain a cycle on more than three vertices as an induced subgraph.
2.3. Tree-partitions. For the construction of a queue layout in our main proof, we do not use a specific tree-decomposition, but instead we use a tree-partition. Given a graph G, a tree-partition of G is a pair consisting of a tree T (or forest) and a partition of V (G) into sets {T x : x ∈ V (T )} being indexed by the vertices of T , such that for each edge uv in G we either have that u, v ∈ T x for some x ∈ V (T ), or there is an edge xy of T with u ∈ T x and v ∈ T y . We refer to the vertices of T as nodes, and say that T x (x ∈ V (T )) is a bag of the tree-partition. By G[T x ] we denote the subgraph of G induced by the vertices of T x . For an example of a tree-partition see Figure 1. A fixed tree-partition of G naturally divides the edges of G into two classes. If both endpoints of an edge are contained in the same bag, then we call it an intrabag edge. In the other case, so if the two endpoints lie in different bags, then we call it an interbag edge.

Upper bounds -Proofs of Theorem 1 and 2
We begin this section with a proof of Theorem 1 and conclude it with a short proof of Theorem 2.
We would like to note that it is enough to prove Theorem 1 for k-trees. Indeed, this follows from the two facts that each graph of tree-width k can be extended to a k-tree by adding edges to the graph (for example, by taking the chordal completion that minimizes the size of the maximum clique), and that the queue-number of a graph does not decrease under the addition of edges.
As noted before, our queue layout construction relies on tree-partitions that capture the structure of k-trees. The following theorem by Dujmović et al. will give us such a tree-partition.
Let us give a brief sketch of how one can obtain a tree-partition of a connected ktree G as in the theorem. Fix an arbitrary vertex r of G and perform a Breadth-first Search (BFS) in G starting from r. For each d 0 and each component induced by the vertices at distance d from r, we introduce a node and associate with this node a bag containing the vertices of the component. Two nodes become adjacent if their corresponding sets of vertices are joined by at least one edge of G. Using the chordality of G one can show that the constructed graph T on the nodes is indeed a tree, and that the vertices of each bag induce a (k − 1)-tree. Note that the bag of the root node of T contains only one vertex (r in our case). The tree-partition in Figure 1 can be obtained with the described procedure by starting the BFS from vertex a.
Let (T, {T x : x ∈ V (T )}) be a rooted tree-partition as in the previous theorem. For each nonroot node x of T , we denote by p(x) the parent node of x in T . Moreover, we let C x denote the clique in T p(x) according to item (ii) of Theorem 5. For instance, in our example of Figure 1 we have that p(x 3 ) = x 1 and the vertices of C x3 are b and c.
We are now ready to prove Theorem 1. In fact, we show the following slightly stronger result. Theorem 6. Let k 0. For each k-tree G, there is a queue layout using at most t k = 2 k −1 queues, such that for each v ∈ V (G), edges with v as their right endpoint in the layout are assigned to pairwise different queues.
Proof. We prove the theorem by induction on k. In the base case k = 0, the graph G has no edges and thus no queues are needed in a queue layout of G.
Suppose now that G is a k-tree for some k 1, and that the theorem holds for k − 1. We may assume that G is connected, since we can combine layouts of different components of G by putting them next to each other, and since we can resuse queues for different components. Let (T, {T x : x ∈ V (T )}) be a tree-partition of G as given by Theorem 5, and denote the root of T by r. Then we can assign to each node of T a depth according to its distance to r (with r being at depth 0). We say that a vertex v ∈ V (G) is at depth d if v is contained in a bag of some node at depth d.
In the following, we first construct a linear order L G for the queue layout of G, and then we assign the edges to queues. Let us give some intuition of how we obtain L G now. We build L G by going through the depths one by one (starting with depth 0). That is to say, given the already produced linear order of vertices at depth d − 1, we construct a linear order of vertices at depth d and append it to the right of the one already produced. To do so, we first specify a linear order L T d on the nodes at depth d in T , and then we replace each node x in L T d by the linear order of the layout obtained by applying induction to the (k − 1)-tree G[T x ]. Now let us be more precise. At depth 0 we only have the root node r of T , and hence we set L T 0 to be the linear order consisting only of r. We apply induction on the (k − 1)-tree G[T r ] and obtain a linear order L G 0 of vertices at depth 0 (as noted before, T r actually contains only one vertex).
So suppose that we have built the linear order L G d−1 containing all vertices at depth at most d − 1 in G. Let L T d−1 be the linear order on the nodes at depth d − 1 that was produced in the last step of our procedure. We proceed by constructing L T d now.
As in a lexicographical breadth-first ordering (Lex-BFS ordering), we order the nodes according to their parent nodes. That is, for nodes x, y at depth d we set It remains to specify the order of nodes sharing a parent node. So suppose that x 1 , . . . , x have the same parent node y at depth d − 1. Consider the cliques C x1 , . . . , C x in T y . For each i ∈ {1, . . . , }, let c xi be the rightmost vertex of C xi in L G d−1 . Then we order x 1 , . . . , x according to the positions of c x1 , . . . , c x , which means that we set Nodes with the same parent node and with the same rightmost vertex in their corresponding clique are still not ordered with this rule. We order those nodes arbitrarily so that L T d becomes a linear order on nodes at depth d. To illustrate this procedure, consider the following linear order, where vertices at depth at most 1 of our example from Figure 1 have been ordered so far.
Here we have x 1 < x 2 in L T 1 , and since x 1 = p(x 3 ) = p(x 4 ) and x 2 = p(x 5 ) = p(x 6 ), this implies that x 3 , x 4 are placed before x 5 , x 6 in L T 2 . As c x3 = c < d = c x4 in the order, we set x 3 < x 4 in L T 2 . The order between x 5 and x 6 in L T 2 can be chosen arbitrarily as c x5 = c x6 = g.
By Theorem 5 we have that the bag of each node x in the tree-partition induces a (k − 1)-tree, which allows us to apply induction. Let L x be the linear order of the queue layout obtained in this way. Now we replace each node x in L T d by the linear order L x . We put the resulting order of vertices at depth d to the right of L G d−1 , which yields a linear order L G d on all vertices at depth at most d. This concludes the step for vertices at depth d.
Let L G be the linear order on the vertices of G obtained after going through all the depths. Similarly, let L T be the linear order on the nodes of T obtained during the procedure. Recall that by our applied rules, L T has the following properties. For nodes x, y ∈ V (T ) with depths d(x) and d(y), respectively, it holds that if p(x) < p(y) in L T , then x < y in L T .
Property (1) asserts that L T is a BFS ordering, and combined with property (2) we have that L T is a Lex-BFS ordering. Therefore, no two edges of T are nested in L T . This has an immediate consequence for interbag edges as they go along edges of T . Let uv and u v be interbag edges such that u < v and u < v in L G . Then we have the property that if uv and u v are nested in L G , then u and u are contained in the same bag of the tree-partition. We need to assign the edges of G to queues now. For convenience, let us instead first color the edges with colors from {1, . . . , 2t k−1 + 1} and then show that each color class induces a queue with respect to L G .
We start with the intrabag edges. For each bag T x , we color the contained edges according to the queue assignment that is given by the induction hypothesis for the (k − 1)-tree G[T x ]. We use the colors 1, . . . , t k−1 for this coloring (so we reuse the same colors for different bags).
Let us continue with the interbag edges now, and let uv ∈ E(G) be one of those. Say, u is at a smaller depth than v. Then there is a node x in T such that v ∈ T x and u ∈ T p(x) . If u = c x , then we color uv with 2t k−1 + 1. Otherwise, if u = c x , then we color uv with i + t k−1 , where i ∈ {1, . . . , t k−1 } is the color of the intrabag edge uc x .
Claim. For each color c ∈ {1, . . . , 2t k−1 + 1}, the edges of G colored with c form a queue with respect to L G .
Proof. Suppose for a contradiction that there are edges uv and u v with color c that are nested in L G . Say, we have u < u < v < v in L G .
If c ∈ {1, . . . , t k−1 } then uv and u v are both intrabag edges. However, if they lie within the same bag, then they cannot be nested as we used a valid queue layout from the induction hypothesis. And if they lie in different bags, then both endpoints of one edge lie before both endpoints of the other edge in L G . Thus, the two edges are not nested in L G , a contradiction.
So we have c t k−1 + 1 and consequently uv and u v are interbag edges. By the consequences of properties (1) and (2) for interbag edges, it follows that u and u both are contained in the same bag. Suppose that this is bag T y , and let x, x ∈ V (T ) be such that v ∈ T x and v ∈ T x . Note that u ∈ C x and u ∈ C x . We distinguish two cases now.
First, suppose c = 2t k−1 + 1. Then u and u are rightmost in L G among vertices of C x and C x , respectively. So we have u = c x and u = c x , and hence x = x . Recall that since x and x share the parent y, they are ordered in L T according to the positions of c x and c x in L G . Thus, as c x = u < u = c x in L G , this implies x < x in L T . It follows that vertices of T x lie before vertices of T x in L G , a contradiction to our assumption v < v in L G .
So we are left with the case c ∈ {t k−1 + 1, . . . , 2t k−1 }. Let i ∈ {1, . . . , t k−1 } be such that c = i + t k−1 . This time we have u = c x and u = c x . Since u ∈ C x and u ∈ C x , it follows that u < c x and u < c x in L G . By our coloring, edges uc x and u c x are colored with i. This implies c x = c x as otherwise c x is the right endpoint of two intrabag edges of the same color, which is contradicting the induction hypothesis. In particular, this yields x = x . By our assumption that v < v in L G , we conclude x < x in L T . And since x and x are ordered in L T according to the positions of c x and c x in L G , this in turn implies c x < c x in L G . Together with c x being the rightmost vertex of C x in L G , we deduce u < u < c x < c x in L G . It follows that the edges uc x and u c x are nested. However, note that both edges are contained in T y and have the same color i. This is a contradiction to the fact that we colored these edges according to the queue layout obtained by the induction hypothesis. This concludes the proof of the claim.
To complete the induction step, we have to show that for each v ∈ V (G), no two edges with v as their right endpoint in L G are colored with the same color. Suppose for a contradiction that there are distinct edges uv and u v colored with c such that u < v and u < v in L G . By the induction hypothesis we cannot have c ∈ {1, . . . , t k−1 }. Therefore, both edges are interbag edges and c ∈ {t k−1 + 1, . . . , 2t k−1 + 1}. Let x ∈ V (T ) be such that v ∈ T x . Then u and u are vertices of the clique C x . Since c x is the unique vertex of C x that is connected by an edge in color 2t k−1 + 1 to v, we deduce c = 2t k−1 + 1. However, then our coloring rule for the edges uv and u v implies that the edges uc x and u c x are colored with c − t k−1 ∈ {1, . . . , t k−1 }. As c x is the rightmost vertex of C x with respect to L G , we obtain that the intrabag edges uc x , u c x have the same color and the same right endpoint in L G , which is a contradiction to the induction hypothesis. We conclude that any two edges with the same right endpoint in L G are colored with different colors.
We continue with a proof of Theorem 2 now. A proper coloring of the vertices of a graph G is acyclic if any two color classes induce a forest (so each cycle receives at least three colors). The minimum number of colors used in an acyclic coloring of G is the acyclic chromatic number of G. Dujmović et al. [8] obtained the following relationship between track-number and queue-number.

Lemma 7 ([8])
. Every graph G with acyclic chromatic number at most c and queue-number at most q has track-number It is well-known that graphs of tree-width at most k have acyclic chromatic number at most k + 1. Using this, we immediately obtain a proof of our claimed upper bound on the track-number of bounded tree-width graphs.
Proof of Theorem 2. Combine Theorem 1 and Lemma 7.

Lower bounds -Proof of Theorem 3
This section is devoted to a proof of Theorem 3. We start by introducing a two-player game between Alice and Bob on k-trees (where k 2), in which Bob has to build a queue-layout of the k-tree to be presented by Alice. We call it the k-queue game.
The game starts with a (k+1)-clique and an arbitrary linear order on the vertices of this clique. Now, each round of the game consists of two moves. First, Alice introduces a new vertex v and chooses a k-clique of the current graph to which v becomes adjacent. And second, Bob has to specify the position in the current layout where v is inserted. Clearly, since we start with a (k + 1)-clique, the graphs obtained during the k-queue game remain k-trees. It is the goal of Alice to increase the maximum size of a rainbow in the layout, while Bob tries to keep it small. Alice wins the k-queue game if Bob creates a rainbow of size k + 1 in the layout. We aim to show the following.
Lemma 8. For each k 1, there is an integer d k such that Alice has a strategy to win the k-queue game within at most d k rounds.
Before we prove this lemma, we use it to show Theorem 3. Let us make some new definitions first.
Given a graph H and a clique C in H, we stack on C in H by introducing a new vertex v C and by making v C adjacent to the vertices of C. (Note that if we stack on a k-clique of a k-tree, then the resulting graph is also a k-tree.) If a graph H is obtained by simultaneously stacking on each k-clique of H, then we call H the k-stack of H.
We iteratively construct a family of k-trees (G i ) i∈N now. We let G 0 be a (k + 1)clique, and given i 1, we define G i to be the k-stack of G i−1 . Note that with this definition G i contains G i−1 as an induced subgraph. In fact, G i might contain several distinct induced subgraphs being isomorphic to G i−1 . For us it is important that G i contains an intrinsic copy G i−1 of G i−1 as an induced subgraph, which is such that G i can be obtained by taking the k-stack of G i−1 .
The following lemma implies Theorem 3 Lemma 9. Given k 2, let d k be as in the statement of Lemma 8. Then the queue-number of the k-tree G d k is at least k + 1.
Proof. Consider the following variant of the k-queue game. Alice's move in a round of the variant consists of simultaneously stacking on each possible k-clique. It is then Bob's task in this round to insert all the newly introduced vertices in the current layout. Again, Alice wins the game when a rainbow of size k + 1 appears in the layout.
Clearly, for Bob this variant is harder than the k-queue game, in the sense that when Alice has a strategy to win the k-queue game within d rounds, then she also has a strategy to win the variant within d rounds. In particular, Lemma 8 also holds for the variant. Now suppose for a contradiction that there is a linear order L on the vertices of G d k such that there is no rainbow of size k + 1 in L. We claim that Bob can use L as an instruction to avoid rainbows of size k + 1 during the first d k rounds in the variant of the k-queue game.
To see this, observe that after i rounds of the variant, the game graph is isomorphic to G i . This gives rise to a strategy for Bob. He only has to fix induced Therefore, Bob can ensure that the linear order after i rounds is equal to L| V (Hi) . Indeed, he only has to read from L how to extend the layout in each round. Applying this strategy, the linear order built after d k rounds is equal to L. As L does not contain a rainbow of size k + 1, Bob can prevent Alice from winning within the first d k rounds. This is a contradiction to Lemma 8 and completes the proof.
The rest of this section is devoted to a proof of Lemma 8. We proceed with some definitions that will help us to talk about the k-queue game.
Let G be a k-tree designed by Alice during the game and let L be the linear order on V (G) built by Bob. Given x, y ∈ V (G), we say that x lies left of y in L, if x < y in L, and we say that x lies right of y in L, otherwise. We denote the leftmost and the rightmost vertex of a subgraph H of G with respect to L by (H) and r(H), respectively. An edge e of G covers a subgraph H of G in L if (e) (H) < r(H) r(e) in L. The edge e strictly covers H if we have (e) < (H) and r(H) < r(e) in L. Suppose Alice chooses to stack on the clique C in her next move. Then we say that Bob goes inside C if he places the new vertex v C such that (C) < v C < r(C) in the layout. Otherwise, we say that Bob goes outside C. If Bob places v C such that r(C) < v C in the layout, then he goes to the right outside of C.
We continue by developing a strategy for Alice to win the k-queue game within a finite number of rounds. Whenever we write that Alice can force Bob to make certain moves, then we mean that she has a strategy to win the game unless Bob does these moves.
Lemma 10. For any k-clique C in the game graph and any positive number d, Alice can force Bob to go outside some k-clique C * , which is covered by the edge (C)r(C), for at least d times.
Proof. We describe a strategy for Alice to enforce the claimed behavior of Bob. First, Alice starts to stack on the clique C in her moves. If Bob does not go inside C for d rounds, then C fulfills the desired requirements. So suppose that Bob goes inside C with the vertex v C so that (C) < v C < r(C) in L. Note that the vertices in the set V (C) \ { (C)} ∪ {v C } form a k-clique C . For the next rounds, Alice keeps on stacking on C . Again, if Bob does not go inside C for d rounds, then we are done with clique C . So suppose that he goes inside C with the vertex v C . Then the vertices in V (C ) \ {r(C)} ∪ {v C } form a k-clique C that is strictly covered by the edge (C)r(C). Now observe that if Alice applies the above strategy to C instead of C, and Bob keeps on avoiding to go outside k-cliques as before, then we will see k-clique being strictly covered by the edge (C )r(C ) after several rounds. Clearly, if Alice is repeating this strategy, then we will see a rainbow of size k + 1 in the layout unless Bob goes outside some k-clique being covered by (C)r(C) for at least d times, as claimed.
Lemma 11. Let C be a k-clique in the game graph with vertices v 1 , . . . , v k such that v 1 < · · · < v k in the layout. Assume that Alice can force Bob to go to the right outside of C at least 2k + 1 many times. Then Alice can enforce the existence of a vertex v k+1 in the layout such that (i) v k < v k+1 in the layout, (ii) v k+1 is adjacent to C, and (iii) Alice can force Bob to go to the right outside of C arbitrary many times, where C denotes the k-clique on the vertices v 1 , v 3 , . . . , v k+1 .
Proof. By assumption, Alice can force Bob to place 2k + 1 vertices p 1 , . . . , p k , v k+1 , q 1 , . . . , q k , which are adjacent to C, to the right of C in the layout. Let us suppose that p k < · · · < p 1 < v k+1 < q k < · · · < q 1 in the layout. For each i ∈ {1, . . . , k}, we let e i := p i v i and e i := q i v i . Observe that the edges e 1 , . . . , e k and e 1 , . . . , e k form rainbows of size k. We claim that v k+1 fulfills the requirements of the statement. Clearly, v k+1 lies to the right of v k in the layout and it is adjacent to C, so (i) and (ii) hold. Denote the k-clique on the vertices v 1 , v 3 , . . . , v k+1 by C . Even stronger than condition (iii), we can show that whenever Alice introduces a vertex v C being adjacent to C , then Bob loses unless he puts v C to the right of C (that is, to the right of v k+1 = r(C )).
So suppose that Bob places v C to the left of v k+1 . Then let j ∈ {1, . . . , k + 1} be minimal such that v C < v j in the layout (see Figure 2 illustrating an example with k = 4 and j = 3). We obtain that the edges e 1 , . . . , e j−1 , v C v k+1 , e j , . . . , e k form a rainbow of size k + 1 in the layout (in Figure 2 this is the rainbow consisting of red edges), implying that Bob lost the game. Therefore, condition (iii) holds.
Later, we will show that Alice can reach a winning configuration in the k-queue game by using the previous lemma. This configuration is described in the following lemma.  in the layout built by Bob (see Figure 3 for an illustration of such a situation). Then Alice has a strategy to win the current k-queue game within a finite number of rounds.
Proof. Given the configuration of the statement, we describe a strategy for Alice to win the game. Alice starts by applying the strategy of Lemma 10 to enforce a kclique C being covered by the edge (C)r(C), such that Bob is forced to go outside C . Note that C and the edges e, e , e also build a configuration as described in the statement of the lemma. So we may assume that C is already the clique on which Bob is forced to go outside. In the following, let v 1 , . . . , v k be the vertices of C such that v 1 < · · · < v k in the layout. Next, Alice keeps on stacking on C until there are 2k − 1 vertices adjacent to C that all lie to the left of C, or that all lie to the right of C (as Bob has to go outside C, this happens after at most 4k − 3 rounds). By symmetry, we may assume that these 2k − 1 vertices lie left of (C). Using the pigeonhole principle we obtain that either there are k such vertices lying to the left of (e), or k such vertices lying between (e) and (C).
Let us consider the first case now. So we have k vertices p 1 , . . . , p k adjacent to C such that p k < · · · < p 1 < (e) (e ) < r(e ) < v 1 < · · · < v k in the layout. Then the edges e , p 1 v 1 , . . . , p k v k form a rainbow of size k + 1, and hence Alice wins the game. In the second case Bob has placed k vertices p 1 , . . . , p k being adjacent to C such that (e) < p k < · · · < p 1 < v 1 < · · · < v k < r(e) in the layout. However, in this case the edges p 1 v 1 , . . . , p k v k , e form a rainbow of size k + 1. This shows that Alice has a winning strategy once the configuration in the statement of the lemma occurs during the game.
We are now ready to combine the previous lemmas to give a proof of Lemma 8.
Proof of Lemma 8. We describe a strategy for Alice to win the k-queue game. Using a k-clique of the initial graph in the game and the strategy of Lemma 10, Alice can enforce a k-clique C 1 on which Bob has to go outside arbitrary many times. Next, Alice keeps on stacking on C 1 until Bob has placed 2k + 1 of the newly introduced vertices either to the left of C 1 , or to the right of C 1 . By symmetry, we may assume that the latter occurs.
Observe that C 1 fulfills the assumptions of Lemma 11. Starting with C 1 , we now describe how Alice can iteratively apply the strategy of this lemma. Let v 1 , . . be the vertices of C 1 such that v 1 < · · · < v k in the layout. Then by Lemma 11 Alice can enforce a vertex v k+1 to the right of v k , such that v k+1 is adjacent to C 1 and Bob is forced to go to the right outside of the k-clique C 2 consisting of the vertices v 1 , v 3 , . . . , v k+1 . Clearly, Alice can now apply the strategy of Lemma 11 to C 2 . So suppose that Alice goes on like this for another three times starting with C 2 , and denote the three newly enforced vertices by v k+2 , v k+3 , and v k+4 . Then we have v 1 < · · · < v k+4 in the layout, and with their introduction the new vertices became adjacent to the following vertices: vertex v k+2 to v 1 , v 3 , . . . , v k+1 , vertex v k+3 to v 1 , v 4 , . . . , v k+2 , and vertex v k+4 to v 1 , v 5 , . . . , v k+3 . Figure 4 shows this situation for k = 4.
Next we show that the resulting layout contains the winning configuration of Lemma 12. To see this, let e := v 1 v k+4 , e := v 1 v 2 , and e := v k+3 v k+4 . Now note that e, e , e and the k-clique formed by the vertices v 3 , . . . , v k+2 build such a winning configuration.
Therefore, Alice can apply the strategy of Lemma 12 and wins the k-queue game. By the arguments used for the proofs of Lemmas 10-12, it is also clear that Alice can exploit her winning strategy within a number of rounds that only depends on k. This completes the proof.

Open Problems
In this paper we showed a single exponential upper bound on the queue-number of graphs with tree-width at most k. It remains open whether this bound can be reduced to a bound that is polynomial in k. Regarding our theorem on the lower bound, it seems unlikely that k+1 is the right answer for the maximal queue-number of k-trees. A quadratic lower bound would already be an exciting improvement.
As mentioned in the introduction, it remains open whether planar graphs have bounded queue-number. The current best upper bound of O(log n) is due to Dujmovic [7]. From below we showed the existence of planar graphs with queue-number at least 3. This a surprising large gap for such a popular class of graphs.
Concerning the track-number, the analogue upper bound problems are unsolved as well.

Acknowledgment
We are very grateful to Piotr Micek for the many discussions on the topic.