On the Total Number of Bends for Planar Octilinear Drawings

An octilinear drawing of a planar graph is one in which each edge is drawn as a sequence of horizontal, vertical and diagonal at 45 degrees line-segments. For such drawings to be readable, special care is needed in order to keep the number of bends small. As the problem of finding planar octilinear drawings of minimum number of bends is NP-hard, in this paper we focus on upper and lower bounds. From a recent result of Keszegh et al. on the slope number of planar graphs, we can derive an upper bound of 4n-10 bends for 8-planar graphs with n vertices. We considerably improve this general bound and corresponding previous ones for triconnected 4-, 5- and 6-planar graphs. We also derive non-trivial lower bounds for these three classes of graphs by a technique inspired by the network flow formulation of Tamassia.


Motivation and Background
Octilinear drawings of graphs have a long history of research, which dates back to the early thirteenth century, when an English technical draftsman, Henry Charles Beck (also known as Harry Beck), designed the first schematic map of London Underground. His map, the so-called Tube map, looked more like an electrical circuit diagram (consisting of horizontal, vertical and diagonal line segments) rather than a true map, as the underlying geographic accuracy was neglected. Laying out networks in such a way is called octilinear graph drawing and plays an important role in map-schematization and the design of metro-maps. In particular, an octilinear drawing Γ(G) of a graph G = (V, E) is one in which each vertex occupies a point on an integer grid and each edge is drawn as a sequence of horizontal, vertical and diagonal at 45 • line segments. When G is planar, usually it is required Γ(G) to be planar as well.
In planar octilinear graph drawing, an important goal is to keep the number of bends small, so that the produced drawings can be understood easily. However, the problem of determining whether a given embedded planar graph of maximum degree eight admits a bend-less planar octilinear drawing is NP-complete [16]. This motivated us to neglect optimality and study upper and lower bounds on the total number of bends of such drawings. Surprisingly enough, very few results were known, even if the octilinear model has been extensively studied in the areas of metro-map visualization and map schematization.
One can derive the first (non-trivial) upper bound on the required number of bends from a result on the planar slope number of graphs by Keszegh et al. [14], who proved that every k-planar graph (that is, planar of maximum degree k) has a planar drawing with at most k 2 different slopes in which each edge has at most two bends. For 3 ≤ k ≤ 8, the drawings are octilinear, which yields an upper bound of 6n − 12, where n is the number of vertices of the graph. The bound can be reduced to 4n − 10 with some effort; see our subsection on related work.
On the other hand, it is known that every 3-planar graph with five or more vertices admits a planar octilinear drawing in which all edges are bend-less [13,7]. Also, for 4 ≤ k ≤ 5, it was 1 arXiv:1512.04866v1 [cs.CG] 15 Dec 2015 recently proved that 4and 5-planar graphs admit planar octilinear drawings with at most one bend per edge [2], which implies that the total number of bends for 4and 5-planar graphs can be upper bounded by 2n and 5n/2, respectively. The remainder of this paper is organized as follows. In Section 2, we considerably improve all aforementioned bounds for the classes of triconnected 4-, 5and 6-planar graphs. In Section 3, we present corresponding lower bounds for these three classes of planar graphs. We conclude in Section 4 with open problems and future work. For a summary of our results also refer to Table 1.

Related work.
As already stated, Keszegh et al. [14] have proved that every k-planar graph admits a planar drawing with at most k 2 different slopes in which each edge has at most two bends. If one appropriately adjusts the slopes of all edge segments incident to a vertex, then one can show that any k-planar graph, with 3 ≤ k ≤ 8, admits a planar octilinear drawing in which each edge has at most two bends. This implies that any k-planar graph on n vertices can have at most 6n − 12 bends, where 3 ≤ k ≤ 8. One can easily improve this bound to 4n − 10 as follows. The edge that "enters" a vertex from its south port and the edge that "leaves" each vertex from its top port in the s-t ordering of the algorithm of Keszegh et al. can both be drawn with only one bend each. Since each vertex is incident to exactly two such edges (except for the first and last ones in the s-t ordering which are only incident to one such edge each), it follows that 2n − 2 edges can be drawn with at most one bend. Hence, the bound of 4n − 10 follows.
Octilinear drawings form a natural extension of the so-called orthogonal drawings, which allow for horizontal and vertical edge segments only. For such drawings, the bend minimization problem can be solved efficiently, assuming that the input is an embedded graph [19]. However, the corresponding minimization problem over all embeddings of the input graph is NP-hard [10]. Note that in [19] the author describes how one can extend his approach, so to compute a bend-optimal octilinear representation 1 of any given embedded 8-planar graph. However, such a representation may not be realizable by a corresponding planar octilinear drawing [5].
For orthogonal drawings, several bounds on the total number of bends are known. Biedl [3] presents lower bounds for graphs of maximum degree 4 based on their connectivity (simply connected, biconnected or triconnected), planarity (planar or not) and simplicity (simple or non-simple with multiedges or selfloops). It is also known that any 4-planar graph (except for the octahedron graph) admits a planar orthogonal drawing with at most two bends per edge [4,15]. Trivially, this yields an upper bound of 4n bends, which can be improved to 2n + 2 [4]. Note that the best known lower bound is due to Tamassia et al. [20], who presented 4-planar graphs requiring 2n − 2 bends.
Finally, in metro-map visualization many approaches have been proposed that result in octilinear or nearly-octilinear drawings (see, e.g., [11,16,17,18]). However, most of them are heuristics and therefore do not focus on the bend-minimization problem explicitly.

