Untangling a Planar Graph

Abstract

A straight-line drawing δ of a planar graph G need not be plane but can be made so by untangling it, that is, by moving some of the vertices of G. Let shift(G,δ) denote the minimum number of vertices that need to be moved to untangle δ. We show that shift(G,δ) is NP-hard to compute and to approximate. Our hardness results extend to a version of 1BendPointSetEmbeddability, a well-known graph-drawing problem.

Further we define fix(G,δ)=n−shift(G,δ) to be the maximum number of vertices of a planar n-vertex graph G that can be fixed when untangling δ. We give an algorithm that fixes at least \(\sqrt{((\log n)-1)/\log\log n}\) vertices when untangling a drawing of an n-vertex graph G. If G is outerplanar, the same algorithm fixes at least \(\sqrt{n/2}\) vertices. On the other hand, we construct, for arbitrarily large n, an n-vertex planar graph G and a drawing δ G of G with \(\ensuremath {\mathrm {fix}}(G,\delta_{G})\leq \sqrt{n-2}+1\) and an n-vertex outerplanar graph H and a drawing δ H of H with \(\ensuremath {\mathrm {fix}}(H,\delta_{H})\leq2\sqrt{n-1}+1\) . Thus our algorithm is asymptotically worst-case optimal for outerplanar graphs.

