1 Introduction

Incremental drawing algorithms have a long history in the field of Graph Drawing. The central result of de Fraysseix, Pach and Pollack [1], who showed that every planar graph admits a planar straight-line drawing within quadratic area, marks the beginning of this line of research. In their seminal paper, they introduced the concept of canonical ordering, an ordering of the vertices that is used to drive their incremental drawing algorithm. In each step, one vertex at a time is placed, while it is ensured that certain invariants are satisfied. Another important result with respect to canonical orderings is by Kant [2]. While the original ordering is only defined for maximal planar graphs, he generalizes this concept to triconnected planar graphs. However, Kant’s ordering is no longer a vertex ordering, instead it is an ordered partition of vertices. Later on, Harel and Sardas [3] show how one can further extend canonical orderings to the biconnected case.

Another type of vertex ordering that has its origins not in Graph Drawing, but finds its applications there [4, 5], is the so-called st-ordering [6]. However, st-orderings are not restricted to planar graphs, hence, the ordering is not related directly to the embedding of the underlying planar graph. This relation between a planar embedding and the ordering itself is established by the bitonic st-orderings [7], which have been used to solve various graph drawing problems, e.g., T-contact representations [7], L-drawings [8], finding universal slope sets [9]. Besides being a proper st-ordering, the definition takes the embedding into account and ensures that the vertex ordering has similar properties to a canonical ordering. Initially introduced for undirected graphs in [7], where it is shown that for every biconnected planar graph a bitonic st-ordering can be found in linear time, the concept has been extended to directed graphs [10].

The idea that led initially to the extension to directed graphs, namely the st-planar graphs, is rather simple. By slightly modifying the original algorithm of de Fraysseix, Pach and Pollack, one may use a bitonic st-ordering to obtain a planar straight-line drawing. Combined with the observation that a vertex is always drawn above its predecessors in the ordering, the resulting drawing is upward planar straight-line. However, not every st-planar graph admits such a bitonic st-ordering, but a full characterization is given in [10] that is based on the existence of so-called forbidden configurations. These configurations, however, can be eliminated by splitting certain edges in the graph, such that for the resulting graph one can then obtain the desired ordering. This technique is used to prove that every upward planar graph with n vertices, admits an upward planar polyline drawing with at most one bend per edge within \(O(n^2)\) area. Moreover, the number of bends is at most \(n-3\), which is the best-known bound so far [10]. Hereby, each bend corresponds to a dummy vertex that has been introduced by splitting an edge. Note that in [10] an example is given that requires exactly \(n-3\) splits, which shows that this bound is tight.

In practice, one is interested in splitting as few edges as possible. In [10], a simple linear-time algorithm is described that finds the optimal set of edges to split. This algorithm assumes the embedding of the underlying st-planar graph to be part of the input. Hence, it is only optimal in the fixed embedding scenario. Changing the embedding, however, may have a big impact on the required number of splits. Chaplick et al. [8] take a first step towards the variable embedding scenario by describing an algorithm based on SPQR-trees [11] to test whether an st-planar graph admits a bitonic st-ordering in any of its embeddings. In the positive case, their algorithm computes such an embedding and a corresponding bitonic st-ordering. Otherwise, one has to fall back to the fixed embedding algorithm for computing a set of edges to split. However, the number of edges to split may depend on the choice of the embedding, and a smaller set may be obtained from a different embedding.

1.1 Our Contribution

In this work, we first close the aforementioned gap in the literature by describing a linear-time algorithm to compute a smallest set of edges to split over all possible embeddings (see Theorem 1). Within the same time complexity, the algorithm outputs also a corresponding embedding.

Then, we turn our attention to upward planar polyline drawings obtained with the approach by Gronemann [10]. In this regard, Rettner [12] observed that an upward planar drawing can be obtained by reversing all edges of the graph, obtain an upward planar drawing for this reversed graph, and then mirror this drawing vertically. This idea stems from the observation that the example given in [10], which requires \(n-3\) splits, does not require any split at all when all edges have been reversed. In view of this property, one would naturally choose the orientation with the minimum number of splits. However, there exist limitations also in this approach, as there exist n-vertex st-planar graphs that require at least \(\frac{3n}{4} - 3\) splits in each of the two orientations [12]. Still the question that arises is whether one of the two orientations always requires significantly less than \(n-3\) splits. We answer this question negatively by demonstrating n-vertex st-planar graphs that require \(n-5\) splits in each of the two orientations (see Theorem 3).

Note that the graphs supporting Theorem 3 are of maximum degree 6. On the other hand, if the maximum degree of the input st-planar graph is 3, then no split is required [13]. We show in Theorem 6 that \(\frac{n}{2}-2\) splits may be required for maximum degree 4 st-planar graphs. We finally prove that \(\frac{n}{2}\) splits are sufficient even for degree-5 st-planar graphs (see Theorem 4).

Finally, we study lower bounds on the total number of bends in upward planar drawings under the polynomial-area requirement, independently of the required number of splits and of the allowed number of bends per edge. We show that \(n-o(\log n)\) bends may be required for st-planar graphs of maximum degree 6 (see Theorem 8), while for maximum degree 4 the corresponding number of required bends is \(\frac{n}{2}-o(\log n)\) (see Theorem 9). As a result, our findings imply that the upper bounds on the number of bends obtained by the approach by Gronemann are worst-case tight up to a logarithmic factor, even if more than one bend per edge is allowed.

Structure of the paper We give preliminaries in Sect. 2. Then, we devote Sect. 3 to describe our algorithm to minimize the number of splits in the variable embedding setting. We complement our algorithm by providing upper and lower bounds on the number of splits in Sect. 4, and by discussing the relationship between bitonic embeddings and upward planarity in Sect. 5. Finally, we conclude with open problems in Sect. 6.

2 Preliminaries

Graph drawings and upward planarity A drawing \(\Gamma \) of a graph G maps the vertices of G to distinct points in the plane and the edges of G to simple Jordan arcs between their endpoints. Drawing \(\Gamma \) is planar if no two edges share an interior point. Planar drawings partition the plane into regions, called faces, whose boundaries consist of edges. The unbounded face is the outer face. An embedding is a class of drawings defining the sets of faces with the same boundaries.

A drawing \(\Gamma \) of a directed acyclic graph G is upward planar if for every edge (uv), vertex u lies below v in \(\Gamma \) and (uv) is drawn as a y-monotone curve in \(\Gamma \); accordingly graph G is upward planar if it admits an upward planar drawing. A vertex v of a directed graph is a source (sink, resp.), if it only has outgoing (incoming, resp.) edges. A directed graph G is st-planar if it has a unique source s and a unique sink t such that there is an upward planar drawing of G, where s and t are incident to the outer face of it. In our definition, we assume that the edge (st) exists and is incident to the outer face. An upward planar embedding of an st-planar graph induces a left-to-right ordering of the incoming and outgoing edges of each vertex. We call the left-to-right ordered sequence of the neighbors of a vertex v connected with outgoing edges of v the successor list of v. Note that the faces of an st-planar graph have a unique source and a unique sink [14] connected by two paths. If one of these paths is a single edge, we call it transitive.

st-orderings An st-ordering of an st-planar graph is a linear ordering of its vertices with a prescribed vertex s being the first and a prescribed vertex t being the last vertex such that for every directed edge (uv), it holds that u precedes v [15]. Given an st-ordering of an embedded st-planar graph, the successor list of a vertex u is monotonically increasing (decreasing, resp.) if the outgoing neighbors of u appear in this successor list in the same (opposite, resp.) order as they appear in the st-ordering. Further, the successor list of u is bitonic if there exists an outgoing neighbor h of u, called apex of u, such that the successor list of u is monotonically increasing from the beginning up to h and monotonically decreasing from h up to the end. Note that a monotonically increasing (decreasing, resp.) successor list is bitonic with the rightmost (leftmost, resp.) outgoing neighbor being its apex. We call an embedding \(\mathcal {E}\) of an st-planar graph G monotonic (bitonic, resp.) if there exists an st-ordering of G such that the successor lists of all vertices defined by \(\mathcal {E}\) are monotonically increasing/decreasing (bitonic, resp.); we call the corresponding st-ordering monotonic (bitonic, resp.). Further, we say that an st-planar graph G is monotonic (bitonic, resp.) if G admits a monotonic (bitonic, resp.) embedding.

Fig. 1
figure 1

Forbidden configurations that prevent a bitonic successor list for u where a \(v_{i+1} \ne v_j\) and b \(v_{i+1} = v_j\), respectively