Preliminaries.
Central in our approach is the canonical order [6,12] of triconnected planar graphs: Let G = (V, E) be a triconnected planar graph and let Π = (P 0 , . . . , P m ) be a partition of V into paths, such that P 0 = {v 1 , v 2 }, P m = {v n } and v 2 → v 1 → v n is a path on the outerface of G. For k = 0, 1, . . . , m, let G k be the subgraph induced by ∪ k i=0 P i . Path P k is called singleton if |P k | = 1 and chain otherwise; Partition Π is a canonical order [6,12] of G if for each k = 1, . . . , m − 1 the following hold (see also Figure 1): (ii) all neighbors of P k in G k−1 are on the outer face of G k−1 and (iii) all vertices of P k have at least one neighbor in P j for some j > k.
To simplify the description of our algorithms, we direct and color the edges of G based on partition Π (similar to Schnyder colorings [8]) as follows. The first partition P 0 of Π defines exclusively one edge (that is, edge (v 1 , v 2 )), which we color blue and direct towards vertex v 1 . For each partition P k = {v i , . . . , v i+j } ∈ Π later in the order, let v and v r be the leftmost and rightmost neighbors of P k in G k−1 , respectively. In the case where P k is a chain (that is, j > 0), we color edge (v i , v ) and all edges between vertices of P k blue and direct them towards v . The edge (v i+j , v r ) is colored green and is directed towards v r (see Figure 2a). In the case where P k is a singleton (that is, j = 0), we color the edges (v i , v ) and (v i , v r ) blue and green, respectively and we direct them towards v and v r . We color the remaining edges incident to P k towards G k−1 (if any) red and we direct them towards v i (see Figure 2e).
, respectively) the in-degree (out-degree, respectively) of vertex v in color x ∈ {r, b, g}. Then, it is not difficult to see that for a vertex v ∈ V \ {v 1 }, outdeg b (v) = 1, which implies that the blue subgraph is a spanning tree of G. Similarly, 0 ≤ outdeg g (v), outdeg r (v) ≤ 1. Hence, the green and the red subgraphs form two forests of G. It also holds that 0 ≤ outdeg r (v) ≤ 1 and

Upper Bounds
In this section, we present upper bounds on the total number of bends for the classes of triconnected 4-planar (Section 2.1), 5-planar (Section 2.2) and 6-planar (Section 2.3) graphs.

