• Title/Summary/Keyword: upright drawings

Search Result 1, Processing Time 0.014 seconds

UPRIGHT DRAWINGS OF GRAPHS ON THREE LAYERS

  • Alam, Muhammad Jawaherul;Rabbi, Md. Mashfiqui;Rahman, Md. Saidur;Karim, Md. Rezaul
    • Journal of applied mathematics & informatics
    • /
    • v.28 no.5_6
    • /
    • pp.1347-1358
    • /
    • 2010
  • An upright drawing of a planar graph G on k layers is a planar straight-line drawing of G, where the vertices of G are placed on a set of k horizontal lines, called layers and no two adjacent vertices are placed on the same layer. There is a previously known algorithm that decides in linear time whether a planar graph admits an upright drawing on k layers for a fixed value of k. However, the constant factor in the running time of the algorithm increases exponentially with k and makes it impractical even for k = 3. In this paper, we give a linear-time algorithm to examine whether a biconnected planar graph G admits an upright drawing on three layers and to obtain such a drawing if it exists. We also give a necessary and sufficient condition for a tree to have an upright drawing on three layers. Our algorithms in both the cases are much simpler and easier to implement than the previously known algorithms.