1 Introduction

Let G be a graph embedded in the plane. An ortho-polygon visibility representation of G (OPVR of G) is an embedding preserving drawing that maps every vertex of G to a distinct orthogonal polygon and every edge of G to a vertical or horizontal visibility between its end-vertices (it is assumed the \(\epsilon \)-visibility model, where the visibilities can be replaced by strips of non-zero width, see also [8]). The vertex complexity of an OPVR of G is the minimum k such that every polygon has at most k reflex corners. For example, Fig. 1(b) shows an OPVR \(\varGamma \) of the graph G of Fig. 1(a). All vertices of Fig. 1(b) are rectangles except vertex u, and thus the vertex complexity of \(\varGamma \) is one.

The notion of ortho-polygon visibility representation generalizes the classical concept of rectangle visibility representation, that is, in fact, an OPVR with vertex complexity zero (see, e.g., [2, 6, 14, 18, 19]). In this context, Biedl et al. [2] characterize the 1-plane graphs that admit a rectangle visibility representation in terms of forbidden subgraphs, called B-, T-, and W-configurations (see Fig. 2 for examples and Sect. 2 for definitions). We recall that 1-plane graphs are graphs embedded in the plane such that every edge is crossed by at most one other edge, and that the 1-planar graphs are those graphs that admit such an embedding; these graphs are a classical subject of investigation in the constantly growing research field called graph drawing beyond-planarity (refer to [1, 9, 15]).

Partly motivated by the result of Biedl et al. [2], Di Giacomo et al. [8] study the vertex complexity of ortho-polygon visibility representations of 1-plane graphs. They prove that an OPVR of a 1-plane graph may require \(\varOmega (n)\) vertex complexity. However, if the graph is 3-connected, then vertex complexity twelve is always sufficient, while vertex complexity two is sometimes necessary.

The idea behind the approach of Di Giacomo et al. [8] to prove a constant upper bound can be shortly described as follows. Let G be a 3-connected 1-plane graph. For each crossing in G, one of the two edges that form the crossing is suitably chosen and removed from G. The removed edges are such that each vertex of G is incident to at most six of them. After this edge removal, the obtained graph is planar, and hence it admits a bar-visibility representation \(\varGamma \) (vertices are represented as horizontal bars and edges as vertical visibilities) [7]. An OPVR of G is now computed by turning the bars of \(\varGamma \) into orthogonal polygons and by inserting horizontal visibilities for the (at most six per vertex) removed edges. The paper shows how to compute a transformation of the bars that adds at most two reflex corners per removed edge, which implies a vertex complexity of at most twelve. Reducing the gap between the upper bound of twelve and the lower bound of two is left as an open problem in [8], and it is the question that motivates our research. We prove the following theorem.

Fig. 1.
figure 1

(a) A 1-plane graph G; (b) An OPVR of G with vertex complexity one.

Theorem 1

Let G be a 3-connected 1-plane graph with n vertices. There exists an \(\tilde{O}(n^\frac{10}{7})\)-time algorithm that computes an ortho-polygon visibility representation of G with vertex complexity at most five on an integer grid of size \(O(n) \times O(n)\). Also, there exists an infinite family of 3-connected 1-plane graphs such that any ortho-polygon visibility representation of a graph in the family has vertex complexity at least four.

Concerning the upper bound stated in Theorem 1, the main difference between our approach and the one in [8] is that we do not aim at removing all crossings so to make G planar. Instead, we define a subset F of the B-, T-, and W-configurations of G such that F has two fundamental properties: (i) Removing the elements of F removes all B-, T-, and W-configurations from G; and (ii) Each vertex of G can be associated with at most five elements of F. We remove F from G and compute a rectangle visibility representation by using the algorithm of Biedl et al. [2]. We then carefully reinsert the removed configurations by “bending” each rectangle with at most five reflex corners. We remark that the study of the combinatorial properties of the B-, T-, and W-configurations in 3-connected 1-plane graphs is a contribution of independent interest that fits in the rich literature about the properties of 1-plane graphs (see, e.g. [15]).

