skip to main content
research-article

Testing Planarity of Partially Embedded Graphs

Published: 13 April 2015 Publication History

Abstract

We study the following problem: given a planar graph G and a planar drawing (embedding) of a subgraph of G, can such a drawing be extended to a planar drawing of the entire graph G? This problem fits the paradigm of extending a partial solution for a problem to a complete one, which has been studied before in many different settings. Unlike many cases, in which the presence of a partial solution in the input makes an otherwise easy problem hard, we show that the planarity question remains polynomial-time solvable. Our algorithm is based on several combinatorial lemmas, which show that the planarity of partially embedded graphs exhibits the ‘TONCAS’ behavior “the obvious necessary conditions for planarity are also sufficient.” These conditions are expressed in terms of the interplay between (1) the rotation system and containment relationships between cycles and (2) the decomposition of a graph into its connected, biconnected, and triconnected components. This implies that no dynamic programming is needed for a decision algorithm and that the elements of the decomposition can be processed independently.
Further, by equipping the components of the decomposition with suitable data structures and by carefully splitting the problem into simpler subproblems, we make our algorithm run in linear time.
Finally, we consider several generalizations of the problem, such as minimizing the number of edges of the partial embedding that need to be rerouted to extend it, and argue that they are NP-hard. We also apply our algorithm to the simultaneous graph drawing problem Simultaneous Embedding with Fixed Edges (Sefe). There we obtain a linear-time algorithm for the case that one of the input graphs or the common graph has a fixed planar embedding.

References