Triconnected 4-Planar Graphs.
Let G = (V, E) be a triconnected 4-planar graph. Before we proceed with the description of our approach, we need to define two useful notions. First, a vertical cut is a y-monotone continuous curve that crosses only horizontal segments and divides a drawing into a left and a right part; see e.g. [9]. Such a cut makes a drawing horizontally stretchable in the following sense: One can shift the right part of the drawing that is defined by the vertical cut further to the right while keeping the left part of the drawing in place and the result is a valid octilinear drawing. Similarly, one can define a horizontal cut.
Since G has at most 2n edges, by Euler's formula, it follows that G has at most n + 2 faces. In order to construct a drawing Γ(G) of G, which has roughly at most n + 2 bends, we also need to associate to each face of G a so-called reference edge. This is done as follows. Let Π = {P 0 , . . . , P m } be a canonical order of G and assume that Γ(G) is constructed incrementally by placing a new partition of Π each time, so that the boundary of the drawing constructed so far is a x-monotone path. When placing a new partition P k ∈ Π, k = 1, . . . , m − 1, one or two bounded faces of G are formed (note that we treat the last partition P m of Π separately). More precisely, if P k is a chain or a singleton of degree 3 in G k , then only one bounded face is formed. Otherwise (that is, P k is a singleton of degree 4 in G k ), two new bounded faces are formed. In both cases, each newly-formed bounded face consists of at least two edges incident to vertices of P k and at least one edge of G k−1 . In the former case, the reference edge of the newly-formed bounded face, say f , is defined as follows. If f contains at least one green edge that belongs to G k−1 , then the reference edge of f is the leftmost such edge (see Figure 2a and 2c). Otherwise, the reference edge of f is the leftmost blue edge of f that belongs to G k−1 (see Figure 2b and 2d). In the case where P k is a singleton of degree 4 in G k , the reference edge of each of the newly formed faces is the edge of G k−1 that is incident to the endpoint of the red edge involved. Observe that by definition a red edge cannot be a reference edge. For an example see Figure 1b.
As already stated, we will construct Γ(G) in an incremental manner by placing one partition of Π at a time. For the base, we momentarily neglect the edge (v 1 , v 2 ) of the first partition P 0 of Π and we start by placing the second partition, say a chain P 1 = {v 3 , . . . , v |P 1 |+2 }, on a horizontal line from left to right. Since by definition of Π, v 3 and v |P 1 |+2 are adjacent to the two vertices, v 1 and v 2 , of the first partition P 0 , we place v 1 to the left of v 3 and v 2 to the right of v |P 1 |+2 . So, they form a single chain where all edges are drawn using horizontal line-segments that are attached to the east and west port at their endpoints. The case where P 1 is a singleton is analogous (assuming that P 1 is a chain of unit length). Assume now that we have already constructed a drawing for G k−1 which has the following invariant properties: IP-1: The number of edges of G k−1 with a bend is at most equal to the number of reference edges in G k−1 .
IP-2: The north-west, north and north-east (south-west, south and south-east) ports of each vertex are occupied by incoming (outgoing) blue and green edges and by outgoing (incoming) red edges 2 .
IP-3: If a horizontal port of a vertex is occupied, then it is occupied either by an edge with a bend (to support vertical cuts) or by an edge of a chain.

