Two-Page Book Embeddings of 4-Planar Graphs

Back in the Eighties, Heath showed that every 3-planar graph is subhamiltonian and asked whether this result can be extended to a class of graphs of degree greater than three. In this paper we affirmatively answer this question for the class of 4-planar graphs. Our contribution consists of two algorithms: The first one is limited to triconnected graphs, but runs in linear time and uses existing methods for computing hamiltonian cycles in planar graphs. The second one, which solves the general case of the problem, is a quadratic-time algorithm based on the book-embedding viewpoint of the problem.


Introduction
Book embeddings have a long history and arise in various application areas such as VLSI design, parallel computing, design of fault-tolerant systems [4].In a book embedding the placement of nodes is restricted to a line, the spine of the book.The edges are assigned to different pages of the book.A page can be thought of as a half-plane bounded by the spine where the edges are drawn as circular arcs between their endpoints.We say that a graph admits a k-page book embedding or is k-page embeddable if one can assign the edges to k pages and there exists a linear ordering of the nodes on the spine such that no two edges of the same page cross.The minimum number of pages required to construct such an embedding is the book thickness or page number of a graph.The book thickness of planar graphs has received much attention in the past.Yannakakis [13] describes a linear-time algorithm to embed every planar graph into a book of four pages.We study the problem of embedding 4-planar graphs, i.e., planar graphs with maximum degree four, into books with two pages.Bernhart et al. [1] show that a graph is two-page embeddable iff it is subhamiltonian.A subhamiltonian graph is a subgraph of a planar hamiltonian graph.It is NP -complete to determine whether a graph is subhamiltonian [12].Often referred to as augmented hamiltonian cycle, a subhamiltonian cycle is a cyclic sequence of nodes in a graph that would form a hamiltonian cycle when adding the missing edges without destroying planarity.The relation between subhamiltonian cycles and two-page book embeddings is quite intuitive.The order of the nodes on the spine is equivalent to the cyclic order of the subhamiltonian cycle.The edges are partitioned by whether they lie in the interior of the cycle or not.
An early important result is due to Whitney [11], who proves that every maximal planar graph with no separating triangles is hamiltonian (recall that a separating triangle is a 3-cycle Figure 2: Merging H in (T ) (dotted) and H out (T ) (dashed) into H (bold gray).
whose removal disconnects the graph).Tutte [10] shows that every 4-connected planar graph has a hamiltonian cycle.Chiba et al. [3] provide a linear-time algorithm to find a hamiltonian cycle in a 4-connected planar graph.Chen [2] gives a proof that every maximal planar graph with at least five vertices and no separating triangles is 4-connected.Sanders [9] generalizes a theorem of Thomassen and shows that any 4-connected planar graph has a hamiltonian cycle that contains two arbitrarily chosen edges of the graph.Based on Whitney's theorem, Kainen et al. [8] show that every planar graph with no separating triangles is subhamiltonian.Another result is by Chen [2] who shows that if a maximal planar graph contains only one such triangle, then it is hamiltonian.Helden [7] improves this result further to two triangles.The aforementioned results are all related to the problem of embedding planar graphs into two pages.However, there is an extensive amount of literature on embedding various types of graphs into books; for an overview see e.g.[5].One result that is interesting in our context is that of Heath [6].In his thesis, he describes a linear-time algorithm to embed any 3-planar graph into two pages and concludes that it would be interesting to know if a higher degree bound is possible.We tackle the 4-planar case from two sides.The first approach based on the subhamiltonicity is restricted to triconnected graphs (Section 2) but builds on existent results and is therefore of a simple nature compared to the second approach.Extending it to biconnected graphs is not straightforward, though.The algorithm of Section 3 -which is less efficient in terms of time complexity-exploits the degree restriction to construct a two-page book embedding.

Subhamiltonicity of Triconnected 4-Planar Graphs
In this section we restrict ourselves to triconnected 4-planar graphs.To state the main result of this section, we proceed in a step-by-step manner.First we investigate the special properties of separating triangles in 4-planar graphs, then we use those to derive a solution for a single separating triangle.Unlike Chen [2] and Helden [7], we are able to extend our approach to an unbounded number of triangles by exploiting the degree restriction.We say a subhamiltonian cycle H crosses a face if there are two consecutive vertices in H that are incident to the face but not adjacent to each other.Lemma 1.Every triconnected planar graph with no separating triangles has a subhamiltonian cycle that crosses every face at most once and it can be computed in linear time.
Proof.In the triconnected case, Kainen et al. [8] construct a new maximal planar graph G = (V , E ) by inserting a vertex into each non-triangular face of G and connect it to the vertices of that face.Clearly this takes linear time.G is maximal planar, free of separating triangles, hence, 4-connected.We can use the linear-time algorithm of Chiba et al. [3] to obtain a hamiltonian cycle H for G .Deleting the newly inserted vertices V − V yields a subhamiltonian cycle H for G that crosses each face at most once.Before investigating the properties of separating triangles, we introduce some notation.Given an embedded triconnected 4-planar graph G with a fixed outerface and a separating triangle T with vertices V (T ) = {A, B, Γ}, we denote the subgraph of G contained in T by G in (T ) and the subgraph of G outside T by G out (T ).We also denote Since G is triconnected and 4-planar, every vertex of T has degree four and is adjacent to exactly one vertex in G in (T ) and G out (T ), respectively.We denote these with A in , B in , Γ in and A out , B out , Γ out , respectively (see Fig. 1).Lemma 2. Given a 4-planar triconnected graph G and a separating triangle T = {A, B, Γ}, then A in , B in , Γ in (A out , B out , Γ out ) are pairwise distinct or all represent the same vertex.
Proof.In the other case, where w.l.o.g.A in = B in = v and Γ in = v, there exists a separation pair (v, Γ) contradicting the triconnectivity of G.A symmetric argument applies to A out , B out , Γ out .Lemma 3. In a 4-planar triconnected graph, every pair of distinct separating triangles T and T is vertex disjoint, i.e.V (T ) ∩ V (T ) = ∅.
Proof.Assume to the contrary that T and T share an edge or a vertex.In the first case, let w.l.o.g. e = (u, v) be the common edge.The degree of both u and v is at least five, since three edges are required for T , T and two additional edges to connect G in (T ) and G in (T ) to T and T , respectively.In the second case, let v denote the common vertex.Since v is part of two edge disjoint cycles and connected to G in (T ) and G in (T ), it follows that deg(v) ≥ 6.
Consider now a 4-planar triconnected graph with a single separating triangle T .Similar to Chen [2], the idea is to compute two cycles H in (T ) and H out (T ) for G in (T ) and G out (T ) and link them via the separating triangle together.The crucial observation is that if two cycles intersect as illustrated in Fig. 2, i.e., they contain two edges of the triangle but have only one of them in common, then we can always merge them into one cycle.It remains to show that we can always find two cycles that satisfy the requirements of Lemma 4. In the following, we neglect the degenerated case of Lemma 2, where G out (T ) or G in (T ) is a single vertex, because finding a cycle in that case is trivial.Consider for example G out (T ), for G in (T ) a symmetric argument holds.To obtain H out (T ), we temporarily replace T in G out (T ) with a single vertex v T as depicted in Fig. 3a.The resulting graph G * out (T ) remains 4-planar and triconnected, because deg(v T ) = 3 by construction and any path via T can use v T instead.One may argue that this operation may introduce additional separating triangles.However, such a triangle must contain v T and, therefore, deg(v Proof.To prove the claim, it is sufficient to consider every combination of e 1 , e 2 and the location of the predecessor and successor of v T in H * out (T ).In the following, we enumerate and describe in detail all possible cases that occur when augmenting H * out (T ) such that the resulting cycle H out (T ) contains two edges e 1 , e 2 of T .To avoid any redundancies, we omit symmetric cases and consider for the same reason a directed cycle.We distinguish between three main cases depending on the location of the predecessor and successor of v T in H * out (T ).Case 1 (Edge v T Edge): Both the predecessor and successor of v T in H * out (T ) are adjacent to v T , hence, the cycle H * out (T ) contains two edges incident to v T , let us say (A out , v T ), (v T , B out ) as illustrated in Fig. 4a.Fig. 5 depicts how H * out (T ) can be augmented such that every pair of edges of T is contained in H out (T ).Notice that while for the pair (A, Γ), (B, Γ) in Fig 5a no face crossing is required, for the two other pairs one additional face crossing is introduced (Fig. 5b and 5c).
Case 2 (Edge v T Face): In this case, the predecessor, say A out , is adjacent to v T , while the successor is not.Since H * out (T ) is a subhamiltonian cycle, the successor is incident to one of the three faces incident to v T .To cover all possible combinations, we distinguish between whether (i) the predecessor A out is incident to that face or (ii) not.Fig. 4b illustrates both configurations, where f 1 denotes the successor located at a face of type (i), and f 2 the successor that is incident to the face at the opposite side (ii).For both subcases, the rerouting rules for the first two edge pairs are relatively simple, since they  (c) A more complicated case requiring one additional crossing of a face from A out to Γ. f 3 ) a solution for both pairs of edges can be found.If only one face is used (f 1 f 2 ), then no solution exists for the edges (A, B), (A, Γ) and (A, B), (B, Γ). follow the basic principle of the first case, see Fig. 6a and 6b.However, the third pair is more complicated.For (i) the sequence A out , v T , f 1 is replaced by A out , Γ, B, A, f 1 , whereas for (ii) A out , v T , f 1 is substituted by A out , A, B, Γ, f 2 (Fig. 6c).