References

  1. 1.

    Avis, D.: Generating rooted triangulations without repetitions. Algorithmica 16, 618–632 (1996)

    MATH  MathSciNet  Google Scholar 

  2. 2.

    Bose, P., Dujmović, V., Hurtado, F., Langerman, S., Morin, P., Wood, D.R.: A polynomial bound for untangling geometric planar graphs. In: P. Ossona de Mendez, D. Poulalhon, M. Pocchiola, J.L. Ramírez Alfonsín, G. Schaeffer (eds.) Proc. Internat. Conf. Topological Geom. Graph Theory (TGGT’08). Electr. Notes Discrete Math., pp. 205–210 (2008). Long version available at http://arxiv.org/abs/0710.1641

  3. 3.

    Canny, J.: Some algebraic and geometric computations in PSPACE. In: Proc. of the 20th ACM Sympos. Theory Comput. (STOC’88), pp. 460–469 (1988)

  4. 4.

    Cibulka, J.: Untangling polygons and graphs. In: P. Ossona de Mendez, D. Poulalhon, M. Pocchiola, J.L. Ramírez Alfonsín, G. Schaeffer (eds.) Proc. of Internat. Conf. Topological Geom. Graph Theory (TGGT’08), Electr. Notes Discrete Math. pp. 200–204 (2008). Long version available at http://arxiv.org/abs/0802.1312

  5. 5.

    Erdős, P., Szekeres, G.: A combinatorial problem in geometry. Compos. Math. 2, 463–470 (1935)

    Google Scholar 

  6. 6.

    Fáry, I.: On straight-line representation of planar graphs. Acta Sci. Math. (Szeged) 11, 229–233 (1948)

    Google Scholar 

  7. 7.

    Goaoc, X., Kratochvíl, J., Okamoto, Y., Shin, Ch.-S., Wolff, A.: Moving vertices to make drawings plane. In: Proc. of the 15th International Symposium on Graph Drawing (GD’07). Lecture Notes in Computer Science, vol. 4875, pp. 101–112. Springer, Berlin (2008)

    Google Scholar 

  8. 8.

    Hong, S.-H., Nagamochi, H.: Convex drawing of graphs with non-convex boundary. Discrete Appl. Math. 156, 2368–2380 (2008)

    MATH  Article  MathSciNet  Google Scholar 

  9. 9.

    Hopcroft, J., Tarjan, R.E.: Efficient planarity testing. J. ACM 21, 549–568 (1974)

    MATH  Article  MathSciNet  Google Scholar 

  10. 10.

    Kang, M., Pikhurko, O., Ravsky, A., Schacht, M., Verbitsky, O.: Obfuscated drawings of planar graphs. ArXiv report (March 2008). Available at http://arxiv.org/abs/0803.0858

  11. 11.

    Kaufmann, M., Wiese, R.: Embedding vertices at points: Few bends suffice for planar graphs. J. Graph Algorithms Appl. 6(1), 115–129 (2002)

    MATH  MathSciNet  Google Scholar 

  12. 12.

    Knuth, D.E., Raghunathan, A.: The problem of compatible representatives. SIAM J. Discrete Math. 5(3), 422–427 (1992)

    MATH  Article  MathSciNet  Google Scholar 

  13. 13.

    Kratochvíl, J., Matoušek, J.: Intersection graphs of segments. J. Combin. Theory Ser. B 62, 289–315 (1994)

    MATH  Article  MathSciNet  Google Scholar 

  14. 14.

    Lichtenstein, D.: Planar formulae and their uses. SIAM J. Comput. 11(2), 329–343 (1982)

    MATH  Article  MathSciNet  Google Scholar 

  15. 15.

    Liske, N.: Planarity game. http://www.creativecouple.de/en/Projects/Planarity.html (accessed 8 September 2008)

  16. 16.

    Lubiw, A., Petrick, M., Spriggs, M.: Morphing orthogonal planar graph drawings. In: Proc. of the 17th Annu. ACM-SIAM Symposium on Discrete Algorithms (SODA’06), pp. 222–230 (2006)

  17. 17.

    Misue, K., Eades, P., Lai, W., Sugiyama, K.: Layout adjustment and the mental map. J. Visual Lang. Comput. 6(2), 183–210 (1995)

    Article  Google Scholar 

  18. 18.

    Pach, J., Tardos, G.: Untangling a polygon. Discrete Comput. Geom. 28(4), 585–592 (2002)

    MATH  MathSciNet  Google Scholar 

  19. 19.

    Pach, J., Wenger, R.: Embedding planar graphs at fixed vertex locations. Graphs Comb. 17(4), 717–728 (2001)

    MATH  Article  MathSciNet  Google Scholar 

  20. 20.

    Ravsky, A., Verbitsky, O.: On collinear sets in straight line drawings. ArXiv report (June–July 2008). Available at http://arxiv.org/abs/0806.0253

  21. 21.

    Renegar, J.: On the computational complexity and geometry of the first-order theory of the reals, part I: Introduction. Preliminaries. The geometry of semi-algebraic sets. The decision problem for the existential theory of the reals. J. Symb. Comput. 13(3), 255–300 (1992)

    MATH  MathSciNet  Article  Google Scholar 

  22. 22.

    Schensted, C.: Longest increasing and decreasing subsequences. Can. J. Math. 13, 179–191 (1961)

    MATH  MathSciNet  Google Scholar 

  23. 23.

    Schnyder, W.: Planar graphs and poset dimension. Order 5(4), 323–343 (1989)

    MATH  Article  MathSciNet  Google Scholar 

  24. 24.

    Spillner, A., Wolff, A.: Untangling a planar graph. In: Proc. of the 34th International Conference on Current Trends in Theory and Practice of Computer Science (SOFSEM’08). Lecture Notes in Computer Science, vol. 4910, pp. 473–484. Springer, Berlin (2008)

    Google Scholar 

  25. 25.

    Stein, S.K.: Convex maps. Proc. Am. Math. Soc. 2, 464–466 (1951)

    MATH  Article  Google Scholar 

  26. 26.

    Tantalo, J.: Planarity. Web site at http://planarity.net/ (accessed 21 May 2007)

  27. 27.

    Verbitsky, O.: On the obfuscation complexity of planar graphs. Theor. Comput. Sci. 396(1–3), 294–300 (2008) (first published at http://arxiv.org/abs/0705.3748)

    MATH  Article  MathSciNet  Google Scholar 

  28. 28.

    Wagner, K.: Bemerkungen zum Vierfarbenproblem. Jahresbericht Deutsch. Math. Verein. 46, 26–32 (1936)

    Google Scholar 

  29. 29.

    Watanabe, M.: Open problem. In: 5th Czech–Slovak Symposium on Combinatorics (1998)

Download references

Author information

Affiliations

Authors

Corresponding author

Correspondence to Alexander Wolff.

Additional information

This paper is based on two preliminary versions: [7] and [24]. Our work was started at the 9th “Korean” Workshop on Computational Geometry and Geometric Networks organized by A. Wolff and X. Goaoc, July 30–August 4, 2006 in Schloss Dagstuhl, Germany. Further contributions were made at the 2nd Workshop on Graph Drawing and Computational Geometry organized by W. Didimo and G. Liotta, March 11–16, 2007 in Bertinoro, Italy.

J. K. was supported by research project 1M0545 of the Czech Ministry of Education.

Y. O. was supported by GCOE Program “Computationism as a Foundation for the Sciences” and Grant-in-Aid for Scientific Research from Ministry of Education, Science and Culture, Japan, and Japan Society for the Promotion of Science.

C.-S. S. was supported by Research Grant 2008 of the Hankuk University of Foreign Studies.

Rights and permissions

Open Access This is an open access article distributed under the terms of the Creative Commons Attribution Noncommercial License (https://creativecommons.org/licenses/by-nc/2.0), which permits any noncommercial use, distribution, and reproduction in any medium, provided the original author(s) and source are credited.

Reprints and Permissions

About this article

Cite this article

Goaoc, X., Kratochvíl, J., Okamoto, Y. et al. Untangling a Planar Graph. Discrete Comput Geom 42, 542–569 (2009). https://doi.org/10.1007/s00454-008-9130-6

Download citation

Keywords

  • Graph drawing
  • Straight-line drawing
  • Planarity
  • NP-hardness
  • Hardness of approximation
  • Moving vertices
  • Untangling
  • Point-set embeddability