Planar L-Drawings of Bimodal Graphs
Patrizio Angelini, Steven Chaplick, Sabine Cornelsen, Giordano Da Lozzo
PPlanar L-Drawings of Bimodal Graphs
Patrizio Angelini − − − , Steven Chaplick − − − ,Sabine Cornelsen − − − X ] (cid:63) , andGiordano Da Lozzo − − − (cid:63)(cid:63) John Cabot University, Rome, Italy [email protected] Maastricht University, The Netherlands [email protected] University of Konstanz, Germany [email protected] Roma Tre University, Rome, Italy [email protected]
Abstract.
In a planar L-drawing of a directed graph (digraph) each edge e is represented as a polyline composed of a vertical segment starting atthe tail of e and a horizontal segment ending at the head of e . Distinctedges may overlap, but not cross. Our main focus is on bimodal graphs ,i.e., digraphs admitting a planar embedding in which the incoming andoutgoing edges around each vertex are contiguous. We show that everyplane bimodal graph without 2-cycles admits a planar L-drawing. Thisincludes the class of upward-plane graphs. Finally, outerplanar digraphsadmit a planar L-drawing – although they do not always have a bimodalembedding – but not necessarily with an outerplanar embedding. Keywords:
Planar L-Drawings · Directed Graphs · Bimodality
In an
L-drawing of a directed graph (digraph), vertices are represented by pointswith distinct x- and y-coordinates, and each directed edge ( u, v ) is a polylineconsisting of a vertical segment incident to the tail u and of a horizontal segmentincident to the head v . Two edges may overlap in a subsegment with end point ata common tail or head. An L-drawing is planar if no two edges cross (Fig. 1(c)).Non-planar L-drawings were first defined by Angelini et al. [1]. Chaplick et al. [10]showed that it is NP-complete to decide whether a directed graph has a planarL-drawing if the embedding is not fixed. However it can be decided in linear timewhether a planar st-graph has an upward-planar L-drawing , i.e. an L-drawing inwhich the vertical segment of each edge leaves its tail from the top.A vertex v of a plane digraph G is k -modal (mod( v ) = k ) if in the cyclicsequence of edges around v there are exactly k pairs of consecutive edges that areneither both incoming nor both outgoing. A digraph G is k -modal if mod( v ) ≤ k for every vertex v of G . The 2-modal graphs are often referred to as bimodal , see (cid:63) The work of Sabine Cornelsen was funded by the German Research Foundation DFG– Project-ID 50974019 – TRR 161 (B06). (cid:63)(cid:63)
The work of Giordano Da Lozzo was partially supported by MIUR grant 20174LF3T8 “AHeAD: efficient Algorithms for HArnessing networked Data” . a r X i v : . [ c s . C G ] A ug P. Angelini et al. s tzx y uvw (a) Bimodal s tzx y uvw (b) Rectangular Dual y s txz w v u (c) L-drawing x sy uvwz t (d) Kandinsky
Fig. 1.
Various representations of a bimodal irriducible triangulation.
Fig. 1(a). Any plane digraph admitting a planar L-drawing is clearly 4-modal.Upward-planar and level-planar drawings induce bimodal embeddings. Whiletesting whether a graph has a bimodal embedding is possible in linear time, testingwhether a graph has a 4-modal embedding [3] and testing whether a partialorientation of a plane graph can be extended to be bimodal [7] are NP-complete.A plane digraph is a planar digraph with a fixed rotation system of the edgesaround each vertex and a fixed outer face. In an L-drawing of a plane digraph G the clockwise cyclic order of the edges incident to each vertex and the outerface is the one prescribed for G . In a planar L-drawing the edges attached to thesame port of a vertex v are ordered as follows: There are first the edges bendingto the left with increasing length of the segment incident to v and then thosebending to the right with decreasing length of the segment incident to v .This is analogous to the Kandinsky model [13] where vertices are drawnas squares of equal size on a grid and edges as orthogonal polylines on a finergrid (Fig. 1(d)). Bend-minimization in the Kandinsky model is NP-complete [8]and can be approximated within a factor of two [2]. Each undirected simplegraph admits a Kandinsky drawing with one bend per edge [9]. The relationshipbetween Kandinsky drawings and planar L-drawings was established in [10].L-drawings of directed graphs can be considered as bend-optimal drawings,since one bend per edge is necessary in order to guarantee the property thatedges must leave a vertex from the top or the bottom and enter it from theright or the left. Planar L-drawings can be also seen as a directed version of + -contact representations, where each vertex is drawn as a + and two verticesare adjacent if the respective + es touch. If the graph is bimodal then the + es are T s (including T , T , and T ). Undirected planar graphs always allow a T -contactrepresentation, which can be computed utilizing Schnyder woods [11].Biedl and Mondal [6] showed that a + -contact representation can also beconstructed from a rectangular dual (Fig. 1(b)). A plane graph with four verticeson the outer face has a rectangular dual if and only if it is an inner triangulationwithout separating triangles [17]. Bhasker and Sahni [4] gave the first linear timealgorithm for computing rectangular duals. He [14] showed how to compute arectangular dual from a regular edge labeling and Kant and He [16] gave two lanar L-Drawings of Bimodal Graphs 3 linear time algorithms for computing regular edge labelings. Biedl and Derka [5]computed rectangular duals via (3,1)-canonical orderings. Contribution:
We show that every bimodal graph without 2-cycles admits aplanar L-drawing respecting a given bimodal embedding. This implies that everyupward-planar graph admits a planar L-drawing respecting a given upward-planarembedding. We thus solve an open problem posed in [10]. The construction isbased on rectangular duals. Finally, we show that every outerplanar graph admitsa planar L-drawing but not necessarily one where all vertices are incident to theouter face. We conclude with open problems.Proofs for statements marked with ( (cid:63) ) can be found in the appendix, wherewe also provide an iterative algorithm showing that any bimodal graph with2-cycles admits a planar L-drawing if the underlying undirected graph without2-cycles is a planar 3-tree.
L-Drawings.
For each vertex we consider four ports , North, South, East, andWest. An L-drawing implies a port assignment , i.e. an assignment of the edgesto the ports of the end vertices such that the outgoing edges are assigned tothe North and South port and the incoming edges are assigned to the Eastand West port. A port assignment for each edge e of a digraph G defines apair (out( e ),in( e )) ∈ { North,South } × {
East,West } . An L-drawing realizes a portassignment if each edge e = ( v, w ) is incident to the out( e )-port of v and to thein( e )-port of w . A port assignment admits a planar L-drawing if there is a planarL-drawing that realizes it. Given a port assignment it can be tested in lineartime whether it admits a planar L-drawing [10].In this paper, we will distinguish between given L-drawings of a triangle. Lemma 1 ( (cid:63) ). Fig. 5 shows all planar L-drawings of a triangle up to symmetry.
Coordinates for the Vertices.
Given a port assignment that admits a planarL-drawing, a planar L-drawing realizing it can be computed in linear time bythe general compaction approach for orthogonal or Kandinsky drawings [12].However, in this approach, the graph has to be first augmented such that eachface has a rectangular shape. For L-drawings of plane triangulations it sufficesto make sure that each edge has the right shape given by the port assignment,which can be achieved using topological orderings only.
Theorem 1 ( (cid:63) ). Let G = ( V, E ) be a plane triangulated graph with a portassignment that admits a planar L-drawing and let X and Y be the digraphs withvertex set V and the following edges. For each edge e = ( v, w ) ∈ E – there is ( v, w ) in X if in ( e ) = West and ( w, v ) in X if in ( e ) = East. – there is ( v, w ) in Y if out ( e ) = North and ( w, v ) in Y if out ( e ) = South.
P. Angelini et al.
Let x and y be a topological ordering of X and Y , respectively. Drawing each vertex v at ( x ( v ) , y ( v )) yields a planar L-drawing realizing the given port assignment. Observe that we can modify the edge lengths in a planar L-drawing indepen-dently in x- and y-directions in an arbitrary way, as long as we maintain theordering of the vertices in x- and y-direction, respectively. This will still yield aplanar L-drawing. This fact implies the following remark.
Remark 1.
Let G be a plane digraph with a triangular outer face, let Γ be aplanar L-drawing of G , and let Γ be a planar L-drawing of the outer face of G such that the edges on the outer face have the same port assignment in Γ and Γ . Then there exists a planar L-drawing of G with the same port assignment asin Γ in which the drawing of the outer face is Γ . Generalized Planar L-Drawings. An orthogonal polyline P = (cid:104) p , . . . , p n (cid:105) isa sequence of points s.t. p i p i +1 is vertical or horizontal. For 1 ≤ i ≤ n − p ∈ p i p i +1 , the polyline (cid:104) p , . . . , p i , p (cid:105) is a prefix of P and the polyline (cid:104) p, p i +1 , . . . , p n (cid:105) is a suffix of P . Walking from p to p n , consider a bend p i , i = 2 , . . . , n −
1. The rotation rot( p i ) is 1 if P has a left turn at p i , − p i − p i and p i p i +1 are both vertical or horizontal).The rotation of P is rot( P ) = (cid:80) n − i =2 rot( p i ).In a generalized planar L-drawing of a digraph, vertices are still represented bypoints with distinct x- and y-coordinates and the edges by orthogonal polylineswith the following three properties. (1) Each directed edge e = ( u, v ) starts witha vertical segment incident to the tail u and ends with a horizontal segmentincident to the head v . (2) The polylines representing two edges overlap in atmost a common straight-line prefix or suffix, and they do not cross.In order to define the third property, let init( e ) be the prefix of e overlappingwith at least one other edge, let final( e ) be the suffix of e overlapping with at leastone other edge, and let mid( e ) be the remaining individual part of e . Observethat the first and the last vertex of init( e ), final( e ), and mid( e ) are end verticesof e , bends of e , or bends of some other edges. Now we define the third property:(3) For an edge e one of the following is true: (i) neither of the two end points ofmid( e ) is a bend of e and rot( e ) = ± e ),but not both, is a bend of e and rot(mid( e )) = 0. See Fig. 2. As a consequence ofthe flow model of Tamassia [18], we obtain the following lemma. Lemma 2 ( (cid:63) ). A plane digraph admits a planar L-drawing if and only if itadmits a generalized planar L-drawing with the same port assignment.
Rectangular Dual. An irreducible triangulation is an internally triangulatedgraph without separating triangles, where the outer face has degree four (Fig. 1). A rectangular tiling of a rectangle R is a partition of R into a set of non-overlappingrectangles such that no four rectangles meet at the same point. A rectangulardual of a planar graph is a rectangular tiling such that there is a one-to-onecorrespondence between the inner rectangles and the vertices and there is an lanar L-Drawings of Bimodal Graphs 5 s twve e e e (a) not a generalized planar L-drawing s twve e e e (b) underlying orthogonal drawing Fig. 2.
Cond. 3 of generalized planar L-drawings is fulfilled for all edges but for e and e . The rotation of each edge is ±
1. However, rot(mid( e )) = 2 and both end verticesof mid( e ) are bends of e . edge between two vertices if and only if the respective rectangles touch. Wedenote by R v the rectangle representing the vertex v . Note that an irreducibletriangulation always admits a rectangular dual, which can be computed in lineartime [4,5,14,16]. Perturbed Generalized Planar L-drawing.
Consider a rectangular dual fora directed irreducible triangulation G . We construct a drawing of G as follows.We place each vertex of G on the center of its rectangle. Each edge is routedas a perturbed orthogonal polyline , i.e., a polyline within the two rectanglescorresponding to its two end vertices, such that each edge segment is parallel toone of the two diagonals of the rectangle containing it. See Fig. 3(a). This drawingis called a perturbed generalized planar L-drawing if and only if (1) each directededge e = ( u, v ) starts with a segment on the diagonal \ u of R u from the upperleft to the lower right corner and ends with a segment on the diagonal / v of R v from the lower left to the upper right corner. Observe that a change of directionsat the intersection of R v and R u is not considered a bend if the two incidentsegments in R v and R u are both parallel to \ or to / . The definition of rotationand Conditions (2) and (3) are analogous to generalized planar L-drawings.In a perturbed generalized planar L-drawing, the North port of a vertex is atthe segment between the center and the upper left corner of the rectangle. Theother ports are defined analogously. Since we can always approximate a segmentwith an orthogonal polyline (Figs. 3(b) to 3(d)), we obtain the following. u v (a) ( u, v ) (b) perturbed (c) zig zag (d) rotate (e) split Fig. 3. (a) An edge in a perturbed generalized planar L-drawing. (b-e) From a perturbedgeneralized planar L-drawing to a generalized planar L-drawing. P. Angelini et al. v w (a) pincers v w (b) bad pincers (c) alternative f ve e (d) 2-modal pincer w v w R w w (e) virtual edges Fig. 4. (a) The blue edges incident to v and w , respectively, are pincers that are bad inthe drawing of the blue triangle in (b) and not bad in (c). (d) shows the only case (upto reversing directions) of a graph H in Sect. 3.2 with a pincer that is incident to a2-modal vertex (the orientation of the undirected outer edge is irrelevant). (e) Avoidingbad pincers with virtual edges. Lemma 3 ( (cid:63) ). If a directed irreducible triangulation has a perturbed generalizedplanar L-drawing, then it has a planar L-drawing with the same port assignment.
We study planar L-drawings of plane bimodal graphs. Our main contribution isto show that if the graph does not contain any 2-cycles, then it admits a planarL-drawing (Theorem 2). In Theorem 6 in Appendix E, we also show that if thereare 2-cycles, then there is a planar L-drawing if the underlying undirected graphafter removing parallel edges created by the 2-cycles is a planar 3-tree.
Our approach is inspired by the work of Biedl and Mondal [6] that constructsa + -contact representation for undirected graphs from a rectangular dual. Weextend their technique in order to respect the given orientations of the edges.The idea is to triangulate and decompose a given bimodal graph G . Proceedingfrom the outermost to the innermost 4-connected components, we construct planarL-drawings of each component that respects a given shape of the outer face. Wecall a pair of edges e , e a pincer if e and e are on a triangle T , both areincoming or both outgoing edges of its common end vertex v (i.e. v is a sink- or a source switch of T ), and there is another edge e of G incident to v in theinterior of T but with the opposite direction. See Fig. 4. If the outer face of a4-connected component contains a pincer, we have to make sure that e and e are not assigned to the same port of v in an ancestral component. In a partialperturbed generalized planar L-drawing of G , we call a pincer bad if e and e are assigned to the same port. Observe that in a bimodal graph, a pincer mustbe a source or a sink in an ancestral component. Moreover, in a 4-connectedcomponent at most one pair of incident edges of a vertex can be a pincer. Theorem 2.
Every plane bimodal graph without 2-cycles admits a planar L-drawing. Moreover, such a drawing can be constructed in linear time. lanar L-Drawings of Bimodal Graphs 7 w tssx t w t x ws sx wt w x s tstw x t sxw a)f) w x st xx x b) c) d) e)g) h) x) y)
Fig. 5.
Realization in the rectangular dual for any kind of drawings of the outer faceup to symmetries.
Proof.
Triangulate the graph as follows: Add a new directed triangle in the outerface. Augment the graph by adding edges to obtain a plane bimodal graph inwhich each face has degree at most four as shown in Lemma 5 in Appendix A.More precisely, now each non-triangular face is bounded by a 4-cycle consistingof alternating source and sink switches of the face. We finally insert a 4-modalvertex of degree 4 into each non-triangular face maintaining the 2-modality ofthe neighbors. Let G be the obtained triangulated graph. We construct a portassignment that admits a planar L-drawing of G as follows. Decompose G atseparating triangles into 4-connected components. Proceeding from the outermostto the innermost components, we compute a port assignment for each 4-connectedcomponent H , avoiding bad pincers and such that the ports of the outer face of H are determined by the corresponding inner face of the parent component of H .See Sect. 3.2. By Theorem 1, we compute a planar L-drawing realizing the givenport assignment. Finally, we remove the added vertices and edges from Γ . Sincethe augmentation of G and its decomposition into 4-connected components [15]can be performed in linear time, the total running time is linear.Theorem 2 yields the following implication, solving an open problem in [10]. Corollary 1.
Every upward-plane graph admits a planar L-drawing.
In this subsection, we present the main algorithmic tool for the proof of Theorem 2.Let G be a triangulated plane digraph without 2-cycles in which each vertex is2-modal or an inner vertex of degree four. Let H be a 4-connected component of P. Angelini et al. G (obtained by decomposing G at its separating triangles) and let Γ be a planarL-drawing of the outer face of H without bad pincers of G . We now present analgorithm that constructs a planar L-drawing of H in which the drawing of theouter face is Γ and no face contains bad pincers of G . Port Assignment Algorithm.
The aim of the algorithm is to compute aport assignment for the edges of H such that (i) there are no bad pincers and(ii) there exists a planar L-drawing realizing such an assignment. Note that thedrawing Γ already determines an assignment of the external edges to the portsof the external vertices. By Remark 1 any planar L-drawing with this given portassignment can be turned into one where the outer face has drawing Γ .First, observe that H does not contain vertices on the outer face that are4-modal in H : This is true since 4-modal vertices are inner vertices of degree fourin the triangulated graph G and since G has no 2-cycles. This implies that H ,likewise G , is a triangulated plane digraph without 2-cycles in which each vertexis 2-modal or an inner vertex of degree four. Avoiding Bad Pincers.
Next, we discuss the means that will allow us to avoidbad pincers. Let e and e be two edges with common end vertex v that areincident to an inner face f of H such that e , e is a pincer of G . Note that thetriangle bounding f is a separating triangle of G . We call f the designated face of v . In the following we can assume that v is 0-modal in H : In fact, if v is 2-modalin H then v was an inner 4-modal vertex of degree 4 in G , and e and e are twonon-consecutive edges incident to v . It follows that H is a K where the outerface is not a directed cycle. See Fig. 4(d). For any given drawing Γ of the outerface (see Fig. 5 and Lemma 1 for the possible drawings of a triangle), the innervertex can always be added such that no bad pincer is created. Finally, observethat v cannot be 4-modal in H otherwise it would be at least 6-modal in G .Hence, in the following, we only have to take care of pincers where the commonend vertex is 0-modal in H . Since each 0-modal vertex was 2-modal in G , it hasat most one designated face. In the following, we assume that all 0-modal verticesare assigned a designated incident inner face where no 0 ◦ angle is allowed. Constructing the Rectangular Dual.
As an intermediate step towards a perturbedgeneralized planar L-drawing, we have to construct a rectangular dual of H , moreprecisely of an irreducible triangulation obtained from H as follows. Let s , t , and w be the vertices on the outer face of H . Depending on the given drawing ofthe outer face, subdivide one of the edges of the outer face by a new vertex x according to the cases given in Fig. 5 – up to symmetries. Let f be the inner faceincident to x . Then f is a quadrangle. Triangulate f by adding an edge e incidentto x : Let y be the other end vertex of e . If y was 2-modal, we can orient e suchthat y is still 2-modal. If y was 0-modal and f was its designated face, then orient e such that y is now 2-modal. Otherwise, orient e such that y remains 0-modal.Observe that if y had degree 4 in the beginning it has now degree 5.The resulting graph H x is triangulated, has no separating triangles and theouter face is bounded by a quadrangle, hence it is an irreducible triangulation. lanar L-Drawings of Bimodal Graphs 9 v v v vv v v v outgoing edgesincoming edges N SW E (a) canonical assignment xy (b) around y Fig. 6.
Port assignment: (b) around neighbor y of outer subdivision vertex x . Thus, we can compute a rectangular dual R for H x . Up to a possible rotationof a multiple of 90 ◦ , we can replace the four rectangles on the outer face withthe configuration depicted in Fig. 5 that corresponds to the given drawing of theouter face. Let R v be the rectangle of a vertex v . Port Assignment.
We now assign edges to the ports of the incident vertices. Forthe edges on the outer face the port assignment is given by Γ . Fig. 5 shows theassignments for the outer face.Let v be a vertex of H x . We define the canonical assignment of an edgeincident to v to a port around v as follows (see Fig. 6(a)). An outgoing edge ( v, u )is assigned to the North port, if R u is to the left or the top of R v . Otherwise it isassigned to the South port. An incoming edge ( u, v ) is assigned to the West port,if R u is to the left or the bottom of R v . Otherwise it is assigned to the East port.In the following we will assign the edges to the ports of their end verticessuch that each edge is assigned in a canonical way to at least one of its endpoints and such that crossings between edges incident to the same vertex canbe avoided within the rectangle of the common end vertex. We exploit thisproperty alongside with the absence of 2-cycles to prove that such an assignmentdetermines a perturbed generalized planar L-drawing of the plane graph H x . We consider each 0-modal vertex v to be 2-modal by addinga virtual edge inside its designated face f . Namely, suppose v is a source andlet e = ( v, w ) and e = ( v, w ) be incident to f . We add a virtual edge ( w, v )between e and e from a new virtual vertex w . Of course, there is not literally arectangle R w representing w , but for the assignments of the edges to the ports of v , we assume that R w is the degenerate rectangle corresponding to the segmenton the intersection of R w and R w . See Fig. 4(e). Let now v be a 2-modal vertex. We discuss the cases where wehave to deviate from the canonical assignment. We call a side s of a rectangle inthe rectangular dual to be mono-directed , bi-directed , or , respectively, ifthere are 0, 1, or 2 changes of directions of the edges across s . See Fig. 7. Observethat by 2-modality there cannot be more than two changes of directions. vv (a) 3-directed v (b) canonical v (c) clockwise v (d) counterclockw. vv (e) dependencies v vvv (f) mono-directed Fig. 7.
Assignment of ports when the direction of edges incident to one side of arectangle changes a) twice b-e) once, or f) never.
Consider first the case that R v has a side that is 3-directed, say the right sideof R v . See Fig. 7(a). If from top to bottom there are first outgoing edges followedby incoming edges and followed again by outgoing edges, then we assign fromtop to bottom first the North port, then the East port, and then the South portto the edges incident to rectangles on the right of R v ( counterclockwise switch ).Otherwise, we assign from top to bottom first the East port, then the Southport, and then the West port ( clockwise switch ). All other edges are assigned in acanonical way to the ports of v ; observe that there is no other change of directions.Consider now the case that R v has one side that is bi-directed, say again theright side of R v . If the order from top to bottom is first incoming then outgoingthen assign the edges incident to the right side of R v in a canonical way ( canonicalswitch , Fig. 7(b)). Otherwise (unpleasant switch) , we have two options, we eitherassign the outgoing edges to the North port and the incoming edges to the Eastport ( counter-clockwise switch , Fig. 7(d)) or we assign the outgoing edges to theSouth port and the incoming edges to the West port ( clockwise switch , Fig. 7(c)).Observe that if there is an unpleasant switch on one side of R v then therecannot be a canonical switch on an adjacent side. Assume now that there are twoadjacent sides s and s of R v in this clockwise order around R v with unpleasantswitches. Then we consider both switches as counterclockwise or both as clockwise.See Fig. 7(e). Observe that due to 2-modality two opposite sides of R v are neitherboth involved in unpleasant switches nor both in canonical switches.Consider now the case that one side s of R v is mono-directed, say again theright side of R v . See Fig. 7(f). In most cases, we assign the edges incident to s ina canonical way. There would be – up to symmetry – the following exceptions:The top side of R v was involved in a clockwise switch and the edges at the rightside are incoming edges. In that case we have a clockwise switch at s , i.e., theedges at the right side are assigned to the West port of v . The bottom side of R v was involved in a counter-clockwise switch and the edges at the right sideare outgoing edges. In that case we have a counter-clockwise switch at s , i.e., theedges at the right side are assigned to the North port of v . lanar L-Drawings of Bimodal Graphs 11 In order to avoid switches at mono-directed sides, we do the following: Let s , s, s be three consecutive sides in this clockwise order around the rectangle R v such that there is an unpleasant switch on side s ; say s is the right side of R v , s is the top and s is the bottom, and the edges on the right side are fromtop to bottom first outgoing and then incoming. By 2-modality, there cannot bea switch of directions on both, s and s , i.e., s contains no incoming edges, or s contains no outgoing edges. In the first case, we opt for a counterclockwiseswitch for s , otherwise, we opt for a clockwise switch. uw qz R z R q x(cid:96) Fig. 8.
Extra Rule
There is one exception to the rule in the previous paragraph (which we referto as
Extra Rule ): Let u and w be two adjacent 0-modal vertices with thesame designated face f such that the two virtual end vertices are on one line (cid:96) .See Fig. 8. Let s u be the side of R u intersecting R w and let s w be the side of R w intersecting R u . Assume that u has an unpleasant switch at s u and, consequently, w has an unpleasant switch at s w . Let x be the third vertex on f and let s x bethe side of R x intersecting R u and R w . Observe that s x ⊂ (cid:96) . Do the switch at s u and s w in clockwise direction if and only if the switch at s x is in clockwisedirection, otherwise in counterclockwise direction. Property 1.
There is neither a clockwise nor a counter-clockwise switch at amono-directed side of a rectangle R v except if v is one of the 0-modal vertices towhich the Extra Rule was applied. If v is an inner 4-modal vertex of degree 4, then each side of R v is incident to exactly one rectangle, and we always use the canonical assignment.If v is a 4-modal vertex of degree 5, then v is the inner vertex y adjacent to thesubdivision vertex x . Note that we do not have to draw the edge between x and y . However, this case is still different from the previous one, since there are tworectangles incident to the same side s of R y . If the switch at s is canonical thenthere is no problem. Otherwise we do the assignment as in Fig. 6(b).Observe that we get one edge between y and a vertex on the outer face thatis not assigned in a canonical way at y . But this edge is assigned in a canonicalway at the vertex in the outer face. This completes the port assignments. Correctness.
In Appendix C, we give a detailed proof that the constructedport assignment admits a perturbed generalized planar L-drawing and, thus, aplanar L-drawing of H . The proof starts with the observation that each edge isassigned in a canonical way at one end vertex at least. Then we route the edgesas indicated in Fig. 9 where each part of a segment that is not on a diagonal of arectangle represents a perturbed orthogonal polyline of rotation 0. Finally, weshow that the encircled bends are not contained in any other edge. v wu v wu v wud d d is alsoa corner of R v d is in the interiorof a side of R v d is not ona side of R v v wu v wu v wud d dv wu v wud = d (cid:48) a ) e n o t c a n o n i c a l a t v b ) e c a n o n i c a l a t v b.2) dd b.1) the edge incidentto u is notcanonical at theother end vertex d = d (cid:48) d (cid:48) d (cid:48) Fig. 9.
How to route the edge e between v and w . Point d is the corner at the end ofthe diagonal of R w to which e is assigned.lanar L-Drawings of Bimodal Graphs 13 Lemma 4.
A planar L-drawing of H in which the drawing of the outer face is Γ and no face contains bad pincers of G can be constructed in linear time.Proof. The construction guarantees a planar L-drawing of H . The port assignmentis such that there are no bad pincers and for the outer face it is the same as in Γ .A rectangular dual can be constructed in linear time [4,16]. The port assignmentcan also be done in linear time. Finally, the coordinates can be computed inlinear time using topological ordering – see Theorem 1. Since there exist outerplanar digraphs that do not admit any bimodal embed-ding [3], we cannot exploit Theorem 2 to construct planar L-drawings for thegraphs in this class. However, we are able to prove the following.
Theorem 3.
Every outerplanar graph admits a planar L-drawing.Proof.
Put all vertices on a diagonal in the order in which they appear on theouter face – starting from an arbitrary vertex. The drawing of the edges isdetermined by the direction of the edges. This implies that some edges are drawnabove and some below the diagonal. By outerplanarity, there are no crossings.We remark that Theorem 3 provides an alternative proof to the one in [3]that any outerplanar digraph admits a 4-modal embedding. Observe that theplanar L-drawings constructed in the proof of Theorem 3 are not necessarilyouterplanar. In the following, we prove that this may be unavoidable.
Theorem 4.
Not every outerplanar graph admits an outerplanar L-drawing. f Proof.
Consider the graph depicted above. It has a unique outerplanar embedding.Let f be the inner face of degree 6. Each vertex incident to f is 4-modal andis a source switch or a sink switch of f . Thus, the angle at each vertex is 0 ◦ .The angle at each bend is at most 3 / π . Thus, the angular sum around f wouldimply (2 · deg f − · π ≤ / · deg f · π, which is not possible for deg f = 6.There are even 4-modal biconnected internally triangulated outerplane di-graphs that do not admit an outerplanar L-drawing. See Appendix D. – Are there bimodal graphs with 2-cycles that do not admit a planar L-drawing(with or without the given embedding)? – What is the complexity of testing whether a 4-modal graph admits a planarL-drawing with a fixed embedding? – In the directed Kandinsky model where edges leave a vertex to the top orthe bottom and enter a vertex from the left or the right, for which k is therealways a drawing with at most 1 + 2 k bends per edge for any 4-modal graph? k = 0 does not suffice. What about k = 1? – Can it be tested efficiently whether an outerplanar graph with a given 4-modalouterplanar embedding admits an outerplanar L-drawing?
References
1. Angelini, P., Da Lozzo, G., Di Bartolomeo, M., Di Donato, V., Patrig-nani, M., Roselli, V., Tollis, I.G.: Algorithms and bounds for L-drawingsof directed graphs. Int. J. Found. Comput. Sci. (4), 461–480 (2018).https://doi.org/10.1142/S01290541184100102. Barth, W., Mutzel, P., Yildiz, C.: A new approximation algorithm for bend mini-mization in the Kandinsky model. In: Kaufmann, M., Wagner, D. (eds.) GD 2006.LNCS, vol. 4372, pp. 343–354. Springer (2007). https://doi.org/10.1007/978-3-540-70904-6 333. Besa Vial, J.J., Da Lozzo, G., Goodrich, M.T.: Computing k-modal embeddingsof planar digraphs. In: Bender, M.A., Svensson, O., Herman, G. (eds.) ESA 2019.LIPIcs, vol. 144, pp. 19:1–19:16. Schloss Dagstuhl - Leibniz-Zentrum f¨ur Informatik(2019). https://doi.org/10.4230/LIPIcs.ESA.2019.194. Bhasker, J., Sahni, S.: A linear algorithm to find a rectangulardual of a planar triangulated graph. Algorithmica , 247–278 (1988).https://doi.org/10.1007/BF017621175. Biedl, T.C., Derka, M.: The (3,1)-ordering for 4-connected planar triangulations.JGAA (2), 347–362 (2016). https://doi.org/10.7155/jgaa.003966. Biedl, T.C., Mondal, D.: A note on plus-contacts, rectangular duals, and box-orthogonal drawings. Tech. Rep. arXiv:1708.09560v1, Cornell University Library(2017)7. Binucci, C., Didimo, W., Patrignani, M.: Upward and quasi-upward planaritytesting of embedded mixed graphs. Theor. Comput. Sci. , 75–89 (2014).https://doi.org/10.1016/j.tcs.2014.01.0158. Bl¨asius, T., Br¨uckner, G., Rutter, I.: Complexity of higher-degree orthogonal graphembedding in the Kandinsky model. In: Schulz, A.S., Wagner, D. (eds.) ESA 2014.LNCS, vol. 8737, pp. 161–172. Springer (2014). https://doi.org/10.1007/978-3-662-44777-2 149. Br¨uckner, G.: Higher-Degree Orthogonal Graph Drawing with Flexibility Con-straints. Bachelor thesis, Department of Informatics, Karlsruhe Institute of Tech-nology (2013)10. Chaplick, S., Chimani, M., Cornelsen, S., Da Lozzo, G., N¨ollenburg, M., Patrig-nani, M., Tollis, I.G., Wolff, A.: Planar L-drawings of directed graphs. In: Frati,F., Ma, K.L. (eds.) GD 2017. LNCS, vol. 10692, pp. 465–478. Springer (2018).https://doi.org/10.1007/978-3-319-73915-1 36lanar L-Drawings of Bimodal Graphs 1511. de Fraysseix, H., Ossona de Mendez, P., Rosenstiehl, P.: On triangle con-tact graphs. Combinatorics, Probability, and Computing (2), 233–246 (1994).https://doi.org/10.1016/j.comgeo.2017.11.00112. Eiglsperger, M., Kaufmann, M.: Fast compaction for orthogonal drawings withvertices of prescribed size. In: J¨unger, M., Mutzel, P. (eds.) GD 2001. LNCS,vol. 2265, pp. 124–138. Springer (2002). https://doi.org/10.1007/3-540-45848-4 1113. F¨oßmeier, U., Kaufmann, M.: Drawing high degree graphs with low bend numbers.In: Brandenburg, F.J. (ed.) GD 1995. LNCS, vol. 1027, pp. 254–266. Springer(1996). https://doi.org/10.1007/BFb002180914. He, X.: On finding the rectangular duals of planar triangular graphs. SIAM J. onComputing (6), 1218–1226 (1993). https://doi.org/10.1137/022207215. Kant, G.: A more compact visibility representation. Int. J. Comput. GeometryAppl. (3), 197–210 (1997). https://doi.org/10.1142/S021819599700013216. Kant, G., He, X.: Two algorithms for finding rectangular duals of planar graphs.In: van Leeuwen, J. (ed.) WG 1993. LNCS, vol. 790, pp. 396–410. Springer (1994).https://doi.org/10.1007/3-540-57899-4 6917. Ko´zmi´nski, K., Kinnen, E.: Rectangular duals of planar graphs. Networks (2),145–157 (1985). https://doi.org/10.1002/net.323015020218. Tamassia, R.: On embedding a graph in the grid with the minimum number of bends.SIAM J. on Computing , 421–444 (1987). https://doi.org/10.1137/021603019. Tutte, W.T.: How to draw a graph. Proceedings of the London MathematicalSociety s3-13 (1), 743–767 (1963). https://doi.org/10.1112/plms/s3-13.1.743 ppendix A Proof of Some Lemmas
Lemma 5.
Let G be a plane digraph. We can augment G by adding edges toobtain a biconnected plane digraph with face-degree at most four such that each k -modal vertex remains k -modal if k > and each 0-modal vertex gets at most 2-modal. The construction neither introduces parallel edges nor 2-cycles. Moreover,each 4-cycle bounding a face consists of alternating source and sink switches.Proof. Let G = ( V, E ) be a plane directed graph.1. If G is not connected, let G be a connected component of G such that theouter face f o of G (considered as an open region) contains vertices of G .Pick a vertex v incident to f o with the property that v is an isolated vertexor v is the tail of an edge incident to f o . Let f be the face of G that iscontained in f o and that is incident to v . Pick a vertex w incident to f thatis not in G and such that w is isolated or the head of an edge incident to f .Add the edge ( v, w ).2. If G contains a cut vertex v , let w and w be two consecutive neighbors of v in different biconnected components. Let f be the face between the edgesconnecting v to w and w , respectively. If we can add the edge ( w , w ) or( w , w ) such that the modalities of w and w do not increase, if they hadbeen positive before, we do so. Otherwise we may assume that the edgesincident to f and w and w are all outgoing edges of w and w , respectively,and that the degree of w is at least two. Let w (cid:54) = v be a neighbor of w on f . Add ( w , w ) to G .3. If G contains a face f of degree greater than four, let v , . . . , v k be the facialcycle of f such that v is the tail of an edge incident to f . Let i = 3 , v i is 0-modal or incident to an incoming edge on f . Ifneither ( v , v i ) nor ( v i , v ) is present in G then add ( v , v i ) to G . Otherwisewe can add an edge between v and v or v if i = 3 or between v and v or v if i = 4. Lemma 1 ( (cid:63) ). Fig. 5 shows all planar L-drawings of a triangle up to symmetry.Proof.
We first consider a triangle T that is not a directed cycle. Let t be thesink, s the source, and w the third vertex of T . We may assume that (cid:104) s, w, t (cid:105) isthe counter-clockwise cyclic order of vertices around T and that the edge ( s, w )uses the North port of s – the other cases being symmetric. We distinguish twocases.1. w is to the right of s . In this case t cannot be below w : otherwise it is notpossible to close T in counter-clockwise direction with only one bend peredge. For the x-coordinate of t there are three possibilities: t is to the rightof w (a), between s and w (c), and to the left of s (b). lanar L-Drawings of Bimodal Graphs 17 w is to the left of s . Similar as in the first case, t cannot be above w in thiscase. If t is below s , its x-coordinate can be to the left of w (g), between w and s (e), or to the right of s (d). If t is vertically between w and s , itsx-coordinate is between w and s (h) or to the left of w (f).Consider now the case that triangle T is a directed cycle. Then no two edges of T can use the same port. Thus, T is drawn as a 6-gone. I.e., the angular sum is4 π which implies that there is one 3 π/ π/ π/ Lemma 2 ( (cid:63) ). A plane digraph admits a planar L-drawing if and only if itadmits a generalized planar L-drawing with the same port assignment.Proof.
A planar L-drawing is a planar generalized L-drawing. So assume that aplanar generalized L-drawing Γ of a digraph G is given. We consider Γ as anorthogonal drawing of a new graph G (cid:48) – see Fig. 2(b). To this end, we replaceevery bend in Γ that is contained in the polyline representing another edge by adummy vertex. Consider now an edge of G that has more than one bend. Thisedge is decomposed in G (cid:48) into an initial straight-line path P init , an edge e mid , anda final straight-line path P final . The edge e mid is represented by an orthogonalpolyline with the same bends as mid( e ). Using the flow model of Tamassia [18],we can remove all but rot(mid( e )) bends from e mid . Now the cases are two: Ifnone of the end vertices of e mid is a bend of e then rot( e ) = ± e endsup with exactly one bend. If the first or the last bend of e is an end vertex of e mid then rot( e mid ) = 0 and e mid ends up with no bends. Thus, e has exactly onebend at exactly one end vertex of e mid . Lemma 3 ( (cid:63) ). If a directed irreducible triangulation has a perturbed generalizedplanar L-drawing, then it has a planar L-drawing with the same port assignment.Proof.
Let a perturbed generalized planar L-drawing Γ of an irreducible triangu-lation G be given. By Lemma 2, it suffices to show that G has a generalized planarL-drawing. First, we construct a graph G (cid:48) of maximum degree 4 by subdividingthe edges at all bends and intersections with the boundary of a rectangle. Observethat now every edge lies in the interior of one rectangle. We approximate eachedge e of G (cid:48) arbitrarily close with an orthogonal polyline rotated by 45 ◦ in sucha way that the following properties hold: No two polylines of two edges crossand the polyline of an edge is not self-intersecting. The rotation of any polylineis zero. The segments incident to the end vertices have both slope − ◦ if e is parallel to \ v and slope 45 ◦ if e is parallel to / v , where R v is the rectanglecontaining e . See Fig. 3. Finally, rotate the drawing by 45 ◦ in clockwise direction.We obtain a drawing that fulfills all properties of a generalized planar L-drawingof G , except that edges might overlap in a prefix or a suffix with rotation 0that might, however, not be a straight-line segment. We fix this as follows. Let v be a vertex and let (cid:104) e , . . . , e k (cid:105) be the sequence of edges assigned to a portof v in clockwise order. Assume without loss of generality that e , . . . , e k areoutgoing edges of v . Let 1 ≤ m ≤ k be such that init( e m ) is longest. We redraw each edge e i with i (cid:54) = m so that the common part of e i and e m lies on the firstsegment and the lengths of init( e ) , . . . , init( e m − ) are still increasing and thoseof init( e m +1 ) , . . . , init( e k ) are still decreasing. The rest of e i is drawn arbitrarilyclose to e m in such a way that the rotation of mid( e i ) is maintained. See Fig. 3(e).Observe that the bends of the original drawing still correspond to bends of theconstructed drawing and have the same turns (left or right). Conditions 2+3 arestill fulfilled. B Proof of Theorem 1
Theorem 1 ( (cid:63) ). Let G = ( V, E ) be a plane triangulated graph with a portassignment that admits a planar L-drawing and let X and Y be the digraphs withvertex set V and the following edges. For each edge e = ( v, w ) ∈ E – there is ( v, w ) in X if in ( e ) = West and ( w, v ) in X if in ( e ) = East. – there is ( v, w ) in Y if out ( e ) = North and ( w, v ) in Y if out ( e ) = South.Let x and y be a topological ordering of X and Y , respectively. Drawing each vertex v at ( x ( v ) , y ( v )) yields a planar L-drawing realizing the given port assignment. We use the following lemma in order to prove Theorem 1.
Lemma 6.
A drawing of a plane biconnected graph is planar if the ordering ofthe edges around each vertex is respected and the boundary of each face is drawncrossing-free.Proof.
The lemma can be proven by the same proof idea as in the proof ofTutte – see Item 9.1 on page 758 of [19]. Let G be a plane biconnected graph andlet Γ be a drawing of G in which each face is drawn crossing-free. Assume twoedges e and e cross. Consider two faces f and f whose boundary contains e and e , respectively. (We consider the boundary of a face not to be part of theface. In particular are faces open regions). Then there must be a point q ∈ f ∩ f .But this is impossible: For each point p in the plane let δ ( p ) be the number offaces containing p . Since the inner faces are bounded, there must be a point q o that is only contained in the outer face and thus, δ ( q o ) = 1. Consider a curve (cid:96) from q o to q that does not contain vertices. Traversing (cid:96) , the count δ does notchange if no edge is crossed. If we cross an edge then we leave a face and enteranother face. Thus, the count will not change either, contradicting δ ( q ) ≥ e and e in a planar L-drawing that are assigned to thesame port of a vertex v and let f be the face between e and e . Then the bend at e or e must be concave in f . This is a subcondition of the so called bend-or-endproperty of Kandinsky drawings and we refer to it as the concave-bend condition . Proof (of Theorem 1).
It suffices to show that all faces are drawn in a planar way.Assume there are two edges e and e incident to the same face that cross. Sinceall faces are triangles e and e are incident. Assume without loss of generalitythat out( e ) = North, in( e ) = West, and that the head v of e is an end vertexof e . We distinguish three ways e could cross e (see Fig. 10): lanar L-Drawings of Bimodal Graphs 19 u vwe e (a) u vwe e e (b) u vw e e e (c) Fig. 10.
A triangular face cannot self-intersect if all edges have the correct shape. (a) v is the head of e , in( e ) = West, out( e ) = South, and e is before e inthe clockwise order around v , or(b) v is the head of e , in( e ) = West, out( e ) = North, and e is after e in theclockwise order around v , or(c) v is the tail of e , out( e ) = South, in( e ) = East, the head w of e is to theleft, and above of the tail u of e .Situation (a) violates the concave-bend condition. A crossing in Situation (b)implies that the edge e closing the triangular face is either ( u, w ) with in( e ) =West or ( w, u ) with in( e ) = East. However, this port assignment would not beone that admits a planar L-drawing. Finally, a crossing in Situation (c) impliesthat the edge e closing the triangular face is either ( u, w ) with in( e ) = Eastand out( e ) = North or ( w, u ) with in( e ) = West and out( e ) = South. Again,this port assignment would not be one that admits a planar L-drawing.Observe that in general it does not suffice to only consider the right drawingof each edge in order to obtain a planar L-drawing even if the port assignmentadmits such a drawing, not even for a directed 4-cycle (Fig. 11(a)) or a 4-cycleconsisting only of sink and source switches (Fig. 11(b)). (a) directed 4-cycle (b) 4-cycle Fig. 11.
Given a port assignment that admits a planar L-drawing, not every L-drawingthat realizes it is also planar.
C Correctness of the Port Assignment in Sect. 3.2
Lemma 7.
Any edge e = ( u, w ) is assigned in a canonical way at u or w . Proof.
Suppose, for contradiction, that there is an edge e = ( u, w ) that is neitherassigned in a canonical way at u nor at w . Assume, without loss of generality,that R u is on top of R w . This implies that e is assigned to the North port of u and to the West port of w . Moreover, the bottom side s u of R u is involved in aclockwise switch and the top side s w of R w in a counter-clockwise switch. SeeFig. 12. uw qe z? Fig. 12.
Edges are canonical at one end vertex at least.
First consider the case that neither s u nor s w is mono-directed. Then theonly reason for these unpleasant switches is that 1. u has an incoming edge ( q, u )and R q is incident to the bottom of R u and is to the right of R w , and 2. w hasan outgoing edge ( w, z ) such that R z is incident to the top of R w and to theright of R u . This is not simultaneously possible if at least one among R z or R q is a real rectangle. In the case that R z and R q were both virtual, the designatedface of u and w would be the same, R z and R q would be collinear and, thus, the Extra Rule would apply. However, this implies that the switches at u and w are both clockwise or both counterclockwise. See Fig. 8.Consider now the case that one of the two sides s u and s w , say s w , is mono-directed. By Property 1, a non-canonical switch at a mono-directed side can onlyhappen in the case of the Extra Rule . See Fig. 13. x (cid:48) w (cid:48) u w x y (cid:96) Fig. 13.
Illustration of the proof of Lemma 7 in the case of the
Extra Rule . We distinguish two cases based on whether s u is bidirected or mono-directed.Suppose first that s u is bidirected. As above there must still be a neighbor q of u such that R q is to the right of R w and below R u . But this is not possible.Assume now that also s u is mono-directed, i.e. the Extra Rule was alsoapplied to u and a vertex w (cid:48) and the designated face f (cid:48) of u and w (cid:48) is as indicated lanar L-Drawings of Bimodal Graphs 21 by the red stub incident to u in Fig. 13. Let x (cid:48) be the third vertex incident to f (cid:48) .Observe that R u and R w (cid:48) must have a common corner that lies on a side of R x (cid:48) .However, this would only be possible if the bottom right corner of R u and thebottom left corner of R w (cid:48) lie on the top side of R x (cid:48) which implies that x (cid:48) = w .But w is a 0-modal vertex and x (cid:48) cannot be 0-modal. Lemma 8.
The constructed port assignment admits a planar L-drawing of H .Proof. In the following we show how to route the edges in order to obtain aperturbed generalized planar L-drawing with the given port assignment. ByLemma 3 this is sufficient to obtain a planar L-drawing with the same portassignment.Recall that in a perturbed generalized planar L-drawing each edge is routed asa polyline lying in the two rectangles corresponding to its end vertices, composedof segments parallel to the respective diagonals and satisfying the followingproperties:(1) each directed edge e = ( u, v ) starts with a segment on the diagonal \ u of R u from the upper left to the lower right corner and ends with a segment on thediagonal / v of R v from the lower left to the upper right corner.(2) The polylines representing two edges overlap in at most a common straight-line prefix or a suffix and they do not cross.(3) For an edge e one of the following is true: (i) none of the two end vertices ofmid( e ) is a bend of e and rot( e ) = ± e ), but not both, is a bend of e and rot(mid( e )) = 0.Property 1 is already fulfilled by the constructed port assignment. Next, weshow that the port assignment allows for a routing of the edges that also fulfillsProperties 2 and 3.Let e be an edge between v and w that is drawn in a canonical way at w . Let e be assigned to the port p of R w . Let d be the corner of R w at the end of thediagonal corresponding to the port p . We define how to route e distinguishingthree main cases on the relationship of R v and R w with respect to d – see thecolumns of Fig. 9. Each case has two subcases depending on whether e is assignedin a canonical way at v or not – see the rows of Fig. 9. We subdivide the casewhere e is assigned in a canonical way at v into two additional subcases b.1 andb.2. Let u be the common neighbor of v and w that is incident to the side of w containing the corner d . Let d (cid:48) be the common point of R u , R v , and R w . Thesubcases depend on whether an edge incident to u would use d (cid:48) or not. Observethat in the last column of Row b.2 the corner d does not have to be on a side of R u since R u might be smaller.For each of the cases, we draw e as sketched in the corresponding box inFig. 9: The first and the last segment of an edge represents a straight line of anappropriate length while each other segment represents a perturbed orthogonalpolyline with rotation zero. If e is assigned to the same port as another edge e (cid:48) ,we make sure that the routing respects the embedding by appropriately selectingthe length of the first or last segment of e and e (cid:48) . E.g., assume that e (cid:48) follows e in counterclockwise order around a vertex v such that both are assigned to theNorth port of v and assume that the first bend of both, e and e (cid:48) , is a right turn.Then the bend of e is closer to v than the bend of e (cid:48) .Observe that the edges are only routed within the rectangles of their endvertices. Thus, if there were crossings then they would involve edges incidentto the same vertex v and would lie within the rectangle R v . However, the portassignment at v makes sure that the middle part of the edges can be routed suchthat no two edges cross. This guarantees that Property 2 is fulfilled.It remains to show that also Property 3 is fulfilled. This is trivial for the casesin Row b.1, since in this case the edge is composed of two parts, each havingrotation zero, that meet at a bend b . Thus, mid( e ) either starts at b and hasrotation 0, or it contains b as an inner point and has rotation ±
1. Analogously,for the other cases, it suffices to prove that mid( e ) contains two out of the threeindicated bends as inner points – one with a left turn and one with a right turn.In fact, in this case mid( e ) has rotation 0 or ± e ) or not.To this end, we prove that each of the bends that are encircled red are innerpoints of mid( e ). This is obvious, if the bend is not on a diagonal, since the endpoints of mid( e ) lie on the diagonals of the rectangles of the end vertices of e . Ifthe bend is on the diagonal, we prove that there are no edges leaving the diagonalafter the bend. If there was such an edge then it would be one that immediatelyfollows or precedes e in the cyclic order around the respective end vertex. b.2) We argue about the bend b on the diagonal of R v in Column 2, thearguments for the bend on the diagonal of R w in Column 3 is analogous.Observe that the edge e is immediately followed by the edge ( u, v ) in thecyclic order around v . Since ( u, v ) is assigned to a different port of v than e ,the statement follows. ev wu (a) Case 1a ev wu (b) Case 3a Fig. 14.
The red bend is an inner point of mid( e ) in the case of the Extra Rule . These two cases cannot happen except if we had applied the
ExtraRule . See Fig. 14. I.e., two among u, v, w are 0-modal vertices, their desig-nated face is the face bounded by u, v, w , the respective virtual rectanglesare collinear, and there is an unpleasant switch at the third vertex. In bothcases the non-virtual edge that immediately follows (3a) or precedes (1a) e lanar L-Drawings of Bimodal Graphs 23 in the cyclic order around w is the edge ( u, w ). However, the port assignmentin the Extra Rule guarantees that ( u, w ) is assigned to a different port of w than e .This concludes the proof of the lemma. D Outerplanar Digraphs
Theorem 5.
Not every biconnected internally triangulated outerplanar digraphwith a 4-modal outerplanar embedding has an outerplanar L-drawing.
We start the proof of the theorem with the following observation. Gv y x v v x y x y Fig. 15.
How to make the vertices of a biconnected internally triangulated outerplanardigraph 4-modal.
Lemma 9.
Every biconnected internally triangulated outerplanar digraph G witha 4-modal outerplanar embedding can be extended to an internally triangulatedouterplanar digraph G (cid:48) with a 4-modal outerplanar embedding in which all verticesof G are 4-modal.Proof. See Fig. 15 for an illustration. Let v , . . . , v n be the vertices of G in theorder in which they appear on the outer face and let v n +1 = v . For i = 1 , . . . , n add a new vertex x i with neighbor v i and a vertex y i with neighbors x i , v i , and v i +1 . Now each new vertex has degree at most three and thus, will be 2-modal,no matter how we orient the edges. Each vertex v i , i = 1 , . . . , n of G is incidentto three new edges. These can be oriented such that each v i , i = 1 , . . . , n gets4-modal. Proof (of Theorem 5).
We consider the digraph G = ( V, E ) in Fig. 16(a) aug-mented as described in Lemma 9. The resulting digraph G (cid:48) is a biconnectedinternally triangulated outerplanar digraph with a 4-modal outerplanar embed-ding and has 57 vertices. Each vertex of G is 4-modal in G (cid:48) . We show that G (cid:48) has v (a) graph vf f e e (b) non-planar L-drawing Fig. 16.
A biconnected internally triangulated outerplanar digraph with a 4-modalouterplanar embedding that has no outerplanar L-drawing – in an extension that makesthe present vertices 4-modal. b) Different from the drawing conventions of L-drawings,the edges at the West port of v are drawn slightly apart in order to make the embeddingvisible.lanar L-Drawings of Bimodal Graphs 25 no planar L-drawing with the given embedding. Fig. 16(b) shows an L-drawingof G that is, however, not planar.Consider now the following flow network L G associated with a plane digraph G = ( V, E ). Let F be the set of faces of G . L G has node set W := V ∪ E ∪ F ,arcs from vertices to incident faces, and from faces to incident edges, and supplies b ( v ) = − mod( v )2 , v ∈ V , b ( f ) = ∓ f , f ∈ F , and b ( e ) = − e ∈ E .Based on the relationship to Kandinsky drawings, Chaplick et al. [10] showedthat any planar L-drawing of a biconnected digraph G yields a flow φ in L G as follows: Let α ( v, f ) be the angle in the face f at a vertex v . Then φ ( v, f ) = α ( v, f ) /π if the two edges incident to both, v and f , are two outgoing or twoincoming edges of v and φ ( v, f ) = α ( v, f ) /π − /
2, otherwise. φ ( f, e ) = 1 if andonly if there is a convex bend in face f on edge e and 0 otherwise.However, not every flow on L G corresponds to a planar L-drawing. In effect,the angles and bends in the non-planar L-drawing in Fig. 16(b) also yield a flow φ (cid:48) in L G .Assume now that there is a planar L-drawing Γ (cid:48) of G (cid:48) and consider thedrawing Γ of G induced by Γ (cid:48) . Let φ be the flow that corresponds Γ . Thedifference between φ and φ (cid:48) is a union C of directed cycles in the residual network L G,φ (cid:48) of L G with respect to the flow φ (cid:48) . Since in G (cid:48) all vertices of G are 4-modal,no arc from a vertex of G to an inner face of G can carry flow. Hence, C does notcontain vertices of G . The direction of the arcs in L G,φ (cid:48) is from a face f to anincident edge e with a concave bend in e and from e to the other incident face f (cid:48) .Since φ corresponds to a planar L-drawing it follows that at least one of theedges e or e must have a concave bend in the outer face f o . Thus, C containsthe arcs ( f , e ) , ( e , f o ) or the arcs ( f , e ) , ( e , f o ). This implies that C mustalso contain an arc from the outer face. But there are only three such arcs (solidblue arcs). Whenever such an arc is contained in C then also the respectivedashed blue arc has to be contained in C . Since in a union of directed cyclesthe indegree and the outdegree must be the same, C can neither contain the arc( e , f o ) nor ( e , f o ). E Planar 3-Trees A planar 3-tree is defined recursively: The complete graph K on four vertices isa planar 3-tree. Adding a new vertex into an inner face f of a planar 3-tree andconnecting it to the 3 vertices on the boundary of f yields again a planar 3-tree. Theorem 6.
A bimodal graph has a planar L-drawing if the underlying undi-rected graph, after the removal of parallel edges due to 2-cycles, is a planar 3-tree.Proof.
Observe that there are no separating 2-cycles in the digraph since planar3-trees are 3-connected. Moreover, due to bimodality no vertex is incident tomore than two 2-cycles.We start with a graph containing three vertices. We draw that triangle withits 2-cycles and then keep inserting the vertices maintaining the invariant that there are no bad pincers. Observe that each inserted vertex has three adjacentvertices in the current digraph and up to five incident edges. We call a vertex anin/out-vertex of a face f if it is neither a source switch nor a sink switch of f . So consider a bimodal graph with three vertices containing a triangle.
If the outerface is a 2-cycle, remove one of the parallel edges, draw the triangle such thatthe respective vertices of the 2-cycle are extreme points of the diagonal of thebounding box of the drawing (Figs. 17(a) to 17(d)) and add the missing edgeof the outer 2-cycle. If the outer 2-cycle had been between the source and thesink of the triangle then – due to bimodality – the triangle is not involved in anyfurther 2-cycles. Otherwise there can be at most one more 2-cycle. Bad pincersare not possible in these cases. s (a) sink–source s (b) sink–in/out s (c) in/out–source (d) in/out–in/out(e) directed (f) not directed Fig. 17.
Different ways of drawing a triangle T with possible 2-cycles. Top row: theouter face is bounded by a 2-cycle where the edge not in T connects the indicatedvertices of T . Bottom row: the outer face is bounded by T and T is directed or not. Consider now the case that the outer face is bounded by the triangle. Wesay that a triangle contains a 2-cycle if one edge of the 2-cycle is an edge ofthe triangle and the other edge of the 2-cycle is in the interior of the triangle.Observe that in a bimodal embedding a triangle can contain at most two 2-cycles.Moreover, if a triangle contains two 2-cycles then the common vertex of the two2-cycles must be the source or the sink of the triangle. Thus, if the triangle is adirected cycle, it contains at most one 2-cycle.Now, if the outer face is a directed cycle of length three, draw it as indicatedin Fig. 17(e). Otherwise, the three vertices incident to the outer face are a source,a sink, and an in/out vertex. Start with the drawing of the triangle where notwo edges are attached to the same port of a vertex. Add the 2-cycles. Thus, theouter face with its 2-cycles is a subgraph of one of the two cases in Fig. 17(f).Observe that in any case no two edges e and e that are assigned to thesame port of a vertex v can be a pincer. There is already an edge in oppositedirection incident to v . If there was an edge that had to be inserted later on lanar L-Drawings of Bimodal Graphs 27 between e and e and that also had the opposite direction as e and e then v would not be 2-modal. Assume now that we insert the next vertex v with three neighbors. If the neighborsof v induce a directed triangle T , then there cannot be a pincer that consists ofan edge in T and an edge incident to v : there is already an oppositely directededge in T incident to the common end vertex. For the same reason, if v is neithera source nor a sink, then there cannot be a pincer incident to v . s ss Fig. 18.
Different ways of drawing a triangle where the angle at both, the source andthe sink, is 0 ◦ and how to add an additional internal vertex. Assume first that T has a source s , a sink t and an in/out-vertex w . Thereare three cases: (1) The angles in T at s and t , respectively, are both 0 ◦ (Fig. 18),(2) the angle at either the source or the sink – say the source – is 0 ◦ (Fig. 19,Columns d+e), or (3) T does not contain a 0 ◦ angle (Fig. 19, Column c). a b c diiiiiiiv xy z xyz w t s s t w sw te Fig. 19.
Different ways of inserting a vertex into a triangle.
In the first case – since there are no bad pincers – the direction of the edgesbetween v on one hand and the source and the sink on the other hand are fixed and it follows that – due to 2-modality – v cannot be incident to a 2-cycle. Thepair of edges with a 0 ◦ angle at the in/out-vertex w of T cannot be a pincer,since there is already an oppositely directed edge incident to w . This concludesCase 1.In Cases 2 and 3, we have the property that if there is a 2-cycle between v and w then – due to 2-modality of w – the order around w is fixed and mustbe such that on both sides an edge of T and an edge of the 2-cycle forms a 0 ◦ angle. Consider now Case 2 and assume w.l.o.g. that there are two edges of T that form a 0 ◦ angle at s . Up to symmetry there are two such drawings of T .See Fig. 19, Columns d+e. If t is incident to a 2-cycle with v then the order ofthe edges in the 2-cycle determines whether we are in case (i) or (ii). No twoedges that are assigned to the same port are a pincer, since there is always anoppositely directed incident edge. If t is not incident to a 2-cycle with v , we canchoose between case (i) and (ii) and we do it such that we do not create a badpincer incident to t .Consider now Case 3. There can be at most two 2-cycles incident to v , and ifso, fixing the ordering of the edges of one 2-cycle also fixes the ordering of theother (due to 2-modality of v ). Depending on this ordering, we can always chooseone out of the Cases ii or iv. No bad pincers can occur. If v is incident to at mostone 2-cycle, the choice depends on pincers at v , s and t and can always withoutcreating bad pincers: There are all four variants of pairs of 0 ◦ angles at s and t ,so we can always choose one that does not contain a bad pincer. If v is a sourceor a sink then v is not incident to any 2-cycles. It follows that T cannot containedges incident to both s and t that are involved in pincers with edges incidentto v . E.g., assume that v is a source. Then only ( v, t ) can be involved in a badpincer: ( v, s ) and an edge on T incident to s do not have the same direction at s ,and w is already incident to an edge in the opposite direction as ( v, w ). Amongthe four possibilities we can always choose one without bad pincers.Assume now that T is a directed triangle (Fig. 19, Columns a+b). Observethat due to 2-modality v cannot be incident to two 2-cycles. It remains to checkfor bad pincers at v in the case were vv