Skip to main content
Log in

Ortho-polygon Visibility Representations of Embedded Graphs

  • Published:
Algorithmica Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20

Similar content being viewed by others

Notes

  1. 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''\)).

  2. To avoid confusion, it might be worth observing that the terminology used in [37] is slightly different. In particular, a strong BVR using the \(\varepsilon \)-visibility model (i.e., the model we are referring to in this point) is called an \(\varepsilon \)-visibility representation in [37].

  3. 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

  1. Ackerman, E.: A note on 1-planar graphs. Discret. Appl. Math. 175, 104–108 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

  3. 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)

  4. 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)

  5. Bertolazzi, P., Di Battista, G., Didimo, W.: Computing orthogonal drawings with the minimum number of bends. IEEE Trans. Comput. 49(8), 826–840 (2000)

    Article  MathSciNet  Google Scholar 

  6. 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)

  7. Brandenburg, F.J.: 1-Visibility representations of 1-planar graphs. J. Graph Algorithms Appl. 18(3), 421–438 (2014)

    Article  MathSciNet  MATH  Google Scholar 

  8. 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)

    Article  MathSciNet  MATH  Google Scholar 

  9. Cornelsen, S., Karrenbauer, A.: Accelerated bend minimization. J. Graph Algorithms Appl. 16(3), 635–650 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  10. Czap, J., Hudák, D.: On drawings and decompositions of 1-planar graphs. Electron. J. Comb. 20(2), P54 (2013)

    MathSciNet  MATH  Google Scholar 

  11. Dean, A.M., Hutchinson, J.P.: Rectangle-visibility representations of bipartite graphs. Discret. Appl. Math. 75(1), 9–25 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  12. Di Battista, G., Didimo, W.: GDToolkit. In: Tamassia, R. (ed.) Handbook of Graph Drawing and Visualization, pp. 571–597. CRC Press, Boca Raton (2013)

    Google Scholar 

  13. Di Battista, G., Eades, P., Tamassia, R., Tollis, I.G.: Graph Drawing. Prentice-Hall, Englewood Cliffs (1999)

    MATH  Google Scholar 

  14. Di Battista, G., Tamassia, R.: On-line planarity testing. SIAM J. Comput. 25(5), 956–997 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  15. 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)

  16. 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)

    Article  MathSciNet  MATH  Google Scholar 

  17. 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)

    Article  MathSciNet  MATH  Google Scholar 

  18. Eades, P., Liotta, G.: Right angle crossing graphs and 1-planarity. Discret. Appl. Math. 161(7–8), 961–969 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  19. 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)

    Article  MathSciNet  MATH  Google Scholar 

  20. Evans, W.S., Liotta, G., Montecchiani, F.: Simultaneous visibility representations of plane \(st\)-graphs using L-shapes. Theor. Comput. Sci. 645, 100–111 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  21. 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)

  22. Haeupler, B., Tarjan, R.E.: Finding a feasible flow in a strongly connected network. Oper. Res. Lett. 36(4), 397–398 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  23. Hutchinson, J.P., Shermer, T.C., Vince, A.: On representations of some thickness-two graphs. Comput. Geom. 13(3), 161–171 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  24. 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)

  25. Kant, G., Liotta, G., Tamassia, R., Tollis, I.G.: Area requirement of visibility representations of trees. Inf. Process. Lett. 62(2), 81–88 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  26. Kobourov, S.G., Liotta, G., Montecchiani, F.: An annotated bibliography on 1-planarity. CoRR arXiv:1703.02261 (2017)

  27. Korzhik, V.P., Mohar, B.: Minimal obstructions for 1-immersions and hardness of 1-planarity testing. J. Graph Theory 72(1), 30–71 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  28. Lenhart, W.J., Liotta, G., Montecchiani, F.: On partitioning the edges of 1-plane graphs. Theor. Comput. Sci. 662, 59–65 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  29. Liotta, G., Montecchiani, F.: L-visibility drawings of IC-planar graphs. Inf. Process. Lett. 116(3), 217–222 (2016)

    Article  MathSciNet  MATH  Google Scholar 

  30. Otten, R.H.J.M., Van Wijk, J.G.: Graph representations in interactive layout design. In: IEEE ISCSS, pp. 914–918. IEEE (1978)

  31. Rosenstiehl, P., Tarjan, R.E.: Rectilinear planar layouts and bipolar orientations of planar graphs. Discret. Comput. Geom. 1, 343–353 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  32. Schnyder, W.: Embedding planar graphs on the grid. In: Johnson, D.S. (ed.) SODA 1990, pp. 138–148. SIAM (1990)

  33. 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)

  34. 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)

  35. Suzuki, Y.: Re-embeddings of maximum 1-planar graphs. SIAM J. Discret. Math. 24(4), 1527–1540 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  36. Tamassia, R.: On embedding a graph in the grid with the minimum number of bends. SIAM J. Comp. 16(3), 421–444 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  37. Tamassia, R., Tollis, I.G.: A unified approach to visibility representations of planar graphs. Discret. Comput. Geom. 1(1), 321–341 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  38. Thomassen, C.: Plane representations of graphs. In: Progress in Graph Theory, pp. 43–69. AP (1984)

  39. Thomassen, C.: Rectilinear drawings of graphs. J. Graph Theory 12(3), 335–341 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  40. Wismath, S.K.: Characterizing bar line-of-sight graphs. In: O’Rourke, J. (ed.) SoCG 1985, pp. 147–152. ACM (1985)

Download references

Acknowledgements

We thank the anonymous referees of this paper for their valuable suggestions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fabrizio Montecchiani.

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 (uv) and (vu) 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 (uv) 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 (uv) 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 (uv). 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

$$\begin{aligned} \tau (f) = \left\{ \begin{array}{l l} 2 \deg (f) - 4 &{} \text{ if } \text{ f } \text{ is } \text{ an } \text{ internal } \text{ face }\\ 2 \deg (f) + 4 &{} \text{ if } \text{ f } \text{ is } \text{ the } \text{ outer } \text{ face. } \end{array} \right. \end{aligned}$$

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 (uv) of G, with faces f and g on its left and right, respectively, N has two arcs:

  • an arc (uf) with lower bound \(\lambda (v,f)=1\), capacity \(\mu (v,f)=4\), and cost \(\chi (v,f)=0\);

  • an arc (fg) 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 (uv) whose associated arcs of N are (uf) and (fg), 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 (uv) 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\}\).

Fig. 21
figure 21

a A graph G; b the SPQR-tree T of G. For each node that is not a Q-tree the skeleton is depicted in the gray balloons; for Q-nodes the corresponding edge is shown

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 (st). 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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-017-0324-2

Keywords

Navigation