Drawing a rooted tree as a rooted y−monotone minimum spanning tree
Introduction
Given a point set P with n points in the plane, the Euclidean Minimum Spanning Tree (EMST) of P, i.e. the connected spanning geometric graph of P where the sum of the Euclidean lengths of its edges is the minimum, can be obtained in time [14]. A Euclidean Minimum Spanning Tree of a point set is of maximum degree at most six [12] and a Euclidean Minimum Spanning Tree of maximum degree at most five can always be found [12]. Given a tree T of maximum degree at most five, T can be efficiently drawn in the plane such that the drawing is an EMST [12]. If T is of maximum degree six then the problem of drawing T as an EMST is NP-hard [7]. Regarding the area requirement of the drawing of a tree of maximum degree five as an EMST, the algorithm of Monma and Suri [12] produces a drawing in a grid of doubly exponential area. Additionally, there exist trees of maximum degree at most five for which no drawing as an EMST lies on a grid of polynomial area [1].
The rooted y−Monotone Minimum Spanning Tree (rooted y−MMST) of a rooted point set P of size n with root r is the spanning geometric graph of P in which each point of P is connected with r by a y−monotone path and the sum of the Euclidean lengths of its edges is the minimum. Mastakas and Symvonis [11] introduced the rooted y−MMST and they showed that it can be obtained in time. In contrast to the case of Euclidean Minimum Spanning Tree, it is not known whether there exists a constant number C such that any rooted y−MMST has maximum degree at most C, whether a drawing of a rooted tree as a rooted y−MMST can be efficiently produced and if there exist rooted trees for which any grid drawing as a rooted y−MMST requires exponential area.
The restricted fathers tree problem which was studied by Guttman-Beck and Hassin [8] is closely related to the problem of obtaining the rooted y−MMST of a rooted point set. The goal of the restricted fathers tree problem is to obtain the minimum spanning tree T of a weighted rooted graph G where each vertex of G contains a key, where in T the root is connected to all other vertices by paths in which the keys of the traversed vertices form a decreasing sequence. The restricted fathers tree problem is greedily solvable [8, Corollary 2.6].
Much research has been done in drawing a rooted tree under several aesthetical drawing conventions [5, Section 3.1]. The problem of finding a drawing that minimizes the area is widely studied [6]. Recently, Chan [3] improved the area requirements of several types of tree drawings. As far as monotonicity is concerned, the problem of drawing a rooted tree such that each child vertex is mapped to a point with y-coordinate smaller than or equal to the y-coordinate of the point to which its parent is mapped with the goal of optimizing the area of the drawing is widely investigated, e.g. see [15, Chapter 3], [4], [3]. Furthermore, the problem of drawing a rooted tree in the plane such that each pair of points is connected by a path that is monotone in some direction, in a grid of small area, is thoroughly investigated [2], [9], [13].
In this article, we give a linear-time algorithm that draws a rooted tree as a rooted y−MMST. That is, we provide a linear-time algorithm that, given a tree T with root r, constructs a planar straight-line drawing Γ of T with the following property: The rooted y-MMST of the rooted point set P at which the vertices of T lie in Γ is isomorphic to T, where the root of P is the point at which r lies in Γ. A corollary of the previous sentence is that there exists no constant number C such that the maximum degree of any rooted y−MMST is bounded by C. We also show that there exist rooted trees for which any grid drawing as a rooted y-MMST requires a grid of exponential area (and not a grid of polynomial area).
Section snippets
Preliminaries
Let be points of the plane. The vector from a to b is denoted as .
A geometric graph is a pair of (i) a point set P which is its vertex set and (ii) a set of line segments L connecting points of P which is its edge set. A geometric path , , …, is a geometric graph with , , …, as its vertex set and , , …, as its edge set. The geometric path , , …, is y−monotone if either (i) for each , 2, …, the y-coordinate of is greater
Drawing a rooted tree as a rooted y−monotone minimum spanning tree
We now give our algorithm that draws a rooted tree T as a rooted y−MMST. Our algorithm is recursive. It first draws the subtrees , , …, with roots , , …, , respectively, that are connected to the root r, as rooted y−MMSTs and then computes appropriate vectors , , …, such that the final drawing is a rooted y−MMST. The algorithm places the vertices such that for each non-root vertex u, the parent of u is the closest point below u to u and u is not connected to any other
Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgements
The author would like to thank the Professor Alexander Arvanitakis and the Professor Aris Pagourtzis for the thoughtful discussions. This research was financially supported by the Special Account for Research Grants of the National Technical University of Athens.
References (15)
- et al.
On the area requirements of Euclidean minimum spanning trees
Comput. Geom.
(2014) - et al.
A note on optimal area algorithms for upward drawings of binary trees
Comput. Geom.
(1992) - et al.
On two restricted ancestors tree problems
Inf. Process. Lett.
(2010) - et al.
Monotone drawings of graphs
J. Graph Algorithms Appl.
(2012) Tree drawings revisited
Discrete Comput. Geom.
(2020)- et al.
Graph Drawing: Algorithms for the Visualization of Graphs
(1999) - et al.
Drawing trees, outerplanar graphs, series-parallel graphs, and planar graphs in a small area