Upward drawings of trees on the minimum number of layers

  • Authors:
  • Md. Jawaherul Alam;Md. Abul Hassan Samee;Md. Mashfiqui Rabbi;Md. Saidur Rahman

  • Affiliations:
  • Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology;Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology;Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology;Department of Computer Science and Engineering, Bangladesh University of Engineering and Technology

  • Venue:
  • WALCOM'08 Proceedings of the 2nd international conference on Algorithms and computation
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

In a planar straight-line drawing of a tree T on k layers, each vertex is placed on one of k horizontal lines called layers and each edge is drawn as a straight-line segment. A planar straight-line drawing of a rooted tree T on k layers is called an upward drawing of T on k layers if, for each vertex u of T, no child of u is placed on a layer vertically above the layer on which u has been placed. For a tree T having pathwidth h, a linear-time algorithm is known that produces a planar straight-line drawing of T on ⌈3h/2⌉ layers. A necessary condition characterizing trees that admit planar straight-line drawings on k layers for a given value of k is also known. However, none of the known algorithms focuses on drawing a tree on the minimum number of layers. Moreover, although an upward drawing is the most useful visualization of a rooted tree, the known algorithms for drawing trees on k layers do not focus on upward drawings. In this paper, we give a linear-time algorithm to compute the minimum number of layers required for an upward drawing of a given rooted tree T. If T is not a rooted tree, then we can select a vertex u of T in linear time such that an upward drawing of T rooted at u would require the minimum number of layers among all other upward drawings of T rooted at the vertices other than u. We also give a linear-time algorithm to obtain an upward drawing of a rooted tree T on the minimum number of layers.