IP-4:
A red edge is not on the outerface of G k−1 .
IP-5: A blue (green, respectively) edge of G k−1 is never incident to the north-west (north-east, respectively) port of a vertex of G k−1 .
IP-6: From each reference edge on the outerface of G k−1 one can devise a vertical cut through the drawing of G k−1 .
The base of our algorithm conforms with the aforementioned invariant properties. In the following, we will show how to add the next partition P k with k < m, so that all invariant properties are fulfilled. In our description, we will mainly describe the port assignment at each vertex that will always conform to IP-2-5, which fully specifies how each edge must be drawn (in other words, we describe the relative coordinates of the vertices). The exact coordinates can then be computed by adopting an approach similar to the one of Bekos et al. [2], since the base of each newly formed face is horizontally stretchable (follows from IP-6). Next, we consider the three main cases; see also Figure 1 for an example.
C.1: P k = {v i } is a singleton of degree 2 in G k ; see Figure 3a, 3b. Let v and v r be the leftmost and rightmost neighbors of v i in G k−1 (note that v and v r are not necessarily neighboring). We claim that the north-east port of v and the north-west port of v r cannot be simultaneously occupied. For a proof by contradiction, assume that the claim does not hold. Denote by v v r the path from v to v r at the outerface of G k−1 (neglecting the direction of the edges). By IP-5, v v r starts as blue from the north-east port of v and ends as green at the north-west port of v r . So, inbetween there is a vertex of the path v v r which has a neighbor in P j for some j ≥ k; a contradiction to the degree of v i . Without loss of generality assume that the north-east port of v is unoccupied. To draw the edge (v i , v ), we distinguish two cases. If (v i , v ) is the reference edge of a face, then we draw (v i , v ) as a horizontal-diagonal combination from the west port of v i towards the north-east port of v . Otherwise, (v i , v ) is drawn bend-less from the south-west port of v i towards the north-east port of v . To draw the edge (v i , v r ), again we distinguish two cases. If the north-west port at v r is unoccupied, then (v i , v r ) will use this port at v r . Otherwise, (v i , v r ) will use the north port at v r . In addition, if (v i , v r ) is the reference edge of a face, then (v i , v r ) will use the east port at v i . Otherwise, the south-east port at v i . The port assignment described above conforms to IP-2-5. Clearly, IP-1 also holds. IP-6 holds because the newly introduced edges that are reference edges have a horizontal segment, which inductively implies that vertical cuts through them are possible.
This case is similar to case C.1, as P k has also exactly two neighbors in G k−1 (which we again denote by v and v r ). The edges between v i , . . . , v i+j will be drawn as horizontal segments connecting the west and east ports of the respective vertices; see Figure 3c. The edges (v i , v ) and (v i+j , v r ) are drawn based on the rules of the case C.1 (e.g., in Figure 3c edge is not). Hence, the port assignment still conforms to IP-2-IP-5. In addition, IP-1 and IP-6 hold, since all edges of the chain are horizontal.
C.3: P k = {v i } is a singleton of degree 3 in G k . This is the most involved case. Let v and v r be the leftmost and rightmost neighbors of v i in G k−1 and let v m be the third neighbor of v i in G k−1 . By IP-2 and the degree restriction, the north port of v m is unoccupied. If the north-east port of v and the north-west port of v r are simultaneously unoccupied, we proceed analogously to case C.1; see Figure 3d. Clearly, IP-1 and IP-6 hold. Consider now the more involved case, where the north-east port of v is occupied and simultaneously (v i , v ) is not a reference edge. Hence, by IP-6 (v i , v ) must be drawn bend-less. Since the north-east port at v is occupied, by IP-4 it follows that the edge at the north-east port of v is not red. Therefore, by IP-2 and IP-5, the edge at the north-east port of v is blue. This implies that the path v v m at the outerface of G k−1 consists of exclusively blue edges pointing towards v . Hence, by IP-5 the north-east port at v m is unoccupied.
is a reference edge (that is, by IP-6 (v i , v r ) has a bend); see Figure 3e. In the case where the edge (v i , v r ) is not a reference edge (that is, none of (v i , v ) and (v i , v r ) is a reference edge), we need a different argument. We further distinguish two sub-cases.
C.3.1: The edge incident to v m on the path v m v r on the outerface of G k−1 is green (we cope with the case where this edge is blue later). By definition, the blue (green) edge of v v m (v m v r ) incident to v m is a reference edge and by IP-6 has a bend. Our aim is to "eliminate" one of these bends and draw one of the edges (v i , v ) or (v i , v r ) with a bend and the other one bend-less. So, IP-1 still holds. In this case, v m may or may not be incident to another red edge in G k−1 (equivalently, v m is either of degree 4 or 3, respectively). Without loss of generality we assume that v m is incident to another red edge, say (v m , v m ), in G k−1 , that is, v m is of degree 4. In this case, we translate v m upwards in the direction implied by the slope of the edge (v m , v m ), until one of the horizontal segments of the edges incident to v m on the outerface of G k−1 is completely eliminated; see Figure 3f. The only case, where the aforementioned segment elimination is not possible, is when (v m , v m ) is vertical and the edges incident to v m at the outerface of G k−1 are both horizontal-vertical combinations; see Figure 3g. In this particular case, however, by IP-2 it follows that either the north-west or the north-east port at v m is free. Since both edges incident to v m at the outerface of G k−1 are bent, by IP-3 we can redraw (v m , v m ) so to be diagonal and then we proceed similarly to the previous case; see Figure 3h. Also, observe that the port assignment still conforms to IP-2-IP-5.