Finally, we recall that some authors recently studied OPVRs with fixed vertex complexity. Evans et al. [11] consider OPVRs of directed acyclic graphs where vertices are L-shapes (i.e., with vertex complexity one). OPVRs with L-shapes are also studied in [16], where it is shown that a particular subclass of 1-planar graphs admits such a representation. Brandenburg [4] studies OPVRs where vertices are T-shapes (i.e., with vertex complexity two) and proves that all 1-planar graphs admit such a representation if the embedding of the input graph can be changed, and hence the final representation may be not 1-planar.

The rest of the paper is organized as follows. Preliminaries are in Sect. 2. The lower bound and the upper bound on the vertex complexity are proved in Sect. 3 and in Sect. 4, respectively. Section 5 contains open problems. For space reasons some proofs have been omitted or sketched, and can be found in [17] (the corresponding statements are marked with [*]).

Fig. 2.
figure 2

(a) B-configuration; (b) W-configuration; (c) T-configuration.

2 Preliminaries

We assume familiarity with basic graph drawing terminology (see, e.g. [7]). Let G be a 1-plane graph, let (uv) be a crossed edge of G, and let p be the crossing along (uv). We call edge fragments the two parts of (uv) from u to p and from p to v, and we denote them by (up) and (pv) respectively. Three edges (uv), (wz), (uz) of G form a B-configuration with poles uz, denoted by b(uz), if (i) (uv) and (wz) cross at a point p, and (ii) vertices vz lie inside the external boundary of b(uz), i.e., the closed region delimited by the edge fragment (up), the edge fragment (pz), and the edge (uz); see Fig. 2(a). Four edges (uv), (wz), (ux), (yz) of G form a W-configuration with poles uz, denoted by w(uz), if (i) (uv) and (wz) cross at a point p, (ii) (ux), (yz) cross at a point q, (iii) vertices vwxy lie inside the external boundary of w(uz), i.e., the closed region delimited by the edge fragments (up), (pz), (zq), and (qu); see Fig. 2(b). Finally, six edges (uv), (wz), (uy), \((x,w')\), \((z,y')\), and \((v',x)\) of G form a T-configuration with poles uxz, denoted by t(uxz), if (i) (uv) and (wz) cross at a point p, (ii) (uy), \((x,w')\) cross at a point q, (iii) \((z,y')\) and \((v',x)\) cross at a point r, (iv) vertices \(v,v',w,w',y,y'\) lie inside the external boundary of t(uxz), i.e., the closed region delimited by edge fragments (up), (pz), (uq), (qx), (xr), and (rz); see Fig. 2(c). For example, the graph G of Fig. 1(a) contains the T-configuration t(uvw) and hence any OPVR of G has at least one reflex corner. A 1-plane graph has a rectangle visibility representation (RVR) if and only if it contains no B-, no T-, and no W-configurations [2].

3 Lower Bound on the Vertex Complexity

Let S(i) be the nested triangle graph with i levels, i.e., a maximal plane graph with 3i vertices recursively defined as follows [10]. Graph S(1) is a triangle. Denote by \(u_1\), \(u_2\), and \(u_3\) the vertices on the outer face of \(S(i-1)\). Graph S(i) is obtained by adding three vertices \(v_1\), \(v_2\), \(v_3\) on the outer face of \(S(i-1)\) and edges \((u_1,v_1)\), \((u_2,v_2)\), \((u_3,v_3)\), \((u_1,v_2)\), \((u_2,v_3)\), and \((u_3,v_1)\). Also, we mark as T-faces a set of faces of S(i) such that: (1) S(i) has \(3i-2\) T-faces, and (2) no two T-faces share an edge. All other faces of S(i) are marked as NT-faces. Figure 3(a) shows an assignment for S(3) that satisfies these two conditions (the T-faces are gray, while the NT-faces are white). Graph G(3i) is the 3-connected 1-plane graph with 3i poles obtained from S(i) as follows. For each T-face of S(i), whose boundary contains the three vertices uxz, we add in its interior a T-configuration t(uxz) and three B-configurations b(ux), b(uz) and b(xz) as shown in Fig. 3(b). The resulting graph is 1-plane and it has 3i poles. In particular, we have one B-configuration for each of the \(3(3i)-6\) edges of S(i), and we have \(3i-2\) T-configurations. However, this graph is not 3-connected. To achieve 3-connectivity, for each NT-face of S(i), whose boundary contains the three vertices uvw, we first add a vertex c in its interior and we then connect it to one vertex that is not a pole for each of b(uv), b(uw), and b(vw); the added edges are crossed exactly once each by an edge on the boundary of the NT-face, as shown in Fig. 3(c). Finally, we add crossing-free edges until all faces are triangles. One can easily verify that the resulting graph is 3-connected.

Fig. 3.
figure 3

(a) The graph S(3); the T-faces are gray while the NT-faces are white. (b) Insertion of a T-configuration and three B-configurations in a T-face. (c) Insertion of a vertex in an NT-face to achieve 3-connectivity.

Theorem 2

For every \(n_p > 8\) with \(n_p \pmod 3=0\), there exists a 3-connected 1-plane graph \(G(n_p)\) whose OPVRs all have vertex complexity at least four.

Proof

Consider the graph \(G(n_p)\) described above, with \(n_p>8\). Let \(\varGamma \) be any OPVR of G. We first prove that, for each forbidden configuration f of \(G(n_p)\), \(\varGamma \) contains at least one reflex corner on one of the poles of f and that this reflex corner lies inside the interior region of f, i.e., inside the bounded region of \(\varGamma \) delimited by the external boundary of f. We follow an argument similar to the one in [2]. Suppose first that f is a B-configuration b(uz). Consider a closed walk in clockwise direction along the external boundary of b(uz) in \(\varGamma \). The crossing point is a left turn, as well as any attaching point of a visibility to a polygon, while the corners of the polygons are right turns. Since the external boundary is an orthogonal polygon, the number of right turns equals the number of left turns plus four. Let a be the number of attaching points of a visibility to a polygon, let k be the number of crossings, and let r be the number of corners. We have that \(r=k+a+4\). Since \(k=1\) and \(a \ge 4\), we have that \(r \ge 9\), which implies that at least one of the two polygons representing u and z, say u, has at least five corners. As a consequence, there exists at least one reflex corner along the polygon of u that lies inside the interior region of b(uz). Similarly, for a T-configuration t(uxz), we have that \(k=3\) and \(a \ge 6\), which implies that \(r \ge 13\), and thus at least one of its poles has a reflex inside the interior region of t(uxz). Since \(G(n_p)\) contains \(4n_p-8\) forbidden configurations, and since any pair of forbidden configurations of \(G(n_p)\) is such that the intersection of their two interior regions is empty, it follows that \(\varGamma \) contains at least \(4n_p-8\) distinct reflex corners distributed among its \(n_p\) poles. Let c be the maximum number of reflex corners on a polygon of \(G(n_p)\), it follows that \(c\, n_p \ge 4n_p-8\), which implies \(c \ge 4-8/n_p>3\) because \(n_p>8\). \(\square \)

4 Upper Bound on the Vertex Complexity

In this section, we first show the existence of an assignment between the set of forbidden configurations in G and their poles such that each pole is assigned at most five forbidden configurations (Sect. 4.1). Then we make use of this assignment and of a suitable modification of the algorithm in [2] to obtain an OPVR of G with vertex complexity at most ten (Sect. 4.2). Finally, we apply a post-processing step to reduce the vertex complexity to five (Sect. 4.3).

4.1 Forbidden Configurations in 3-Connected 1-Plane Graphs

Two forbidden configurations of a 3-connected 1-plane graph G are called independent if they share no crossing (although they may share poles), while they are called dependent otherwise. The next lemma proves some basic properties of the independent forbidden configurations in G.

Lemma 1

\({[{\varvec{*}}]}\) Let G be a 3-connected 1-plane graph and let \(G' \subseteq G\). The following properties hold. P1: There are no three independent forbidden configurations of \(G'\) that share a pair of poles. P2: If \(G'\) contains a W-configuration w(uz), all vertices of \(G'\), except u and z, are inside w(uz). P3: If \(G'\) contains a W-configuration w(uz), no other forbidden configuration of \(G'\) that is independent of w(uz) has uz as poles. P4: There are no two B-configurations of \(G'\) sharing their two poles. The only exception is when two B-configurations form a W-configuration. P5: Two T-configurations of \(G'\) that are dependent share exactly one pair of crossing edges.

Fig. 4.
figure 4

A non-redundant set contains only b(ux).

Intuitively, two dependent forbidden configurations may be drawn by inserting only one reflex corner on a common pole. By following this intuition, our goal is to find a set of forbidden configurations that “cover” all others and such that they can be drawn by introducing only a small number of reflex corners per vertex. To formalize this idea, we give the following definition. A set F of forbidden configurations of G is non-redundant if it contains: (1) all B-configurations of G; (2) all T-configurations of G independent of B-configurations; (3) zero, one, or two copies of the W-configuration in G (there is at most one by P2), if the W-configuration exists and has two, one, or zero, respectively, dependent B-configurations. For example, in the graph of Fig. 4, t(uxz) and b(ux) are dependent, and thus \(b(u,x) \in F\) while .

A T-configuration t of G is separating if G contains a pole v that is not a pole of t and that lies in the interior region of t (i.e., inside the bounded region delimited by the external boundary of t). Let \(\beta \), \(\tau \), and \(\omega \) be the number of B-/T-/W-configurations in F, respectively. Note that, if G is (a subgraph of) a 3-connected 1-plane graph, F contains at most one W-configuration by P2, i.e., \(\omega \le 1\). It follows that, if F contains zero or one copy of the (at most one) W-configuration of G, we have \(|F|=\beta +\tau +\omega \), else \(|F|=\beta +\tau +\omega +1\).

Lemma 2

Let G be (a subgraph of) a 3-connected 1-plane graph, let F be a set of non-redundant forbidden configurations of G, and let P be the set of its poles. If G has no separating T-configurations, then \(|F| \le 4|P|-8\) if \(\omega =0\) and \(|F| \le 4|P|-7\) otherwise. Also, if \(\omega =0\), then \(|F| = 4|P|-8\) if and only if \(\beta =3|P|-6\) and \(\tau = |P|-2\).

Proof

By Lemma 1, properties P1P5 hold for G. We define an auxiliary graph \(G_A\) whose edges represent the crossings of the forbidden configurations in F. More precisely, let f be a forbidden configuration. For each crossing k of f there exist two poles of f, denoted by \(u_k\) and \(z_k\), such that the edge fragments \((u_k,k)\) and \((k,z_k)\) belong to the external boundary of f. Let \(G_A\) be the graph with \(n_A=|P|\) vertices and \(m_A\) edges obtained from G as follows; see, e.g., Fig. 5. Remove first all edges of G and then all vertices of G that are not poles of any forbidden configuration. For each forbidden configuration f of F and for each crossing k of f, draw an edge \((u_k,z_k)\) on the external boundary of f by following the two edge fragments \((u_k,k)\) and \((k,z_k)\). Note that \(G_A\) is plane and may have parallel edges. By P1, each pair of adjacent vertices of \(G_A\) is connected by at most two parallel edges, that is, \(m_A \le 2(3n_A-6)=6n_A-12\). Also, \(G_A\) contains an edge for each B-configuration, two edges for the W-configuration (if it exists), and three edges for each T-configuration in F. A B-configuration does not share an edge with a T-configuration by construction of F, also, two B-configurations do not share an edge by P4, and finally, no two T-configurations share an edge as otherwise one of them would be a separating T-configuration (they would be two dependent T-configurations such that one has a pole inside the interior region of the other). On the other hand, a W-configuration can share an edge with a B- or with a T-configuration. Let \(0 \le s \le 2\) be the number of edges of \(G_A\) that a W-configuration shares with other configurations. From the argument above, it follows that \(m_A = \beta + 3\tau + 2\omega - s \le 6n_A-12\).

Fig. 5.
figure 5

Illustration for the proof of Lemma 2: Construction of the auxiliary graph \(G_A\) from G. The vertices of G that are not poles are smaller, and the edges of G that are not part of forbidden configurations are thinner. The edges of \(G_A\) are drawn by following the remaining (bold) pairs of crossing edges of G.

If \(\omega =0\) (and hence \(s=0\)), then \(|F|=\beta +\tau \) and \(m_A= \beta +3\tau \le 6n_A-12\). Also, \(\beta \le 3n_A-6\) by P4. For a fixed value of \(n_A\) (note that \(n_A\ge 2\) if \(|F|>0\)), consider the function \(f(\beta ,\tau )=\beta +\tau \) in the domain defined by the two inequalities \(\beta \,+\,3\tau \le 6n_A-12\) and \(\beta \le 3n_A-6\). By studying the function \(f(\beta ,\tau )\), it is easy to verify that its maximum value in the above domain is \(4n_A-8\), and that this value is obtained if and only if \(\beta =3n_A-6\) and \(\tau =n_A-2\). If \(\omega =1\) then either \(|F|=\beta +\tau +1\) and \(\beta =3n_A-6\), or \(|F|=\beta +\tau +2\) and \(\beta \le 3n_A-7\). In both cases \(|F|\le 4n_A-7\). \(\square \)

Theorem 3

Let G be a 3-connected 1-plane graph and let F be a set of non-redundant forbidden configurations of G. For each configuration \(f \in F\), it is possible to assign f to one of its poles such that every pole is assigned at most five elements of F.

Proof

Let \(H=(F \cup P, E \subseteq F \times P)\) be the bipartite graph with vertex set \(F \cup P\) (where P is the set of poles of G), and having an edge (fu) with \(f \in F\) and \(u \in P\) if u is a pole of f. A k-matching from F into P is a set \(M \subseteq E\) such that each vertex in F is incident to exactly one edge in M and each vertex in P is incident to at most k edges in M. For a subset \(F' \subseteq F\), we denote by \(N(F')\) the set of all vertices in P that are adjacent to a vertex in \(F'\). We prove the existence of a 5-matching of F into P by using Hall’s theorem [13], i.e., we show that \(\forall F' \subseteq F: |F'| \le 5 |N(F')|\).

