Article contents
Functional Pearls
Deriving tidy drawings of trees
Published online by Cambridge University Press: 07 November 2008
Abstract
The tree-drawing problem is to produce a ‘tidy’ mapping from elements of a tree to points in the plane. In this paper, we derive an efficient algorithm for producing tidy drawings of trees. The specification, the starting point for the derivations, consists of a collection of intuitively appealing criteria satisfied by tidy drawings. The derivation shows constructively that these criteria completely determine the drawing. Indeed, the criteria completely determine a simple but inefficient algorithm for drawing a tree, which can be transformed into an efficient algorithm using just standard techniques and a small number of inventive steps.
The algorithm consists of an upwards accumulation followed by a downwards accumulation on the tree, and is further evidence of the utility of these two higher-order tree operations.
- Type
- Articles
- Information
- Copyright
- Copyright © Cambridge University Press 1996
References
- 6
- Cited by
Discussions
No Discussions have been published for this article.