Case 3 Face
v T Face.Both predecessor and successor of v T in H * out (T ) are not adjacent.Hence, the cycle enters and leaves v T through a face.Again to cover all possibilities, we have to deal with two subcases: (i) the two faces are distinct or (ii) the cycle H * out (T ) leaves through the same face as it enters.Rerouting H * out (T ) in the first subcase (i) works for all three different edge pairs, even without introducing any new face crossings.The three solutions for (i) are displayed in Fig. 7, where the predecessor is labeled by f 1 and the successor by f 3 .So far we have been able to resolve every configuration such that any pair of edges can be selected to be part of H out (T ).However, the interesting case is subcase (ii), where the predecessor f 1 and successor f 2 are incident to the same face.While there is a solution for the edge pair (A, Γ), (B, Γ) as displayed in Fig. 7a, the two remaining edge pairs create unresolvable configurations, see Fig. 7b and 7c, respectively.This dilemma is caused by the fact that H out (T ) has to either enter or leave T via Γ.However, Γ is not accessible from neither f 1 nor f 2 without destroying planarity.We may summarize the solutions for the different cases as follows: As long as the cycle does not enter and leave v T via the same face, we can always choose two edges of T in advance and reroute the cycle such that these two edges become part of H.
At this point it is tempting to show that we can always find a cycle that avoids crossing a face twice.By using Lemma 1, we may obtain such a cycle in a triconnected graph with no separating triangles.This raises the question if we can use it and apply the described rules to obtain a cycle through multiple triangles for which we may specify two edges in advance.We answer this question negatively with a small counterexample.
Consider the triconnected 4-planar graph G shown in Fig. 8a.It contains two separating triangles T and T with vertices V (T ) = {A, B, Γ} and V (T ) = {A , B , Γ }, respectively.In every triangle two edges (bold, blue) are prescribed to lie on the augmented subhamiltonian cycle H.We proceed as described; both triangles are replaced by a dummy vertex v T and v T , respectively.The resulting graph (Fig. 8b) is triconnected 4-planar and free of separating triangles.The squares and dashed lines correspond to the dummy vertices and edges inserted by the technique of Kainen et al. [8] as described in Lemma 1.We may now compute a hamiltonian cycle H by applying the linear-time algorithm of Chiba et al. [3].Assume the result is the bold cycle in Fig. 8b.Clearly the cycle crosses every face at most once after we remove the dummy vertices inserted by the technique of Kainen et al. [8].We reinsert T and apply the corresponding rule, i.e., the augmentation displayed in Fig. 6b.The result of augmenting such that the two marked edges of T , namely (A, Γ), (B, Γ), lie on the cycle is displayed in Fig. 8c.Notice that we are forced to enter T via A and exit by B. As a result, the cycle crosses one face twice.Moreover, T must be entered and left through the same face.The corresponding rule, illustrated in Fig. 7b, implies that we cannot reroute the cycle such that it contains the edges (A , Γ ), (B , Γ ).However, we may lift the restriction, use the only rule applicable in this case (Fig. 7a), and obtain a cycle with edges (A , Γ ), (A , B ) instead.Notice that the graph in this example has even a hamiltonian cycle H through the requested edges.However, the purpose of the example is to demonstrate that for an arbitrary chosen subhamiltonian cycle, the described rules cannot always be applied.We may conclude that when using Lemma 1, we may choose for one (the first) triangle two edges because the initial cycle visits every face at most once.From there on, we can only guarantee that two unknown edges are part of the final cycle.In the following we will benefit from this observation.
Recall the aforementioned single-separating-triangle scenario.Both G out (T ) and G in (T ) are free of separating triangles.Therefore, we may construct two graphs G * out (T ), G * in (T ) by replacing T with dummy vertices.Applying Lemma 1 to them yields two subhamiltonian cycles H * out (T ) and H * in (T ), both crossing every face of G * out (T ) and G * in (T ) at most once.Hence, we may augment them with the aid of Lemma 5 such that they contain each two edges of T .By choosing the combination of the edges such that H out (T ) and H in (T ) meet the requirements of Lemma 4, we can merge them into a single subhamiltonian cycle H for G.
While the property that G * out (T ) and G * in (T ) are both free of separating triangles enables us to conveniently choose two edges for each cycle H out (T ), H in (T ), this only works for a single separating triangle.However, a closer look reveals that it is sufficient to have a choice for either H out (T ) or H in (T ), not necessarily both of them.The idea is to first augment the cycle for which we do not have a choice to see which edges of T are part of it, then we choose the edges for the second cycle accordingly.We summarize the idea as the main result of this section and describe it in a more formal manner in form of a proof.Theorem 1.Every triconnected 4-planar graph is subhamiltonian.
Proof.Let G denote a triconnected 4-planar graph and τ (G) the number of separating triangles in G.We prove by induction and claim that for any τ (G) ≥ 0 we can compute a subhamiltonian cycle H for G. Base case: Since τ (G) = 0, we can directly apply Lemma 1. Inductive case: and compute a cycle H * in (T ) that crosses each face at most once.With Lemma 5 we may obtain a cycle H in (T ) for G in (T ) with two edges e 1 , e 2 ∈ E(T ) of our choice.Choosing e 1 = e 1 and e 2 = e 2 yields two cycles H out (T ), H in (T ) that meet the requirements of Lemma 4 and we can merge them into one cycle H for G.
The proof of Theorem 1 is constructive.Embedding G and identifying all separating triangles in G can be done in linear time.Augmenting a cycle and merging two of them takes constant time.Disjointness of separating triangles yields a linear number of subproblems and every edge occurs in at most one such subproblem.Hence, the total time spent for the subroutine of Lemma 1 is linear in the size of G.
Corollary 1.A subhamiltonian cycle of a triconnected 4-planar graph can be found in linear time.
In this section, we have shown that in the triconnected case a rather simple technique can be used to efficiently compute a subhamiltonian cycle in a 4-planar graph.However, the property that G is triconnected has been used extensively throughout this section, thus, a relaxation to biconnectivity is not straightforward.

