# Balanced Aspect Ratio Trees and Their Use for Drawing Very Large Graphs

## Abstract

We describe a new approach for cluster-based drawing of very large graphs, which obtains clusters by using binary space partition (BSP) trees. We also introduce a novel BSP-type decomposition, called the *balanced aspect ratio* (BAR) tree, which guarantees that the cells produced are convex and have bounded aspect ratios. In addition, the tree depth is *O*(log*n*), and its construction takes *O*(*n* log *n*) time, where *n* is the number of points. We show that the BAR tree can be used to recursively divide a graph into subgraphs of roughly equal size, such that the drawing of each subgraph has a *balanced aspect ratio.* As a result, we obtain a representation of a graph as a collection of *O*(log *n*) layers, where each succeeding layer represents the graph in an increasing level of detail. The overall running time of the algorithm is *O*(*n* log *n* + *m* + *D* _{0}(*G*)), where *n* and *m* are the number of vertices and edges of the graph *G*, and *D* _{0}(*G*) is the time it takes to obtain an initial embedding of *G.* In particular, if the graph is planar each layer is a graph drawn with straight lines and without crossings on the *n* × *n* grid and the running time reduces to *O*(*n* log *n*).

### References

- [1]S. Arya, D. M. Mount, N. S. Netanyahu, R. Silverman, and A. Wu. An optimal algorithm for approximate nearest neighbor searching. In
*Proc. 5th ACM-SIAM Sympos. Discrete Algorithms*, pages 573–582, 1994.Google Scholar - [2]Sunil Arya and David M. Mount. Approximate range searching. In
*Proc. 11th Annu. ACM Sympos. Comput. Geom.*, pages 172–181, 1995.Google Scholar - [3]P. B. Callahan and S. R. Kosaraju. A decomposition of multidimensional point sets with applications to k-nearest-neighbors and n-body potential fields.
*J. ACM*, 42:67–90, 1995.MATHCrossRefMathSciNetGoogle Scholar - [4]H. de Fraysseix, J. Pach, and R. Pollack. Small sets supporting Fary embeddings of planar graphs. In
*Proc. 20th Annu. ACM Sympos. Theory Comput.*, pages 426–433, 1988.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.MATHGoogle Scholar - [6]P. Eades and Q. W. Feng. Multilevel visualization of clustered graphs.
*Lecture Notes in Computer Science*, 1190:101-??, 1997.Google Scholar - [7]P. Eades, Q. W. Feng, and X. Lin. Straight-line drawing algorithms for hierarchical graphs and clustered graphs.
*Lecture Notes in Computer Science*, 1190:113-??, 1997.Google Scholar - [8]I. Fary. On straight lines representation of planar graphs.
*Acta Sci. Math. Szeged.*, 11:229–233, 1948.MathSciNetGoogle Scholar - [9]Q.-W. Feng, R. F. Cohen, and P. Eades. How to draw a planar clustered graph.
*Lecture Notes in Computer Science*, 959:21-??, 1995.Google Scholar - [10]Q.-W. Feng, R. F. Cohen, and P. Eades. Planarity for clustered graphs.
*Lecture Notes in Computer Science*, 979:213-??, 1995.Google Scholar - [11]J. H. Friedman, J. L. Bentley, and R. A. Finkel. An algorithm for finding best matches in logarithmic expected time.
*ACM Trans. Math. Softw.*, 3:209–226, 1977.MATHCrossRefGoogle Scholar - [12]George W. Furnas. Generalized fisheye views. In
*Proceedings of ACM CHI’86 Conference on Human Factors in Computing Systems*, Visualizing Complex Information Spaces, pages 16–23, 1986.Google Scholar - [13]K. Kaugars, J. Reinfelds, and A. Brazma. A simple algorithm for drawing large graphs on small screens. In R. Tamassia and I. G. Tollis, editors,
*Graph Drawing (Proc. GD’ 94*, volume 894 of*Lecture Notes in Computer Science*, pages 278–281. Springer-Verlag, 1995.Google Scholar - [14]R. J. Lipton, S. C. North, and J. S. Sandberg. A method for drawing graphs. In
*Proc. 1st Annu. ACM Sympos. Comput. Geom.*, pages 153–160, 1985.Google Scholar - [15]R. J. Lipton and R. E. Tarjan. Applications of a planar separator theorem.
*SIAM J. Comput.*, 9:615–627, 1980.MATHCrossRefMathSciNetGoogle Scholar - [16]G. L. Miller. Finding small simple cycle separators for 2-connected planar graphs. Report 85-336, Dept. Comput. Sci., Univ. Southern California, Los Angeles,CA, 1985.Google Scholar
- [17]Frances J. Newbery. Edge concentration: A method for clustering directed graphs. In
*Proceedings of the 2nd International Workshop on Software Configuration Management*, pages 76–85, Princeton, New Jersey, October 1989.Google Scholar - [18]S. C. North. Drawing ranked digraphs with recursive clusters. In
*Graph Drawing’ 93, ALCOM International Workshop PARIS 1993 on Graph Drawing and Topological Graph Algorithms*, September 1993.Google Scholar - [19]Sablowski and Frick. Automatic graph clustering. In
*GDRAWING: Conference on Graph Drawing (GD)*, 1996.Google Scholar - [20]H. Samet.
*The Design and Analysis of Spatial Data Structures*. Addison-Wesley, Reading,MA, 1990.Google Scholar - [21]M. Sarkar and M. H. Brown. Graphical fisheye views.
*Commun. ACM*, 37(12):73–84, 1994.CrossRefGoogle Scholar - [22]W. Schnyder. Embedding planar graphs on the grid. In
*Proc. 1st ACM-SIAM Sympos. Discrete Algorithms*, pages 138–148, 1990.Google Scholar - [23]S. K. Stein. Convex maps.
*Proc. Amer. Math. Soc.*, 2:464–466, 1951.MATHCrossRefMathSciNetGoogle Scholar - [24]K. Sugiyama and K. Misue. Visualization of structural information: Automatic drawing of compound digraphs.
*IEEE Trans. Softw. Eng.*, 21(4):876–892, 1991.MathSciNetGoogle Scholar - [25]W. T. Tutte. How to draw a graph.
*Proceedings London Mathematical Society*, 13(3):743–768, 1963.MATHCrossRefMathSciNetGoogle Scholar - [26]K. Wagner. Bemerkungen zum vierfarbenproblem.
*Jahresbericht der Deutschen Mathematiker-Vereinigung*, 46:26–32, 1936.Google Scholar