C.3.2:
The edge incident to v m on the path v m v r on the outerface of G k−1 is blue. In this case, v m cannot be incident to another red edge. In the case where v m is of degree 3, we proceed similar to the case C.3.1, where v m was of degree 3. So, we now focus on the case where v m is of degree 4. In this case, the fourth edge attached to v m can be either (outgoing) green or (incoming) blue. In the former case, this edge is a reference edge. In the latter case, it is part of a chain. In both cases, however, this edge has a horizontal segment; see Figure 3i. Hence, we can translate v m horizontally to the left so to eliminate the bend of the edge incident to v m on the path v v m ; see Figure 3j. Note that all invariant properties are fulfilled once v i is drawn.
Note that the coordinates of the newly introduced vertices are determined by the shape of the edges connecting them to G k−1 . If there is not enough space between v and v r to accommodate the new vertices, IP-6 allows us to stretch the drawing horizontally using the reference edge of the newly formed face.
To complete the description of our algorithm, it remains to cope with the last partition P m = {v n } and describe how to draw the edge (v 1 , v 2 ) of the first partition P 0 of Π. If v n is of degree 3, we cope with P m as being an ordinary singleton. However, if v n is of degree 4, then we momentarily ignore the edge (v n , v 1 ) of P m and proceed to draw the remaining edges incident to v n , assuming that P m is again an ordinary singleton. The edge (v n , v 1 ) can be drawn afterwards using two bends in total. Finally, since by construction v 1 and v 2 are horizontally aligned, we can draw the edge (v 1 , v 2 ) with a single bend, emanating from the south-east port of v 1 towards the south-west port of v 2 . Theorem 1. Let G be a triconnected 4-planar graph with n vertices. A planar octilinear drawing Γ(G) of G with at most n + 5 bends can be computed in O(n) time.
Proof. By IP-1, all bends of Γ(G) are in correspondence with the reference edges of G, except for the bends of the edges (v 1 , v 2 ) and (v n , v 1 ). Since the number of reference edges is at most n + 2 and the edges (v 1 , v 2 ) and (v n , v 1 ) require 3 additional bends, the total number of bends of Γ(G) does not exceed n + 5. The linear running time follows from the observation that we can use the shifting method of Kant [13] to compute the actual coordinates of the vertices of G, since in the canonical order the y-coordinates of the vertices that have been placed at some particular step do not change in subsequent steps (following a similar approach as in [2]).

Triconnected 5-Planar Graphs.
Our algorithm for triconnected 5-planar graphs is an extension of the corresponding algorithm of Bekos et al. [2], which computes for a given triconnected 5-planar graph G on n vertices a planar octilinear drawing Γ(G) of G with at most one bend per edge. Since G cannot have more than 5n/2 edges, it follows that the total number of bends of Γ(G) is at most 5n/2. However, before we proceed with the description of our extension, we first provide some insights into this algorithm, which is based on a canonical order Π of G. Central are IP-2 and IP-4 of the previous section and the so-called stretchability invariant, according to which all edges on the outerface of the drawing constructed at some step of the canonical order have a horizontal segment and therefore one can devise corresponding vertical cuts to horizontally stretch the drawing. We claim that we can appropriately modify this algorithm, so that all red edges of Π are bend-less.
Since we seek to draw all red edges of Π bend-less, our modification is limited to singletons. So, let P k = {v i } be a singleton of Π. The degree restriction implies that v i has at most two incoming red edges (we also assume that P k is not the last partition of Π, that is k = m). We first consider the case where v i has exactly one incoming red edge, say e = (v j , v i ), with j < i. By construction, e must be attached to one of the northern ports of v j (that is, north-west, north or north-east). On the other hand, e can be attached to any of the southern ports of v i , as e is its only incoming red edge. This guarantees that e can be drawn bend-less.
Consider now the more involved case, where v i has exactly two incoming red edges, say e = (v j , v i ) and e = (v j , v i ) and assume without loss of generality that v j is to the left of v j in the drawing of G k−1 . We distinguish three cases based on the available ports of v j : C.1: The north-east port of v j is unoccupied: In this case, e emanates from the north-east port of v j and leads to the south-west port of v i (recall that all southern ports of singleton v i are dedicated for incoming red edges; in this case e and e ). If the north-west or the north port of v j is unoccupied, then e can be easily drawn bend-less. In the former case, e emanates from the north-west port of v j and leads to the south-east port of v i . In the latter case, e emanates from the north port of v j and leads to the south port of v i . Hence, the aforementioned port assignment fully specifies the position of v i . It remains to consider the case, where neither the north-west nor the north port of v j is unoccupied, that is, the north-east port of v j is unoccupied. By our coloring scheme and IP-2, v j has already two incoming green edges, say e g and e g , and e is the last edge to be attached at v j ; see Figure 4a. Therefore, there is no other (bend-less) red edge involved. We proceed by shifting v j up in a way that makes all northern ports of v j unoccupied; see Figure 4b. Note that we may have to use a second bend on the outgoing blue edge of v j (in order to maintain the stretchability invariant), but on the other hand we can eliminate one bend from the second green edge e g ; see Figure 4b. So, the total number of bends remains unchanged. In addition, the endpoints of both e g and e g that are opposite to v j may have to be moved horizontally to allow e g and e g to be drawn planar, but by the stretchability invariant we are guaranteed that this is always possible. Finally, the stretchability invariant is maintained, since each edge besides the red ones contains a horizontal segment.

