On the complexity of optimal drawings of graphs

  • Franz J. Brandenburg
Graph Embedding
Part of the Lecture Notes in Computer Science book series (LNCS, volume 411)


We consider the problem of producing aesthetically nice drawings of graphs from the complexity point of view. The following questions are immediate:
  1. (1)

    How to formalize in algorithmic terms that a drawing is nice?

  2. (2)

    What are the computational costs for nice drawings?

  3. (3)

    Are there tools to beat the NP-completeness?


For (1) we propose grid embeddings of graphs and measure ”nice” by algorithmic cost measures of the embeddings, e.g., area, expansion, edge length, etc. For (2) we prove that optimal embeddings with fixed costs are NP-complete, even for binary trees. This sharpens previous NP-completeness results of optimal embeddings from connected graphs to binary trees and extends them to other cost measures. For (3) we introduce placement graph grammars. These are special graph grammars enriched by a placement component. The placement component contains partial information on the relative positions of the vertices, which is a reduction of the placement information contained in any concrete grid drawing. Every derivation of a graph in the base graph grammar has an associated placement component. By an extension of the parsing process we can compute a placement of the vertices of each generated graph, which is consistent with the associated placement component, and is area minimal. For connected graphs of bounded degree this can be done in polynomial time.


graph layout embeddings NP-completeness graph grammars placement graph grammars 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    S.N. Bhatt, S.S. Cosmadakis, ”The complexity of minimizing wire lenghts in VLSI layouts”, Inform. Proc. Letters 25 (1987), 263–267CrossRefGoogle Scholar
  2. [2]
    F.J. Brandenburg, ”On polynomial time graph grammars” Proc. 5 STACS, Lecture Notes in Computer Science 294 (1988), 227–236Google Scholar
  3. [3]
    F.J. Brandenburg, ”Nice drawings of graphs are computationally hard”, Proc. 7th Interdisciplinary Workshop in Informatics and Psychology, Lecture Notes in Computer Science (to appear)Google Scholar
  4. [4]
    B. Courcelle, ”An axiomatic definition of context-free rewriting and its application to NLC graph grammars”, Theoret. Comput. Sci. 55 (1987), 141–181CrossRefGoogle Scholar
  5. [5]
    D. Dolev, F.T. Leighton, H. Trickey, ”Planar embedding of planar graphs”, Advances in Computing Research, vol. 2, F.P. Preparata (ed.), JAI Press Inc. 1984Google Scholar
  6. [6]
    P. Eades, R. Tamassia, ”Algorithms for Drawing Graphs: An Annotated Bibliography” Networks (to appear)Google Scholar
  7. [7]
    H. Ehrig, M. Nagl, G. Rozenberg, A. Rosenfeld (Eds.), ”Graph Grammars and Their Application to Computer Science”, Lecture Notes in Computer Science 291 (1987)Google Scholar
  8. [8]
    J. Engelfriet, G. Leih, E. Welzl, ”Boundary graph grammars with dynamic edge relabeling”, J. Comput. System Sci. (to appear)Google Scholar
  9. [9]
    S. Even, ”Graph Algorithms”, Computer Science Press, Maryland (1979)Google Scholar
  10. [10]
    M.J. Fischer, M.S. Paterson, ”Optimal tree layout”, Proc. 12 ACM STOC (1980), 177–189Google Scholar
  11. [11]
    M.R. Garey, D.S. Johnson, ”Computers and Intractability: a Guide to the Theory of NP-Completeness”, Freeman and Company, San Francisco (1979)Google Scholar
  12. [12]
    A. Gregori, ”Unit-Length embedding of binary trees on a square grid” Inform. Proc. Letters 31 (1989), 167–173CrossRefGoogle Scholar
  13. [13]
    D. Janssens, G. Rozenberg, ”On the structure of node label controlled graph languages”, Inform. Sci. 20 (1980), 191–216CrossRefGoogle Scholar
  14. [14]
    D. S. Johnson, ”The NP-completeness column: An ongoing guide” J. Algorithms 3 (1982), 89–99CrossRefGoogle Scholar
  15. [15]
    D. S. Johnson, ”The NP-completeness column: An ongoing guide” J. Algorithms 5 (1984), 147–160CrossRefGoogle Scholar
  16. [16]
    M. Kaul, ”Syntaxanalyse von Graphen bei Präzedenz-Graph-Grammatiken” Technical Report MIP-9610, Universität Passau (1986)Google Scholar
  17. [17]
    M. R. Kramer, J. van Leeuwen, ”The complexity of wire-routing and finding minimum area layouts for arbitrary VLSI circuits”, Adv. Comput. Research 2 (1984), 129–146Google Scholar
  18. [18]
    F. S. Makedon, I. H. Sudborough, ”Graph Layout Problems” Überblicke Informationsverarbeitung, B.I., Mannheim (1984), 145–183Google Scholar
  19. [19]
    Z. Miller, J.B. Orlin, ”NP-completeness for minimizing maximum edge length in grid embeddings”, J. Algorithms 6 (1985), 10–16CrossRefGoogle Scholar
  20. [20]
    E.M. Reingold, J. Tilford, ”Tidier drawing of trees” IEEE Trans SE 7(1981), 223–228Google Scholar
  21. [21]
    G. Rozenberg, E. Welzl, ”Boundary NLC graph grammars-basic definitions, nornal forms and complexity”, Inform. Contr. 69 (1986), 136–137CrossRefGoogle Scholar
  22. [22]
    R. Schuster, ”Graph Grammatiken und Graph Einbettungen: Algorithmen und Komplexität”, Technical Report MIP 8711, Universität Passau, (1987)Google Scholar
  23. [23]
    A.O. Slisenko, ”Context-free grammars as a tool for describing polynomial-time subclasses of hard problems”, Inform. Process. Letters 14 (1982), 52–56CrossRefGoogle Scholar
  24. [24]
    J. A. Storer ”On minimal-node-cost planar embeddings” Networks 14 (1984), 181–212Google Scholar
  25. [25]
    K. J. Supowit, E. M. Reingold, ”The complexity of drawing trees nicely” Acta Informatica 18 (1983), 377–392CrossRefGoogle Scholar
  26. [26]
    R. Tamassia, ”On embedding a graph in the grid with the minimum number of bends” SIAM J. Comput. 16 (1987), 421–444CrossRefGoogle Scholar
  27. [27]
    J. D. Ullman, ”Computational Aspects of VLSI” Comput. Science Press, Rockville, Md. (1984)Google Scholar
  28. [28]
    L. Valiant, ”Universality considerations in VLSI circuits”, IEEE Trans. Computers, C-30 (1981), 135–140.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1990

Authors and Affiliations

  • Franz J. Brandenburg
    • 1
  1. 1.Lehrstuhl für InformatikUniversität PassauPassauF.R. Germany

Personalised recommendations