Rectangular Drawing (continue) Harald Scheper. Overview algorithm (directions) algorithm in linear time outline of algorithm (placement) Rect. Drawings.

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Octagonal Drawing Johan van Rooij. Overview What is an octagonal drawing Good slicing graphs Octagonal drawing algorithm for good slicing graphs Correctness.
Planar graphs Algorithms and Networks. Planar graphs2 Can be drawn on the plane without crossings Plane graph: planar graph, given together with an embedding.
Bart Jansen 1.  Problem definition  Instance: Connected graph G, positive integer k  Question: Is there a spanning tree for G with at least k leaves?
Planar Graphs: Coloring and Drawing
Covers, Dominations, Independent Sets and Matchings AmirHossein Bayegan Amirkabir University of Technology.
Orthogonal Drawing Kees Visser. Overview  Introduction  Orthogonal representation  Flow network  Bend optimal drawing.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Planar Orientations Chapter 4 ( ) in the book Written By: Tomer Heber.
Convex drawing chapter 5 Ingeborg Groeneweg. Summery What is convex drawing What is convex drawing Some definitions Some definitions Testing convexity.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Brute-Force Triangulation
Chapter 8, Part I Graph Algorithms.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 CHAPTER 4 - PART 2 GRAPHS 1.
Krakow, Summer 2011 Schnyder’s Theorem and Relatives William T. Trotter
Feb Polygon Triangulation Shmuel Wimer Bar Ilan Univ., School of Engineering.
Rajat K. Pal. Chapter 3 Emran Chowdhury # P Presented by.
Great Theoretical Ideas in Computer Science.
Graph Drawing Introduction 2005/2006. Graph Drawing: Introduction2 Contents Applications of graph drawing Planar graphs: some theory Different types of.
Convex Grid Drawings of 3-Connected Plane Graphs Erik van de Pol.
What is the next line of the proof? a). Let G be a graph with k vertices. b). Assume the theorem holds for all graphs with k+1 vertices. c). Let G be a.
Computational Geometry Seminar Lecture 1
Great Theoretical Ideas in Computer Science.
DAST 2005 Tirgul 11 (and more) sample questions. DAST 2005 Q.Let G = (V,E) be an undirected, connected graph with an edge weight function w : E→R. Let.
Graph Colouring Lecture 20: Nov 25.
Is the following graph Hamiltonian- connected from vertex v? a). Yes b). No c). I have absolutely no idea v.
Straight line drawings of planar graphs – part I Roeland Luitwieler.
Chapter 4: Straight Line Drawing Ronald Kieft. Contents Introduction Algorithm 1: Shift Method Algorithm 2: Realizer Method Other parts of chapter 4 Questions?
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Drawing of G. Planar Embedding of G Proposition Proof. 1. Consider a drawing of K 5 or K 3,3 in the plane. Let C be a spanning cycle. 2. If the.
Rectangular Drawing Imo Lieberwerth. Content Introduction Rectangular Drawing and Matching Thomassen’s Theorem Rectangular drawing algorithm Advanced.
What is the next line of the proof? a). Assume the theorem holds for all graphs with k edges. b). Let G be a graph with k edges. c). Assume the theorem.
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
Curve Curve: The image of a continous map from [0,1] to R 2. Polygonal curve: A curve composed of finitely many line segments. Polygonal u,v-curve: A polygonal.
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
Floorplanning. Obtained by subdividing a given rectangle into smaller rectangles. Each smaller rectangle corresponds to a module.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Graph Theory Ch6 Planar Graphs. Basic Definitions  curve, polygon curve, drawing  crossing, planar, planar embedding, and plane graph  open set  region,
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
Subdivision of Edge In a graph G, subdivision of an edge uv is the operation of replacing uv with a path u,w,v through a new vertex w.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
Orthogonal Drawings of Series-Parallel Graphs Joint work with Xiao Zhou by Tohoku University Takao Nishizeki.
Straight line drawings of planar graphs – part II Roeland Luitwieler.
1 Orthogonal Drawing (continued)  Sections 8.3 – 8.5 from the book  Bert Spaan.
Expanders via Random Spanning Trees R 許榮財 R 黃佳婷 R 黃怡嘉.
Introduction to Graph Theory
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Graph Colouring Lecture 20: Nov 25. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including.
2 Office hours: MWR 4:20-5:30 inside or just outside Elliott 162- tell me in class that you would like to attend. For those of you who cannot stay: MWR:
1) Find and label the degree of each vertex in the graph.
COMPSCI 102 Introduction to Discrete Mathematics.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Matchings and Factors Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
Week 11 - Wednesday.  What did we talk about last time?  Graphs  Paths and circuits.
Polygon Triangulation
1 Schnyder’s Method. 2 Motivation Given a planar graph, we want to embed it in a grid We want the grid to be relatively small And we want an efficient.
Trees.
Theory of Computational Complexity Probability and Computing Chapter Hikaru Inada Iwama and Ito lab M1.
Algorithms and Networks
Graphs and Algorithms (2MMD30)
Computational Geometry
Graph Drawing.
Proof technique (pigeonhole principle)
Great Theoretical Ideas in Computer Science
Algorithms and Complexity
Planarity Testing.
Victoria city and Sendai city
Graphs and Algorithms (2MMD30)
Discrete Mathematics for Computer Science
Presentation transcript:

Rectangular Drawing (continue) Harald Scheper

Overview algorithm (directions) algorithm in linear time outline of algorithm (placement) Rect. Drawings without Designated Corners

Algorithm To find directions of edges in rectangular drawing of G (vertical, horizontal) Later decide the integer coordinates of vertices

Algorithm (outline) Assume plane graph G has no bad cycle. Each C 0 (G) component treated independently. If there exists a boundary NS-, SN-, WE-, or EW-path then choose it as a partition path Otherwise find partition path P C and P CC from westmost NS-path, and recurse over subgraphs

Algorithm Main Algorithm Rectangular-Draw(G) 1.Draw the outer cycle C 0 (G) as a rectangle by 2 horizontal line segments P N, P S and 2 vertical line segments P E and P W 2.Find all C 0 (G) components J 1,..,J P 3.For each component J i Gi = C 0 (G) J i Draw(G i,J i )

Draw(G,J) if part If G has boundary NS-, SN-, WE-, or EW-path P –assume without loss of generality that P is a boundary NS-path –Draw all edges of P on vertical line (directions are vertical) –If |E(P)| ≥ 2 then F 1,..,F q are C 0 components of G P For each F i, i ≤ 1 ≤ q do –Draw (C 0 (G P ) F i, F i )

Draw(G i,J i ) else part No boundary NS-,SN-,EW-, or WE path Find westmost NS-path P Find partition-pair Pc and Pcc from P If P c = P cc then –Draw all edges of P c on a vertical line segment Recursive –Draw(C 0 (G i ) F i,F i )

Draw(G i,J i ) else, else part If P c ≠ P cc then –Draw all edges of P c and P cc on alternating sequences of horizontal, vertical line segments –G 1 is graph obtained form G W by contracting all edges of P CC that are on horizontal sides of rectangular embeddings of C 1,C 2,..C k G 2 = of P c G 3 = G(C 1 ), G 4 = G(C 2 )…G(C k ) –Recursive: Draw(C 0 (G j ) F j,F j ), 1 ≤ j ≤ q for each graph G i, 1 ≤ i ≤ k+2 Pcc

Linear time Find all C 0 components For each C 0 we find boundary NS-,SN-,EW- and WE-paths if exist, by traversing all boundary faces of G by cc depth-first search. Each boundary path gets a label, NN, NE,…, WW (start/end points). So NS-, SN-, EW-, WE-paths are found in constant time

Linear time no boundary NS-, SN-, EW-, WE paths find partition-pair P c and P cc give labels to the newly created paths by traversing them (once) problem if a subpath of the westmost NS-path is chosen as westmost NS- path P’ in a later recursive stage, which is not on P c or P cc.

Linear time then again have to traverse the facial cycles attached to P’, so time complexity not linear so store: –list edges e i elemof E(P) contained in boundary NN- and EN-paths –list edges e i elemof E(P) contained in boundary SS- and SE-paths to find P st and P en in later recursive stages

Linear time store array of length n = whether the vertex is a head or a tail vertex of a clock wise critical cycle C attached to P and whether n cc (C) = 1 or n cc (C) >1 indicate existence of critical cycles attached to P’ (not to find critical cycles again) every face become boundary face, and not again. so traversed constant time. => linear time.

