270 likes | 405 Views
Octagonal Drawing. Johan van Rooij. Overview. What is an octagonal drawing Good slicing graphs Octagonal drawing algorithm for good slicing graphs Correctness Time Complexity. Definition. Octagonal drawing: Orthogonal drawing Outer cycle is a rectangle
E N D
Octagonal Drawing Johan van Rooij
Overview • What is an octagonal drawing • Good slicing graphs • Octagonal drawing algorithm for good slicing graphs • Correctness • Time Complexity
Definition Octagonal drawing: • Orthogonal drawing • Outer cycle is a rectangle • Each inner face has at most eight corners • The area of each inner face is equal to a prescribed number
Applications • VLSI floorplanning • Modules with fixed space requirements • Adjacency requirements for communication • Often not possible with rectangular drawings • Often “good slicing floorplans”
Slicing Graph For a 2-3 plane graph, with designated corners and N,E,S,W boundary we have: Slicing Path: Path from N to S or E to W boundary that does not pass through other outer vertices or edges Slicing Graph: One inner face or has a slicing path which divides the graph in two slicing graphs
Slicing Tree We can make a tree using the recursive definition of a slicing graph • Leaf: face of the graph • Internal node: slicing path • V-Node: Vertical (N-S) slicing path • H-Node: Horizontal (W-E) slicing path
Good Slicing Graph Good Slicing Tree: Every H-Node has at least one child which is a leaf. Good Slicing Graph: Graph corresponding to a good slicing tree Therefore: north or south subgraph of WE-slicing path never sliced
Octagonal Drawing Algorithm Given a good slicing graph with a given good slicing tree we will create an octagonal drawing for the graph. Preprocessing step: Add to each node of the slicing tree the total required area of the faces corresponding to its descendants.
Algorithm Outline • Choose initial height and width and draw the outer cycle and arbitrarily fix all vertices on east boundary. • Traverse tree: root, right, left subtree • Draw slicing paths corresponding to the nodes of the tree from east to west. • For Leaf: do nothing • Always: east boundary vertices fixed
Feasible Face • Area equals prescribed area • max( lt , lb ) < fλ • If xN2 concave: lt < (f - fE)λ • If xS1 concave: lb < (f – fE)λ • If xN2 convex: lt ≥ fE λ • If xS1 convex: lb ≥ fE λ • If xN2 andIf xS2 concave: lb – lt ≥ fE λ • If xN1 andIf xS1 concave: lt – lb ≥ fE λ f = total nr of inner faces fE = nr of faces inside current face which have an edge on the east boundary
Correctness Theorem The algorithm finds an octagonal drawing • The initial rectangle is a feasible face Next slides: • If the face corresponding to an internal node of the slicing tree is feasible we can draw the corresponding slicing path such that both new faces are feasible as well.
Vertical Slicing • North and south boundary ether face or outer cycle: no interfering vertices! • We can draw a straight vertical line such that the area’s are correct. • New faces feasible? • Because of condition 2 of the original face, the new faces are also feasible
Vertical Slicing is Feasible? Condition 2 + formula for λ : • max( lt , lb ) H < fλH = Amin
Horizontal Slicing • We will only show this for shape (a) • East node of slicing path fixed • Two cases - horizontal line through fixed eastern nodes intersects: • West boundary – three subcases • Line segment between xS1 and xS2
Horizontal Slicing – case 1a Case 1a: Straight line gives correct areas North face feasible: 2. max( lNt, lNb) = max( lt, 0 ) ≤ max( lt, lb ) < fλ 3. lNt = lt < (f - fE)λ < (f – fNE)λ South face feasible: 2. max( lSt, lSb ) = max( 0, lb ) ≤ max( lt, lb ) < fλ 6. lSb= lb ≥ fEλ > fSEλ
Horizontal Slicing – case 1b Case 1b: North face is too large Fix x’S1 such that lNb= lt + fNEλ And x’S2 such that the areas are correct The slicing path always is below the top boundary Since7: lb ≥ fEλ + lt max(lb, lt) ≥ fEλ + lt > fNEλ + lt = lNb Thus: lNbH < max(lb,lt)H Since2: lNbH < fλH = Amin
Horizontal – case 1b feasibility Case 1b: North face is too large North face feasible: Since: lNb= lt + fNEλ (and 7) lb > lNb > lt 2. max( lNt, lNb) < max( lt, lb ) < fλ 3. lNt = lt ≤ (f – fE)λ < (f – fNE)λ Etcetera…
Horizontal Slicing – case 2 Case 2: Horizontal line through fixed vertex intersect south boundary Fix x’S1 such that lNb= lt + fNEλ and x’S2 by required area Possible since 7: lNb = lt + fNEλ < lt + fEλ ≤ lb And: max(lt , lb)H < fλH = Amin
What have we shown? • If the face corresponding to an internal node of the slicing tree is feasible we can draw the corresponding slicing path such that both new faces are feasible as well. • Proves the Correctness Theorem
Time Complexity • The Algorithm works in linear time • Bottom up computation of areas • Each slicing path can be imbedded in constant time
How To Obtain the Good Slicing Tree? Rahman et al. If a 2-3 plane graph has a rectangular drawing and every proper inner cycle has at least five legs then it is a good slicing graph and a good slicing tree can be found in linear time! Proper inner cycle: contains no outer edges