A better heuristic for orthogonal graph drawings

  • Therese Biedl
  • Goos Kant
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 855)


An orthogonal drawing of a graph is an embedding in the plane such that all edges are drawn as sequences of horizontal and vertical segments. We present a linear time and space algorithm to draw any connected graph orthogonally on a grid of size n×n with at most 2n+2 bends. Each edge is bent at most twice.

In particular for non-planar and non-biconnected planar graphs, this is a big improvement. The algorithm is very simple, easy to implement, and it handles both planar and non-planar graphs at the same time.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    G. Di Battista, P. Eades, R. Tamassia, and I.G. Tollis Algorithms for Automatic Graph Drawing: An Annotated Bibliography, to appear in Comp. Geom.: Theory and Applications, Preliminary version also available via anonymous ftp from wilma.cs.brown.edu (, files /pub/gdbiblio.tex.Z and /pub/gdbiblio.ps.Z.Google Scholar
  2. 2.
    G. Di Battista, G. Liotta, and F. Vargiu, Spirality of orthogonal representations and optimal drawings of series-parallel graphs and 3-planar graphs, In: Proc. Workshop on Algorithms and Data Structures, Lecture Notes in Computer Science 709, Springer-Verlag, 1993, pp. 151–162.Google Scholar
  3. 3.
    N. Chiba, T. Nishizeki, S. Abe, and T. Ozawa, A linear algorithm for embedding planar graphs using PQ-trees, J. of Computer and System Sciences 30 (1985), pp. 54–76.MathSciNetGoogle Scholar
  4. 4.
    P.F. Dietz, and D.D. Sleator, Two algorithms for maintaining order in a list, in: Proc. 19th Annual ACM Symp. Theory of Computing, 1987, pp. 365–372.Google Scholar
  5. 5.
    S. Even, and G. Granot, Rectilinear Planar Drawings with Few Bends in Each Edge, Manuscript, Faculty of Comp. Science, the Technion, Haifa (Israel), 1993.Google Scholar
  6. 6.
    S. Even, and R.E. Tarjan, Computing an st-numbering, Th. Comp. Science 2 (1976), pp. 436–441.MathSciNetGoogle Scholar
  7. 7.
    M. Formann, and F. Wagner, The VLSI layout problem in various embedding models, Graph-Theoretic Concepts in Computer Science (16th Workshop WG'90), Springer-Verlag, Berlin/Heidelberg, 1992, pp. 130–139.Google Scholar
  8. 8.
    A. Garg, and R. Tamassia, On the Computational Complexity of Upward and Rectilinear Planarity Testing, Tech. Report CS-94-10, Dept. of Comp. Science, Brown University, Providence, 1994.Google Scholar
  9. 9.
    J. Hopcroft, and R.E. Tarjan, Dividing a graph into triconnected components, SIAM J. Comput. 2 (1973), pp. 135–158.MathSciNetGoogle Scholar
  10. 10.
    G. Kant, Drawing planar graphs using the lmc-ordering, Extended Abstract in: Proc. 33th Ann. IEEE Symp. on Found. of Comp. Science, Pittsburgh, 1992, pp. 101–110. Extended and revised version in: G. Kant, Algorithms for Drawing Planar Graphs, PhD thesis, Dept. of Computer Science, Utrecht University, 1993.Google Scholar
  11. 11.
    M.R. Kramer, and J. van Leeuwen, The complexity of wire routing and finding minimum area layouts for arbitrary VLSI circuits. In: F.P. Preparata (Ed.), Advances in Computer Research, Vol. 2: VLSI Theory, JAI Press, Reading, MA, 1992, pp. 129–146.Google Scholar
  12. 12.
    Th. Lengauer, Combinatorial Algorithms for Integrated Circuit Layout, Teubner/Wiley & Sons, Stuttgart/Chichester, 1990.Google Scholar
  13. 13.
    A. Lempel, S. Even, and I. Cederbaum, An algorithm for planarity testing of graphs, Theory of Graphs, Int. Symp. Rome (1966), pp. 215–232.Google Scholar
  14. 14.
    P. Rosenstiehl, and R.E. Tarjan, Rectilinear planar layouts and bipolar orientations of planar graphs, Discr. and Comp. Geometry 1 (1986), pp. 343–353.MathSciNetGoogle Scholar
  15. 15.
    M. Schäffter, Drawing graphs on rectangular grids, Discr. Appl. Math. (to appear).Google Scholar
  16. 16.
    J. Storer, On minimal node-cost planar embeddings, Networks 14 (1984), pp. 181–212.MATHMathSciNetGoogle Scholar
  17. 17.
    R. Tamassia, On embedding a graph in the grid with the minimum number of bends, SIAM J. Comput. 16 (1987), pp. 421–444.CrossRefMATHMathSciNetGoogle Scholar
  18. 18.
    R. Tamassia, and I.G. Tollis, Efficient embedding of planar graphs in linear time, Proc. IEEE Int. Symp. on Circuits and Systems, Philadelphia, pp. 495–498, 1987.Google Scholar
  19. 19.
    R. Tamassia, I.G. Tollis, and J.S. Vitter, Lower bounds for planar orthogonal drawings of graphs, Inf. Proc. Letters 39 (1991), pp. 35–40.MathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1994

Authors and Affiliations

  • Therese Biedl
    • 1
  • Goos Kant
    • 2
  1. 1.RUTCOR - Rutgers UniversityNew BrunswickUSA
  2. 2.Department of Computer ScienceUtrecht UniversityCH UtrechtThe Netherlands

Personalised recommendations