C.2:
The north-east port of v j is occupied, while its north port is unoccupied: In this case, e emanates from the north port of v j and leads to the south port of v i (that is, v i and v j are vertically aligned). We now claim that the north-west port of v j is unoccupied. For the sake of contradiction, assume that the claim is not true. By our coloring scheme, the edge attached at the north-west port of v j is green, which implies that there must exist a path v j v j at the outerface face of G k−1 whose first edge is blue at the north-east port of v j and its last edge is green at the north-west port of v j . So, path v j v j has a vertex which has a neighbor in P κ for some κ ≥ k. Since v i is the only such candidate, the contradiction follows from the degree of v i . Hence, the north-west port of v j is unoccupied and therefore we can draw e without bends by using the south-east port of v i and the north-west port of v j , as desired.
C.3: Only the north-west port of v j is unoccupied: We can reduce this case to case C.1 by applying an operation symmetric to the one of Figure 4a on vertex v j . This will result in a configuration where all northern ports of v j (including the north-east) are unoccupied.
Theorem 2. Let G be a triconnected 5-planar graph with n vertices. A planar octilinear drawing Γ(G) of G with at most 2n − 2 bends can be computed in O(n) time.
Proof. From our extension, it follows that the only edges of Γ(G) that have a bend are the blue and the green ones and possibly the third incoming red edge of vertex v n of the last partition P m of Π. Now, recall that the blue subgraph is a spanning tree of G, while the green one is a forest on the vertices of G. So, in the worst case the green subgraph is a tree on n − 1 vertices of G (by construction the green subgraph cannot be incident to the first vertex v 1 of Π). Therefore, at most 2n − 2 edges of Γ(G) have a bend. In addition, the running time remains linear since the shifting technique can still be applied. This is because once a vertex has been placed its y-coordinate does not change anymore, except for the special case of two red edges (cases C.1 and C.3), which does not influence the overall running time, since it can occur at most once per vertex.

Triconnected 6-Planar Graphs.
In this section, we present an algorithm that based on a canonical order Π = {P 0 , P 1 , . . . , P m } of a given triconnected 6-planar graph G = (V, E) results in a drawing Γ(G) of G, in which each edge has at most two bends. Hence, in total Γ(G) has 6n − 12 bends. Then, we show how one can appropriately adjust the produced drawing to reduce the total number of bends. Algorithm 1 describes rules R1 -R6 to assign the edges to the ports of the corresponding vertices. It is not difficult to see that all port combinations implied by these rules can be realized with at most two bends, so that all edges have a horizontal segment (which makes the drawing horizontally stretchable): (i) a blue edge emanates from the west or south-west port of a vertex (by rule R4) and leads to one of the south-east, east, north-east, north or north-west ports of its other endvertex (by rule R1); see Figure 5g and 5h, (ii) a green edge emanates from the east or south-east

