A linear layout of a graph consists of a vertex ordering together with a partition of the edges. For a fixed vertex ordering , we say that two independent edges and with and
nest if or and
cross if or .
A queue, respectively a page (also called stack), is a subset of edges that are pairwise non-nesting, respectively non-crossing. A queue layout, respectively a book embedding, is a linear layout whose partition of the edge set consists of queues, respectively pages. The queue number and page number (also called stack number or book thickness) denote the smallest such that there is a linear layout consisting of at most queues, respectively at most pages. Both queue layouts and book embeddings were intensively investigated in the past decades, where complete graphs are one of the very first considered graph classes [2, 9].
Queue layouts and book embeddings model how the edges of a graph can be assigned to and processed by queues, respectively stacks. It was first asked by Heath, Leighton, and Rosenberg  whether queues or stacks are more powerful in this context. Recently, Dujmović et al.  partly answered this question by presenting a class of graphs with bounded queue number that needs an unbounded number of stacks, showing that stacks are not more powerful than queues for representing graphs. In the classical variant in this question, the total number of necessary queues or stacks serves as a measure for the power of queues and stacks. Local and union variants relax the setting by allowing more queues or stacks, as long as each vertex is touched by a small number of queues, respectively stacks, or if they operate on vertex-disjoint subgraphs.
Local and union variants of queue layouts and book embeddings were recently introduced by the second and third author [13, 14]. A linear layout is called -local if each vertex has incident edges in at most parts of the edge partition. The local queue number, respectively local page number, is the smallest such that there is a -local queue layout, respectively a -local book embedding for . Given a fixed vertex ordering, a union queue (union page) is a vertex-disjoint union of queues (pages). The union queue number, respectively union page number, then is the smallest such that there is a linear layout whose edge partition consists of at most union queues, respectively union pages.
Local and union variants have been considered for numerous graph decomposition parameter, such as boxicity, interval numbers, planar thickness, poset dimension, several arboricities, and many more. Especially in recent years, there has been a lot of interest in these variants in various directions, see e.g. [3, 7, 12, 10, 4, 11].
In this paper, we continue the investigation of local and union variants of linear layouts, that is, queue numbers and page numbers. We establish bounds on the respective graph parameters for complete graphs, which interestingly turns out to be non-trivial; in contrast to their classic counterparts. Our results show that the local and union variants of queue numbers and page numbers for -vertex complete graphs are located strictly between the trivial lower bound of due to the density [13, 14, see also Section 2] and , respectively , which is the queue number, respectively page number, of complete graphs [2, 9].
In Section 2, we survey the relation between local and union variants of queue layouts and book embeddings. We give a lower bound on the local queue number of complete graphs and show how to obtain the same upper bound for the union queue number in Section 3 (up to an additive constant). Section 4 continues with a lower and a matching (up to an additive constant) upper bound on the local page number. We also present an upper bound on the union page number and discuss properties that an improved bound needs to satisfy in this section.
Both the local queue number and the union queue number of are linear in with the leading coefficient being . For the local queue number, the error term is small; it is between and .
The local queue number and the union queue number of satisfy
The local page number of is also linear in with the leading coefficient being . In this case, the error term is between and . The local page number also gives a lower bound on the union page number, whereas the leading coefficient of our upper bound is .
The local page number and the union page number of satisfy
First, we have and , where the gap between the union and global variants can be arbitrarily large. There are graph classes (e.g. -regular graphs for ) with bounded union queue number and union page number but unbounded queue number and page number. In contrast, the local page number, the local queue number, the union page number, and the union queue number are all tied to the maximum average degree, which is defined by . In particular, we have the following connection between the maximum average degree and the union queue number, respectively the union page number. We follow the proof of a similar statement for book embeddings in . However, we stress that the vertex ordering is arbitrary as we make use of this in the proof of Lemma 3.
Every graph admits a -union queue layout and a -union book embedding with any vertex ordering.
Nash-Williams  proved that every graph can be partitioned into at most forests. Each forest, in turn, can be partitioned into two star forests . Choosing an arbitrary vertex ordering, each of the star forests is both a union queue and a union page as the edges of a star can neither nest nor cross. ∎
In addition, the local queue number and the local page number are lower-bounded by , which gives a lower bound of for .
In the following sections, we consider the complete graph with vertex set . Due to symmetry, we may throughout assume that the vertex ordering of is given by . Partitioning the edges is the difficult part.
3 Local and Union Queue Numbers
We first establish the lower bound of Theorem 1.1. As the union queue number is lower-bounded by the local queue number, we only consider the latter. Note that .
For any we have .
Consider a -local queue layout of . Without loss of generality, each edge is contained in exactly one queue. Moreover, the vertices are ordered and the length of an edge is defined as . Now for any edge with consider the queue containing . We call left-longest if there is no edge in that is longer than and has the same right endpoint as , i.e., contains no edge with . Similarly, we call right-shortest if there is no edge in that is shorter than and has the same left endpoint as , i.e., contains no edge with . We have that
every edge of is left-longest or right-shortest (or both).
In fact, if is of neither type, then would contain two edges and with , and hence would not be a queue.
For each vertex let , respectively , denote the number of left-longest edges whose right endpoint is , respectively the number of right-shortest edges whose left endpoint is . That is,
Further let denote the number of queues in with at least one edge whose right endpoint is and at least one edge whose left endpoint is . That is,
We can then write the number of queues in containing the vertex in terms of , and . Indeed, if contains an edge incident to , then it contains a left-longest or a right-shortest or both, i.e., the contribution of to is exactly one.
Vertex has incident edges in exactly queues in .
As every vertex is in at most queues, we have for . Also every vertex is the right endpoint of at most edges and thus . Similarly, the left endpoint of at most edges and thus . Together,
for every vertex we have .
Using the above and assuming (we are done otherwise), we calculate
For and we have
Using this we get the desired bound for as follows.
Now let us turn to the upper bound of the union queue number in Theorem 1.1. We thereby also prove an upper bound for the local queue number. However, we improve on this bound with a different construction in Lemma 4.
For any , we have
We prove that whenever , there is a -local queue layout and a -union queue layout of . Let be a fixed vertex ordering of . For ease of presentation, we model the edge set of as a point set in with triangular shape defined by
The elements in correspond to the entries of the adjacency matrix of . That is, element of corresponds to edge in and conversely edge in with corresponds to element in . Two edges with and with nest if and only if the corresponding elements and in are comparable in the strict dominance order of (i.e. coordinate-wise strict inequalities of points). To see this, observe that small -coordinates correspond to a left endpoint having a small index, whereas small -coordinates correspond to a right endpoint with a large index. Hence, an edge set forms a queue if and only if the corresponding points in form a weakly monotonically decreasing chain, see Fig. 1.
A vertex of corresponds to column and row in . We call the union of column and row the hook of vertex . If is the hook of vertex and is a queue corresponding to chain , then vertex is contained in queue if and only if . For our construction of a -local queue assignment of , we use the equivalent model of covering the triangular point set with monotone chains such that no hook intersects more than chains.
Analogously to union queues, we call a subset a union chain if there is a partition of into weakly monotonically decreasing chains such that each hook intersects at most one of them. To prove Lemma 2, we partition into union chains and therefore get a -union queue layout for .
For any integer and any integer , the points of can be partitioned into union chains. In addition, the points of can be partitioned into weakly monotonically decreasing chains such that each hook intersects at most chains.
First, we define weakly monotonically decreasing chains that cover such that no hook intersects more than chains. We then partition these chains into sets of chains that form the basis for our union chains. We assume that is even and that is the smallest even integer with . To compensate for this assumption, we construct chains such that each hook intersects at most chains and a partition of into union chains. We need for the construction, which is the case for . For , we have , so an -queue layout of gives the desired partition of , respectively , into queues, respectively chains. For any between and , one can check that the desired bounds can be obtained from a queue layout of some with a slightly smaller or greater number of vertices.111Indeed, for each between and and corresponding , one of the following two cases applies. First, there is an even such that is even, holds, and we have , respectively . Or second, there is an even such that , is even, holds, and the queue layout we obtain for can be augmented to a queue layout of matching the desired bounds. To do so, we attach at most two of the additional vertices to the left and at most two to the right and use two additional queues to cover the new edges. We then observe that , which gives the desired bounds for .
We start by defining a family of chains , illustrated in Fig. 2. Chain is composed of three blocks. The first block consists of the topmost elements in column of . The second block starts at the lowest element of the first block, continues with a right and down alternation for steps, and ends in row . The last block consists of the rightmost elements in row . Formally, for we set
The chains of cover all points of except for the bottom left triangle . The remaining points are covered by chains containing only points of a single column or row. We refer to these chains as vertical and horizontal chains, respectively. Note that vertical and horizontal chains correspond to stars in . We only define families containing vertical chains, the horizontal chains are then defined symmetrically, i.e., for . The resulting layout of is illustrated in Fig. 2.
The families cover the bottom left square . For this, let consist of chains and with having size or for . The chains consist of points in column starting with the bottommost point in row . Chains with points above continue as from the bottom. Note that is empty for . For we define
The defined chains together with the chains in cover all points whose - and -coordinates are at most . Some points, however, are covered twice. We may choose any of the two covering chains for the respective points to obtain a partition.
Family is located to the right of and consists of chains and . Above , there are chains and forming family . Considering the -coordinates of the bottommost points of the chains in , we have a slope ( for ). Symmetrically, the slope is in . For and we define
Note that and are empty for and . The chains in , and symmetrically , form a rectangle containing points. Again, we choose any chain for points that are covered by multiple chains.
Family , together with the corresponding horizontal chains in , accomplishes the square . For this, we have chains , where has size . For let
Finally, we cover to remaining two triangles with three families , and of vertical chains. Families and consist of chains , respectively , each filling a triangle, whereas the chains all have size and cover a rectangle. For and we define
The chains in , , and together cover the all points of with , and symmetrically , , and cover the triangle above . Note that we have and recall that so all intervals are well-defined.
Next we show that each hook intersects at most chains. Recall that a hook of a vertex is the union of the row and the column representing that vertex. We first count for each row and each column the number of intersecting chains and then add up the results to obtain the number of intersecting chains for each hook. We start by counting the vertical chains, which intersect rows . Note that no vertical chain intersects any row above . If , then and are empty, so we may assume when counting these chains.
For each , row intersects chains and , which sums up to chains. The chains do not contain any points above row and thus row intersects exactly , i.e., chains.
For the upcoming calculation, note that for . For row , we have chains for and for . This sums up to
chains. For , each row intersects at most
chains. For , we remark that holds for all . For smaller , recall that there are only columns containing vertical chains in . That is, if , then certainly upper-bounds the number of chains in that intersect any row. However, if and , then we also have .
For , chain intersects row only if and intersects row only if . So we have at most
chains. For , we have in row for , which upper-bounds the number of chains by
The vertical chains in intersect the rows . Precisely, for , row intersects the chains , i.e., chains.
Similarly, the vertical chains in intersect the rows . For each , row intersects the chains , i.e., chains.
All chains of intersect the rows exactly once, that is we have additional vertical chains in these rows.
Row intersects the chains , i.e., chains.
Summing up the number of vertical chains intersecting the rows , we get at most chains from and . Additionally we have at most four horizontal chains in and . Rows intersect vertical chains in and , which sums up to chains. There are at most four additional horizontal chains in and intersecting these rows. Finally, rows intersect only vertical chains in and horizontal chains in , summing up to chains. Together, we have at most vertical and horizontal chains in row and only one horizontal chain from in row . Symmetrically, there are at most vertical and horizontal chains intersecting column and one vertical chain in each column .
Now, we count the number of chains intersecting the hook of vertex for . Recall that hook corresponds to column and row . For , hook intersects and vertical and horizontal chains. Note that row is above row and thus does not intersect any vertical or horizontal chains in . Hooks intersect all chains in and at most one vertical chain from . By symmetry all hooks intersect at most chains.
The chains defined above induce a -local queue layout. To obtain a -union queue layout, we partition the set of all chains into sets of chains with for .
We first introduce some notions that allow us to transform a set of chains into a union chain. Consider some set of chains. Note that is not necessarily a union chain as two chains may intersect the same hook. We call the set of all hooks that intersect at least two chains of the common hooks of . If has no common hooks, then is already a union chain. Otherwise, we assign each of the common hooks to at most one chain. A point that is contained in some chain and in some common hook that is not assigned to is called a bad point. Removing all bad points yields chains that together form a union chain.
We now aim to define such that the resulting bad points can be covered by a constant number of union chains. For this, we associate each vertical (horizontal) chain with the interval that consists of the -coordinates (-coordinates) of the points contained in . We say two vertical (horizontal) chains overlap if the corresponding intervals are not disjoint. Consider the set for some . We add vertical and horizontal chains to such that
chains in do not overlap,
the -coordinates (-coordinates) of all points in vertical (horizontal) chains in are smaller than , and
there is no vertical (horizontal) chain in in column (row) .
We first assume that Items 3, 2 and 1 hold and show that they can indeed be satisfied at the end of the proof. We merge vertical (horizontal) chains of that are in the same column (row) into a single chain. Next, we assign common hooks to chains and use the three conditions to show that union chains suffice to cover all bad points. For the analysis of bad points, we concentrate on vertical chains. The result for horizontal chains follows symmetrically.
Consider a vertical chain in column and let denote the hook that contains . Recall that vertical chains of that are in the same column are merged into a single chain. If is a common hook, we assign it to . Note that each hook either contains vertical chains or horizontal chains, and thus no hook is assigned to multiple chains. See Fig. 3 for an illustration of bad points in . Assigning to implies that all points of that are contained in some other chain of are bad points. We say that these bad points are caused by . We now analyze how many bad points are caused by . If , then intersects in at most four points, i.e., we have at most four bad points in . In this case, no horizontal chain in intersects by Item 2. Otherwise we have (due to Item 3), and Item 1 ensures that intersects at most one horizontal chain . We thus have at most one bad point in . In either case, causes at most four bad points.
It is left to show that each bad point is caused by some vertical or horizontal chain. For this, we keep fixed and consider a hook whose column intersects the triangle , i.e., with . We show that each bad point in is caused by a vertical chain. The result for hooks whose row intersect follows symmetrically with horizontal chains. Hooks that do not intersect contain no bad points since is the only chain in that intersects such a hook. Note that the row of is above and thus does not intersect any vertical or horizontal chains. If , then does not intersect . It intersects at most one horizontal chain due to Item 1. That is, if contains a bad point, then it also contains a vertical chain causing this bad point. If , then intersects neither vertical nor horizontal chains by Items 3 and 2. Thus, is the only intersected chain in and there are no bad points. If , then intersects no horizontal chains in by Item 2. Hence, if there are bad points, then they are caused by a vertical chain in column .
We are now ready to cover the bad points by a constant number of union chains. Let denote the graph that is induced by all bad points. For a vertical or horizontal chain , let denote the vertex that is represented by hook . We orient the edges of such that every edge whose corresponding bad point is caused by chain is oriented away from . Each hook contains at most four vertical or horizontal chains (see Fig. 2 and recall that each hook either contains vertical chains or horizontal chains). Recall that each chain causes at most four bad points. Thus, the out-degree of every vertex of is at most . By Proposition 1, the graph can be covered with union queues using an arbitrary vertex ordering. Hence, the bad points can be covered by union chains.
Finally, we show how to partition the vertical chains of the presented -local layout such that Items 3, 2 and 1 are satisfied. Let denote the interval graph that is given by the intervals that correspond to vertical chains, i.e., and there is an edge between two vertices if and only if the intervals are not disjoint. A clique of vertices in corresponds to a row that intersects vertical chains. Recall that every row intersects at most vertical chains. In particular, the clique number of is at most .
Note that any proper -coloring and an arbitrary mapping between color classes and the sets of chains satisfies Item 1. We next find a coloring with less than colors that also satisfies Items 3 and 2. We define an ordering on the vertices of by decreasing topmost points of the intervals, i.e., if and only if or and . We color the vertices of greedily with colors . That is, for an interval in column , we choose the largest color that is not used by any smaller neighbor and that does not equal . We then define to contain the vertical chains whose intervals have color . Since is an interval graph, the set consisting of a vertex and its smaller neighbors induces a clique that corresponds to row . The vertex thus has at most smaller neighbors. There are at least two colors left that are larger than and that are not already used by a smaller neighbor. Choosing one that does not equal satisfies Items 3 and 2.
Lemma 2 provides an upper bound of both for the union queue number and the local queue number and thus completes the proof of Theorem 1.1. For the local queue number, however, the following lemma improves on the constant of the additive term such that it almost matches the lower bound.
For any , we have
For our example of a -local queue assignment of , we again use the equivalent model of covering the triangular point set with a set of monotone chains such that no hook intersects more than of the chains in .
For any and any , the elements of can be partitioned into a set of weakly monotonously decreasing chains in such a way that
every hook intersects at most chains in ,
for each , column intersects at most chains in ,
for each , row intersects at most chains in .
We proceed by induction on . For the value of is at least as large as the queue number of , this yields an induction base.
For the remainder assume that and (without loss of generality) that