Rectangular Grid Drawing 1 Algorithm finds only directions of all edges in G Now coordinates of vertices in G determined in linear time Assume for simplicity not-corner vertices have degree 3

Rectangular Grid Drawing 2 Graph T y spanning tree obtained from G delete not deleted

Rectangular Grid Drawing 3 16 maximal vertical lseg 15 maximal horizontal lseg

Rectangular Grid Drawing 4 to each maximal horizontal line segment L, we assign y(L) as y- coordinate of every vertex on L –P S is lowermost, P N is topmost –y(P S )=0 –compute y(L) bottom to top –For each vertex v assign temp(v) as temporary y-coordinate of v –For every vertex v on L two cases: v has neighbor u below v (temp(v) = y(L’)+1) v has no neighbor u below v (temp(v) = 0) –y(L) = max{temp(v)} v

Rectangular Grid Drawing 5 All maximal horizontal line segments with depth-first search = linear time Upperbounds on area of grid, W+H ≤ n/2 and W · H ≤ n 2 /16 –coordinate of south-west corner = (0,0), northeast = (W,H), at least one hor., vert. line segment –l v = #vertical linesegments, l h = #horizontal linesegments, l = l v + l h –each vertex (- 4) = one of the l-4 max. line seg (P N …) so n-4 = 2(l-4) => l-2 = n/2 because compact: H ≤ l h -1, W ≤ l v -1 = W+H ≤ l h + l v – 2 = l – 2 = n/2 => W · H ≤ n 2 /4

RD no designated corners 1 until now considered rect. plane graph G with Δ ≤ 3 with 4 outer vertices of degree 2 as corners now corners not designated efficiently find whether G has 4 outer vertices (degree 2) such that there is a rect. drawing

RD no designated corners 2 independent: no common vertex S 1 = {C 1,C 2 }, S 2 = {C 2,C 3,C 4 }

RD no designated corners 3 Theorem 6.4.1: G is 2 connected graph, Δ ≤ 3, has min. 4 outer vertices of degree 2, then rect. draw with 4 corners desig. corners if G satisfies: –every 2-legged cycle in G contains at least 2 outer vertices of degree 2 –every 3-legged cycle in G contains at least 1 outer vertex of degree 2 –if an independent set S of cycles in G consists of c 2 2 legged cycles and c 3 3- legged cycles then 2c 2 + c 3 ≤ 4

RD no designated corners 2 independent: no common vertex S1 = {C 1, C 2 }, c 2 = 2, c 3 = 0, 2*2+0 = 4 S2 = {C 2, C 3, C 4 }, c 2 = 1, c 3 = 2, 2*1+2 = 4

RD no designated corners 3 Necessity of Th : –assume G has rectangular drawing D with 4 corners. by fact 6.3.1: an indep. set S has c 2 2-legged C contains at least 2 corners, c 3 3-legged C contains at least 1 corner. All cycles independent, so at least 2c 2 + c 3 corners in D. Since there are 4 corners in D, 2c 2 +c 3 ≤ 4 In any rectangular drawing D of G, every 2- legged cycle of G contains 2 or more corners, every 3-legged cycle of G contains 1 or more corner, more than 3-legged has no corner

RD no designated corners 4 prove of 6.4.1: –show if the 3 conditions hold, then can choose 4 outer vertices of degree 2 as corners a,b,c,d, such that (theorem): any 2-legged cycle contains 2 or more corners any 3-legged cycle contains 1 or more corners

RD no designated corners 5 outline = (complete in article) let J 1,..,J p p ≥ 1 be C 0 (G) components of G in series C 1 and C 2 in J 1 and J p if 4 corners not been chosen, we choose a corner from each of innermost 3-legged cycles.

RD no designated corners 6 example

RD of Planar Graphs until now considered rectangular drawings of plane graphs (with fixed embedding), now of planar graphs with Δ ≤ 3 (without fixed embedding) say planar graph G has rect. drawing if at least one of the plane embeddings has rect. drawing

RD of Planar Graphs b, c, d are embeddings of planar graph b = rd, c and d not (3-legged cycle with no outer vertex of degree 2)

RD of Planar Graphs finding not trivial because exponential number of plane embeddings by algorithm as before. now linear algorithm to examine if there is a plane embedding with rect. drawing

Questions?