Let \(G'\) be any subgraph of G that contains all and only the forbidden configurations in \(F'\). By Lemma 1, \(G'\) of G satisfies P1P5. The proof is by induction on the number h of separating T-configurations of \(G'\). Let \(G'_A\) be the auxiliary graph of \(G'\) constructed as in the proof of Lemma 2. In the base case \(h=0\), we have that \(|F'| \le 4|N(F')|-7\) by Lemma 2. Suppose now that the claim holds for \(h-1>0\). Let t(uxz) be a separating T-configuration of \(G'\) such that it does not contain any other separating T-configuration in its interior. Let \(G'_{IN}\) be any subgraph of \(G'\) containing t(uxz) and all and only the forbidden configurations of \(F'\) that are inside t(uxz), that is, its auxiliary graph \(G'_{A,IN}\) is the subgraph of \(G'_A\) having the three edges of t(uxz) as outer face. Note that \(G'_A\) may contain some of the possible B-configurations b(ux), b(uz), and b(xz), but their corresponding edges of \(G'_A\) are not part of \(G'_{A,IN}\). We denote by \(F'_{IN}\) the set of forbidden configurations of \(F'\) in \(G'_{IN}\). Let \(G'_{OUT}\) be any subgraph of \(G'\) containing all and only the forbidden configurations of \(F'\) except those in \(F'_{IN}\), but including t(uxz). We denote by \(F'_{OUT}\) the set of forbidden configurations of \(F'\) in \(G'_{OUT}\). Since \(G'_{OUT}\) contains \(h-1\) separating T-configurations, by induction we have that \(|F'_{OUT}| \le 5|N(F'_{OUT})|\). On the other hand, \(G'_{IN}\) does not contain separating T-configurations and it is a subgraph of G, thus \(|F'_{IN}| \le 4|N(F'_{IN})|-7\) by Lemma 2. In particular, \(G'_{IN}\) does not contain any W-configuration, since G can have at most one and it must be part of its outer face. Hence, \(|F'_{IN}| \le 4|N(F'_{IN})|-8\), and in particular \(|F'_{IN}| = 4|N(F'_{IN})|-8\) if and only if its number of B-configurations is such that \(\beta _{IN}=3|F'_{IN}|-6\) (Lemma 2). However, the (at most) three B-configurations b(ux), b(uz), and b(xz) are not part of \(G'_{IN}\) by construction, and therefore \(|F'_{IN}| \le 4|N(F'_{IN})|-11\). Since \(|N(F'_{IN})|+|N(F'_{OUT})|=|N(F')|+3\) (we have to consider the three vertices uxz that are poles in both graphs), and since \(|F'_{IN}|+|F'_{OUT}| \ge |F'|\), it follows that \(|F'| \le |F'_{IN}|+|F'_{OUT}| \le 4|N(F'_{IN})|-11 + 5|N(F'_{OUT})|\), and thus \(|F'| \le 5 |N(F')|+4-|N(F'_{IN})|\), which implies that \(|F'| \le 5|N(F')|\) when \(|N(F'_{IN})| \ge 4\). Since t(uxz) is a separating T-configuration, \(G'_{IN}\) contains at least one pole more than uxz, thus \(|N(F'_{IN})| \ge 4\). \(\square \)

4.2 Proving Vertex Complexity at Most 10

We briefly recall an algorithm by Biedl et al. [2], called 1P-RVDrawer, which takes as input a 1-plane graph with no forbidden configurations and that returns an RVR of this graph. First, the planarization \(G_p\) of G is computed. The plane graph \(G_p\) is then triangulated in such a way that the degree of dummy vertices remains four, i.e., avoiding the addition of edges incident to dummy vertices. The resulting graph \(G_t\) does not contain any planarized forbidden configuration (i.e., any subgraph such that by replacing dummy vertices with crossings we obtain a forbidden configuration). Moreover, if G is 3-connected, \(G_t\) does not contain parallel edges (and hence is 3-connected as well). As next step, 1P-RVDrawer decomposes \(G_t\) into its 4-connected components, it computes an RVR for each 4-connected component, and finally it patches the drawings by suitably identifying the outer face of each component with the corresponding inner face of its parent component. The algorithm guarantees that each dummy vertex is represented by a rectangle having one visibility on each of its four sides. This property allows to replace that rectangle with a crossing. Also, we observe that for each 4-connected component \(\mathcal C\) of \(G_t\), 1P-RVDrawer chooses one edge e on the outer face of \(\mathcal C\) called the surround edge of \(\mathcal C\). This edge is chosen so to satisfy the following two conditions: (1) The inner face of \(\mathcal C\) containing e on its boundary consists of the two end-vertices of e plus a third vertex which is not dummy; (2) If the surround edge of the parent component \(\mathcal C'\) of \(\mathcal C\) (if \(\mathcal C'\) exists) is an edge \(e'\) of the outer face of \(\mathcal C\), then \(e=e'\). The feasibility of this choice is guaranteed by the absence of planarized forbidden configurations in \(G_t\). The resulting RVR is such that all edges of \(\mathcal C\) incident to an end-vertex of e are represented by horizontal visibilities.

Lemma 3

\({[{\varvec{*}}]}\) Every 3-connected 1-plane graph admits an OPVR with vertex complexity at most ten.

Fig. 6.
figure 6

Illustration for Lemma 3: (a) Inserting a subdivision vertex (orange) to remove a forbidden configuration; (b–d) The separating triangles (bold) facing the subdivision vertices in (b) T-, (c) W-, and (d) B-configurations. (Color figure online)

Sketch of Proof

Let \(G^*\) be a 3-connected 1-plane graph. Let P be the set of poles of \(G^*\), and let F be a set of non-redundant forbidden configurations of \(G^*\). By Theorem 3, there exists a 5-matching of F into P. Let f be a forbidden configuration of F, and let u be the pole of P matched with f. Let (uv) and (wz) be two crossing edges of f such that z is another pole of f, and denote by k their crossing. Note that this pair of edges is unique if f is a B-configuration, while if f is a T-configuration there are two such pairs. Also, if f is a W-configuration, by construction of F we have that each of its two crossings is matched with one of its two poles. We subdivide the edge fragment (ku) with a subdivision vertex s and we add the uncrossed edges (zs) and (sw); see Fig. 6(a) for an illustration. It is easy to verify that this operation removes f from \(G^*\) and it does not introduce any new forbidden configuration. Let G be the 1-plane graph obtained by introducing a subdivision vertex for each forbidden configuration of F; one can show that G does not contain any forbidden configuration and is 3-connected; hence, it admits an RVR \(\gamma \). In particular, it is possible to compute \(\gamma \) such that every subdivision vertex introduced when going from \(G^*\) to G is incident to a face containing a surround edge of \(G_t\). Recall that \(G_t\) is a triangulated plane graph and that dummy vertices have degree four (see the description of 1P-RVDrawer above and [2] for details), which implies that every dummy vertex is inside a 4-cycle of uncrossed edges (called kite in [2]). In particular, it can be shown that every forbidden configuration f whose matched pole is denoted by u, whose subdivision vertex is denoted by s (which is incident to u), and whose other pole adjacent to s is denoted by z, is such that there exists a separating triangle \(\varDelta _f\) in \(G_t\) having u and z as two of its vertices (for ease of description, we view the outer face of \(G_t\) as a separating triangle) and such that (uz) can be chosen as surround edge.

Fig. 7.
figure 7

Illustration for Lemma 3: Replacing a subdivision vertex, denoted by s in (a), with a spoke, which is represented in (b) with a dashed fill.

We finally turn \(\gamma \) into an OPVR \(\varGamma \) of \(G^*\) with vertex complexity at most ten. Let u be a pole of \(G^*\) and let r(u) be the rectangle representing it in \(\gamma \). Observe that, since u has at most five matched forbidden configurations, u is adjacent to at most five subdivision vertices of G. On the other hand, in order to turn \(\gamma \) into the desired OPVR, we need to replace all u’s visibilities towards subdivision vertices with visibilities towards the other endpoints of the subdivided edges. To this aim, we attach on a side of r(u) a rectangle so that r(u) becomes an orthogonal polygon with two reflex corners for each attached rectangle. Let s be a subdivision vertex adjacent to u and let (uv) be the edge subdivided by s. Also, let (wz) be the edge that crosses (uv). From the argument above, (uz) is a surround edge and all visibilities incident to u and z are horizontal. We can remove r(s) from \(\gamma \), and attach to r(u) a spoke, i.e., a rectangle around the visibility (us) (see the shaded blue region in Fig. 7(a)) so that the visibility between r(s) and r(v) is now attached to this spoke, as shown in Fig. 7(b). By repeating this procedure for all poles and for all their subdivision vertices, we obtain the desired OPVR \(\varGamma \) of G. In particular, since each pole u is adjacent to at most five subdivision vertices in \(G^*\), we attached to r(u) at most five spokes, hence we created at most ten reflex corners along the boundary of r(u). \(\square \)

4.3 Reducing the Vertex Complexity to 5

An OPVR can be interpreted as a planar orthogonal drawing whose vertices are the corners of the polygons, the crossing points, and the attaching points between visibilities and polygons, and whose edges are (pieces of) sides of the polygons and (pieces of) visibilities. We now recall a well-known method used to modify an orthogonal drawing in order to move a desired set of vertices and edges while keeping stationary all other elements of the drawing. This can be achieved with zig-zag-bend-elimination-slide curves  [3]. Any such a curve D contains: (1) a horizontal segment \(s_h\) that intersects neither edges nor vertices of the drawing; (2) an “upward” vertical half-line \(h_l\) that originates at the leftmost endpoint of \(s_h\) and whose points are above it; and (3) a “downward” vertical half-line \(h_r\) that originates at the rightmost endpoint of \(s_h\) and whose points are below it. The two half-lines can intersect edges and vertices of the drawing. The region to the right of D is the set of all points that are in the y-range of \(h_l\) and strictly to the right or on \(h_l\), and all points in the y-range of \(h_r\) and strictly to the right of \(h_r\). If such a curve D exists, we can move all points in the region to the right of D by any given \(\delta >0\) and leave stationary all other points [3].

Theorem 4

Every 3-connected 1-plane graph with n vertices admits an OPVR with vertex complexity at most five. Also, such OPVR can be computed in \(\tilde{O}(n^\frac{10}{7})\) time on an integer grid of size \(O(n) \times O(n)\).

Proof

Fig. 8.
figure 8

Illustration for Theorem 4: Removing reflex corners through zig-zag-bend-elimination curves. The spoke g is bold and its free side is red. (Color figure online)

Proof. Let G be a 3-connected 1-plane graph with n vertices. Let \(\varGamma \) be an OPVR of G with vertex complexity at most 10, which exists by Lemma 3. We show how to reduce the number of reflex corners around a vertex by using the above defined zig-zag-bend-elimination-slide curves. Let p(u) be a polygon representing a vertex u of G in \(\varGamma \). Note that p(u) is either a rectangle, or a polygon obtained by attaching spokes (rectangles) on the sides of an initial rectangle r(u) in the intermediate RVR (see the proof sketch of Lemma 3). Moreover, each spoke g of p(u) has only one visibility attached to it on a side, while the opposite side of g does not have any visibility, and we say it is free. Suppose that p(u) contains \(0 < k \le 5\) spokes and hence 2k reflex corners. We apply k zig-zag-bend-elimination-slide curves in order to remove k reflex corners. Since the application of a zig-zag-bend-elimination-slide curve on a spoke may alter the shape of another spoke, in what follows a spoke g is more generally defined as a chain of segments in p(u) such that g contains exactly one reflex corner followed by two inflex corners and by one more reflex corner. The free side of g is hence a segment of g that is between a reflex and an inflex corner and that does not contain any visibility on it. Consider any spoke g of p(u). Without loss of generality, we can assume that the free side s of g is horizontal and is the topmost side of g (up to a mirroring/rotation of the drawing). Let \([x_1,x_2]\) be the x-range of g, and let \(\varepsilon >0\) be a value smaller than the smallest distance between any two points on the boundary of two distinct polygons of \(\varGamma \). Let \(\alpha \) be the first angle encountered when walking along p(u) counter-clockwise, starting from the leftmost point of s. Consider the zig-zag-bend-elimination curve D constructed by using a horizontal segment above s by \(\varepsilon \) and with x-range \([x_1+\varepsilon ,x_2+\varepsilon ]\), as shown in Fig. 8(a). We move all points in the region to the right of D by \(\delta =|x_2-x_1|\). After this operation, there is no polygon above s (other than p(u)), as shown in Fig. 8(b). Hence, we can modify p(u) as shown in Figs. 8(c)–(d) if \(\alpha \) is an inflex corner, or as shown in Figs. 8(e)–(f) if \(\alpha \) is a reflex corner. In both cases, after this operation, p(u) contains exactly one less reflex corner and one less spoke.

By repeating this argument for all vertices of \(\varGamma \), we obtain an OPVR \(\varGamma '\) of G with at most five reflex corners per polygon. It remains to show how to compute an OPVR of G with vertex complexity at most five in time \(\tilde{O}(n^\frac{10}{7})\) time and on an integer grid of size \(O(n) \times O(n)\). Di Giacomo et al. described an algorithm that computes an OPVR of G with minimum vertex complexity (which is at most five as shown above) in time \(O(n^\frac{7}{4}\sqrt{\log n})\) and on an integer grid of \(O(n) \times O(n)\) (Theorem 5 in [8]). This algorithm requires the computation of a feasible flow in a flow network with O(n) nodes and edges. For such a flow network, Di Giacomo et al. used the min-cost flow algorithm of Garg and Tamassia [12], whose time complexity is \(O(\chi ^{\frac{3}{4}}n\sqrt{\log {n}})\), where \(\chi \) is the cost of the flow, which is O(n). Instead, we can use a recent result by Cohen et al. [5] as follows. We first replace all arcs of the flow network with capacity \(k>1\) with k arcs having unit capacity (note that \(k \in O(1)\)). Then the unit-capacity min-cost flow problem can be solved on the resulting flow network in \(\tilde{O}(n^\frac{10}{7} \log W)\) time, where W is the maximum cost of an arc, which is O(1). Thus, we can compute an OPVR in \(\tilde{O}(n^\frac{10}{7})\) time on an integer grid of size \(O(n) \times O(n)\), as desired. \(\square \)

Theorem 4, together with Theorem 2, proves Theorem 1.

5 Open Problems

We conclude by mentioning three open problems that are naturally suggested by the research in this paper. (i) Close the gap between the lower bound and the upper bound stated in Theorem 1. (ii) Can the time complexity of Theorem 1 be improved? (iii) An immediate consequence of Theorem 3 is that a 3-connected 1-plane graph G with |P| poles has a set of non-redundant forbidden configurations whose size is at most 5|P|. Is this upper bound tight?