Acta Informatica

, Volume 18, Issue 4, pp 377–392

The complexity of drawing trees nicely

  • Kenneth J. Supowit
  • Edward M. Reingold
Article

DOI: 10.1007/BF00289576

Cite this article as:
Supowit, K.J. & Reingold, E.M. Acta Informatica (1983) 18: 377. doi:10.1007/BF00289576

Summary

We investigate the complexity of producing aesthetically pleasing drawings of binary trees, drawings that are as narrow as possible. The notion of what is aesthetically pleasing is embodied in several constraints on the placement of nodes, relative to other nodes. Among the results we give are: (1) There is no obvious “principle of optimality” that can be applied, since globally narrow, aesthetic placements of trees may require wider than necessary subtrees. (2) A previously suggested heuristic can produce drawings on n-node trees that are Θ(n) times as wide as necessary. (3) The problem can be reduced in polynomial time to linear programming; hence, if the coordinates assigned to the nodes are continuous variables, then the problem can be solved in polynomial time. (4) If the placement is restricted to the integral lattice then the problem is NP-hard, as is its approximation to within a factor of about 4 per cent.

Copyright information

© Springer-Verlag 1983

Authors and Affiliations

  • Kenneth J. Supowit
    • 1
  • Edward M. Reingold
    • 1
  1. 1.Department of Computer ScienceUniversity of Illinois at Urbana-ChampaignUrbanaUSA
  2. 2.Hewlett-Packard, Computer Research LabPalo AltoUSA