Abstract
An ortho-polygon visibility representation of an n-vertex embedded graph G (OPVR of G) is an embedding-preserving drawing of G that maps every vertex to a distinct orthogonal polygon and each edge to a vertical or horizontal visibility between its end-vertices. The vertex complexity of an OPVR of G is the minimum k such that every polygon has at most k reflex corners. We present polynomial time algorithms that test whether G has an OPVR and, if so, compute one of minimum vertex complexity. We argue that the existence and the vertex complexity of an OPVR of G are related to its number of crossings per edge and to its connectivity. More precisely, we prove that if G has at most one crossing per edge (i.e., G is a 1-plane graph), an OPVR of G always exists while this may not be the case if two crossings per edge are allowed. Also, if G is a 3-connected 1-plane graph, we can compute an OPVR of G whose vertex complexity is bounded by a constant in O(n) time. However, if G is a 2-connected 1-plane graph, the vertex complexity of any OPVR of G may be \(\varOmega (n)\). In contrast, we describe a family of 2-connected 1-plane graphs for which an embedding that guarantees constant vertex complexity can be computed in O(n) time. Finally, we present the results of an experimental study on the vertex complexity of ortho-polygon visibility representations of 1-plane graphs.
Similar content being viewed by others
Notes
Note that we cannot use the faster min-cost flow algorithm in [9] because \(N''\) may not be planar (due to the gadgets introduced in order to transform \(N'\) into \(N''\)).
By Invariants I1 and I2, u has only horizontal visibilities and v has only vertical visibilities, and hence we can translate u horizontally and v vertically and then scale \(\gamma _{\nu _i}\) so to fit it in a prescribed region of the plane.
References
Ackerman, E.: A note on 1-planar graphs. Discret. Appl. Math. 175, 104–108 (2014)
Alam, M.J., Brandenburg, F.J., Kobourov, S.G.: Straight-line grid drawings of 3-connected 1-planar graphs. In: Wismath, S.K., Wolff, A. (eds.) GD 2013, volume 8242 of LNCS, pp. 83–94. Springer, Berlin (2013)
Alam, M.J., Kobourov, S.G., Mondal, D.: Orthogonal layout with optimal face complexity. In: Freivalds, R.M., Engels, G., Catania, B. (eds.) SOFSEM 2016, volume 9587 of LNCS, pp. 121–133. Springer, Berlin (2016)
Bannister, M.J., Cabello, S., Eppstein, D.: Parameterized complexity of 1-planarity. In: Dehne, F., Solis-Oba, R., Sack, J. (eds.) WADS 2013, volume 8037 of LNCS, pp. 97–108. Springer, Berlin (2013)
Bertolazzi, P., Di Battista, G., Didimo, W.: Computing orthogonal drawings with the minimum number of bends. IEEE Trans. Comput. 49(8), 826–840 (2000)
Biedl, T.C., Liotta, G., Montecchiani, F.: On visibility representations of non-planar graphs. In: Fekete, S.P., Lubiw, A. (eds.) SoCG 2016, volume 51 of LIPIcs, pp. 19:1–19:16. Schloss Dagstuhl—Leibniz-Zentrum fuer Informatik (2016)
Brandenburg, F.J.: 1-Visibility representations of 1-planar graphs. J. Graph Algorithms Appl. 18(3), 421–438 (2014)
Cabello, S., Mohar, B.: Adding one edge to planar graphs makes crossing number and 1-planarity hard. SIAM J. Comput. 42(5), 1803–1829 (2013)
Cornelsen, S., Karrenbauer, A.: Accelerated bend minimization. J. Graph Algorithms Appl. 16(3), 635–650 (2012)
Czap, J., Hudák, D.: On drawings and decompositions of 1-planar graphs. Electron. J. Comb. 20(2), P54 (2013)
Dean, A.M., Hutchinson, J.P.: Rectangle-visibility representations of bipartite graphs. Discret. Appl. Math. 75(1), 9–25 (1997)
Di Battista, G., Didimo, W.: GDToolkit. In: Tamassia, R. (ed.) Handbook of Graph Drawing and Visualization, pp. 571–597. CRC Press, Boca Raton (2013)
Di Battista, G., Eades, P., Tamassia, R., Tollis, I.G.: Graph Drawing. Prentice-Hall, Englewood Cliffs (1999)
Di Battista, G., Tamassia, R.: On-line planarity testing. SIAM J. Comput. 25(5), 956–997 (1996)
Didimo, W., Liotta, G., Mehrabi, S., Montecchiani, F.: 1-Bend RAC drawings of 1-planar graphs. In: Hu, Y., Nöllenburg, M. (eds.) GD 2016, volume 9801 of LNCS, pp. 335–343. Springer, Berlin (2016)
Duchet, P., Hamidoune, Y., Vergnas, M.L., Meyniel, H.: Representing a planar graph by vertical lines joining different levels. Discret. Math. 46(3), 319–321 (1983)
Eades, P., Hong, S., Katoh, N., Liotta, G., Schweitzer, P., Suzuki, Y.: A linear time algorithm for testing maximal 1-planarity of graphs with a rotation system. Theor. Comput. Sci. 513, 65–76 (2013)
Eades, P., Liotta, G.: Right angle crossing graphs and 1-planarity. Discret. Appl. Math. 161(7–8), 961–969 (2013)
Evans, W.S., Kaufmann, M., Lenhart, W., Mchedlidze, T., Wismath, S.K.: Bar 1-visibility graphs vs. other nearly planar graphs. J. Graph Algorithms Appl. 18(5), 721–739 (2014)
Evans, W.S., Liotta, G., Montecchiani, F.: Simultaneous visibility representations of plane \(st\)-graphs using L-shapes. Theor. Comput. Sci. 645, 100–111 (2016)
Garg, A., Tamassia, R.: A new minimum cost flow algorithm with applications to graph drawing. In: North, S.C. (ed.) GD ’96, volume 1190 of LNCS, pp. 201–216. Springer, Berlin (1996)
Haeupler, B., Tarjan, R.E.: Finding a feasible flow in a strongly connected network. Oper. Res. Lett. 36(4), 397–398 (2008)
Hutchinson, J.P., Shermer, T.C., Vince, A.: On representations of some thickness-two graphs. Comput. Geom. 13(3), 161–171 (1999)
Kant, G., Bodlaender, H.L.: Triangulating planar graphs while minimizing the maximum degree. In: Nurmi, O., Ukkonen, E. (eds.) SWAT 1992, volume 621 of LNCS, pp. 258–271. Springer, Berlin (1992)
Kant, G., Liotta, G., Tamassia, R., Tollis, I.G.: Area requirement of visibility representations of trees. Inf. Process. Lett. 62(2), 81–88 (1997)
Kobourov, S.G., Liotta, G., Montecchiani, F.: An annotated bibliography on 1-planarity. CoRR arXiv:1703.02261 (2017)
Korzhik, V.P., Mohar, B.: Minimal obstructions for 1-immersions and hardness of 1-planarity testing. J. Graph Theory 72(1), 30–71 (2013)
Lenhart, W.J., Liotta, G., Montecchiani, F.: On partitioning the edges of 1-plane graphs. Theor. Comput. Sci. 662, 59–65 (2017)
Liotta, G., Montecchiani, F.: L-visibility drawings of IC-planar graphs. Inf. Process. Lett. 116(3), 217–222 (2016)
Otten, R.H.J.M., Van Wijk, J.G.: Graph representations in interactive layout design. In: IEEE ISCSS, pp. 914–918. IEEE (1978)
Rosenstiehl, P., Tarjan, R.E.: Rectilinear planar layouts and bipolar orientations of planar graphs. Discret. Comput. Geom. 1, 343–353 (1986)
Schnyder, W.: Embedding planar graphs on the grid. In: Johnson, D.S. (ed.) SODA 1990, pp. 138–148. SIAM (1990)
Shermer, T.C.: On rectangle visibility graphs. III. External visibility and complexity. In: Fiala, F., Kranakis, E., Sack, J. (eds.) CCCG 1996, pp. 234–239. Carleton University Press, Kingston (1996)
Streinu, I., Whitesides, S.: Rectangle visibility graphs: characterization, construction, and compaction. In: Alt, H., Habib, M. (eds.) STACS 2003, volume 2607 of LNCS, pp. 26–37. Springer, Berlin (2003)
Suzuki, Y.: Re-embeddings of maximum 1-planar graphs. SIAM J. Discret. Math. 24(4), 1527–1540 (2010)
Tamassia, R.: On embedding a graph in the grid with the minimum number of bends. SIAM J. Comp. 16(3), 421–444 (1987)
Tamassia, R., Tollis, I.G.: A unified approach to visibility representations of planar graphs. Discret. Comput. Geom. 1(1), 321–341 (1986)
Thomassen, C.: Plane representations of graphs. In: Progress in Graph Theory, pp. 43–69. AP (1984)
Thomassen, C.: Rectilinear drawings of graphs. J. Graph Theory 12(3), 335–341 (1988)
Wismath, S.K.: Characterizing bar line-of-sight graphs. In: O’Rourke, J. (ed.) SoCG 1985, pp. 147–152. ACM (1985)
Acknowledgements
We thank the anonymous referees of this paper for their valuable suggestions.
Author information
Authors and Affiliations
Corresponding author
Additional information
Research of EDG, WD, GL and FM supported in part by the MIUR project AMANDA, prot. 2012C4E3KT_001. NSERC funding is gratefully acknowledged for WE and SW. An extended abstract of this paper has been presented at the 24th International Symposium on Graph Drawing & Network Visualization.
Appendices
Appendix A: Orthogonal Representations and Network Flow Model
In this section, we recall basic definitions and main results related to the problem of computing orthogonal representations exploiting the network flow model by Tamassia. We refer the reader to [13, 21] for further details.
Let G be a plane graph (possibly with multiple edges and self-loops) whose maximum vertex degree is four. Let \(e=(u,v)\) be an edge of G. The two possible orientations (u, v) and (v, u) of e are called darts. A dart is said to be counterclockwise with respect to face f if f is on the left hand side when walking along the dart according to its orientation. Denote by D(u) the set of darts exiting from u and by D(f) the set of counterclockwise darts with respect to f.
An orthogonal representation of G is an assignment to each dart (u, v) of two values \(\alpha (u,v) \in \{1,2,3,4\}\) and \(\beta (u,v) \in \mathbb {N}\) that satisfies the following conditions.
- C1. :
-
\(1 \le \alpha (u,v) \le 4\);
- C2. :
-
\(\beta (u,v) \ge 0\);
- C3. :
-
\(\sum _{(u,v) \in D(u)}\alpha (u,v)=4\);
- C4. :
-
For each internal face f: \(\sum _{(u,v) \in D(f)}(\alpha (u,v)+\beta (v,u)-\beta (u,v))=2\deg (f)-4\);
- C5. :
-
For the outer face \(f_{ext}\): \(\sum _{(u,v) \in D(f_{ext})}(\alpha (u,v)+\beta (v,u)-\beta (u,v))=2\deg (f)+4\).
The value \(\alpha (u,v)\cdot \frac{\pi }{2}\) is the angle that dart (u, v) forms with the dart following it in the circular counterclockwise order around u, while the value \(\beta (u,v)\) is the number of bends of \(\frac{\pi }{2}\) along the dart (u, v). Condition C1 expresses the fact that the sum of angles around each vertex is \(2\pi \), while C2 (respectively C3) expresses the fact that the sum of the angles at the vertices and bends of an internal face (respectively outer) is equal to \(\pi (p-2)\) (respectively \(\pi (p+2)\)), where p is the number of such angles.
An orthogonal representation of G with the minimum number of bends can be computed by means of a flow network N. In the flow network N, each unit of flow corresponds to a \(\frac{\pi }{2}\) angle, each vertex supplies 4 units of flow, and each face consumes an amount of flow proportional to its degree. Bends along edges correspond to unit of flows transferred across adjacent faces, and each bend has a unit cost in the network. The flow network N is constructed as follows. The nodes of network N are the vertices and faces of G. Each vertex-node v supplies \(\sigma (v)=4\) units of flow, and each face-node f consumes \(\tau (f)\) units of flow, where
By Euler’s formula, \(\sum _v \sigma (v) = \sum _f \tau (f)\), i.e., the total supply is equal to the total consumption.
For each dart (u, v) of G, with faces f and g on its left and right, respectively, N has two arcs:
-
an arc (u, f) with lower bound \(\lambda (v,f)=1\), capacity \(\mu (v,f)=4\), and cost \(\chi (v,f)=0\);
-
an arc (f, g) with lower bound \(\lambda (v,f)=0\), capacity \(\mu (v,f)=+\infty \), and cost \(\chi (v,f)=1\);
The conservation of flow at the vertices expresses the fact that the sum of the angles around a vertex is equal to \(2 \pi \). The conservation of flow at the faces expresses the fact that the sum of the angles at the vertices and bends of an internal face is equal to \(\pi (p-2)\), where p is the number of such angles. For the outer face, the above sum is equal to \(\pi (p+2)\).
It can be shown that every feasible flow \(\phi \) in network N corresponds to an admissible orthogonal representation for graph G, whose number of bends is equal to the cost of flow \(\phi \). Namely, let \(\varPhi \) be a flow of N with cost b. Then, for each dart (u, v) whose associated arcs of N are (u, f) and (f, g), we set \(\alpha (u,v)=\varPhi (u,f)\) and \(\beta (u,v) = \varPhi (f,g)\). On the other hand, by just setting \(\varPhi (u,f)=\alpha (u,v)\) and \(\varPhi (f,g)=\beta (u,v)\), an orthogonal representation H with at most b bends is transformed into a feasible flow \(\varPhi \) of N with cost b. Hence, the following theorem summarizes the above discussion.
Theorem 9
(see e.g. [13]) Let G be a plane graph with n vertices and maximum vertex degree four. An orthogonal representation H of G with the minimum number of bends can be computed in O(T(n)) time, where T(n) is the time for computing a min-cost flow of the flow network N associated with G.
Appendix B: The SPQR-Tree Decomposition
The following definitions and observations are useful for the proof of Theorem 8.
Let G be a 2-connected graph. A separation pair is a pair of vertices whose removal disconnects G. A split pair is either a separation pair or a pair of adjacent vertices. A split component of a split pair \(\{u,v\}\) is either an edge (u, v) or a maximal subgraph \(G_{uv} \subset G\) such that \(\{u,v\}\) is not a split pair of \(G_{uv}\). Vertices \(\{u,v\}\) are the poles of \(G_{uv}\). The SPQR-tree T of G with respect to an edge e is a rooted tree that describes a recursive decomposition of G induced by its split pairs [14]. In what follows, we call nodes the vertices of T, to distinguish them from the vertices of G. The nodes of T are of four types S,P,Q, or R. Each node \(\mu \) of T has an associated 2-connected multigraph called the skeleton of \(\mu \) and denoted by \(sk(\mu )\). At each step, given the current split component \(G^*\), its split pair \(\{s,t\}\), and a node \(\nu \) in T, the node \(\mu \) of the tree corresponding to \(G^*\) is introduced and attached to its parent vertex \(\nu \), while the decomposition possibly recurs on some split component of \(G^*\). At the beginning of the decomposition the parent of \(\mu \) is a Q-node corresponding to \(e=(u,v), G^* = G \setminus e\), and \(\{s,t\} = \{u,v\}\).
Base case: \(G^*\) consists of a single edge between s and t. Then, \(\mu \) is a Q-node whose skeleton is \(G^*\) itself plus the reference edge between s and t.
Parallel case: The split pair \(\{s,t\}\) has \(G_1,\ldots ,G_k\) (\(k \ge 2\)) split components. Then, \(\mu \) is a P-node whose skeleton is a set of \(k+1\) parallel edges between s and t, one for each split component \(G_i\) plus the reference edge between s and t. The decomposition recurs on \(G_1,\ldots ,G_k\) with \(\mu \) as parent node.
Series case: \(G^*\) is not 2-connected and it has at least one cut vertex (a vertex whose removal disconnects \(G^*\)). Then, \(\mu \) is an S-node whose skeleton is defined as follows. Let \(v_1,\ldots ,v_{k-1}\), where \(k \ge 2\), be the cut vertices of \(G^*\). The skeleton of \(\mu \) is a path \(e_1,\ldots ,e_k\), where \(e_i= (v_{i-1},v_i), v_0=s\) and \(v_k=t\), plus the reference edge between s and t which makes the path a cycle. The decomposition recurs on the split components corresponding to each \(e_1,\ldots ,e_k\) with \(\mu \) as parent node.
Rigid case: None of the other cases is applicable. A split pair \(\{s',t'\}\) is maximal with respect to \(\{s,t\}\), if for every other split pair \(\{s^*,t^*\}\), there is a split component that includes the vertices \(s',t',s,t\). Let \(\{s_1,t_1\},\ldots ,\{s_k,t_k\}\) be the maximal split pairs of \(G^*\) with respect to \(\{s,t\}\) (\(k \ge 1\)), and, for \(i=1,\ldots ,k\), let \(G_i\) be the union of all the split components of \(\{s_i,t_i\}\). Then \(\mu \) is an R-node whose skeleton is obtained from \(G^*\) by replacing each component \(G_i\) with an edge between \(s_i\) and \(t_i\), plus the reference edge (s, t). The decomposition recurs on each \(G_i\) with \(\mu \) as parent node.
Figure 21 shows a graph and its SPQR-tree. For each node that is not a Q-tree the skeleton is depicted; for Q-nodes the corresponding edge is shown. The SPQR-tree T of a graph G with n vertices and m edges has m Q-nodes and O(n) S-, P-, and R-nodes. Also, the total number of vertices of the skeletons stored at the nodes of T is O(n).
If G is an embedded graph, then each pertinent graph \(G_\mu \) of a node \(\mu \) of T is also an embedded graph. Furthermore, the skeleton \(sk(\mu )\) of \(\mu \) inherits an embedding from \(G_\mu \). For our purposes, we observe that if G is a 1-plane graph, then the skeleton of an R-node is also a 1-plane graph. Moreover, we remark that the skeleton of an R-node is 3-connected by definition.
The SPQR-tree can also be exploited to modify the embedding of G. A split component can be flipped around its poles, hence reversing the order of the edges of the split component around its poles. A swap operation consists of exchanging the position of two split components of the same split pair. If G is 1-plane, both these operations modify the embedding of G without introducing additional crossings, and thus preserve 1-planarity.
Rights and permissions
About this article
Cite this article
Di Giacomo, E., Didimo, W., Evans, W.S. et al. Ortho-polygon Visibility Representations of Embedded Graphs. Algorithmica 80, 2345–2383 (2018). https://doi.org/10.1007/s00453-017-0324-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-017-0324-2