[1]
P. Angelini, G. Di Battista, F. Frati, V. Jelínek, J. Kratochvíl, M. Patrignani, and I. Rutter. 2010. Testing planarity of partially embedded graphs. In Proceedings of SODA’10. 202--221.
[2]
P. Angelini, G. Di Battista, F. Frati, M. Patrignani, and I. Rutter. 2012a. Testing the simultaneous embeddability of two graphs whose intersection is a biconnected or a connected graph. Journal of Discrete Algorithms 14, 150--172.
[3]
P. Angelini, M. Geyer, M. Kaufmann, and D. Neuwirth. 2012b. On a tree and a path with no geometric simultaneous embedding. Journal of Graph Algorithms and Algorithms 16, 1, 37--83.
[4]
P. Bertolazzi, G. Di Battista, and W. Didimo. 2000. Computing orthogonal drawings with the minimum number of bends. IEEE Transactions on Computers 49, 8, 826--840.
[5]
T. Bläsius, A. Karrer, and I. Rutter. 2013a. Simultaneous embedding: Edge orderings, relative positions, cutvertices. In Graph Drawing. Lecture Notes in Computer Science, Vol. 8242. Springer, 220--231.
[6]
T. Bläsius, S. G. Kobourov, and I. Rutter. 2013b. Simultaneous embedding of planar graphs. In Handbook of Graph Drawing and Visualization, R. Tamassia (Ed.). CRC Press.
[7]
T. Bläsius and I. Rutter. 2013a. Disconnectivity and relative positions in simultaneous embeddings. In Graph Drawing. Lecture Notes in Computer Science, Vol. 7704. Springer, 31--42.
[8]
T. Bläsius and I. Rutter. 2013b. Simultaneous pq-ordering with applications to constrained embedding problems. In Proceedings of SODA’13. 1030--1043.
[9]
J. M. Boyer and W. J. Myrvold. 2004. On the cutting edge: Simplified O(n) planarity by edge addition. Journal of Graph Algorithms and Applications 8, 3, 241--273.
[10]
H. de Fraysseix, P. O. de Mendez, and P. Rosenstiehl. 2006. Trémaux trees and planarity. International Journal on Foundations of Computer Science 17, 1017--1030.
[11]
G. Demoucron, Y. Malgrange, and R. Pertuiset. 1964. Reconnaissance et construction de représentations planaires topologiques. Rev. Francaise Recherche Opérationelle 8, 33--34.
[12]
G. Di Battista and R. Tamassia. 1996. On-line planarity testing. SIAM Journal on Computing 25, 956--997.
[13]
E. Di Giacomo and G. Liotta. 2007. Simultaneous embedding of outerplanar graphs, paths, and cycles. International Journal of Computational Geometry and Applications 17, 2, 139--160.
[14]
C. Dornheim. 2002. Planar graphs with topological constraints. Journal of Graph Algorithms and Applications 6, 1, 27--66.
[15]
C. Erten and S. G. Kobourov. 2005. Simultaneous embedding of planar graphs with few bends. Journal of Graph Algorithms and Applications 9, 3, 347--364.
[16]
A. Estrella-Balderrama, E. Gassner, M. Jünger, M. Percan, M. Schaefer, and M. Schulz. 2007. Simultaneous geometric graph embeddings. In Graph Drawing. Lecture Notes in Computer Science, Vol. 4875. Springer, 280--290.
[17]
J. Fiala. 2003. NP-completeness of the edge precoloring extension problem on bipartite graphs. Journal of Graph Theory 43, 2, 156--160.
[18]
J. Fowler, M. Jünger, S. G. Kobourov, and M. Schulz. 2011. Characterizations of restricted pairs of planar graphs allowing simultaneous embedding with fixed edges. Computational Geometry 44, 8, 385--398.
[19]
F. Frati. 2006. Embedding graphs simultaneously with fixed edges. In Graph Drawing. Lecture Notes in Computer Science, Vol. 4372. Springer, 108--113.
[20]
M. Garey and D. Johnson. 1977. The rectilinear Steiner tree problem is NP-complete. SIAM Journal on Applied Mathematics 32, 4, 826--834.
[21]
E. Gassner, M. Jünger, M. Percan, M. Schaefer, and M. Schulz. 2006. Simultaneous graph embeddings with fixed edges. In Graph-Theoretic Concepts in Computer Science. Lecture Notes in Computer Science, Vol. 4271. Springer, 325--335.
[22]
M. Grötschel, L. Lovász, and A. Schrijver. 1988. Stable sets in graphs. In Geometric Algorithms and Combinatorial Optimization. Springer, 273--303.
[23]
C. Gutwenger, K. Klein, and P. Mutzel. 2008. Planarity testing and optimal edge insertion with embedding constraints. Journal of Graph Algorithms and Applications 12, 1, 73--95.
[24]
C. Gutwenger and P. Mutzel. 2000. A linear time implementation of SPQR-trees. In Graph Drawing. Lecture Notes in Computer Science, Vol. 1984. Springer, 77--90.
[25]
B. Haeupler, K. R. Jampani, and A. Lubiw. 2013. Testing simultaneous planarity when the common graph is 2-connected. Journal of Graph Algorithms and Applications 17, 3, 147--171.
[26]
J. Hopcroft and R. E. Tarjan. 1974. Efficient planarity testing. Journal of the ACM 21, 4, 549--568.
[27]
V. Jelínek, J. Kratochvíl, and I. Rutter. 2013. A Kuratowski-type theorem for planarity of partially embedded graphs. Computational Geometry: Theory and Applications 46, 4, 466--492.
[28]
M. Jünger and M. Schulz. 2009. Intersection graphs in simultaneous embedding with fixed edges. Journal of Graph Algorithms and Applications 13, 2, 205--218.
[29]
M. Juvan and B. Mohar. 2005. 2-restricted extensions of partial embeddings of graphs. European Journal of Combinatorics 26, 3--4, 339--375.
[30]
B. Katz, M. Krug, I. Rutter, and A. Wolff. 2010. Manhattan-geodesic embedding of planar graphs. In Graph Drawing. Lecture Notes in Computer Science, Vol. 5849. Springer, 207--218.
[31]
P. Klavík, J. Kratochvíl, T. Krawczyk, and B. Walczak. 2012a. Extending partial representations of function graphs and permutation graphs. In Algorithms—ESA 2012. Lecture Notes in Computer Science, Vol. 7501. Springer, 671--682.
[32]
P. Klavík, J. Kratochvíl, Y. Otachi, I. Rutter, T. Saitoh, M. Saumell, and T. Vyskočil. 2012c. Extending partial representations of proper and unit interval graphs. CoRR abs/1207.6960.
[33]
P. Klavík, J. Kratochvíl, Y. Otachi, and T. Saitoh. 2012b. Extending partial representations of subclasses of chordal graphs. In Algorithms and Computation. Lecture Notes in Computer Science, Vol. 7676. Springer, 444--454.
[34]
P. Klavík, J. Kratochvíl, and T. Vyskočil. 2011. Extending partial representations of interval graphs. In Theory and Applications of Models of Computation. Lecture Notes in Computer Science, Vol. 6648. Springer, 276--285.
[35]
L. Kowalik and M. Kurowski. 2003. Short path queries in planar graphs in constant time. In Proceedings of STOC’03. 143--148.
[36]
J. Kratochvíl and A. Sebo. 1997. Coloring precolored perfect graphs. Journal of Graph Theory 25, 207--215.
[37]
K. Kuratowski. 1930. Sur le problème des courbes gauches en topologie. Fundamenta Mathematicae 15, 271--283.
[38]
B. Mohar. 1999. A linear time algorithm for embedding graphs in an arbitrary surface. SIAM Journal on Discrete Mathematics 12, 1, 6--26.
[39]
P. Mutzel. 2003. The SPQR-tree data structure in graph drawing. In Automata, Languages and Programming. Lecture Notes in Computer Science, Vol. 2719. Springer, 35--46.
[40]
M. Patrignani. 2006. On extending a partial straight-line drawing. International Journal of Foundations of Computer Science 17, 5, 1061--1069.
[41]
J. A. La Poutré. 1994. Alpha-algorithms for incremental planarity testing. In Proceedings of STOC’94. 706--715.
[42]
M. Schaefer. 2013. Toward a theory of planarity: Hanani-tutte and planarity variants. Journal of Graph Algorithms and Applications 17, 4, 367--440.
[43]
R. Tamassia. 1987. On embedding a graph in the grid with the minimum number of bends. SIAM Journal on Computing 16, 3, 421--444.
[44]
R. Tamassia. 1996. On-line planar graph embedding. Journal of Algorithms 21, 2, 201--239.
[45]
R. Tamassia. 1998. Constraints in graph drawing algorithms. Constraints 3, 1, 87--120.
[46]
R. Tamassia, G. Di Battista, and C. Batini. 1988. Automatic graph drawing and readability of diagrams. IEEE Transactions on Systems, Man, and Cybernetics 18, 1, 61--79.
[47]
R. E. Tarjan. 1972. Depth first search and linear graph algorithms. SIAM Journal on Computing 2, 146--160.
[48]
J. Westbrook. 1992. Fast incremental planarity testing. In Automata, Languages and Programming. Lecture Notes in Computer Science, Vol. 623. Springer, 342--353.

Cited By

View all

Index Terms

  1. Testing Planarity of Partially Embedded Graphs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Algorithms
    ACM Transactions on Algorithms  Volume 11, Issue 4
    June 2015
    302 pages
    ISSN:1549-6325
    EISSN:1549-6333
    DOI:10.1145/2756876
    Issue’s Table of Contents
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 13 April 2015
    Accepted: 01 April 2014
    Revised: 01 April 2014
    Received: 01 March 2013
    Published in TALG Volume 11, Issue 4

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Planarity
    2. algorithm
    3. partial embedding
    4. simultaneous embedding

    Qualifiers

    • Research-article
    • Research
    • Refereed

    Funding Sources

    • Australian Research Council
    • MIUR project AMANDA (Algorithmics for Massive and Networked Data) protocol 2012C4E3KT_001
    • ESF EuroGIGA GraDR as Czech Research
    • fellowship within the postdoctoral program of the German Academic Exchange Service (DAAD)

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)33
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 01 Jan 2025

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    Login options

    Full Access

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media