R6:
The incoming red edges of v occupy consecutively in counterclockwise direction the south-west, south and south-east ports of v starting from the first available.
port of a vertex (by rule R5) and leads to one of the west, north-west, north or north-east ports of its other endvertex (by rule R3); see Figure 5i and 5j, (iii) a red edge emanates from one of the north-west, north, north-east ports of a vertex (by rule R2) and leads to one of the south-west, south, south-east ports of its other endvertex (by rule R6); see Figure 5k.
Hence, the shape of each edge is completely determined. To compute the actual drawing Γ(G) of G, we follow an incremental approach according to which one partition (that is, a singleton or a chain) of Π is placed at a time, similar to Kant's approach [12] and the 4or 5-planar case. Each edge is drawn based on its shape, while the horizontal stretchability ensures that potential crossings can always be eliminated. Note additionally that we adopt the leftist canonical order [1], according to which the leftmost partition is chosen to be placed, when there exist two or more candidates. Since each edge has at most two bends, Γ(G) has at most 6n − 12 bends in total.
In the following, we reduce the total number of bends. This is done in two steps. In the first step, we show that all red edges can be drawn with at most one bend each. Recall that a red edge emanates from one of the north-west, north, north-east ports of a vertex and leads to one of the south-west, south, south-east ports of its other-endvertex. So, in order to prove that all red edges can be drawn with at most one bend each, we have to consider in total nine cases, which are illustrated in Figure 6. It is not difficult to see that in each of these cases, the red edge can be drawn with at most one bend. Note that the absence of horizontal segments at the red edges does not affect the stretchability of Γ(G), since each face of Γ(G) has at most two such edges (which both "point upward" at a common vertex). Since a red edge cannot be incident to the outerface of any intermediate drawing constructed during the incremental construction of Γ(G), it follows that it is always possible to use only horizontal segments (of blue and green edges) to define vertical cuts, thus, avoiding all red edges. The second step of our bend reduction is more involved. Our claim is that we can "save" two bends per vertex 3 , which yields a reduction by roughly 2n bends in total. To prove the claim, consider an arbitrary vertex u ∈ V of G. Our goal is to prove that there always exist two edges incident to u, which can be drawn with only one bend each. By rules R3 and R4, it follows that the west port of vertex u is always occupied, either by an incoming green edge (by rule R3) or by a blue outgoing edge (by rule R4; u = v 1 ∈ P 0 ). Analogously, the east port of vertex u is always occupied, either by a blue incoming edge (by rules R1 and R2) or by an outgoing green edge (by rule R5). Let (u, v) ∈ E be the edge attached at the west port of u (symmetrically we cope with the edge that is attached at the east port of u). If edge (u, v) is attached to a non-horizontal port at v, then (u, v) is by construction drawn with one bend (regardless of its color; see Figure 5g and 5i) and our claim follows.
It remains to consider the case where edge (u, v) is attached to a horizontal port at v. Assume first that edge (u, v) is blue (we will discuss the case where edge (u, v) is green later). By Algorithm 1, it follows that edge (u, v) is either the first blue incoming edge attached at v (by rules R1b and R1c) or the second one (by rule R1a). We consider each of these cases separately. In rule R1c, observe that edge (u, v) is part of a chain (because outdeg g (u) = 0). Hence, when placing this chain in the canonical order, we will place u directly to the right of v. This implies that (u, v) will be drawn as a horizontal line segment (that is, bend-less). Similarly, we cope with rule R1b, when additionally outdeg g (u) = 0. So, there are still two cases to consider: rule R1a and rule R1b, when additionally outdeg g (u) = 1; see the left part of Figure 7. In both cases, the current degree of vertex u is 3 and vertex v (and other vertices that are potentially horizontally-aligned with v) must be shifted diagonally up, when u is placed based on the canonical order, such that (u, v) is drawn as a horizontal line segment (that is, bend-less; see the right part of Figure 7). Note that when v is shifted up, vertex v and all vertices that are potentially horizontally-aligned with v are also of degree 3, since otherwise one of these vertices would not have a neighbor in some later partition of Π, which contradicts the definition of Π.
We complete our case analysis with the case where edge (u, v) is green. By rule R3a, it follows that (u, v) is the first green incoming edge attached at u. In addition, when (u, v) is placed based on the canonical order, there is no red outgoing edge attached at u (otherwise u would not be at the outerface of the drawing constructed so far). The leftist canonical order also ensures that there is no blue incoming edge at u drawn before (u, v). Hence, vertex u is of degree two, when edge (u, v) is placed. Hence, it can be shifted up (potentially with other vertices that are horizontally-aligned with u), such that (u, v) is drawn as a horizontal line segment (that is, bend-less). We summarize our approach in the following theorem. Proof. Before the two bend-reduction steps, Γ(G) contains at most 6n − 12 bends. In the first reduction step, all red edges are drawn with one bend. Hence, Γ(G) contains at most 5n − 9 bends. In the second reduction step, we "save" two bends per vertex (except for v 1 ∈ P 0 , which has no outgoing blue edge), which yields a reduction by 2n − 1 bends. Therefore, Γ(G) contains at most 3n − 8 bends in total. On the negative side, we cannot keep the running time of our algorithm linear. The reason is the second reduction step, which yields changes in the y-coordinates of the vertices. In the worst case, however, quadratic time suffices.
Note that there exist 6-planar graphs that do not admit planar octilinear drawings with at most one bend per edge [2]. Theorem 3 implies that on average one bend per edge suffices.

Lower Bounds
In this section, we present lower bounds on the total number of bends for the classes of triconected 4-, 5and 6-planar graphs.

4-Planar Graphs.
We start our study with the case of 4-planar graphs. Our main observation is that if a 3-cycle C 3 of a graph has at least two vertices, with at least one neighbor in the interior of C 3 each, then at least one edge of C 3 must contain a bend, since the sum of the interior angles at the corners of C 3 exceeds 180 • . In fact, elementary geometry implies that a k-cycle, say C k with k ≥ 3, whose vertices have σ ≥ 0 neighbors in the interior of C k requires (at least) max{0, (σ − 3k + 8)/3 } bends. Therefore, a bend is necessary. Now, refer to the 4-planar graph of Figure 8a, which contains n/3 nested triangles, where n is the number of its vertices. It follows that this particular graph requires at least n/3 − 1 bends in total.