Forbidden configurations for bitonic st-orderings Consider an embedding and an st-ordering of an st-planar graph G. Let u be a vertex and h the outgoing neighbor of u with largest rank in the st-ordering. Note that h is the only possible apex for the successor list of u. Then, the successor list of u is not bitonic if and only if there exist two vertices vw such that v precedes w in the st-ordering and v appears between w and h in the successor list. We call this configuration a conflict. It has been shown [10] that for a given embedding of an st-planar graph there exists an st-ordering without conflicts if and only if the embedding does not contain any forbidden configuration, where a forbidden configuration with source u is formed by two faces \(f_1=\langle u,v_{i+1},\ldots ,v_i\rangle \) and \(f_2=\langle u,v_j,\ldots ,v_{j+1}\rangle \) such that the successor list of u contains \(v_i,v_{i+1},v_{j},v_{j+1}\) in this order, with possibly \(v_{i+1}=v_j\), and \((v_{i+1},\ldots ,v_i)\) and \((v_j,\ldots ,v_{j+1})\) are directed paths in G; see Fig. 1. In order to obtain bitonic embeddings even in the presence of forbidden configurations, Gronemann [10] proposed to split at least one of the transitive edges \((u,v_i)\) and \((u,v_{j+1})\). More specifically, if we split edge \((u, v_i)\), we obtain two new edges \((u, v'_i)\) and \((v'_i, v_i)\) with dummy vertex \(v_i'\). Note that \(v_i'\) then replaces \(v_i\) in the successor list of u in the obtained graph. Since there exists no directed path from \(v_{i+1}\) to \(v_i'\), the forbidden configuration has been resolved.

Connectivity and SPQR-trees A graph is connected if for any pair of vertices there is a path connecting them. A graph is k-connected if the removal of any set of \(k-1\) vertices leaves it connected. A 2- or 3-connected graph is also referred to as biconnected or triconnected, respectively. Note that a triconnected planar graph has a unique embedding up to the choice of the outer face. Also note that st-planar graphs are always biconnected.

The SPQR-tree \(\mathcal {T}\) of an st-planar graph G is a labeled tree representing the decomposition of G into its triconnected components [11, 16]. Every triconnected component of G is associated with a node \(\mu \) in \(\mathcal {T}\). The two vertices separating the component associated with \(\mu \) from the rest of the graph are called the poles \(s_\mu \) and \(t_\mu \) of \(\mu \). The skeleton of \(\mu \), denoted by \(\textit{skel}(\mu ) \), is an st-planar graph where \(s=s_\mu \) and \(t=t_\mu \) whose edges are called virtual edges. In particular, there exists a virtual edge for every child \(\nu \) of \(\mu \) in \(\mathcal {T}\) plus a parent virtual edge \((s_\mu ,t_\mu )\) that corresponds to a virtual edge between \(s_\mu \) and \(t_\mu \) in the skeleton of its parent. A node \(\mu \in \mathcal {T}\) can be of one of four different types:

  1. (i)

    S-node, if \(\textit{skel}(\mu ) \) is composed of the parent virtual edge and a directed path of length at least 2 from \(s_\mu \) to \(t_\mu \);

  2. (ii)

    P-node, if \(\textit{skel}(\mu ) \) is a bundle of at least three parallel edges from \(s_\mu \) to \(t_\mu \);

  3. (iii)

    Q-node, if \(\textit{skel}(\mu ) \) consists of two parallel edges, one being the parent virtual edge and the other one being the corresponding edge in G;

  4. (iv)

    R-node, if \(\textit{skel}(\mu ) \) is a simple triconnected st-planar graph with \(s=s_\mu \) and \(t=t_\mu \).

The set of leaves of \(\mathcal {T}\) coincides with the set of Q-nodes, except for the Q-node \(\rho \) corresponding to edge (st), which is selected as the root of \(\mathcal {T}\). Also, neither two S-nodes, nor two P-nodes are adjacent in \(\mathcal {T}\). The subtree \(\mathcal {T}_\mu \) of \(\mathcal {T}\) rooted at \(\mu \) induces a subgraph \(\textit{pert}(\mu )\) of G, called pertinent, which is described by \(\mathcal {T}_\mu \) in the decomposition. In particular, \(\textit{pert}(\mu )\) is obtained from \(\textit{skel}(\mu )\) by recursively identifying each virtual edge with the corresponding parent virtual edge in the corresponding child node. We assume that the parent virtual edge of \(\mu \) is not part of \(\textit{pert}(\mu )\). All embeddings of \(\textit{pert}(\mu )\) can be described by a permutation of the parallel virtual edges in each P-node in \(\mathcal {T}_\mu \) and a flip of the skeleton of each R-node in \(\mathcal {T}_\mu \). SPQR-tree \(\mathcal {T}\) is unique, and can be computed in linear time [17].

3 Number of Splits in the Variable Embedding Setting

In this section, we present an algorithm that given an st-planar graph G computes a minimum-cardinality set of edges \(E'\) of G so that the graph \(G'\) obtained from G by splitting every edge in \(E'\) is bitonic. More precisely, our goal is to construct an embedding \(\mathcal E\) of G such that the embedding \(\mathcal E'\) of \(G'\) obtained from \(\mathcal E\) by splitting the edges in \(E'\) admits a bitonic ordering \(\pi '\). At the end of the section we discuss an analogous (and simpler) algorithm that even guarantees \(G'\) to be monotonic albeit at the cost of more splits.

To compute \(\mathcal {E}\), we adopt an SPQR-tree approach similar to the one by Chaplick et al. [8] to test whether an st-planar graph with fixed upward planar embedding is bitonic. In contrast, however, we do not explicitly augment the graph as Chaplick et al. [8] do. Instead, we specify the embedding \(\mathcal E\) and a labeling of the edges describing whether they will eventually be split.

Let \(\mathcal T\) be the SPQR-tree of G, rooted at the edge (st). We associate each node \(\mu \) of \(\mathcal T\), with poles \(s_\mu \) and \(t_\mu \), with two costs \(c_b(\mu )\) and \(c_m(\mu )\), and with two embeddings \(\mathcal {E}_b(\mu )\) and \(\mathcal {E}_m(\mu )\) of \(\textit{pert}(\mu )\), whose edges are labeled as split or non-split, such that the following invariants hold:

  1. I.1

    \(c_m(\mu )\) is the minimum number of splits to make \(\textit{pert}(\mu )\) bitonic, with the additional requirement that the successor list of \(s_\mu \) is monotonically decreasing, and \(\mathcal {E}_m(\mu )\) is an embedding of \(\textit{pert}(\mu )\) achieving this cost;

  2. I.2

    \(c_b(\mu )\) is the minimum number of splits to make \(\textit{pert}(\mu )\) bitonic, with no additional requirement, and \(\mathcal {E}_b(\mu )\) is an embedding of \(\textit{pert}(\mu )\) achieving this cost;

  3. I.3
    1. (a)

      An edge e in \(\mathcal {E}_m(\mu )\) is labeled as split if and only if e contributes to \(c_m(\mu )\),

    2. (b)

      An edge e in \(\mathcal {E}_b(\mu )\) is labeled as split if and only if e contributes to \(c_b(\mu )\);

  4. I.4

    If the edge \((s_\mu , t_\mu )\) exists in \(\textit{pert}(\mu )\), then \(t_\mu \) is the apex of \(s_\mu \) in \(\mathcal {E}_m(\mu )\) and the edge \((s_\mu ,t_\mu )\) is labeled as non-split.

Observe that, by definition, it holds that \(c_b(\mu ) \le c_m(\mu )\).

We perform a bottom-up traversal of \(\mathcal T\) and compute for each node \(\mu \) the costs \(c_b(\mu )\) and \(c_m(\mu )\), the two embeddings \(\mathcal {E}_b(\mu )\) and \(\mathcal {E}_m(\mu )\) of \(\textit{pert}(\mu )\), and the labeling of their edges, so that Invariants I.1–I.4 hold, assuming that they hold for all the children of \(\mu \). We distinguish cases based on the type of node \(\mu \).

Node \(\mu \) is a Q-node that is a leaf of \(\mathcal T\). We set both \(\mathcal {E}_b(\mu )\) and \(\mathcal {E}_m(\mu )\) to the unique embedding of \(\textit{pert}(\mu )\), which consists only of edge \((s_\mu ,t_\mu )\). Since this embedding is monotonic, we set both costs \(c_m(\mu )\) and \(c_b(\mu )\) to 0, and we label \((s_\mu ,t_\mu )\) as non-split in both embeddings. Hence, Invariants I.1–I.4 are satisfied.

Node \(\mu \) is a P-node: Let \(\nu _1,\ldots ,\nu _k\) denote the children of \(\mu \). W.l.o.g., assume that if \(\mu \) has a Q-node child then this child is \(\nu _1\). We construct both \(\mathcal {E}_m(\mu )\) and \(\mathcal {E}_b(\mu )\) by ordering the children of \(\mu \) in clockwise order around \(s_\mu \) from \(\nu _1\) to \(\nu _k\). Then, we choose embeddings and flips for the pertinent graphs of the children of \(\mu \) in order to obtain \(\mathcal {E}_m(\mu ) \) and \( \mathcal {E}_b(\mu ) \), as follows.

In order to construct \(\mathcal {E}_m(\mu )\), we choose the monotonic embedding \(\mathcal {E}_m(\nu _i)\) for each child \(\nu _i\) and perform no flip. We set the monotonic cost \(c_m(\mu )\) for \(\mu \) to \(\sum _{i=1}^k c_m(\nu _i)\), satisfying Invariant I.1. The labeling of the edges in \(\mathcal {E}_m(\mu )\) is inherited from the corresponding ones of \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _k)\), which ensures Invariants I.3(a) and I.4.

To specify \(\mathcal {E}_b(\mu )\), we select one of the children of \(\mu \) to contain the apex of \(s_\mu \), in such a way that the resulting bitonic cost \(c_b(\mu )\) for \(\mu \) is minimized. For this, we select the child \(\nu _h\), with \(1 \le h \le k\), such that the difference \(c_m(\nu _h) - c_b(\nu _h)\) is maximum. If this difference is 0 for all children of \(\mu \), we set \(\nu _h\) to be \(\nu _1\). Then, we select the bitonic embedding \(\mathcal {E}_b(\nu _h)\) for \(\nu _h\) and the monotonic embedding \(\mathcal {E}_m(\nu _i)\) for each child \(\nu _i\ne \nu _h\). Finally, we flip the embeddings \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _{h-1}) \) of the pertinent graphs of \(\nu _1,\ldots ,\nu _{h-1}\). Note that the flip of these embeddings results in a monotonically increasing successor list at \(s_\mu \) for each of them, and hence guarantees that \(\mathcal {E}_b(\mu )\) is bitonic, except when \(\nu _1\) is a Q-node and \(\nu _h\ne \nu _1\); see Fig. 2.

Fig. 2
figure 2

Bitonic embedding \(\mathcal {E}_b(\mu ) \) for a P-node \(\mu \). One child \(\nu _h\) uses its bitonic embedding \(\mathcal {E}_b(\nu _h) \). Embedding \(\mathcal {E}_m(\nu _\ell ) \) of child \(\nu _\ell \) appearing left of \(\nu _h\) is flipped

To guarantee that \(\mathcal {E}_b(\mu )\) is bitonic also in this special case, edge \((s_\mu ,t_\mu )\) must be split; note that, by Invariant I.4, edge \((s_\mu ,t_\mu )=(s_{\nu _1},t_{\nu _1})\) is labeled as non-split in the embedding \(\mathcal {E}_m(\nu _1)\) of \(\nu _1\). So, to guarantee Invariant I.2, we set \(c_b(\mu ) = c_m(\mu ) - c_m(\nu _h) + c_b(\nu _h) + 1\) if \(\nu _1\) is a Q-node and \(\nu _h\ne \nu _1\), and \(c_b(\mu ) = c_m(\mu ) - c_m(\nu _h) + c_b(\nu _h)\) otherwise.

