Upward Planarity Testing via SAT

  • Markus Chimani
  • Robert Zeranski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7704)


A directed acyclic graph is upward planar if it allows a drawing without edge crossings where all edges are drawn as curves with monotonously increasing y-coordinates. The problem to decide whether a graph is upward planar or not is NP-complete in general, and while special graph classes are polynomial time solvable, there is not much known about solving the problem for general graphs in practice. The only attempt so far was a branch-and-bound algorithm over the graph’s triconnectivity structure which was able to solve sparse graphs.

In this paper, we propose a fundamentally different approach, based on the seemingly novel concept of ordered embeddings. We carefully model the problem as a special SAT instance, i.e., a logic formula for which we check satisfiability. Solving these SAT instances allows us to decide upward planarity for arbitrary graphs. We then show experimentally that this approach seems to dominate the known alternative approaches and is able to solve traditionally used graph drawing benchmarks effectively.


Integer Linear Program Conjunctive Normal Form Sparse Graph Satisfying Assignment Integer Linear Program Formulation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Bachmaier, C., Brunner, W., Gleißner, A.: Grid sifting: Leveling and crossing reduction. Tech. Rep. MIP-1103, University of Passau (2011)Google Scholar
  2. 2.
    Bertolazzi, P., Di Battista, G., Liotta, G., Mannino, C.: Upward drawings of triconnected digraphs. Algorithmica 12(6), 476–497 (1994)MathSciNetzbMATHCrossRefGoogle Scholar
  3. 3.
    Bertolazzi, P., Di Battista, G., Didimo, W.: Quasi-upward planarity. Algorithmica 32(3), 474–506 (2002)MathSciNetzbMATHCrossRefGoogle Scholar
  4. 4.
    Binucci, C., Didimo, W.: Upward Planarity Testing of Embedded Mixed Graphs. In: van Kreveld, M., Speckmann, B. (eds.) GD 2011. LNCS, vol. 7034, pp. 427–432. Springer, Heidelberg (2012)Google Scholar
  5. 5.
    Binucci, C., Didimo, W., Patrignani, M.: Upward and quasi-upward planarity testing of embedded mixed graphs. Tech. Rep. RT-001-12, University of Perugia, Department of Electronic and Information Engineering (2012)Google Scholar
  6. 6.
    Chan, H.: A Parameterized Algorithm for Upward Planarity Testing. In: Albers, S., Radzik, T. (eds.) ESA 2004. LNCS, vol. 3221, pp. 157–168. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Chimani, M., Gutwenger, C., Mutzel, P., Wong, H.M.: Layer-free upward crossing minimization. ACM Journal of Experimental Algorithmics 15 (2010)Google Scholar
  8. 8.
    Di Battista, G., Eades, P., Tamassia, R., Tollis, I.G.: Graph Drawing. Prentice Hall, Upper Saddle River (1999)zbMATHGoogle Scholar
  9. 9.
    Di Battista, G., Garg, A., Liotta, G., Parise, A., Tamassia, R., Tassinari, E., Vargiu, F., Vismara, L.: Drawing directed acyclic graphs: An experimental study. International Journal of Computational Geometry and Appl. 10(6), 623–648 (2000)MathSciNetzbMATHCrossRefGoogle Scholar
  10. 10.
    Di Battista, G., Liu, W.P., Rival, I.: Bipartite graphs, upward drawings, and planarity. Information Processing Letters 36(6), 317–322 (1990)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Didimo, W., Giordano, F., Liotta, G.: Upward spirality and upward planarity testing. SIAM Journal on Discrete Mathematics 23(4), 1842–1899Google Scholar
  12. 12.
    Eiglsperger, M., Kaufmann, M.: An Approach for Mixed Upward Planarization. In: Dehne, F., Sack, J.-R., Tamassia, R. (eds.) WADS 2001. LNCS, vol. 2125, pp. 352–364. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  13. 13.
    Garg, A., Tamassia, R.: On the computational complexity of upward and rectilinear planarity testing. SIAM Journal on Computing 31(2), 601–625 (2002)MathSciNetCrossRefGoogle Scholar
  14. 14.
    Gutwenger, C., Klein, K., Mutzel, P.: Planarity testing and optimal edge insertion with embedding constraints. J. Graph Algorithms Appl. 12(1), 73–95 (2008)MathSciNetzbMATHCrossRefGoogle Scholar
  15. 15.
    Healy, P., Lynch, K.: Fixed-Parameter Tractable Algorithms for Testing Upward Planarity. In: Vojtáš, P., Bieliková, M., Charron-Bost, B., Sýkora, O. (eds.) SOFSEM 2005. LNCS, vol. 3381, pp. 199–208. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  16. 16.
    Hopcroft, J., Tarjan, R.: Efficient planarity testing. J. ACM 21(4), 549–568 (1974)MathSciNetzbMATHCrossRefGoogle Scholar
  17. 17.
    Hutton, M.D., Lubiw, A.: Upward planar drawing of single source acyclic digraphs. In: Proc. of SODA 1991, pp. 203–211 (1991)Google Scholar
  18. 18.
    Papakostas, A.: Upward Planarity Testing of Outerplanar Dags (Extended Abstract). In: Tamassia, R., Tollis, I.G. (eds.) GD 1994. LNCS, vol. 894, pp. 298–306. Springer, Heidelberg (1995)CrossRefGoogle Scholar
  19. 19.
    Welzl, E., Di Battista, G., Garg, A., Liotta, G., Tamassia, R., Tassinari, E., Vargiu, F.: An experimental comparison of four graph drawing algorithms. Computational Geometry 7, 303–325 (1997)MathSciNetCrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Markus Chimani
    • 1
  • Robert Zeranski
    • 1
  1. 1.Algorithm EngineeringFriedrich-Schiller-Universität JenaGermany

Personalised recommendations