Two-Page Book Embeddings of General 4-Planar Graphs
In this section, we prove that any planar graph of maximum degree four admits a two-page book embedding.The proof is given by a recursive combinatorial construction, which determines the order of the vertices along the spine and the page in which each edge is drawn.W.l.o.g.we assume that the input graph G is biconnected, since it is known that the page number of a graph equals the maximum of the page number of its biconnected components [1].Note that one can neglect the exact geometry, as two edges that are drawn on the same page cross if and only if their endpoints alternate along the spine.We say that an edge e nests a vertex v iff one endpoint of e is to the left of v along the spine and the other endpoint of e to its right.We also say that an edge e nests an edge e iff both e and e are drawn on the same page and both endpoints of e are nested by e. Observe that nested edges do not cross.
The general idea of our algorithm is as follows: First remove from G cycle C out delimiting the outerface of G and contract each bridge-block1 of the remaining graph into a single vertex.Let F be the implied graph, which is a forest in general, since G − C out is not necessarily connected.Cycle C out is embedded, s.t.: (i) the order of the vertices of C out along the spine is fixed (and follows the one in which the vertices of C out appear along C out ), and, (ii) all edges of C out are on the same page, except for the one that connects its outermost vertices.Then, we describe how to embed without crossings: (i) the chords of C out , (ii) forest F , and, (iii) the edges between C out and F .To obtain a two-page book embedding of G, we replace each vertex of F with a cycle (embedded similarly to C out ), whose length equals to the length of the cycle delimiting the outerface of the bridge-block it corresponds to in G−C out , and recursively embed its interior.
More formally, consider an arbitrary simple cycle C : IP-4: If C is not identified with the cycle delimiting the outerface of G, the degree of either v 1 or v k is at most 3 in G in (C).Say w.l.o.g. that v k is of degree at most 3.
IP-5: If vertex v 1 has degree 4 in G in (C), then it is adjacent to zero or two chords of C. We explicitly notice that the combinatorial embedding specified in IP-2 is maintained throughout the whole drawing process.This combined with the fact that every edge entirely lies on one page (i.e., no edge crosses the spine; see IP-1) is sufficient to ensure planarity.In the following, we describe in detail how to recursively produce a two-page book embedding of G in (C).Note that we first present the recursive step of our algorithm and then its base, since  this approach shows better how the different ideas flow one after the other.Let v i be a vertex of C, i = 1, . . ., k.Since G is of max-degree 4, v i is incident to at most two undrawn edges.Assume that v i has at least one undrawn edge.We refer to the edge incident to v i that follows (v i , v (i+1) mod k ) in the counterclockwise order of the edges around v i (as defined by the combinatorial embedding specified by IP-2), as the right edge of v i .If v i is adjacent to two undrawn edges, then the one that is not identified with the right edge of v i is its left edge; otherwise, the left and the right edge of v i are identified.
Initially, we draw the chords of C on the top-page.By IP-2 and IP-3, no two chords intersect.We then draw G in (C) and the edges between C and G in (C).Note that G in (C) is not necessarily connected.Hence, its bridge-block trees form a forest.As already stated, we contract each bridge-block of G in (C) into a single vertex, which we call block-vertex ; see Figs. 10a-10b.We distinguish two types of block-vertices: those adjacent to vertices of C (anchors) and those adjacent to other block-vertices only (ancillaries).From the contraction, it follows that an edge between C and a certain anchor can be of multiplicity at most two.Edges among block-vertices are always simple.We will first determine the positions of all anchors along .Consider an anchor c, then among the edges between c and C, we select and mark exactly one, s.t.: (i) the marked edge will be drawn on the bottom-page and (ii) all other edges incident to c (i.e., either edges between c and C that are not marked, or between c and block-vertices) will be drawn on the top-page.Let v l,c be the leftmost vertex of C adjacent to c along .If (c, v l,c ) is simple, we select and mark this edge.Otherwise, we mark the right edge of v l,c .Hence, each anchor has exactly one marked edge (which we will shortly utilize to determine its position along ) and each vertex of C is incident to at most two marked edges.Let v ∈ C be a vertex of C adjacent to at least one anchor through a marked edge.Then we have two cases: Case 1 v is adjacent to exactly two anchors c and c through two marked edges e and e , resp.: Assume w.l.o.g. that e is the left edge of v and e its right edge.Then, both c and c are placed directly to the right of v and c precedes c (see Fig. 10d).Note that v cannot be the rightmost vertex of C due to IP-4.
Case 2 v is adjacent to one anchor c through a marked edge e: If deg(v) = 3 in G in (C), then we distinguish two sub-case.If v is not the rightmost vertex of C, then c is placed directly to the right of v (see Fig. 10e).Otherwise, directly to its left (see Fig. 10f).It now remains to consider the case where deg(v) = 4 in G in (C).In this case, by IP-4 it follows that v is not the rightmost vertex of C. Again, we distinguish two sub-cases: − If e is the right edge of v, then c is placed directly to the right of v (see Fig. 10g).− If e is the left edge of v, then c is placed directly to the left of v (see Fig. 10h); v cannot be the leftmost vertex of C, as the right edge of v would be a chord, violating IP-5.
As already stated, all marked edges are bottom-drawn.Edges between anchors and C that are not marked are top-drawn; see Fig. 10c.Observe that we do not change the underlying combinatorial embedding of G, preserving IP-2.Hence, the book embedding constructed so far is planar.
Before we proceed to describe how anchors "determine" the positions of ancillaries, we introduce the notion of (labeled ) anchored tree and investigate properties of it.Observe that ancillaries form a new forest (forest of ancillaries), which is subgraph of the initial forest (containing all block-vertices).Let T be a tree of the forest of ancillaries and let c 1 , . . ., c t be anchors that (i) are adjacent to at least one ancillary of T , and (ii) c i is to the left of c i+1 , i = 1, . . ., t−1.We refer to c 1 , . . ., c t as the anchors of T , and to the tree formed by T and its anchors as the anchored tree of T , denoted by T .We say that two anchors of T are consecutive iff there is no anchor of T between them (anchors that do not belong to T or vertices of C may lie in between).Lemma 6.For anchored trees the following hold: (i) Two trees T and T share at most a common anchor; (ii) T contains at least two anchors; and (iii) every leaf of T is an anchor of T , and vice versa.
Proof.(i) If T and T have two common anchors c and c , then there are two paths from c to c , one through T and one through T , which form a cycle of block-vertices, a contradiction.(ii) If T has no anchors, then no path from C to T exists, a contradiction since G is connected.If T has one anchor c, then the edge from c to T is a bridge, a contradiction since G is biconnected.Note that the edge from c to T is always simple; double edges potentially occur between vertices of C and anchors.(iii) Removing the anchors of T , we obtain T .If an anchor of T is internal to T , then its removal disconnects T , a contradiction since T is connected.If there is a leaf c ∈ T that is not an anchor of T , then the edge from c to T is a bridge, a contradiction since G is biconnected.
Assume now that T is rooted at anchor c 1 (rooted anchored tree).For an anchor or ancillary c of T , denote by p(c) the parent of c in T and let p(c 1 ) be any of the vertices of C adjacent to c 1 .For an ancillary c of T (i.e., non-leaf in T ), we define an order for its children: if c and c are children of c, then c < c iff c precedes c in the counterclockwise order of the edges around c (defined by the combinatorial embedding specified by IP-2), when starting from (c, p(c)).By this order, we label the vertices of T as they appear in the pre-order traversal of T (labeled anchored tree); see Fig. 11a.Lemma 7.For each ancillary c of a labeled anchored tree T there is (i) at least an anchor of T with label smaller than that of c and (ii) at least another with label greater than that of c.
Proof.The leftmost anchor (i.e.root) of T is zero labeled, which proves (i).The greatest labeled vertex of T is a leaf of T (due to pre-order traversal) and by Lemma 6(iii) an anchor of T .This proves (ii).
We first define the order in which the trees of the forest of ancillaries will be drawn.To do so, we create an auxiliary graph G T aux whose vertices correspond to trees and there is a directed edge (v T , v T ) in G T aux iff T has an anchor between two consecutive anchors of T .The desired order is defined by a topological sorting of G T aux , which always exists as the following lemma suggests.
Lemma 8. Auxiliary graph G T aux is a directed acyclic graph.
Proof.Assume to the contrary that there is a cycle v T 1 → . . .v Ts → v T 1 in G T aux .Let I i be the interval defined by the left/right-most anchors of T i .Edge (v T i , v T i+1 ) implies that there is an anchor of T i between consecutive anchors of T i+1 .However, in this case all anchors of T i should be between the same two anchors of T i+1 , as otherwise the embedding specified by IP-2 is not planar.So, I i ⊆ I i+1 .By Lemma 6(i), it follows that I i = I i+1 .Hence, I 1 ⊂ . . .⊂ I s ⊂ I 1 , a contradiction.Lemma 8 implies that drawing the trees in the order defined by a topological sorting of G T aux , assures that the tree T will be drawn before T , if T has an anchor that is between two consecutive anchors of T along .Now assume that we have drawn zero or more of these trees s.t.(i) all edges are top-drawn, (ii) there are no edge crossings, and (iii) the combinatorial embedding specified by IP-2 is preserved.Let T be the next tree to be drawn.The following lemma presents an important property of our drawing approach.Lemma 9. Assume that all trees that precede T in a topological sorting of G T aux have been drawn on the top-page without edge crossings by preserving the combinatorial embedding specified by IP-2.If e is a top-drawn edge that does not belong to T and nests at least one anchor of T , then it nests all anchors of T .
Proof.If e is the top-drawn edge of cycle C, then e nests all anchors of T , since all anchors of T are between the left/right-most vertices of C. Now consider the case where e is not the top-drawn edge of C. By Lemma 6(ii), T has at least two anchors, say c and c (with c to the left of c ), and assume to the contrary that e nests c and not c .If e is an edge of an anchored tree T drawn before T , then by Lemma 7, both endpoints of e are between the left/right-most anchors of T .Since e nests c, T should be drawn before T , a contradiction.Finally, if e is not an edge of a previously drawn anchored tree, then each endpoint of e is either (i) a vertex of C or (ii) an anchor.Since such vertices are connected to C by a bottom edge, there is a path connecting the endpoints of e on the bottom-page, which together with e forms a cycle with c in its interior and c on its exterior.Hence, the embedding specified by IP-2 is not planar, a contradiction.
We now describe how to draw T on the top page s.t.(i) there are no edge crossings, and, (ii) the combinatorial embedding specified by IP-2 is preserved.More precisely, we place each ancillary c of T between a pair of consecutive anchors of T , s.t. the label of c is larger (smaller) than the label of the anchor to its left (right)2 ; for ancillaries placed between the same pair of anchors, the one with smaller label is to the left; all edges of T are top-drawn (see Fig. 11b).Note that we have not fully specified the exact positions of the ancillaries of T along , since between consecutive anchors of T there may exist anchors that do not belong to T or vertices of C or anchors/ancillaries of trees that have already been drawn.Details will be given shortly.
Notice that all ancillaries of T are placed between its left/right-most anchors, which by Lemma 9 implies that if a top-drawn edge (that does not belong to T ) nests at least one anchor of T , then it nests the entire tree T .By exploiting the correspondence between the left-to-right order of the vertices of T along and the labeling of T , we can prove that the drawing of T is planar.
Lemma 10.The drawing of the anchored tree T is planar.
Proof.Assume to the contrary that e = (c 1 , c 2 ) and e = (c 1 , c 2 ) of T cross.Since e and e are top-drawn, their endpoints alternate along .Let the order on be c 1 → c 1 → c 2 → c 2 .Hence, c 1 is the parent of c 2 , as the label of c 1 is smaller than that of c 2 and they are adjacent in T .Similarly, c 1 is the parent of c 2 .Since between c 1 and c 2 are drawn subtrees of T rooted at children of c 1 other than c 2 , it follows that c 1 and c 2 belong to a subtree rooted at a child of c 1 , different from c 2 , which implies that the label of c 2 is smaller than that of c 2 , a contradiction.
Recall that we have not fully specified the exact positions of the ancillaries of T along .Consider the following scenario.There is a path P of top-drawn edges (e.g., non-marked edges incident to C and/or edges of previously drawn trees) joining a pair of consecutive anchors of T and our algorithm must place an ancillary c of T between them.Since c is nested by an edge of P and all edges of T are top-drawn, an edge connecting c with an ancillary of T placed between another pair of consecutive anchors of T will cross P .The following lemma ensures that this scenario cannot occur, as such a path cannot exist.
Lemma 11.Let u 0 , u 1 , . . ., u l+1 , l ≥ 0, be vertices (anchors/ancillaries are treated as vertices) drawn on from left to right, s.t.u 0 and u l+1 are two consecutive anchors of T .Assume that all trees anchored at u 1 , . . ., u l have been drawn on the top-page without edge crossings by preserving the combinatorial embedding specified by IP-2, while T has not been drawn.Then, there is an index i ∈ {0, 1, . . ., l}, such that no two adjacent vertices u k and u m exist with Proof.Since all trees anchored at u 1 , . . ., u l have been drawn, edges incident to u 1 , . . ., u l are present in the drawing.For a proof by contradiction, we make the following assumption: For all i ∈ {0, . . ., l}, there are two adjacent vertices u k and u m with 0 ≤ k ≤ i, i + 1 ≤ m ≤ l + 1 and (u k , u m ) is on the top-page.We first prove that there is a top-drawn path P (u 0 → u l+1 ) : u 0 → u j 1 . . .u jp → u l+1 consisting of vertices of {u 0 , . . ., u l+1 }, whose edges are top-drawn and for each edge of P (u 0 → u l+1 ) there is not a top-drawn edge with endpoints in {u 0 , . . ., u l+1 } that nests it.The existence of P (u 0 → u l+1 ) will imply the desired contradiction.
For i = 0, by our assumption it follows that for some m ∈ {1, . . ., l + 1}, edge (u 0 , u m ) exists and is on the top-page.Let j 1 ∈ {1, . . ., l + 1} be the maximum s.t.(u 0 , u j 1 ) is drawn on the top-page.If j 1 = l + 1, then P (u 0 → u l+1 ) exists.Let j 1 = l + 1.For i = j 1 , it follows that for some k ∈ {0, . . ., j 1 } and m ∈ {j 1 + 1, . . ., l + 1}, (u k , u m ) exists and is on the top-page.k / ∈ {1, . . ., j 1 − 1}, since otherwise (u 0 , u j 1 ) and (u k , u m ) would cross, which is not possible since the combinatorial embedding specified by IP-2 is planar.Also, k = 0, since j 1 was the maximum of {1, . . ., l + 1}, s.t.(u 0 , u j 1 ) is drawn on the top-page.Hence, k = j 1 .Let j 2 ∈ {j 1 + 1, . . ., l + 1} be the maximum, s.t.(u j 1 , u j 2 ) is drawn on the top-page, and proceed as in the case i = 0.This procedure will eventually lead to P (u 0 → u l+1 ).We claim that P (u 0 → u l+1 ) has at least one vertex of C. Assume to the contrary that P (u 0 → u l+1 ) contains only anchors/ancillaries, which cannot belong to T , since u 0 and u l+1 are consecutive anchors of T .By Lemma 6(iii), u 0 and u l+1 are leaves of T .Hence, the path from u 0 to u l+1 through T and P (u 0 → u l+1 ) form a cycle of anchors/ancillaries, a contradiction.Let u be the rightmost vertex of C in P (u 0 → u l+1 ) and c be the neighbor of u in P (u 0 → u l+1 ) to the right of u on .Since u l+1 is an anchor of T , c is well-defined and is either an anchor or an ancillary.Now observe that c is adjacent to u and u ∈ C, which implies that c is an anchor and hence is incident to a marked edge, say (v, c), where v ∈ C (u = v is possible).Assume that We are now ready to specify the exact positions of the ancillaries of T along .Recall that the anchors of T are denoted by c i , i = 1, . . ., t, s.t.c i is to the left of c i+1 .Now assume that a particular number of ancillaries of T should be drawn between two consecutive anchors c i and c i+1 of T , i = 1, . . ., t − 1.By Lemma 11, there is a pair of vertices that are between c i and c i+1 along and there is not a top-drawn edge with endpoints between c i and c i+1 nesting both of these vertices.We benefit from this by placing between this particular pair of vertices all ancillaries of T that must reside between c i and c i+1 .Their relative order is not affected, i.e., for ancillaries placed between c i and c i+1 , the one with smaller label is to the left.Lemma 10 ensures the planarity of T .It remains to prove that the combinatorial embedding specified by IP-2 is preserved.
Lemma 12. Assume that all trees that precede T in a topological sorting of G T aux have been drawn on the top-page without edge crossings by preserving the combinatorial embedding specified by IP-2.When T is drawn, the combinatorial embedding specified by IP-2 is also preserved.
Proof.Since the drawing of T preserves the order of the edges of T around all ancillaries, the combinatorial embedding specified by IP-2 is preserved for all ancillaries of T .We will prove that the lemma holds for all anchors of T .Let c be an anchor of T and denote by e c the marked edge incident to c (which is bottom-drawn).Let also e p and e t be two edges incident to c s.t. e p is an edge among those drawn before T and e t is an edge of T .We restrict our proof to the case where in the combinatorial embedding specified by IP-2, e p precedes e t in the clockwise traversal of the edges around c when starting from e c and c is the left endpoint of e p along .The remaining cases are treated similarly.Then, there is a simple path of drawn edges (other than e p ) that joins the two endpoints of e p and together with e p forms a face of G. Let C(e p ) be the cycle bounding this face.Since e p precedes e t in the clockwise traversal of the edges around c when starting from e c , T lies in the interior of C(e p ).Hence, there is a top-drawn edge that belongs to C(e p ) (possibly edge e p ) that does not belong to T and that nests an anchor of T .By Lemma 9, this edge nests all anchors of T (including anchor c).Since c belongs to C(e p ), it follows that the only edge of C(e p ) that nests T is edge e p .Thus, c is the leftmost anchor of T and the entire drawing of T is nested by e p .After drawing T , e p still precedes e t in the clockwise traversal of the edges around c when starting from e c , as desired.
In the following lemma, we turn our attention to the case where C contains a vertex of degree 2 in G in (C) (other than its leftmost or rightmost vertex).We will utilize this lemma later.Lemma 13.Let v be a vertex of C with degree 2 in G in (C) that is not the left/right-most vertex of C. Let also v r (v l ) be its next neighbor on C to its right (left resp.).Since edge (v, v r ) belongs to C, it is drawn on the bottom-page.However, it can also be drawn on the top-page without edge-crossings, while the combinatorial embedding specified by IP-2 is maintained.
Proof.If no block-vertex is drawn between v and v r , then obviously (v, v r ) can be drawn on the top-page.Otherwise, we will move the block-vertices in between to the left of v, so that v and v r are consecutive along .This is not possible if there is an anchor c between v and v r s.t.(c, v r ) is bottom-drawn (see Fig. 12a).Alternatively, we could place v between c and v r .However, in this case (v r , c) and (v l , v) cross.We could overcome this problem if (v r , c) is redrawn on the top-page.This is not possible if there is a block-vertex c between c and v r .We have two cases: (i) c is an anchor, i.e., adjacent to a vertex of C. Then c can only be adjacent to v r through a marked edge.Hence, c and c are two anchors that are both to the left of v r and adjacent to v r through marked edges, which is not valid by the algorithm, a contradiction.
(ii) c is an ancillary.Then c belongs to a tree T .All ancillaries of T are placed between the left/right-most anchors of T .Let u and u be consecutive anchors of T , ordered on as u → c → u ; u = c is possible (see the left part of Fig. 12b).However, u cannot be between c and v r (otherwise the previous case applies for u ), thus, u is to the right of v r .We claim that Lemma 11 holds for u 0 = v r and u l+1 = u , even though u 0 is not an anchor but a vertex of C (the detailed proof is similar to the one of Lemma 11).Hence, there are two consecutive vertices between v r and u s.t.c can be placed between them (and not between c and v r ); see Fig. 12b.The same holds for every ancillary that was initially placed between c and v r .If we move all ancillaries between v r and u by keeping their relative order unchanged, then (c, v r ) can be drawn on the top-page, and the problem is resolved (see Fig. 12c).
Up to now, we have drawn G in (C), s.t., every bridge-block of G in (C) is contracted to a block-vertex that lies on and each edge is drawn either on the bottom (if it is a marked edge) or on the top-page (otherwise).Also, we preserved the order of the vertices of C on and the embedding of G specified by IP-2.Hence, crossings in G out (C) cannot occur.Next, we describe how to recursively proceed.Let c be a block-vertex of G in (C) with outerface F c .Initially, assume that F c is a simple cycle.If c is an anchor, denote by w 0 the vertex of F c incident to the marked edge of c.If c is an ancillary, then c belongs to an anchored tree.In this case, w 0 denotes the vertex of F c adjacent to the closest neighbor of c to its left, which is well-defined since c is always placed between two consecutive anchors of the anchored tree it belongs to.Let w 0 , w 1 , . . ., w m be the vertices of F c , in the clockwise traversal of F c from w 0 (see Fig. 13a).
First assume that c is an anchor, i.e., w 0 is incident to a marked edge.We place the vertices of F c on as follows: (i) w 0 occupies the position of c and it is the rightmost vertex of F c on , (ii) w 1 is the leftmost vertex of F c on , (iii) w i is to the left of w i+1 for i = 1, . . ., m − 1, and, (iv) there are no vertices in between; see Fig. 13b.All edges of F c are top-drawn, except for (w 1 , w 0 ).This placement is always feasible, except for the case in which in the combinatorial embedding specified by IP-2 there is an edge incident to w 0 that is between (w 0 , w 1 ) and the marked edge incident to w 0 in the counterclockwise order of the edges around w 0 when starting from (w 0 , w 1 ); see Fig. 13c.In this case, we place w 0 to the left of w 1 , . . ., w m , s.t.w 0 is the leftmost vertex of F c .So, (w 0 , w m ) is the bottom-drawn edge of F c .
Suppose now that c is an ancillary.Let w be the closest neighbor of c to its left on .Then, w is the parent of c in the tree in which c belongs to and (w 0 , w) is top-drawn.We place the vertices of F c as follows: (i) w 0 occupies the position of c and it is the leftmost vertex of F c on , (ii) w m is the rightmost vertex of F c on , (iii) w i is to the left of w i+1 , i = 1, . . ., m − 1, and, (iv) there are no vertices in between.All edges of F c are top-drawn, except for (w 0 , w m ).This placement is infeasible only when in the combinatorial embedding specified by IP-2 there is an edge incident to w 0 , say (w 0 , w ), and between (w 0 , w m ) and (w 0 , w) in the clockwise order of the edges around w 0 when starting from (w 0 , w m ) (see Fig. 13d).In this case, (w 0 , w ) cannot be drawn on the top-page, as required for edges incident to ancillaries.More precisely, since c has only its parent to its left among the block-vertices of the anchored tree it belongs to, it follows that, w is to the right of c.Hence, (w 0 , w ) cannot be drawn on the top-page, without deviating the combinatorial embedding specified by IP-2.Since G is biconnected, c is adjacent to at least another block-vertex, say w , s.t.w / ∈ {w, w }.The following lemma takes care of this case.
Lemma 14. Ancillary c can be repositioned on , s.t.: (i) c is placed between two consecutive anchors of T .(ii) The combinatorial embedding specified by IP-2 is preserved and the edges (w 0 , w), (w 0 , w ) and (c, w ) are top-drawn and crossing-free.(iii) w 0 is leftmost vertex of F c and w i is to the left of w i+1 , i = 1, . . ., m−1; All edges of F c are top-drawn, except for (w 0 , w m ).
Proof.w is the parent of c and w , w are children of c in T , with w being the first child of c.For our proof, w is its second child.So, (c, w), (c, w ) and (c, w ) are consecutive around c as in Fig. 13d.Let T (w ) and T (w ) be subtrees of T rooted at w and w , resp.Initially, c is to the left of all vertices of T (w ), all vertices of T (w ) are to the left of all vertices of T (w ) and there are no ancillaries of T in between.We place c between the rightmost (leftmost) anchor of T (w ) (T (w )); see Fig. 13e.So, c is placed between two consecutive anchors of T .If we place the vertices of F c , with w 0 being leftmost on F c and w i to the left of w i+1 , then (w 0 , w), (w 0 , w ) and (c, w ) are drawn on the top-page and the embedding is preserved.
If we process all ancillaries that have to be repositioned from right to left along , then by Lemma 14 we obtain a planar drawing in which the embedding specified by IP-2 is preserved once w 0 root Figure 14: F c is not simple the outerface of block-vertex is drawn and all edges that connect block-vertices are eventually drawn on the top-page.Initially, we assumed that F c is simple.If not so, F c consists of smaller simple subcycles, s.t.(i) any two subcycles share at most one vertex of F c and (ii) any vertex of F c is incident to at most two subcycles.Hence, the "tangency graph" of these subcycles (which has a vertex for each subcycle and an edge between every pair of subcycles that share a vertex) is a tree.Define w 0 as in the case of simple cycle and let the tangency tree be rooted at the cycle containing w 0 .Due to degree restriction, w 0 cannot be incident to two subcycles.We draw the subcycles of F c in the order implied by the Breadth First Search (BFS) traversal of the tangency tree.The first one (incident to w 0 ) is drawn as in the case of simple cycle.Each next subcycle is plugged into the drawing, as shown in Fig. 14.
It remains to ensure that IP-1 up to IP-5 are satisfied when a simple cycle, say C s , is recursively drawn.IP-1 holds, since each edge is drawn either on the bottom (if it is a marked edge) or on the top-page (otherwise) and no two edges intersect.Lemma 12 implies IP-2.If C s is the outerface of a block-vertex or a leaf in the tangency tree, then IP-3 trivially holds.If C s is a non-leaf in the tangency tree, it contains at least one edge on the bottom-page (see Fig. 14).This violates IP-3.However, we can benefit from Lemma 13 since the edge which is improperly bottom-drawn is incident to a vertex (of degree four) that is not adjacent to any other vertex in the interior of C s .For the sake of the recursion we assume that it is drawn on the top-page and once C s is completely drawn, we redraw it on the bottom-page using Lemma 13.If C s is the outerface of a block-vertex or root of the tangency tree of a non-simple outerface F c , then at least one vertex of C s is adjacent to G out (C s ).If C s is an internal node of the tangency tree of F c , then its leftmost vertex has two edges in G out (C s ).Hence, IP-4 also holds.
However, IP-5 does not necessarily hold.To cope with this case, consider a simple cycle C s and, with a slight abuse of the notation developed so far, denote by w 1 , . . ., w m the vertices of C s from left to right along .If IP-5 is violated, then deg(w 1 ) = 4 in G in (C s ) and w 1 is incident to exactly one chord of C s , say (w 1 , w i ), i ∈ {3, . . ., m − 1}; see Fig. 15a.Let v be the other neighbor of w 1 in G in (C s ).Clearly, v / ∈ C s .In general, (w 1 , w i ) belongs to a path of chords stemming from w 1 .Let w j , j ≥ i, be the end of this path be the end of this path P (w 1 → w j ).The degree restriction implies that P (w 1 → w j ) is uniquely defined.We refer to it as the separating path of chords of C s , since it splits G in (C s ) into two subgraphs (see Fig. 15b-15c): − G in (C l ) with outerface C l consisting of the edges (w 1 , w 2 ), (w 2 , w 3 ), . .., (w j−1 , w j ) and the edges of P (w 1 → w j ) (highlighted in gray in Fig. 15a) and − G in (C r ) with outerface C r consisting of the edges (w j , w j+1 ), . .., (w m−1 , w m ), (w m , w 1 ) and the edges of P (w 1 → w j ).
In the following, we describe how the two sub-instances G in (C l ) and G in (C r ) can be recursively solved.Observe that if i = j, then C l is not simple.In this case, C l consists of a particular number of smaller simple subcycles, for which IP-4 and IP-5 hold (hence they can be recursively drawn), except for the first one, that is leftmost drawn along .First consider G in (C r ).We distinguish two cases: • Case 1: j = m (see Fig. 15d).Then, C r is formed by P (w 1 → w m ) and (w 1 , w m ).Observe that w m is the rightmost vertex of C r and incident to a chord of C s .Hence, deg(w m ) = 2 in G in (C r ).Since none of the edges of P (w 1 → w m ) is nested by a chord of C r , all vertices of C r (except possibly for w 1 ) are of degree 2 in G in (C r ).If deg(w So, we draw it as in Fig. 15d, i.e., on the top-page.Then, each subcycle of C l conforms to IP-4 and IP-5 (including the first one, that is leftmost drawn along ) and can be recursively drawn.The drawing of G in (C s ) is derived by plugging the drawing of the subcycles of C l into the drawing of G in (C r ).Observe that the combinatorial embedding is preserved.
• Case 2: j < m (see Fig. 15c).All vertices of P (w 1 → w j ) have degree 2 in G in (C r ), except for w 1 and w j , that can have max-degree 3. We modify G in (C r ) as follows (see Fig. 15e): We contract P (w 1 → w j ) into a vertex, identified by w j .Let G in (C r ) be the new subgraph with outerface C r .Clearly, IP-5 holds for G in (C r ).IP-4 also holds, since w m is the rightmost vertex of C r and deg(w m ) ≤ 3. Hence, G in (C r ) can be recursively drawn.We proceed by distinguishing two sub-cases based on the degree of w 1 in G in (C l ): -Case 2.1: deg(w 1 ) = 3 in G in (C l ) (see Fig. 15f).Here IP-4 and IP-5 hold for G in (C l ), so, it can be recursively drawn.Once G in (C l ) and G in (C r ) are drawn, the drawing of G in (C) can be derived by deleting (w j , w m ) from G in (C r ) and restoring    We can benefit from this by proceeding recursively, as we initially did with G in (C).Eventually, at some point IP-5 should hold, otherwise a graph with at most 3 vertices on its outerface should have a chord; contradiction.Once G in (C l ) has been drawn, we derive the drawing of G in (C) as follows; see Fig. 15k.We remove (w 2 , w i ) and connect the neighbors of w j in G in (C r ) with its copy in G in (C l ).Note that no crossings are introduced, since the two copies of w j in G in (C l ) and G in (C r ) are consecutive on .
(e) Mirroring the input graph G along the y-axis.
(f) Graph Gaug when cr is not incident to a vertex of Cout apart from v k .
(g) The drawing of Gaug, when: cr is not adjacent to another vertex of Cout apart from v k ; v l and vr belong to different block-vertices.
(h) A valid drawing of G, when: cr is not adjacent to another vertex of Cout apart from v k ; v l and vr belong to different block-vertices.
(i) The of Gaug, when: cr is not adjacent to any other vertex of Cout apart from v k ; v l and vr belong to the same block-vertex; (v k , v k+1 ) is marked.
(j) A valid drawing of G, when: cr is not adjacent to any other vertex of Cout apart from v k ; v l and vr belong to the same block-vertex; (v k , v k+1 ) is marked.
(k) The of Gaug, when: cr is not adjacent to any other vertex of Cout apart from v k ; v l and vr belong to the same block-vertex; (v k , v k+1 ) is not marked.• Case 2: c r is not incident to any other vertex of C out apart from v k .We claim that we are allowed to assume w.l.o.g. that c l is not incident to any other vertex of C out apart from v k .If not so, consider a mirroring of at the y-axis (see Fig. 16e).The clockwise order of the edges around each vertex of G is reversed.So, (v k , v l ) ((v k , v r ), resp.) is the right (left, resp.)edge of v k .If c l is incident to a vertex of C out other than v k , then Case 1 applies.Assume w.l.o.g. that c r and c l are not incident to any other vertex of C out apart from v k .We augment G as in Fig. 16f, s.t.IP-4 holds.Let C aug be the outerface of the augmented graph.Since v k is not a cutvertex in G, (v k , v k+1 ) cannot be a bridge in G aug .Hence, G aug can be recursively drawn.We distinguish two subcases: -Case 2.1: Vertices v l and v r belong to two different block-vertices of G aug −C aug , say c aug l and c aug r resp.So, v k+1 belongs to another block-vertex (containing only v k+1 ) and is incident to v k .Both c aug r and c aug l are ancillaries.Since v k+1 is adjacent to one vertex of C out (i.e.v k ), (v k , v k+1 ) is the marked edge of v k+1 and v k+1 is placed directly to the left of v k (see Fig. 16g).(v k , v k+1 ) is drawn on the bottom half-plane (marked edge) and (v l , v k+1 ) and (v r , v k+1 ) are drawn on the top half-plane.If there was an anchor between v k+1 and v k , it would be adjacent to v k , contradicting the fact that deg(v k ) = 3 in aug .So, the rightmost anchor of G aug − C aug is v k+1 .Then, all vertices of G aug − C aug are to the left of v k+1 .So, if we contract v k and v k+1 back to v k , then we obtain a valid drawing of G (see Fig. 16h).
-Case 2.2: Vertices v l and v r belong to the same block-vertex, say c, of G aug .Then, v k+1 must belong to c, as well.Also, v r , v k+1 and v l appear in this order in the clockwise traversal of the outerface C c of c.Since c contains v k+1 , c is adjacent to v k of C out , and so c is incident to a marked edge, which "determines" the placement of the vertices of C c on .Let v be the vertex of C c incident to the marked edge of c.Since c is adjacent to v k , v = v k+1 is possible (but v / ∈ {v r , v l } since v r and v l are not incident to a vertex of C out ).
* Assume that v = v k+1 , i.e., (v k , v k+1 ) is the marked edge of c (see Fig. 16i).Then, c is directly to the left of v k , with v k+1 being the rightmost vertex of C c .Then between v k+1 and v k no vertices of G aug exist, since deg(v k ) = 3 in G aug , i.e., if there was an anchor between v k and v k+1 , it would be adjacent to v k and then deg(v k ) = 4. So, the rightmost anchor of G aug − C aug has v k+1 as its rightmost vertex.Then all vertices of G aug − C aug are to the left of v k+1 .If we contract vertices v k and v k+1 back to v k , and draw (v l , v k ) on the bottom half-plane and (v r , v k ) on the top half-plane, we obtain a valid drawing of G (see Fig. 16j).* Assume now that v = v k+1 .We claim that v r , v k+1 and v l appear in this order from left to right on .Assume to the contrary that, either v l and v k+1 , or, v k+1 and v r , are the leftmost and rightmost vertices of C c on , resp.The contradiction is implied by the construction, in which v is either leftmost or rightmost on C c , and v / ∈ {v k+1 , v r , v l }.The current situation is depicted in Fig. 16k.If we remove v k+1 , and draw (v l , v k ) and (v r , v k ) on the top half-plane, then we obtain a valid drawing of G (see Fig. 16l).
We are now ready to state our main theorem.Theorem 3. Any planar graph of maximum degree 4 on n vertices admits a two-page book embedding, which can be constructed in O(n 2 ) time.
Proof.At each step, our algorithm performs a series of computations; the computation of the bridge-blocks, the topological sorting of G T aux , BFS-traversals on the tangency trees.Using standard algorithms from the literature all of these computations can be done in O(n) time, resulting in O(n 2 ) total time.

Figure 1 :
Figure 1: Triangle T separating G in (T ) and G out (T ) on removal.

Figure 3 :
Figure 3: (a) Subhamiltonian cycle H * out (T ) in G * out (T ) containing v T .(b) Augmenting H * out (T ) yields H out (T ) containing edges e 1 = (Γ, A) and e 2 = (A, B).(c) Dummy vertex v T as replacement for T in G * in (T ) and a cycle H * in (T ).(d) Rerouting H * in (T ) through T resulting in H in (T ) with edges e 1 = (Γ, B) and e 2 = (A, B).(d) The result of merging H in (T ) and H out (T ) into a cycle H for G.

Lemma 4 .
Let G be a triconnected 4-planar graph, T a separating triangle, and H in (T ) and H out (T ) two subhamiltonian cycles for G in (T ) and G out (T ), resp.If E(H in (T )) ∩ E(T ) = {e in , e} and E(H out (T )) ∩ E(T ) = {e out , e} where {e, e in , e out } are the edges of T , then G is subhamiltonian.Proof.Let w.l.o.g. e = (A, B), e in = (B, Γ) and e out = (A, Γ) as illustrated in Fig.2.The result of removing the edges of T from both cycles are two paths P out = B Γ and P in = Γ A. Joining them at Γ and inserting e yields a subhamiltonian cycle.

Figure 4 :
Figure 4: The three main cases at v T : (a) The cycle uses two of the three edges incident to v T .(b) The cycle enters via an edge and leaves through a face.(c) Predecessor and successor are not adjacent to v T .

Figure 5 :
Figure 5: (a) Dummy vertex v T is replaced by the sequence A, Γ, B to obtain a cycle with the edges (A, Γ) and (B, Γ).(b) Sequence Γ, A, B yields a cycle with (A, B) and (A, Γ) where (A out , Γ) requires it to cross a face.(c) Augmenting with A, B, Γ results in a cycle containing (A, B) and (B, Γ).

Figure 6 :
Figure 6: In (a) and (b) the same sequences as before are used to obtain a cycle containing (A, Γ), (B, Γ) and (A, B), (A, Γ), respectively.Subcase-specific links are drawn in blue and red.(c) A more complicated case requiring one additional crossing of a face from A out to Γ.

Figure 7 :
Figure 7: (a) Both subcases have a solution.(b,c) When the cycle uses two distinct faces (f 1f 3 ) a solution for both pairs of edges can be found.If only one face is used (f 1 f 2 ), then no solution exists for the edges (A, B), (A, Γ) and (A, B), (B, Γ).

Figure 8 :
Figure 8: (a) Two separating triangles T and T with vertices V (T ) = {A, B, Γ} and V (T ) = {A , B , Γ } and for each two prescribed edges (bold, blue).(b) T and T replaced by v T and v T , every non triangular face is stellated by inserting additional vertices (squares) and edges (dashed), and a (sub)hamiltonian cycle H (bold, red).(c) Result of applying the corresponding rule to T creating an unresolvable configuration for T .
The removal of C results in two planar subgraphs G in (C) and G out (C) of G that are the components of G − C that lie in the interior and exterior of C in G, resp.Note that G in (C) and G out (C) are not necessarily connected.Let G in (C) (G out (C), resp.)be the subgraph of G induced by C and G in (C) (G out (C), resp.).For the recursive step, we assume the following invariant properties: IP-1: The order of the vertices of G out (C) along the spine is fixed and the page in which each edge of G out (C) is drawn (i.e., top or bottom) is determined s.t. the book embedding of G out (C) is planar.In other words, we assume that we have already produced a two-page book embedding for G out (C), in which no edge crosses the spine.IP-2: The combinatorial embedding of G out (C) is consistent with a given planar combinatorial embedding of G. IP-3: The vertices of C occupy consecutive positions along , s.t.v 1 (v k , resp.) is the leftmost (rightmost, resp.)along .Moreover, all edges of C are on the same page, except for the one that connects v 1 and v k .Say w.l.o.g. that (v 1 , v k ) is on the top-page (or topdrawn), while the remaining edges of C, namely edges (v i , v i+1 ) for 1 ≤ i < k, are on the bottom-page (or bottom-drawn); see Fig.9.
(a) Bridge-blocks of Gin(C) (b) Forest of block-vertices (c) Placement of anchors

Figure 10 :
Figure 10: In all figures, the edges of C are drawn dotted, bridge-blocks are colored gray and edges between C and anchors are drawn dashed; marked edges are highlighted in gray.

c 1 c 2 c 3 c 4 c 5 c 6 c 7 c 8 c 9 1
The placement of the ancillaries of T among its anchors

Figure 11 :
Figure 11: In both figures, anchors are colored gray; the indices of the vertical grid-lines denote the labeling of T .

Figure 12 :
Figure 12: Configuration considered in Lemma 13: (a) A situation in which placing anchor c to the left of v creates crossings.(b) Moving block-vertex c to the right of v r .(c) Edge (v, v r ) can be drawn on the top half-plane.

Figure 13 :
Figure 13: (a) The outerface of a block-vertex c. (b)-(c) different cases that occur when drawing the outerface of c, in the case where c is anchor.(d) Ancillary c needs to be repositioned.(e) Its placement is determined by Lemma 14.
Figure 15: In all figures, P (w 1 → w j ) is drawn fat, dotted edges are removed and gray-shaded dashed edges are added.
A valid drawing of G, when: cr is not adjacent to any other vertex of Cout apart from v k ; v l and vr belong to the same block-vertex; (v k , v k+1 ) is not marked.

Figure 16 :
Figure 16: In all figures, dotted edges are removed and gray-shaded dashed edges are added.
T ) = 4, a contradiction.Now let us assume that H * out (T ) is a subhamiltonian cycle for G * out (T ).The idea is to reinsert T and reroute H * out (T ) through T such that the resulting cycle H out (T ) contains two edges e 1 , e 2 ∈ E(T ).Lemma 5. Let G be a triconnected 4-planar graph, T a separating triangle.Furthermore, let G * out (T ) denote the graph resulting from replacing T by a vertex v T in G out (T ).A subhamiltonian cycle H * out (T ) for G * out (T ) can be augmented to a subhamiltonian cycle H out (T ) for G out (T ) such that it contains two edges of T , i.e., E(H out (T )) ∩ E(T ) = {e 1 , e 2 }.If H * out (T ) crosses every face of G * out (T ) at most once, one may choose any pair e 1 , e 2 ∈ E(T ) to lie on H out (T ).