To satisfy Invariant I.3(b), we inherit the labeling of the edges in \(\mathcal {E}_b(\mu )\) from the embeddings \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _{h-1}),\mathcal {E}_b(\nu _{h}),\mathcal {E}_m(\nu _{h+1}),\ldots ,\mathcal {E}_m(\nu _k)\). Further, in the special case in which \(\nu _1\) is a Q-node and \(\nu _h\ne \nu _1\), we label edge \((s_\mu ,t_\mu )\) as split.

Node \(\mu \) is an S-node: Let \(\nu _1,\ldots ,\nu _k\) denote the children of \(\mu \), where \(s_\mu = s_{\nu _1}\) and \(t_\mu = t_{\nu _k}\). To compute \(\mathcal {E}_m(\mu ) \) and \(\mathcal {E}_b(\mu ) \), we use \(\mathcal {E}_m(\nu _1) \) and \(\mathcal {E}_b(\nu _1) \) for child \(\nu _1\), respectively, and the bitonic embeddings \(\mathcal {E}_b(\nu _2),\ldots ,\mathcal {E}_b(\nu _k) \) for children \(\nu _2,\ldots ,\nu _k\) in both cases, without performing any flip. To guarantee Invariants I.1 and I.2, we set \(c_m(\mu )\) and \(c_b(\mu )\) to \(c_m(\nu _1) + \sum _{i=2}^kc_b(\nu _i)\) and \(\sum _{i=1}^kc_b(\nu _i)\), respectively. To guarantee Invariants I.3(a) and I.3(b), the labeling of the edges in \(\mathcal {E}_b(\mu )\) and \(\mathcal {E}_m(\mu )\) is inherited from the corresponding ones in the chosen embeddings of the children. Finally, Invariant I.4 is satisfied since edge \((s_\mu , t_\mu )\) does not exist in \(\textit{pert}(\mu )\).

Node \(\mu \) is an R-node: Since \(\textit{skel}(\mu ) \) is triconnected, it has a unique embedding; we will construct both \(\mathcal {E}_m(\mu )\) and \(\mathcal {E}_b(\mu )\) based on such an embedding and by selecting for each child \(\nu \) of \(\mu \) a suitable embedding of \(\textit{pert}(\nu )\) and a flip. Since each virtual edge is outgoing for only one of its end-vertices due to the fact that G is st-planar, we consider every vertex in \(\textit{skel}(\mu )\) independently, together with its outgoing virtual edges, similar to [10].

Let u be a vertex of \(\textit{skel}(\mu ) \), and let \((u,v_1), \ldots , (u,v_k)\) be the outgoing virtual edges of u, as they appear consecutively clockwise around u, and let \(\nu _1,\ldots ,\nu _k\) be the corresponding children of \(\mu \). If \(u \ne s_\mu \), we can construct a bitonic successor list for u in both \(\mathcal {E}_m(\mu )\) and \(\mathcal {E}_b(\mu )\). Otherwise, we may need to perform different choices when constructing \(\mathcal {E}_m(\mu )\) and \(\mathcal {E}_b(\mu )\), to guarantee Invariants I.1 and I.2, respectively.

Suppose first that \(u \ne s_\mu \). Similar to the P-node case, we determine a child \(\nu _h\) of \(\mu \), with \(1 \le h \le k\), to contain the apex of u, in such a way to minimize the number of splits of the outgoing edges of u to make the successor list of u bitonic; we denote this number by \(c_b(u)\). To determine \(\nu _h\), we consider each child \(\nu _j\), for \(j = 1, \dots , k\), to be candidate for \(\nu _h\), and compute the required number of splits for this choice, denoted by \(c_b(u,j)\). We then obtain \(c_b(u) = \min \{c_b(u,j)\mid j = 1, \ldots , k\}\).

Fig. 3
figure 3

a An unavoidable conflict if \(v_j\) is selected as apex of u. bd Different cases, that arise, when computing \(c_b(u,j)\)

In contrast to the P-node case, we cannot conclude that \(c_b(u,j) = c_b(\nu _j) + \sum _{i \ne j} c_m(\nu _i)\), since the choice of \(\nu _j\) and the structure of \(\textit{skel}(\mu )\) may result in new conflicts. Namely, consider a child \(\nu _i\) of \(\mu \) with \(i < j\) and assume that the edge \((u,v_i)\) exists in \(\textit{pert}(\mu )\) and that there is a directed path in \(\textit{skel}(\mu )\) from \(v_{i+1}\) to \(v_i\); see e.g. Figure 3a. This implies that there is a directed path from a successor of u in \(\textit{pert}(\nu _{i+1})\) to \(v_i\). Since \(i < j\), this defines a forbidden configuration, and hence edge \((u,v_i)\) must be split. On the other hand, by Invariant I.4 edge \((u,v_i)\) is labeled as non-split in \(\mathcal {E}_m(\nu _i) \), and thus we have to account the cost of the split of edge \((u,v_i)\) in the computation. Analogously, if \(i > j\), a conflict may arise when there exists a directed path in \(\textit{skel}(\mu )\) from \(v_{i-1}\) to \(v_i\). Denote by \(c_s(u,j)\) the total number of these additional splits when \(\nu _j\) contains the apex of u. Thus,

$$\begin{aligned} c_b(u,j) = \sum _{i=1}^{j-1} c_m(\nu _i) + c_b(\nu _j) + \sum _{i=j+1}^k c_m(\nu _i) + c_s(u,j). \end{aligned}$$

The computation of \(c_b(u,j)\) for all \(j = 1, \ldots ,k\) can be done in quadratic time with respect to the number of outgoing virtual edges of u. Next, we make use of ideas of the fixed-embedding algorithm [10] to achieve linear time. Namely, we first compute \(c_b(u,1)\) in linear time. Then, for each \(j = 2, \ldots , k\), we can compute \(c_b(u,j)\) from \(c_b(u,j-1)\) in constant time as follows. Namely, for computing \(c_b(u,j)\), we assume that we already computed \(c_b(u,j-1)\) and that the apex of u is to be contained in child \(\nu _j\). In this transition, \(\textit{pert}(\nu _{j-1}) \) changes its embedding from \(\mathcal {E}_b(\nu _{j-1}) \) to \(\mathcal {E}_m(\nu _{j-1}) \), while \(\textit{pert}(\nu _j) \) changes its embedding from \(\mathcal {E}_m(\nu _{j}) \) to \(\mathcal {E}_b(\nu _{j}) \); the pertinent graphs of the remaining children maintain their monotonic embeddings. We take this change into account by considering the corresponding difference \(\delta _j(u)= c_b(\nu _j)-c_m(\nu _j) + c_m(\nu _{j-1})- c_b(\nu _{j-1})\). In addition, we must also take into account the difference between \(c_s(u,j-1)\) and \(c_s(u,j)\), whose computation can be done again by only considering the children \(\nu _{j-1}\) and \(\nu _j\). More precisely, if \((u,v_{j-1})\) is an edge in \(\textit{pert}(\mu )\), then it did not need to be split when the apex of u was in \(\nu _{j-1}\), but it has to be split when moving the apex to \(\nu _{j}\), if there is a directed path from \(v_j\) to \(v_{j-1}\); see Fig. 3b. On the other hand, if \((u,v_j)\) is an edge of \(\textit{pert}(\mu )\) and it had to be split when the apex of u was in \(\nu _{j-1}\), i.e., there is a directed path from \(v_{j-1}\) to \(v_j\), then edge \((u,v_j)\) does not need to be split any longer when the apex is in \(\nu _{j}\); see Fig. 3c. Note that, if there is no directed path between \(v_{j-1}\) and \(v_j\), then neither of the two cases occurs, and edges \((u,v_{j-1})\) and \((u,v_{j})\) (if they exist) do not need to be split; see Fig. 3d. In either case, we conclude that the difference between \(c_s(u,j-1)\) and \(c_s(u,j)\) is at most 1. Depending on which of the three cases arises, we compute \(c_b(u,j)\) as follows:

$$\begin{aligned} c_b(u,j) = c_b(u,j-1) + \delta _j(u) + {\left\{ \begin{array}{ll} 1 &{}{} \text{ if }\;\exists \;\text{ directed } \text{ path } \text{ from }\;v_j\;to\;v_{j-1}, \text{ and } \\ {} &{}{} (u,v_{j-1})\;\text{ is } \text{ an } \text{ edge } \text{ in } \;\textit{pert}(\mu ) \\ -1 &{}{} \text{ if }\;\exists \;\text{ directed } \text{ path } \text{ from }\;v_{j-1}\;to\;v_{j},\;\text{ and } \\ {} &{}{} (u,v_{j})\;\text{ is } \text{ an } \text{ edge } \text{ in } \;\textit{pert}(\mu ) \\ 0 &{}{} \text{ otherwise } \end{array}\right. } \end{aligned}$$

We remark that there is a directed path from \(v_j\) to \(v_{j-1}\) in G if and only if vertex \(v_{j-1}\) is the sink of the face shared with \(v_j\) and u in \(\textit{skel}(\mu ) \). Similarly, a directed path from \(v_{j-1}\) to \(v_{j}\) in G exists if and only if vertex \(v_{j}\) is the sink of the face shared with \(v_{j-1}\) and u in \(\textit{skel}(\mu ) \). Both properties can be checked in constant time as demonstrated in [10].

Once \(c_b(u,j)\) has been computed for all \(j = 1, \ldots , k\), we choose \(\nu _h\), with \(1 \le h \le k\), so that \(c_b(u,h)\) is minimum among all \(c_b(u,j)\) and define \(c_b(u)=c_b(u,h)\). Hence, in order to construct \(\mathcal {E}_m(\mu )\) and \(\mathcal {E}_b(\mu )\), we select the bitonic embedding \(\mathcal {E}_b(\nu _h)\) for \(\textit{pert}(\nu _h) \) and the monotonic embedding \(\mathcal {E}_m(\nu _i) \) for the pertinent graph \(\textit{pert}(\nu _i) \) for \(i \in \{1,\ldots ,h-1,h+1,\ldots ,k\}\). We further flip the embeddings \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _{h-1}) \), as in the P-node case. We inherit the labeling of the edges from the embeddings \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _{h-1}), \mathcal {E}_b(\nu _h), \mathcal {E}_m(\nu _{h+1}), \ldots , \mathcal {E}_m(\nu _k) \), except for the edges that contribute to \(c_s(u,h)\), which we label as split. We repeat the above operations for every vertex u of \(\textit{skel}(\mu )\) with \(u \ne s_\mu \).