5-and 6-Planar Graphs.
For 5and 6-planar graphs, our proof becomes more complex. For these classes of graphs, we follow an approach inspired by Tamassia's min-cost flow formulation [19] for computing bendminimum representations of embedded planar graphs of bounded degree. Since it is rather difficult to implement this algorithm in the case where the underlying drawing model is not the orthogonal model, we developed an ILP instead. Recall that a representation describes the "shape" of a drawing without specifying its exact geometry. This is enough to determine a lower bound on the number of bends, even if a bend-optimal octilinear representation may not be realizable by a corresponding (planar) octilinear drawing. In our formulation, variable α(u, v) · 45 • corresponds to the angle formed at vertex u by edge (u, v) and its cyclic predecessor around vertex u. Hence, 1 ≤ α(u, v) ≤ 8. Since the sum of the angles around a vertex is 360 • , it follows that v∈N (u) a(u, v) = 8. Given an edge e = (u, v), variables 45 (u, v), 90 (u, v) and 135 (u, v) correspond to the number of left turns at 45 • , 90 • and 135 • when moving along (u, v) from vertex u towards vertex v. Similarly, variables r 45 (u, v), r 90 (u, v) and r 135 (u, v) are defined for right turns. All aforementioned variables are integer lowerbounded by zero. For a face f , we assume that its edges are directed according to the clockwise traversal of f . This implies that each (undirected) edge of the graph appears twice in our formulation. For reasons of symmetry, we require 45 (u, v) = r 45 (v, u), 90 (u, v) = r 90 (v, u) and 135 (u, v) = r 135 (v, u). Since the sum of the angles formed at the vertices and at the bends of a bounded face f equals to 180 • · (p(f ) − 2), where p(f ) denotes the total number of such angles, it follows that (u,v)∈E(f ) α(u, v) + ( 45 (u, v) + 90 (u, v) + 135 (u, v)) − (r 45 (u, v) + r 90 (u, v) + r 135 (u, v)) = 4a(f ) − 8, where a(f ) denotes the total number of vertex angles in f , and, E(f ) the directed arcs of f in its clockwise traversal. If f is unbounded, the respective sum is increased by 16. Of course, the objective is to minimize the total number of bends over all edges, or, equivalently min (u,v)∈E 45 (u, v) + 90 (u, v) + 135 (u, v) + r 45 (u, v) + r 90 (u, v) + r 135 (u, v). Now, consider the 5-planar graph of Figure 8b and observe that each "layer" of this graph consist of six vertices that form an octahedron (solid-drawn), while octahedrons of consecutive layers are connected with three edges (dotted-drawn). Using our ILP formulation, we prove that each octahedron subgraph requires at least 4 bends, when drawn in the octilinear model (except for the innermost one for which we can guarantee only two bends). This implies that 2n/3 − 2 bends are required in total to draw the graph of Figure 8b. For the 6-planar case, we apply our ILP approach to a similar graph consisting of nested octahedrons that are connected by six edges each; see Figure 8c. This leads to a better lower bound of 4n/3 − 6 bends, as each octahedron except for the innermost one requires 8 bends. Summarizing we have: Theorem 4. There exists a class G n,k of triconnected embedded k-planar graphs, with 4 ≤ k ≤ 6, whose octilinear drawings require at least: (i) n/3 − 1 bends, if k = 4, (ii) 2n/3 − 2 bends, if k = 5 and (iii) 4n/3 − 6 bends, if k = 6.

Conclusions
In this paper, we studied bounds on the total number of bends of octilinear drawings of triconnected planar graphs. We showed how one can adjust an algorithm of Keszegh et al. [14] to derive an upper bound of 4n − 10 bends for general 8-planar graphs. Then, we improved this general bound and previously-known ones for the classes of triconnected 4-, 5and 6-planar graphs. For these classes of graphs, we also presented corresponding lower bounds. We mention two major open problems in this context. The first one is to extend our results to biconnected and simply connected graphs and to further tighten the bounds. Since our drawing algorithms might require super-polynomial area (cf. arguments from [2]), the second problem is to study trade-offs between the total number of bends and the required area.