A More Practical Algorithm for Drawing Binary Trees in Linear Area with Arbitrary Aspect Ratio

  • Ashim Garg
  • Adrian Rusu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2912)


Trees are usually drawn using planar straight-line drawings. [1] presented an algorithm for constructing a planar straight-line grid drawing of an n-node binary tree with area O(n) and any pre-specified aspect ratio in the range [n  − α ,n α ], where 0 ≤ α < 1 is any constant, in \(\mathcal{O}(n {\rm log}n)\) time. Unfortunately, the algorithm of [1] is not suitable for practical use. The main problem is that the constant hidden in the “Oh” notation for area is quite large (e.g., it can be as large as 3900).

In this paper, we have made several practical improvements to the algorithm, which make it suitable for practical use. We have also conducted experiments on this newer version of the algorithm for randomly-generated and complete binary trees with up to 50,000, and 65,535 nodes, respectively. Our experiments show that it constructs area-efficient drawings in practice, with area at most 10 times and 8 times the number of nodes for randomly-generated and complete binary trees, respectively.


  1. 1.
    Garg, A., Rusu, A.: Straight-line drawings of binary trees with linear area and arbitrary aspect ratio. In: Goodrich, M.T., Kobourov, S.G. (eds.) GD 2002. LNCS, vol. 2528, pp. 320–331. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  2. 2.
    Garg, A., Rusu, A.: A more practical algorithm for drawing binary trees in linear area with arbitrary aspect ratio. Technical Report No. 2003-12, Department of Computer Science and Engineering, University at Buffalo, Buffalo, NY (2003)Google Scholar
  3. 3.
    Valiant, L.: Universality considerations in VLSI circuits. IEEE Trans. Comput. C-30(2), 135–140 (1981)MathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Ashim Garg
    • 1
  • Adrian Rusu
    • 1
  1. 1.Department of Computer Science and EngineeringUniversity at BuffaloBuffaloUSA

Personalised recommendations