Consider now the case \(u = s_\mu \). We distinguish two cases, based on which embedding of \(\textit{pert}(\mu )\) we are going to compute. Namely, for \(\mathcal {E}_b(\mu )\) we perform the same operations as for any other vertex of \(\textit{skel}(\mu )\), since in this embedding we can have a bitonic successor list for \(s_\mu \). This guarantees Invariants I.2 and I.3(b). In order to also guarantee Invariants I.1 and I.3(a), we have to slightly adjust our approach. In particular, we have to obtain a monotonic successor list for \(s_\mu \) in \(\mathcal {E}_m(\mu )\). To achieve this, we first choose the monotonic embeddings for \(\textit{pert}(\nu _1),\ldots ,\textit{pert}(\nu _k) \). Then, we have to choose whether \(\nu _1\) or \(\nu _k\) contains the apex of \(s_\mu \). In order to perform this choice, we have to consider the conflicts that are created due to the presence of directed paths in \(\textit{skel}(\mu )\), as in the bitonic case. Thus, we compute \(c_s(s_\mu ,1)\) and \(c_s(s_\mu ,k)\) and choose the minimum of the two. We choose the corresponding child to contain the apex of \(s_\mu \) and label edges as split such that all conflicts are resolved and inherit the labeling of the remaining edges from embeddings \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _k) \). Note that if \(\nu _k\) contains the apex of \(s_\mu \), we also have to flip all the embeddings \(\mathcal {E}_m(\nu _1),\ldots ,\mathcal {E}_m(\nu _k) \) and the resulting embedding of the entire R-node \(\mu \) so to obtain a monotonically decreasing successor list for \(s_\mu \).

We account for the monotonic and the bitonic costs of node \(\mu \) by summing up the corresponding costs of all vertices in \(V_\mu \), where \(V_\mu \) denotes the vertex set of \(\textit{skel}(\mu ) \). In particular, we can always choose the bitonic embedding for all the vertices different from \(s_\mu \). For \(s_\mu \) on the other hand, we choose the corresponding embedding. This results in costs

$$\begin{aligned} c_b(\mu ) = \sum _{u\in V_\mu }c_b(u) \end{aligned}$$

and

$$\begin{aligned} c_m(\mu ) = \sum _{\begin{array}{c} u\in V_\mu \\ u \ne s_\mu \end{array}}c_b(u)\ +\ \underbrace{\sum _{i=1}^kc_m(\nu _i)\ +\ \min \{c_s(s_\mu ,1),c_s(s_\mu ,k)\}}_{u=s_\mu } \end{aligned}$$

for \(\mathcal {E}_b(\mu ) \) and \(\mathcal {E}_m(\mu ) \), respectively. We remark that Invariant I.4 is trivially satisfied, since edge \((s_\mu , t_\mu )\) does not exist in \(\textit{pert}(\mu )\).

Node \(\mu \) is a Q-node that is the root of \(\mathcal {T}\): This case arises at the end of the traversal of \(\mathcal {T}\). Since we seek to compute a bitonic embedding for G, we only have to compute \(\mathcal {E}_b(\mu ) \) and satisfy Invariants I.2 and I.3(b) (i.e., Invariants I.1, I.3(a) and I.4 can be safely neglected). Consider the unique child \(\nu \) of \(\mu \).

We first discuss the case where \(c_b(\nu ) < c_m(\nu )\). Here, assume for a contradiction, that the apex of \(s_\mu =s_\nu \) in \(\mathcal {E}_b(\nu ) \) is incident to a face that contains both \(s_\mu \) and \(t_\mu \). Then either \(s_\nu \) has already a monotonic successor list in \(\mathcal {E}_b(\nu ) \) or \(\nu \) is a P-node and it is possible to obtain a monotonic successor list of \(s_\nu \) by only reordering and flipping the embeddings of the pertinent graphs of its children. But then \(c_b(\nu ) = c_m(\nu )\) holds, which contradicts our assumption. Hence \(s_\mu \) is not incident to a face in \(\mathcal {E}_b(\nu ) \) that contains both \(s_\mu \) and \(t_\mu \). Therefore, any possible embedding obtained from \(\mathcal {E}_b(\nu ) \) by adding the edge \((s_\mu ,t_\mu )\) violates the bitonicity of the successor list of \(s_\mu \). Thus, we label \((s_\mu ,t_\mu )\) as split, and inherit the labeling of the remaining edges from \(\mathcal {E}_b(\nu ) \).

Second, consider the case \(c_b(\nu ) = c_m(\nu )\). Here, we use the monotonic embedding \(\mathcal {E}_m(\nu ) \) and label the edges according to the labeling of \(\mathcal {E}_m(\nu ) \) while labeling \((s_\mu ,t_\mu )\) as non-split.

In both cases, edge \((s_\mu ,t_\mu )\) is embedded on the outer face of the embedding of \(\textit{pert}(\nu ) \) such that \(t_\mu \) is the leftmost successor of \(s_\mu \), which guarantees Invariant I.2. Invariant I.3(b) is satisfied by the way we treat edge \((s_\mu ,t_\mu )\) and by inheriting the labeling of the remaining edges of \(\textit{pert}(\mu ) \) from the chosen embedding of \(\textit{pert}(\nu ) \).

We are now ready to prove the main theorem of this section.

Theorem 1

