# Optimal algorithms to embed trees in a point set

## Abstract

We present optimal *Θ(n* log *n*) time algorithms to solve two tree embedding problems whose solution previously took quadratic time or more: rooted-tree embeddings and degree-constrained embeddings. In the rooted-tree embedding problem we are given a rooted-tree *T* with *n* nodes and a set of *n* points *P* with one designated point *p* and are asked to find a straight-line embedding of *T* into *P* with the root at point *p*. In the degree-constrained embedding problem we are given a set of *n* points *P* where each point is assigned a positive degree and the degrees sum to 2*n}*-2 and are asked to embed a tree in *P* using straight lines that respects the degrees assigned to each point of *P*. In both problems, the points of *P* must be in general position and the embeddings have no crossing edges.

## Keywords

Convex Hull Geographic Information System Tree Edge Embedding Problem Maintenance Structure## References

- 1.P. Bose, G. Di Battista, W. Lenhart, and G. Liotta. Proximity constraints and representable trees. In R. Tamassia and I. G. Tollis, editors,
*Graph Drawing (Proc. GD '94)*, volume 894 of*Lecture Notes in Computer Science*, pages 340–351. Springer-Verlag, 1995.Google Scholar - 2.P. Bose, W. Lenhart, and G. Liotta. Characterizing proximity trees. Report TR-SOCS-93.9, School of Comp. Sci., McGill Univ., Montreal, Quebec, Canada, 1993.Google Scholar
- 3.B. Chazelle. On the convex layers of a planar set.
*IEEE Transactions on Information Theory*, IT-31:509–517, 1985.CrossRefGoogle Scholar - 4.P. Crescenzi and A. Piperno. Optimal-area upward drawings of AVL trees. In R. Tamassia and I. G. Tollis, editors,
*Graph Drawing (Proc. GD '94)*, volume 894 of*Lecture Notes in Computer Science*, pages 307–317. Springer-Verlag, 1995.Google Scholar - 5.G. Di Battista, P. Eades, R. Tamassia, and I. G. Tollis. Algorithms for drawing graphs: an annotated bibliography.
*Comput. Geom. Theory Appl.*, 4:235–282, 1994.Google Scholar - 6.P. Eades and S. Whitesides. The realization problem for Euclidean minimum spanning trees is NP-hard. In
*Proc. 10th Annu. ACM Sympos. Comput. Geom.*, pages 49–56, 1994.Google Scholar - 7.J. Hershberger and S. Suri. Applications of a semi-dynamic convex hull algorithm.
*BIT*, 32:249–267, 1992.CrossRefGoogle Scholar - 8.Y. Ikebe, M. Perles, A. Tamura, and S. Tokunaga. The rooted tree embedding problem into points in the plane.
*Discrete & Computational Geometry*, 11:51–63, 1994.Google Scholar - 9.G. Kant, G. Liotta, R. Tamassia, and I. Tollis. Area requirement of visibility representations of trees. In
*Proc. 5th Canad. Conf. Comput. Geom.*, pages 192–197, Waterloo, Canada, 1993.Google Scholar - 10.D. E. Knuth.
*Fundamental Algorithms*, volume 1 of*The Art of Computer Programming*. Addison-Wesley, second edition, 1973.Google Scholar - 11.J. Manning and M. J. Atallah. Fast detection and display of symmetry in trees.
*Congressus Numerantium*, 64:159–169, 1988.Google Scholar - 12.A. Melkman. On-line construction of the convex hull of a simple polyline.
*Information Processing Letters*, 25:11–12, 1987.CrossRefGoogle Scholar - 13.C. Monma and S. Suri. Transitions in geometric minimum spanning trees. In
*Proc. 7th Annu. ACM Sympos. Comput. Geom.*, pages 239–249, 1991.Google Scholar - 14.A. Okabe, B. Boots, and K. Sugihara.
*Spatial Tessellations: Concepts and Applications of Voronoi Diagrams*. John Wiley & Sons, 1992.Google Scholar - 15.J. O'Rourke.
*Computational Geometry in C*. Cambridge University Press, 1994.Google Scholar - 16.M. Overmars and J. van Leeuwen. Maintenance of configurations in the plane.
*Journal of Computer and System Sciences*, 23:166–204, 1981.CrossRefGoogle Scholar - 17.J. Pach and J. Törőcsik. Layout of rooted trees. In W. T. Trotter, editor,
*Planar Graphs*, volume 9 of*DIMACS Series*, pages 131–137. American Mathematical Society, 1993.Google Scholar - 18.W. Paul and J. Simon. Decision trees and random access machines. Logic and Algorithmics, Monograph 30, L'Enseignement Mathématique, 1987.Google Scholar
- 19.F. P. Preparata and M. I. Shamos.
*Computational Geometry: an Introduction*. Springer-Verlag, New York, NY, 1985.Google Scholar - 20.A. Tamura and Y. Tamura. Degree constrained tree embedding into points in the plane.
*Information Processing Letters*, 44:211–1214, 1992.CrossRefGoogle Scholar