Let \(G=(V,E)\) be an st-planar graph with n vertices. There exists an O(n)-time algorithm that computes an embedding and a set of edges \(E' \subseteq E\) of minimum cardinality such that the graph \(G'\) obtained from G by splitting each edge in \(E'\) once is bitonic.

Proof

The correctness of our algorithm follows from the fact that at the end of the traversal of \(\mathcal {T}\), Invariant I.2 is satisfied by the bitonic embedding \(\mathcal {E}_b(\rho ) \) of the root \(\rho \) of \(\mathcal {T}\). Further, since the labeling of the edges of \(\mathcal {E}_b(\rho ) \) satisfies Invariant I.3(b), we can set \(E'\) to be the set of edges that are labeled as split in \(\mathcal {E}_b(\rho ) \), which guarantees that \(E'\) is of minimum cardinality and that the graph \(G'\) obtained from G by splitting each edge in \(E'\) once is bitonic. Note that we can obtain an actual bitonic st-numbering for \(G'\) using the fixed-embedding algorithm [10] on the embedding of \(G'\) obtained from \(\mathcal {E}_b(\rho ) \) by splitting each edge of \(E'\).

To complete the proof of the theorem, it remains to discuss the time complexity of our algorithm. The construction of the SPQR-tree can be done in O(n) time [17]. Then, at each step of the algorithm, we consider a node \(\mu \) of \(\mathcal T\) and we perform a set of operations in time linear to the size of \(\textit{skel}(\mu ) \). This is clear for the Q-, S-, and P-node cases. In the R-node case, this follows from our analysis and the fact that the fixed-embedding algorithm [10] is linear in the size of the input embedding. Since the sum of the sizes of the skeletons over all the nodes of \(\mathcal T\) is O(n) [18], the time complexity of the algorithm follows. \(\square \)

We conclude this section with two remarks.

Remark 1

Our algorithm can be adjusted so that the resulting graph \(G'\) is monotonic. To achieve that, in the S- and R-node cases, we apply to all vertices of \(\textit{skel}(\mu ) \) the same procedure as we applied to \(s_\mu \) when computing \(\mathcal {E}_m(\mu ) \). In this way, we guarantee that the successor lists of all vertices are in fact monotonic.

Remark 2

Every series–parallel graph, oriented consistently with the series–parallel structure, is monotonic. This is because, in the absence of R-nodes, there is no need to split when computing a monotonic embedding.

4 Bounds on the Number of Splits

In this section, we provide upper and lower bounds on the number of splits that are required for making either an n-vertex st-planar graph G or its reversed graph \(\tilde{G}\) bitonic. First, recall that there is an upper bound of \(n-3\) splits [10] and a lower bound of \(\frac{3}{4}n-3\) splits [12]. In the following, we will improve the lower bound to \(n-5\) hence showing that the upper bound is tight up to a small additive constant. Second, we investigate the number of splits that are required for graphs of bounded degree motivated by the fact that our lower bound construction has maximum degree 6.

We start by describing the family \(\mathcal {G}\) of graphs for the lower bound for general graphs.

Definition 1

(Graph family \(\mathcal {G}\)) For every integer \(k \ge 1\), \(\mathcal {G}\) contains a graph \(G_k=(V_k,E_k)\) that is recursively defined as follows:

  • For \(k=1\), we set \(V_1= \{s_0, s_1, t_0, t_1, t_2\}\) and \(E_1=\{(s_0,t_0),(s_0,t_1), (s_0,t_2), (s_1,t_0), (s_1,t_1), (s_1,t_2), (s_1,s_0), (t_0,t_1),(t_1,t_2)\}\); see Fig. 4a.

  • For \(k > 1\), graph \(G_k\) constructed from \(G_{k-1}\) so that \(V_k = V_{k-1} \cup \{s_k,t_{k+1}\}\) and \(E_k = E_{k-1} \cup \{(s_k,t_{k-1}), (s_k,t_{k}), (s_k,t_{k+1}), (s_{k-1},t_{k+1}), (s_k,s_{k-1}), (t_k,t_{k+1})\}\); see Fig. 4b.

Fig. 4
figure 4

a Graph \(G_1\) in \(\mathcal {G}\). b Construction of graph \(G_k\) in \(\mathcal {G}\)

With the following lemma, we first establish some properties of the graphs in \(\mathcal {G}\). As a side note, we also mention that \(G_k\) has pathwidth 3.

Lemma 2

Each graph \(G_k\) in graph family \(\mathcal {G}\) contains the directed Hamiltonian path \(\langle s_k,s_{k-1},\ldots ,s_0,t_0,t_1,\ldots ,t_{k+1} \rangle \) and its underlying undirected graph is a triangulation with maximum degree 6.

Proof

The fact that \(G_k\) is a triangulation follows easily by construction. Moreover, vertex \(t_i\) is connected to \(t_{i+1}\), \(t_{i-1}\), \(s_{i-2}\), \(s_{i-1}\), \(s_i\), \(s_{i+1}\) (if these vertices exist), while vertex \(s_i\) is connected to \(s_{i+1}\), \(s_{i-1}\), \(t_{i-1}\), \(t_i\), \(t_{i+1}\) and \(t_{i+2}\) (again, if these vertices exist). Hence, each vertex of \(G_k\) has maximum degree 6. The existence of the Hamiltonian path can be shown inductively. Namely, \(G_1\) contains the Hamiltonian path \(\langle s_1,s_0,t_0,t_1,t_2 \rangle \) by definition. Since by induction hypothesis \(G_{k-1}\) contains the Hamiltonian path \(\langle s_{k-1},\ldots ,t_k \rangle \) and since \(G_k\) contains edges \((s_k,s_{k-1})\) and \((t_k,t_{k+1})\), it holds that \(G_k\) contains the Hamiltonian path \(\langle s_k,s_{k-1},\ldots ,t_k, t_{k+1}\rangle \). \(\square \)

We now prove a new lower bound on the number of splits required for turning either \(G_k\) or \(\tilde{G_k}\) into a bitonic st-planar graph.

Theorem 3

Let \(G_k=(V_k,E_k)\) with \(k> 1\) be a graph in graph family \(\mathcal {G}\) and let n be its number of vertices, i.e., \(n=2k+3\). For every set \(E' \subset E_k\) with \(\vert E' \vert < n-5\), neither the graph \(G_k'\) obtained from \(G_k\) by splitting each edge in \(E'\) once nor the reversed graph \(\tilde{G'_k}\) of \(G_k'\) is bitonic.

Proof

By Lemma 2, graph \(G_k\) is a triangulated Hamiltonian st-planar graph. Thus, it has a unique st-ordering and a unique embedding up to the choice of the outer face, which simply allows us to embed edge \((s_k,t_{k+1})\) as the leftmost or as the rightmost edge of vertex \(s_k\). Similar arguments apply when considering \(\tilde{G_k}\).

Fig. 5
figure 5

a, b Illustration of forbidden configurations and edges that must be split in both orientations

In the following, we describe forbidden configurations that inevitably appear in both embeddings of \(G_k\), and then count the number of edge splits that are required to eliminate them. In particular, for vertex \(s_i\) with \(1\le i \le k-1\), each of the two faces \(\langle s_i,t_{i-1},s_{i-1}\rangle \) and \(\langle s_i,t_{i},t_{i-1}\rangle \) form a forbidden configuration with each of the faces \(\langle s_i,s_{i-1},t_{i+1}\rangle \) and \(\langle s_i,t_{i+1},t_{i+2}\rangle \); see the blue and red colored faces in Fig. 5a, respectively. In order to eliminate these forbidden configurations, at least one of the two pairs of edges \((s_i,t_{i-1}), (s_i,t_i)\) and \((s_i,t_{i+1}), (s_i,t_{i+2})\) must be split; see the blue and red edges in Fig. 5a, respectively. Forbidden configurations involving \(s_k\) are avoidable by embedding \((s_k,t_{k+1})\) as the leftmost edge of \(s_k\).

We now describe the forbidden configurations that appear in both embeddings of \(\tilde{G_k}\). Namely, for vertex \(t_i\) with \(2\le i \le k-1\), each of the two faces \(\langle t_i,t_{i-1},s_{i} \rangle \) and \(\langle t_i,s_{i},s_{i+1}\rangle \) form a forbidden configuration with each of the two faces \(\langle t_i,s_{i-2},t_{i-1}\rangle \) and \(\langle t_i,s_{i-1},s_{i-2}\rangle \); see the blue and red colored faces in Fig. 5b, respectively. Hence, at least one of the two pairs of edges \((t_i,s_{i}), (t_i,s_{i+1})\) and \((t_i,s_{i-2}), (t_i,s_{i-1})\) must be split; see the blue and red edges in Fig. 5b, respectively. Note that forbidden configurations that involve vertex \(t_{k+1}\) can be avoided by embedding edge \((t_{k+1},s_k)\) as the leftmost edge of \(t_{k+1}\). Moreover, for vertex \(t_1\) (\(t_k\), resp.), face \(\langle t_1,s_0,t_0\rangle \) (\(\langle t_k, t_{k-1},s_k\rangle \), resp.) forms forbidden configurations with both faces \(\langle t_1,t_0,s_1\rangle \) and \(\langle t_1,s_1,s_2\rangle \) (\(\langle t_k,s_{k-2},t_{k-1}\rangle \) and \(\langle t_k,s_{k-1},s_{k-2}\rangle \), resp.). Hence, for each of \(t_1\) and \(t_k\) at least one more incident edge must be split (namely, splitting \((t_1,s_0)\) and \((t_k,s_k)\), respectively, eliminates these forbidden configurations).

We conclude that for both \(G_k\) and \(\tilde{G_k}\), a set of edges \(E'\) of cardinality at least \(2(k-1)=n-5\) has to be split to eliminate all the forbidden configurations discussed above. Note that in \(\tilde{G_1}\) there is already one unavoidable forbidden configuration (at vertex \(t_1\)), while this is not the case for \(G_1\). \(\square \)

4.1 Bounds for Graphs of Bounded Degree

In Theorem 3, we showed that \(n-O(1)\) is a tight upper bound for the required number of splits even for graphs with maximum degree 6 (see also Lemma 2). On the other hand, if the input graph has maximum degree 3, then no split is required [13]. In the next two theorems, we focus on graphs with maximum degree 5. For this graph class, we improve the general upper bound of \(n-3\) [10] on the number of splits to n/2. Then, we provide a corresponding lower bound of \(n/2-2\), which holds even for graphs with maximum degree 4.

Theorem 4

Let \(G=(V,E)\) be an st-planar graph with n vertices and maximum degree 5. There exists a set of edges \(E' \subseteq E\) with \(\vert E'\vert \le n/2\) such that either the graph \(G'\) obtained by splitting each edge in \(E'\) or the reversed graph \(\tilde{G'}\) of \(G'\) is bitonic. Moreover, set \(E'\) can be computed in O(n) time.

Proof

Consider any upward planar embedding of G. Consider a vertex v of G that is the source of at least one forbidden configuration. In the following, we will prove the existence of a face that belongs to all forbidden configurations with source v (after possibly redrawing edge (st)). Suppose first that v does not coincide with s, which implies that v has at most four outgoing edges. Hence, there exist at most three internal faces with v as a source, which implies that there is one that belongs to all forbidden configurations with source v. Suppose now that v coincides with s. In this case, s can be the source of four internal faces and, therefore, there might exist two forbidden configurations with source s not sharing a face. If s is the source of two such forbidden configurations and if (st) is the leftmost (rightmost) outgoing edge of s, then we redraw it as rightmost (leftmost, respectively). After this redrawing, s is necessarily the source of three forbidden configurations that share a single face f, i.e., one of the previous two forbidden configurations is resolved. Now, all remaining forbidden configurations with source s share the face f that has a transitive edge which is not (st).

In both cases, there is a face f that belongs to all forbidden configurations with source v. Therefore, by splitting the transitive edge of f, every forbidden configuration with source v is resolved. We associate this split with vertex v. Since v is the source of at least one forbidden configuration, it has at least three outgoing edges, and thus at most two incoming edges. Therefore, v cannot be the source of a forbidden configuration in \(\tilde{G}\) as well. This allows us to conclude that each vertex contributes at most one split in either G or \(\tilde{G}\).

For the time complexity, we first observe that an upward-planar embedding can be computed in linear time for st-planar graphs . Then, for each face we decide whether it contains a transitive edge or not. If this is the case, we assign the corresponding face to its source and sink. Afterwards, we iterate over all vertices and check how many faces are assigned to it (both as a source and as a sink) and perform the splits as described above. This last step can be done in constant time for each vertex as at most four faces are assigned to each vertex in the previous step. \(\square \)

Next, we prove that the upper bound given in Theorem 4 is tight by providing a corresponding lower bound. First, we present the class of graphs used in our lower bound construction. For this purpose, we define the following family of auxiliary graphs:

Definition 2

(Auxiliary graph family \(\hat{\mathcal {H}}\)) For every integer \(k \ge 1\), \(\hat{\mathcal {H}}\) contains a graph \(\hat{H}_k=(V_k,E_k)\) that is recursively defined as follows:

  • For \(k=1\), graph \(\hat{H}_1\) consists of six vertices that form a directed path \(\langle b_{1,b}, r_{1,b}, g_{1,b}, b_{1,t}, g_{1,t}, r_{1,t} \rangle \). Additionally, it contains four edges \((b_{1,b},b_{1,t})\), \((r_{1,b},b_{1,t})\), \((r_{1,b},r_{1,t})\) and \((g_{1,b},g_{1,t})\); see Fig. 6a.

  • For \(k>1\), graph \(\hat{H}_k\) contains \(\hat{H}_{k-1}\) as a subgraph and six additional vertices \(b_{k,t},g_{k,t},r_{k,t},b_{k,b}, r_{k,b},g_{k,b}\) that form two directed paths \(\langle r_{k-1,t}, b_{k,t},g_{k,t},r_{k,t} \rangle \) and \(\langle b_{k,b}, r_{k,b},g_{k,b},b_{k-1,b} \rangle \) with \(r_{k-1,t}\) and \(b_{k-1,b}\) of \(\hat{H}_{k-1}\), respectively. The recursive construction of \(\hat{H}_k\) is completed by adding the six edges \((b_{i-1,b},b_{i,t})\), \((b_{i,b},b_{i,t})\), \((g_{i,b}, g_{i-1,t})\), \((g_{i,b},g_{i,t})\), \((r_{i,b},r_{i-1,t})\) and \((r_{i,b},r_{i,t})\); see Fig. 6b.

Based on \(\hat{\mathcal {H}}\), we define the following graph family:

Definition 3

(Graph family \(\mathcal {H}\)) For every integer \(k \ge 1\), \(\mathcal {H}\) contains a graph \(H_k=(V_k,E_k)\) obtained from \(\hat{H}_k\) of \(\mathcal {\hat{H}}\) by adding the two edges \((b_{k,b},g_{k,t})\) and \((b_{k,b},r_{k,t})\) to it; see the dashed edges in Fig. 6b.

Fig. 6
figure 6

a Graphs \(\hat{H}_1\) in \(\mathcal {\hat{H}}\) and \(H_1\) in \(\mathcal {H}\). b Construction of graph \(\hat{H}_k\) in \(\mathcal {\hat{H}}\) and \(H_k\) in \(\mathcal {H}\). In both subfigures, dashed edges are part of \(H_k\) but not of \(\hat{H}_k\)

In the following, we discuss some properties of each graph \(H_k\) of \(\mathcal {H}\).

Observation 1

Let \(H_k \in \mathcal {H}\). The edges of \(H_k\) can be partitioned into the following four paths (ignoring the edge orientations):

  • \(P = \langle b_{k,b},r_{k,b},g_{k,b},\ldots ,b_{1,b},r_{1,b},g_{1,b},b_{1,t},g_{1,t},r_{1,t},\ldots , b_{k,t}, g_{k,t}, r_{k,t} \rangle \),

  • \(P_b=\langle b_{1,t},b_{1,b},b_{2,t},b_{2,b},\ldots ,b_{k,t},b_{k,b} \rangle \),

  • \(P_g=\langle g_{1,b},g_{1,t}, g_{2,b}, g_{2,t}, \ldots ,g_{k,b},g_{k,t},b_{k,b} \rangle \), and

  • \(P_r=\langle b_{1,t},r_{1,b},r_{1,t},r_{2,b},r_{2,t},\ldots ,r_{k,b}, r_{k,t},b_{k,b} \rangle .\)

Moreover, P is a directed Hamiltonian path.

Lemma 5

The underlying undirected graph of each \(H_k \in \mathcal {H}\) is triconnected and has maximum degree 4.

Proof

By Observation 1, the edges of \(H_k\) can be partitioned into the four paths P, \(P_b\), \(P_g\) and \(P_r\) (ignoring the edge orientations). Each vertex \(b_{i,j}\) of \(H_k\) is on path \(P_b\) is also connected to one vertex \(r_{k,\ell }\) via P or \(P_r\) and to one vertex \(g_{x,y}\) via P or \(P_g\) for some values of \(i,j,k,\ell ,x\) and y. Analogous properties hold for vertices \(g_{i,j}\) and \(r_{i,j}\) of \(H_k\). Thus, for each pair of vertices, there exists three disjoint paths such that each follows a distinct subpath of \(P_b\), \(P_g\) and \(P_r\) possibly except for the very first and the very last edge which may also belong to P.

For the maximum degree, observe that every vertex except for \(b_{1,t}\) and \(b_{k,b}\) belongs to exactly two of the four paths partitioning the edges of \(H_k\). Vertex \(b_{1,t}\) is an internal vertex of P and an extremal vertex of both \(P_b\) and \(P_r\). Finally, \(b_{k,b}\) is an extremal vertex in all four paths. \(\square \)

We are now ready to prove that the upper bound given in Theorem 4 is tight up to a small additive constant.

Theorem 6

Let \(H_k=(V_k,E_k)\) be a graph in graph family \(\mathcal {H}\), which has maximum degree 4, and let n be its number of vertices, i.e., \(n=6k\). For every set \(E' \subset E_k\) with \(\vert E'\vert < n/2-2\), neither the graph \(H_k'\) obtained from \(H_k\) by splitting each edge in \(E'\) once nor the reversed graph of \(H_k'\) is bitonic.

Fig. 7
figure 7

a, b Illustration of forbidden configurations and edges that must be split in both orientations

Proof

Since \(H_k\) is triconnected and Hamiltonian by Lemma 5 and Observation 1, it admits a unique upward planar embedding (see Fig. 6a, b) up to a flip and the choice of the outer face which can either be \(\langle b_{k,b},r_{k,b},r_{k,t}\rangle \) as shown in Fig. 6b or \(\langle r_{k,t},g_{k,t},b_{k,b}\rangle \) depending on whether \((b_{k,b},r_{k,t})\) is drawn on the right or on the left side, respectively. We emphasize that the forbidden configurations that we describe next occur in each of the four possible upward planar embeddings.

First consider \(H_k\). We find the following forbidden configurations:

  • For \(2 \le i \le k\), vertex \(r_{i,b}\) is source of the forbidden configuration formed by the faces \(\langle r_{i,b},r_{i,t},g_{i,t},g_{i,b}\rangle \) and \(\langle r_{i,b},g_{i,b},g_{i-1,t},r_{i-1,t}\rangle \); see Fig. 7a.

  • For \(2 \le i \le k\), vertex \(g_{i,b}\) is source of the forbidden configuration formed by the faces \(\langle g_{i,b},g_{i,t},b_{i,t},b_{i-1,b}\rangle \) and \(\langle g_{i,b},b_{i-1,b},b_{i-1,t},g_{i-1,t}\rangle \); see Fig. 7a.

  • For \(2 \le i \le k-1\), vertex \(b_{i,b}\) is source of the forbidden configuration formed by the faces \(\langle b_{i,b},b_{i+1,t},r_{i,t},r_{i,b}\rangle \) and \(\langle b_{i,b},r_{i,b},r_{i-1,t},b_{i,t}\rangle \); see Fig. 7a.

  • Vertex \(r_{1,b}\) is source of a forbidden configuration formed by faces \(\langle r_{1,b},r_{1,t},g_{1,t},g_{1,b}\rangle \) and \(\langle r_{1,b},g_{1,b},b_{1,t}\rangle \); see Fig. 6a.

  • Vertex \(b_{1,b}\) is source of a forbidden configuration formed by faces \(\langle b_{1,b},b_{2,t},r_{1,t},r_{1,b}\rangle \) and \(\langle b_{1,b},r_{1,b},b_{1,t}\rangle \); see Fig. 6a.

Thus, there are \(3k-2\) forbidden configurations in any upward planar embedding of \(H_k\) that each require at least one split to obtain a bitonic subdivision.

Next consider the reversed graph \(\tilde{H_k}\). In each of the four upward planar embeddings of graph \(\tilde{H_k}\), we find the following forbidden configurations:

  • For \(1 \le i \le k-1\), vertex \(r_{i,t}\) is source of the forbidden configuration formed by the faces \(\langle r_{i,t},g_{i,t},g_{i,b},r_{i,b}\rangle \) and \(\langle r_{i,t},r_{i+1,b},g_{i+1,b},g_{i,t}\rangle \); see Fig. 7b.

  • For \(2 \le i \le k-1\), vertex \(g_{i,t}\) is source of the forbidden configuration formed by the faces \(\langle g_{i,t},b_{i,t},b_{i-1,b},g_{i,b}\rangle \) and \(\langle g_{i,t},g_{i+1,b},b_{i,b},b_{i,t}\rangle \); see Fig. 7b.

  • For \(2 \le i \le k\), vertex \(b_{i,t}\) is source of the forbidden configuration formed by the faces \(\langle b_{i,t},r_{i-1,t},r_{i-1,b},b_{i-1,b}\rangle \) and \(\langle b_{i,t},b_{i,b},r_{i,b},r_{i-1,t}\rangle \); see Fig. 7b.

  • Vertex \(g_{1,t}\) is source of a forbidden configuration formed by faces \(\langle g_{1,t},b_{1,t},g_{1,b}\rangle \) and \(\langle g_{1,t},g_{2,b},b_{1,b},b_{1,t}\rangle \); see Fig. 6a.

  • Vertex \(g_{k,t}\) is source of a forbidden configuration formed by faces \(\langle g_{k,t},b_{k,t},b_{k-1,b},g_{k,b}\rangle \) and \(\langle g_{k,t},b_{k,b},b_{k,t}\rangle \); see Fig. 6b.

We conclude that there are also \(3k-2\) forbidden configurations in any upward planar embedding of \(\tilde{H_k}\) that each require at least one split to obtain a bitonic subdivision. Since \(H_k\) has 6k vertices, \(3k-2=n/2-2\) and the statement of the theorem follows. \(\square \)

5 Relationship to Upward Planarity

For an n-vertex st-planar graph that can be made bitonic by splitting a subset \(E'\) of its edges, Gronemann suggested an approach in [10] to construct an upward planar polyline drawing of it in \(O(n^2)\) area, where each edge of \(E'\) has one bend while the remaining edges are drawn as straight lines. This approach has been used to prove that every n-vertex st-planar graph admits an upward planar drawing in \(O(n^2)\) area with at most one bend per edge and at most \(n-3\) bends in total [10], and that every n-vertex st-planar graph of maximum degree 3 can be drawn upward planar without any bends in \(O(n^2)\) area [13]. A notable consequence of Theorem 4 is that the bound on the total number of bends can be reduced from \(n-3\) to n/2 for n-vertex st-planar graphs of maximum degree 5.

Theorems 3 and 6, on the other hand, show the limitations of this approach. In particular, when constructing upward planar drawings with the approach by Gronemann [10], \(n-5\) bends may be required for graphs of maximum degree 6 (by Theorem 3), and \(n/2-2\) bends may be required for graphs of maximum degree 4 (by Theorem 6). Note that these limitations are tailored to the adopted approach. As a matter of fact, Gronemann [7] further observed that there exist st-planar graphs which require a linear number of splits to become bitonic, and at the same time admit bend-less upward planar drawings in even linear area.

In this section, we investigate whether these limitations are caused by the specific drawing technique or are already imposed by the nature of the upward planarity problem. To this end, we study lower bounds on the total number of bends in upward planar drawings under the polynomial-area requirement, independently of the required number of splits and of the allowed number of bends per edge. Interestingly, our findings imply that the upper bounds on the number of bends obtained by the approach by Gronemann are worst-case almost tight, even if more than one bend per edge is allowed.

Central in our lower bound studies is the following structure, the so-called coil; for an illustration refer to Fig. 8a:

Definition 4

(\(\textbf{k}\)-coil) A k-coil \(\xi =\langle v_0,v_1,\ldots ,v_k \rangle \) with \(k \ge 2\) in an upward planar embedding of an st-planar graph G is an embedded subgraph of G so that

  1. [(i)

    ] either \((v_i,v_{i-1}), (v_i,v_{i+1}) \in E(\xi )\), i.e., \(v_i\) is source in \(\xi \), or \((v_{i-1},v_i), (v_{i+1},v_i) \in E(\xi )\), i.e., \(v_i\) is sink in \(\xi \), for \(1\le i \le k-1\),

  2. (ii)

    there is a directed st-path \(P_\xi \) in G that passes through all vertices of \(\xi \) so that \(v_i\) follows \(v_{i+2}\) along \(P_\xi \) if \(v_i\) is sink in \(\xi \) or precedes \(v_{i+2}\) along \(P_\xi \) if \(v_i\) is source in \(\xi \), and,

  3. (iii)

    for \(1 \le i \le k-1\), the edges \(\{v_i,v_{i-1}\},\{v_i,n^*_i\},\{v_i,v_{i+1}\}\) appear in this order either consistently clockwise or consistently counter-clockwise around \(v_i\) where \(n^*_i\) is the predecessor of \(v_i\) on \(P_\xi \) if \(v_i\) is source in \(\xi \) or the succesor of \(v_i\) on \(P_\xi \) if \(v_i\) is sink in \(\xi \).

Note that by Property (i) of Definition 4 it follows that if \(v_i\) is sink in \(\xi \), then \(v_{i+1}\) is source in \(\xi \), and vice-versa. We also remark that a similar concept has already been used for area lower bounds in [19] and [20]. In particular, Frati [20] proved that a k-coil requires \(\Omega (2^k)\) area in any upward planar straight-line drawing. In the following, we generalize this result by showing that superpolynomial area is required for a coil unless roughly half of its edges have at least one bend each.

Fig. 8
figure 8

a A 6-coil \(\langle v_0,\ldots ,v_6 \rangle \). b The region \(R(\xi _i)\)

Lemma 7

Let G be an st-planar graph with a fixed upward planar embedding containing a k-coil \(\xi =\langle v_0,v_1,\ldots ,v_k \rangle \). In any polyline upward planar drawing of G, \(\xi \) is drawn in \(\omega (\text { poly}(k))=\omega (2^{\log (k)})\) area unless \(k/2-O(\log (k))\) edges of \(\xi \) have at least one bend.

Proof

Assume for a contradiction that G admits an upward st-planar drawing \(\Gamma \) in which the k-coil \(\xi \) is drawn in \(O(\text { poly}(k))\) area such that \(k/2-\omega (\log (k))\) edges of \(\xi \) are bent.

Consider a 2-coil \(\xi _i=\langle v_{i-1},v_i,v_{i+1} \rangle \) that is part of \(\xi \). We say that \(\xi _i\) is a V-shape if and only if \(v_i\) is a source of \(\xi \). Similarly, we say that \(\xi _i\) is a \(\Lambda \)-shape if and only if \(v_i\) is a sink of \(\xi \). By definition of k-coil, the number of 2-coils in \(\xi \) is \(k-1\); more precisely, \(\xi _1,\ldots ,\xi _{k-1}\) are the 2-coils in \(\xi \), where \(\xi _i\) is a V-shape if and only if \(\xi _{i+1}\) is a \(\Lambda \)-shape. Furthermore, we say that \(\xi _i\) is eliminated in \(\Gamma \) if either edge \((v_i,v_{i-1})\) or edge \((v_i,v_{i+1})\) is bent in \(\Gamma \). Conversely, we say that a bend b on one of these two edges eliminates \(\xi _i\). We call a V-shape \(\xi _i\) valid if and only if \(\xi _i\) is not eliminated and the next non-eliminated 2-coil \(\xi _j\) along \(\xi \) with \(j >i\) is a \(\Lambda \)-shape. Similarly, we call a \(\Lambda \)-shape \(\xi _i\) valid if and only if it is not eliminated and the next non-eliminated 2-coil \(\xi _j\) along \(\xi \) with \(j >i\) is a V-shape.

Let \(\xi '=\langle v_j,v_{j+1},\ldots ,v_{j+k'} \rangle \) be a \(k'\)-subcoil of \(\xi \), so that all \(k'\) edges of \(\xi '\) are bent in \(\Gamma \). Then, the bends along \(\xi '\) eliminate all 2-coils \(\xi _j,\ldots , \xi _{j+k'}\) of \(\xi '\), which are in total \(k'+1\). In addition, if \(k'\) is even, \(\xi _{j-1}\) and \(\xi _{j+k'+1}\) are either both V-shapes or both \(\Lambda \)-shapes. Thus, the bends along \(\xi '\) make \(k'+1\) of the 2-coils in \(\xi \) not valid, if \(k'\) is odd, or \(k'+2\) of the 2-coils in \(\xi \), if \(k'\) is even. In either case, the bends along \(\xi '\) make at most \(2k'\) of the 2-coils in \(\xi \) not valid, namely if \(k'\in \{1,2\}\). Recall now that in \(\Gamma \) only \(k/2-\omega (\log (k))\) edges of \(\xi \) are bent. Hence, by the previous analysis, at most \(k-2\omega (\log (k))\) 2-coils in \(\xi \) are not valid. As \(\xi \) contains \(k-1\) 2-coils, we conclude that \(\xi \) contains \(c=\omega (\log (k))\) valid 2-coils \(\xi ^*_1, \ldots , \xi ^*_{c}\) so that if \(\xi ^*_i = \xi _j\) and \(\xi ^*_{i+1}=\xi _{j'}\) it holds that \(j < j'\), for \(1 \le i < c\). In particular, if \(\xi ^*_i\) is a \(\Lambda \)-shape, then \(\xi ^*_{i+1}\) is a V-shape and vice versa.

We first observe, that all of \(v_{i+2},\ldots , v_k\) are located in the bounded region \(R(\xi _i)\) delimited by edge \(\{v_i,v_{i+1}\}\), the horizontal \(h_{i+1}\) through \(v_{i+1}\) and the part of edge \(\{v_i,v_{i-1}\}\) between \(v_i\) and the crossing with \(h_{i+1}\); see Fig. 8b (in this and the following figures \(\{v_i,v_{i-1}\},\{v_i,n^*_i\},\{v_i,v_{i+1}\}\) appear in this order clockwise around \(v_i\); the counter-clockwise case is symmetric). We now show, that the region \(R(\xi ^*_i)\) has at least four times as much area as \(R(\xi ^*_{i+1})\) for all \(1 \le i < c\). We assume w.l.o.g. that \(\xi _i^*=\langle \beta _1,\beta _2,\beta _3 \rangle \) is a V-shape while \(\xi _{i-1}^*=\langle \lambda _1,\lambda _2,\lambda _3 \rangle \) is a \(\Lambda \)-shape. Further, we assume w.l.o.g. that \(\beta _2\) and \(\lambda _2\) have the same x-coordinate, otherwise this property may be obtained by shearing the drawing horizontally. Note that Euclidean area is invariant under shear mapping [21][Thm.9-2].

Fig. 9
figure 9

Illustration for the proof of Lemma 7

Consider the following:

  • horizontals and \(y_3\) through vertices \(\lambda _2\) and \(\lambda _3\), resp.,

  • rays \(r_1\) and \(r_3\) from \(\lambda _2\) through \(\lambda _1\) and \(\lambda _3\), resp.,

  • point \(\lambda _1'\) on the intersection of \(y_3\) and \(r_1\),

  • verticals \(x_1\), \(x_2\) and \(x_3\) through \(\lambda _1'\), \(\lambda _2\) and \(\lambda _3\), resp.,

  • the line through \(\lambda _3\) which is parallel to edge \((\beta _2,\beta _1)\), and,

  • the line \(p_3\) through \(\lambda _1'\) which is parallel to edge \((\beta _2,\beta _3)\).

We consider the following three cases:

Case 1: Both \(r_1\) and \(r_3\) cross \((\beta _2,\beta _1)\). For an illustration refer to Fig. 9a. The area of \(R(\xi ^*_{i+1})\) is at most half the area of the axis-aligned rectangle R spanned by edge \((\lambda _3,\lambda _2)\). Moreover, contains the right triangle T bounded by , \(x_2\) and . Since R is an inscribed rectangle of T, R has at most half the area of T. Thus, we conclude that the area of is at least four times as large as the area of \(R(\xi ^*_{i+1})\).

Case 2: Both \(r_1\) and \(r_3\) cross \((\beta _2,\beta _3)\). This case is symmetric to Case 1; here R is spanned by the segment \((\lambda _2,\lambda _1')\).

Case 3: \(r_1\) crosses \((\beta _2,\beta _1)\) and \(r_3\) crosses \((\beta _2,\beta _3)\). For an illustration refer to Fig. 9b. The area of \(R(\xi ^*_{i+1})\) is at most half the area of the axis-aligned rectangle R bounded by \(x_1\), \(x_3\), and \(y_3\). Moreover, contains the triangle T bounded by , and \(p_3\). Since R is an inscribed rectangle of T, R has at most half the area of T. Thus, we conclude that the area of is at least four times as large as the area of \(R(\xi ^*_{i+1})\).

Recall that by assumption, \(k/2-\omega (\log (k))\) edges of \(\xi \) are bent. As we have proven, there is the sequence \(\xi ^*_1, \ldots , \xi ^*_{c}\) of 2-coils with \(c=\omega (\log (k))\) as claimed above. Finally, we showed that the area of \(R(\xi _i)\) is at least four times as large as the area of \(R(\xi ^*_{i+1})\) for \(1 \le i < c\).

We now conclude that \(R(\xi ^*_1)\) has at least \(4^{c-2}\cdot \Omega (1)=4^{\omega (\log (k))}\) area, which is superpolynomial in k assuming that \(R(\xi ^*_{c-1})\) has area \(\Omega (1)\). This leads to a contradiction.

Hence, it remains to show that \(R(\xi ^*_{c-1})\) has area \(\Omega (1)\). Assume w.l.o.g. that \(\lambda _1,\lambda _2,\lambda _3\) are the vertices of \(\xi ^*_{c}\) and that \(\beta _1,\beta _2,\beta _3\) are the vertices of \(\xi ^*_{c-1}\); as shown in Fig. 9. Observe that \(R(\xi ^*_{c-1})\) contains a triangle T bounded by \(\beta _2\), \(\beta _3\), and \(\lambda _2\). By Pick’s theorem [22, 23], T, and hence also \(R(\xi ^*_{c-1})\), has area at least 1/2. This concludes the proof. \(\square \)

We now shift our attention back to the two graph families introduced in Sect. 4. As we shall see in the next two theorems, members of these graph families contain coils which require many bends in any polynomial area upward planar drawing. More precisely, the induced number of required bends almost matches the upper bound obtained via splitting technique for obtaining a bitonic subdivision:

Theorem 8

Let \(G_k \in \mathcal {G}\) and let n be its number of vertices. Graph \(G_k\) does not admit an upward planar drawing with \(n-o(\log (n))\) bends within polynomial area.

Proof

Recall the definition of the graph family \(\mathcal {G}\) described in Definition 1. In particular, we may assume \(G_k \in \mathcal {G}\) to be upward planar embedded as it is a triangulated graph with a Hamiltonian directed path. Observe that in \(G_k\)

  • the path \(\xi _h=\langle s_k,t_k,s_{k-1},t_{k-1},\ldots ,s_1,t_1,s_0\rangle \) is a \((2k-1)\)-coil, and

  • \(\xi _1=\langle s_k,t_{k-1},s_{k-3},t_{k-4},s_{k-6},\ldots \rangle \), \(\xi _2=\langle s_{k-1},t_{k-2},s_{k-4},t_{k-5},s_{k-7},\ldots \rangle \) and \(\xi _3=\langle s_{k-2},t_{k-3},s_{k-5},t_{k-6},s_{k-8},\ldots \rangle \) are three \((2k/3-O(1))\)-coils.

By Lemma 7, every polynomial area upward drawing \(\Gamma \) of \(G_k\) has at least \(\frac{2k}{2}-o(\log (2k))=k-o(\log (k))\) bent edges along \(\xi _h\) and at least \(\frac{2k/3}{2}-o(\log (2k/3))=\frac{k}{3}-o(\log (k))\) bent edges along each of \(\xi _1\), \(\xi _2\) and \(\xi _3\). Since \(\xi _h\), \(\xi _1\), \(\xi _2\) and \(\xi _3\) are pairwise edge-disjoint, \(\Gamma \) has at least \(2k-o(\log (k)) = n-o(\log (n))\) bent edges in total. \(\square \)

Theorem 9

For infinitely many values of \(n \in \mathbb {N}\), there exists an n-vertex st-planar graph with maximum degree 4 that does not admit any upward planar drawing with \(\frac{n}{2}-{o}(\log (n))\) bends within polynomial area.

Proof

Consider the graph \(H_k\) from the proof of Theorem 6. Observe that the paths \(P_r\), \(P_b\) and \(P_g\) are disjoint \((2k+1)\)-, \((2k-1)\), and 2k-coils, resp. By Lemma 7, every polynomial area upward drawing \(\Gamma \) of \(H_k\) has at least \(\frac{2k}{2}-o(\log (2k))=k-o(\log (k))\) bent edges along each of \(P_r\), \(P_b\) and \(P_g\). Thus, \(\Gamma \) has at least \(3k-o(\log (k)) = \frac{n}{2}-o(\log (n))\) bent edges in total. \(\square \)

Note that Theorem 9 improves upon the result of Di Battista et al. [19] in two ways: First, we show that the superpolynomial area is still required if we allow an almost linear number of bends. Second, our area lower bound construction has maximum degree 4 which closes the gap towards the maximum degree 3 graphs, which are known to always admit a straight-line upward drawing in polynomial area.

This result also strengthens the observation on the relationship between the number of splits in bitonic st-orderings and the number of bends in polynomial-area upward planar drawings. Consequently, we may now ask whether graphs that require a certain number of splits in any bitonic st-ordering also require a certain number of bends in a polynomial-area upward planar drawing. In the following theorem, we answer this question negatively even for graphs of maximum degree 4.

Theorem 10

There exist infinitely many n-vertex st-planar graphs \(G=(V,E)\) with maximum degree 4 so that

  1. (i)

    for every set \(E' \subset E\) with \(\vert E'\vert < n/4- 5/2\), neither the graph \(G'\) obtained from G by splitting each edge in \(E'\) once nor the reversed graph of \(G'\) is bitonic and

  2. (ii)

    there is a straight-line upward planar drawing of G within quadratic area.

Fig. 10
figure 10

Illustration for the proof of Theorem 10

Proof

Our construction for the n-vertex (such that \(n\equiv 2 (\bmod \ 4)\)) st-planar graph G consists of source s and sink t and subgraphs \(G_1\) and \(G_2\) with sources \(s_1\) and \(s_2\), respectively, and sinks \(t_1\) and \(t_2\), respectively, which are st-planar except for lacking the st-edge; refer also Fig. 10. We first describe \(G_1\).

Let \(k=n/4-3/2\). Then, \(G_1\) contains the three directed paths

  • \(\langle s_1=v_1,v_2,\ldots ,v_k \rangle \),

  • \(\langle v_k,\ell _{(k-1)/2},\ldots ,\ell _2, \ell _1 \rangle \) and

  • \(\langle v_k,r_{(k-1)/2},\ldots ,r_2, r_1 \rangle \).

In addition, there is a vertex \(t_1\) and the following edges:

  • \((\ell _1,t_1)\),

  • \((r_1,t_1)\),

  • \((v_i,\ell _{\lceil i/2 \rceil })\) for \(i \in \{1,\ldots ,k-1\}\) and

  • \((v_i,\ell _{\lceil i/2 \rceil })\) for \(i \in \{1,\ldots ,k-1\}\).

Now, we observe that vertex \(v_i\) for \(i \in \{1,\ldots ,k-1\}\) is source of a forbidden configuration, namely,

  • if i is odd, consisting of face \((v_i,\ell _{(i+1)/2},v_{i+1})\) with transitive edge \((v_i,\ell _{(i+1)/2})\) and face \((v_i,r_{(i+1)/2},v_{i+1})\) with transitive edge \((v_i,r_{(i+1)/2})\), or,

  • if i is even, consisting of face \((v_i,\ell _{i/2},\ell _{i/2+1},v_{i+1})\) with transitive edge \((v_i,\ell _{i/2})\) and face \((v_i,r_{i/2},r_{i/2+1},v_{i+1})\) with transitive edge \((v_i,r_{i/2})\).

Hence, \(G_1\) requires at least \(k-1=n/4-5/2\) splits in G. In addition, \(G_1\) admits an upward planar drawing in quadratic area (as shown in Fig. 10), where

  • \(v_i\) is located at (0, i) for \(i \in \{1,\ldots ,k\}\),

  • \(\ell _i\) is located at \((-(k+1)/2+i,k+i)\) for \(i \in \{1,\ldots ,(k-1)/2\}\),

  • \(r_i\) is located at \(((k+1)/2-i,k+i)\) for \(i \in \{1,\ldots ,(k-1)/2\}\) and

  • \(t_1\) is located at \((0,3k/2+1/2)\).

Now the construction of G is completed as follows. \(G_2\) is isomorphic to \(\tilde{G_1}\). Further, vertices s and t are incident to edges (st), \((s,s_1)\), \((s,s_2)\), \((t_1,t)\) and \((t_2,t)\).

Since \(G_2\) is isomorphic to \(\tilde{G_1}\), it requires at least \(k-1=n/4-5/2\) splits in \(\tilde{G}\) and admits an upward planar drawing isomorphic to the one described above for \(G_1\). We can combine the described drawings of \(G_1\) and \(G_2\) to a drawing of G as follows:

  • \(G_1\) is drawn as described above,

  • vertex s is placed at \(((k+1)/2,0)\), and,

  • the drawing of \(G_2\) is isomorphic (rotated by \(\pi /2)\) to the drawing of \(G_1\) and vertex \(s_2\) of \(G_2\) (which is isomorphic to \(t_1\)) is located at \((k+1,1)\).

With the above construction, we obtain a drawing in area \({O}(k) \times {O}(k)=\mathcal {O}(n^2)\). In addition, we have already seen that \(G_1\) requires at least \(n/4 - 5/2\) splits in G, while \(G_2\) requires at least \(n/4 - 5/2\) splits in \(\tilde{G}\). This concludes the proof. \(\square \)

Fig. 11
figure 11

Illustration of a slight modification of a lower bound construction in [12]

Similarly to the previous theorem, the graph shown in Fig. 11 that is inspired by a lower bound construction of Rettner [12] requires only linear area for an upward planar drawing but n/2 splits in each orientation. Thus, we conclude that the number of bends required in a polynomial area upward planar drawing is not an upper bound for the number of splits in a bitonic st-ordering while the reverse relation holds.

6 Conclusions and Open Problems

In this work, we proposed a linear-time algorithm to minimize the number of splits over all embeddings to make a given st-planar graph bitonic. We then provided bounds on the number of required splits that are tight up to an additive constant in the worst case. Finally, we studied the relationship between the required number of such splits and the number of bends in polynomial-area upward planar drawings.

We conclude with some open problems raised by our work.

  1. (i)

    An experimental evaluation of our algorithm would allow to estimate the required number of splits in practice. In addition, our investigation of the relationship to upward planar drawings in Sect. 5 suggests that an actual implementation of our algorithm would be a viable tool in practical applications.

  2. (ii)

    In view of Remark 2 and Theorem 4, it is worth investigating other meaningful subclasses of st-planar graphs that admit improved upper bounds on the required number of splits; note that our lower bound examples in Theorems 3 and 6 already impose strong restrictions. Namely, they are Hamiltonian have pathwidth 3 and 4, respectively, and the latter construction has maximum degree 4.

  3. (iii)

    Another possible direction would be to study whether some of the results for st-planar graphs translate to general upward planar graphs. Note that the definition of bitonic st-orderings is based on st-planar graphs, hence, it would have to be extended to support general upward planar graphs. Recall that a directed acyclic graph is upward planar if and only if it can be augmented to an st-planar graph [24].