15-853Page1 15-853:Algorithms in the Real World Planar Separators I & II – Definitions – Separators of Trees – Planar Separator Theorem.

Slides:



Advertisements
Similar presentations
Chapter 11 Trees Graphs III (Trees, MSTs) Reading: Epp Chp 11.5, 11.6.
Advertisements

Trees Chapter 11.
Chapter 9 Graphs.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Bayesian Networks, Winter Yoav Haimovitch & Ariel Raviv 1.
9.7 Planar Graphs. Intro problem- 3 houses and 3 utilities K 3,3 problem: Can 3 houses be connected to 3 utilities so that no 2 lines cross? Similarly,
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
A Separator Theorem for Graphs with an Excluded Minor and its Applications Paul Seymour Noga Alon Robin Thomas Lecturer : Daniel Motil.
CompSci 102 Discrete Math for Computer Science April 19, 2012 Prof. Rodger Lecture adapted from Bruce Maggs/Lecture developed at Carnegie Mellon, primarily.
Graphs III (Trees, MSTs) (Chp 11.5, 11.6)
3.3 Spanning Trees Tucker, Applied Combinatorics, Section 3.3, by Patti Bodkin and Tamsen Hunter.
CMPS 2433 Discrete Structures Chapter 5 - Trees R. HALVERSON – MIDWESTERN STATE UNIVERSITY.
Feb Polygon Triangulation Shmuel Wimer Bar Ilan Univ., School of Engineering.
Applied Combinatorics, 4th Ed. Alan Tucker
Steps in DP: Step 1 Think what decision is the “last piece in the puzzle” –Where to place the outermost parentheses in a matrix chain multiplication (A.
Last time: terminology reminder w Simple graph Vertex = node Edge Degree Weight Neighbours Complete Dual Bipartite Planar Cycle Tree Path Circuit Components.
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Applied Combinatorics, 4th Ed. Alan Tucker
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Computational Geometry Seminar Lecture 1
Tucker, Applied Combinatorics, Section 1.4, prepared by Patti Bodkin
Definition Dual Graph G* of a Plane Graph:
Graph Theory TreesAlgorithms. Graphs: Basic Definitions 4 n Let n be the number of nodes (stations) and e be the number of edges (links). n A graph is.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
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.
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.
Multiple-Source Shortest Paths in Planar Graphs Allowing Negative Lengths Philip Klein Brown University.
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
Introduction to Planarity Test W. L. Hsu. Plane Graph A plane graph is a graph drawn in the plane in such a way that no two edges intersect A plane graph.
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
5.2 Trees  A tree is a connected graph without any cycles.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
V Spanning Trees Spanning Trees v Minimum Spanning Trees Minimum Spanning Trees v Kruskal’s Algorithm v Example Example v Planar Graphs Planar Graphs v.
Introduction to Graph Theory
MAT 2720 Discrete Mathematics Section 8.7 Planar Graphs
Planar Graphs Graph Coloring
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
Unit – V Graph theory. Representation of Graphs Graph G (V, E,  ) V Set of vertices ESet of edges  Function that assigns vertices {v, w} to each edge.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
PC-Trees & PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
S&H Planarity Test Based on PC-Trees Wen-Lian Hsu.
Great Theoretical Ideas in Computer Science for Some.
COMPSCI 102 Introduction to Discrete Mathematics.
Chapter 7 Planar Graphs 大葉大學 資訊工程系 黃鈴玲  7.2 Planar Embeddings  7.3 Euler’s Formula and Consequences  7.4 Characterization of Planar Graphs.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
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.
Discrete Structures Li Tak Sing( 李德成 ) Lectures
Algorithms and Networks
Outline 1 Properties of Planar Graphs 5/4/2018.
Applied Combinatorics, 4th Ed. Alan Tucker
Graph theory Definitions Trees, cycles, directed graphs.
12. Graphs and Trees 2 Summary
Introduction to Trees Section 11.1.
Algorithms and Complexity
Planarity Testing.
Depth Estimation via Sampling
Applied Combinatorics, 4th Ed. Alan Tucker
MAT 2720 Discrete Mathematics
N(S) ={vV|uS,{u,v}E(G)}
Gaph Theory Planar Graphs
Discrete Mathematics for Computer Science
Concepts of Computation
Presentation transcript:

15-853Page :Algorithms in the Real World Planar Separators I & II – Definitions – Separators of Trees – Planar Separator Theorem

15-853Page2 When I was a boy of 14 my father was so ignorant I could hardly stand to have the old man around. But when I got to be 21, I was astonished at how much he had learned in 7 years. - Mark Twain

15-853Page3 Planar Graphs Definition: A graph is planar if it can be embedded in the plane, i.e., drawn in the plane so that no two edges intersect. (equivalently: embedded on a sphere) vertex edge face

15-853Page4 Euler’s Formula Theorem: For any spherical polyhedron with V vertices, E edges, and F faces, V – E + F = 2. V = 6 E = 9 F = 5 Corollary: If a graph is planar then E  3(V-2) planar graph with n nodes has O(n) edges. (Use 2E  3F.)

15-853Page5 Kuratowski’s Theorem Theorem: A graph is planar if and only if it has no subgraph homeomorphic to K 5 or K 3,3. “forbidden subgraphs” or “excluded minors” K5K5 K 3,3

15-853Page6 Homeomorphs Definition: Two graphs are homeomorphic if both can be obtained from the same graph G by replacing edges with paths of length 2. A homeomorph of K 5

15-853Page7 Algorithms for Planar Graphs Hopcroft-Tarjan 1973: Algorithm for determining if an n-node graph is planar, and, if so, finding a planar embedding, all in O(n) time. (Based on depth-first search.) Lipton-Tarjan 1977: Proof that planar graphs have an O(  n)-vertex separator theorem, and an algorithm to find such a separator. Lipton-Rose-Tarjan 1979: Proof that nested- dissection produces Gaussian elimination orders for planar graphs with O(n log n) fill.

15-853Page8 Separators of Trees Theorem: Suppose that each node v in a tree T has a non-negative weight w(v), and the sum of the weights of the nodes is S. Then there is a single node whose removal (together with its incident edges) separates the graph into two components, each with weight at most 2S/ S = 26

15-853Page9 Proof of Theorem: Direct each edge towards greater weight. Resolve ties arbitrarily. Find a “terminal” vertex – one with no outgoing edges. This vertex is a separator S = 26

15-853Page10 Observation There is no corresponding theorem for edge separators

15-853Page11 Weighted Edges Theorem: Suppose that each edge e in a degree-D tree T has a non-negative weight w(e), and the sum of the weights of the edges is S. Then there is a single edge whose removal separates the graph into two components, each with weight at most (1-1/D)S S = 23 Proof: Exercise.

15-853Page12 Planar Separator Theorem Theorem (Lipton-Tarjan 1977): The class of planar graphs has a (2/3,4)  n vertex separator theorem. Furthermore, such a separator can be found in linear time.

15-853Page13 Planar Separator Algorithm Starting at an arbitrary vertex, find a breadth-first spanning tree of G. Let L i denote the i’th level in the tree, and let d denote the number of levels. a b c fe g L0L0 L1L1 L2L2 a b c ef g Observe that each level of tree separates nodes above from nodes below.

15-853Page14 Breadth-First Search Tree L0L0 L1L1 LdLd If d < O(  n), call algorithm CUTSHALLOW on G.

15-853Page15 Algorithm CUTSHALLOW Theorem: Suppose a connected planar graph G has a spanning tree whose depth is bounded by d. Then the graph has a 2/3 vertex separator of size at most 2d+1. Proof later. What if G is not connected? If there is a connected component of size between n/3 and 2n/3, we have a separator of size 0. If all components have size less than n/3, we have a separator of size 0. Otherwise, separate largest component.

15-853Page16 Look for “middle” level L0L0 LjLj LdLd n/2 n L1L1 Number vertices in order they are found. Let L j denote level containing vertex n/2. If |L j | = O(  n), L j serves as a ½ separator. Done.

15-853Page17 Find consecutive large levels in middle L0L0 LjLj LdLd LiLi L k-1 Suppose levels L i+1 through L k-1 all have at least g  n nodes, for some constant g, where i < j < k, and both L i and L k have fewer than g  n nodes. L i+1 LkLk

15-853Page18 Various Cases R S L0L0 L i+1 LiLi LkLk L k-1 LdLd Observe that |R| < n/2 and |S| < n/2. If |R| > n/3, then L i is a 2/3-separator. Similarly, if |S| > n/3, then L k is a 2/3-separator.

15-853Page19 Last Case R L0L0 L i+1 LiLi LkLk L k-1 LdLd S T |R| < n/3 |S| < n/3 Since each level in T contains at least g  n nodes, T has at most  n/g levels. Apply algorithm CUTSHALLOW to T, yielding T 1, T 2, and separator C. Combine larger of T 1,T 2 with smaller of R-L i, S-L k, and vice versa. Separator L i  C  L k T1T1 T2T2 C

15-853Page20 Dual Graph In the dual of a plane graph G (planar graph embedded in the plane), there is a node for each face of G, and an arc between any two faces that share an edge in G. The dual graph is also planar.

15-853Page21 Cycles A cycle C in G vertex-separates (or edge-separates) the vertices and edges inside C from those outside. Similarly, a cycle C’ in the dual of G edge-separates the vertices of G inside C’ from those outside. C C’

15-853Page22 Triangulation In a triangulated plane graph, every face (including the external face) has three sides. Theorem: Any plane graph can be triangulated by adding edges. (Use E  3 (V-2).)

15-853Page23 Algorithm CUTSHALLOW Start with any depth d spanning tree T of G. (T need not be a breadth-first search tree.) Assume G has been triangulated. tree edge e’  T non-tree edge e  E-T One of these cycles will be the separator! Observe that adding any non-tree edge e  E-T to T creates a cycle in G.

15-853Page24 Detour: Cycle Basis Let e 1, e 2, …, e k denote the non-tree edges. Let C i denote the cycle induced by e i. e1e1 C1C1 Let C 1  C 2 denote (C 1  C 2 ) – (C 1  C 2 ), i.e., symmetric difference. Theorem: Any cycle C in G can be written as C i1  C i2    C ij where e i1, e i2, …, e ij are the non-tree edges in C.

15-853Page25 Spanning Tree of Dual Graph Let A denote the set of arcs in the dual graph D that cross non-tree edges of G. A in green

15-853Page26 Spanning Tree of Dual Graph Claim: A is a spanning tree of D. Proof: 1)A is acyclic -- A cycle C in A would enclose some vertex v of G (since edges of E-T cross arcs of C). C also corresponds to an edge separator of G. But since T spans G, the separator would have to include an edge e  T, so C can’t be made of only arcs of A, a contradiction. 2)There is a path in A between any two nodes of D -– because T is acyclic. v C e Not in A!

15-853Page27 Rooting the Spanning Tree Pick an arbitrary degree-1 node of A, call it x 0 and make it the root of A, directing arcs towards A. For any cycle in G, call side containing x 0 the “outside”. x0x0

15-853Page28 Induced Cycles x0x0 G D x f Suppose x is the child end of arc f  A, which crosses edge e  E-T. Adding e to T induces cycle C x, of depth at most 2d+1. We say that C x is the cycle induced by x. Every node of D except x 0 induces a cycle in G. e CxCx cycles in blue

15-853Page29 Containment and Enclosure Given W  V, we say that cycle C in G contains W if every vertex in W is either inside or on C. Note that if the vertices on cycle C 1 are contained in cycle C 2, then any vertex inside C 1 is also inside C 2. C W C2C2 C1C1 Similarly, C encloses W (here W can be a set of vertices in G or a set of nodes in D) if all vertices of W are inside of C. C W vertices of W shown red

15-853Page30 Lemma 1 Lemma 1: Suppose C v is the cycle induced by node v. Then all the nodes in the subtree of A rooted at v are inside C v. Proof: Let u be the parent of v in A. Let f = {v,u} be the arc from v to u, and let e be the edge in E-T that f crosses. Edge e induces cycle C v in G, and u and v are on different sides of C v. x0x0 G D v f e CvCv u w Suppose w is a descendant of v. There is a path from face v to face w that doesn’t cross f or any edge of T. Hence w is on the same side of C v as v. Similarly, x 0 is on the same side of C v as u.

15-853Page31 Lemma 2 Lemma: The cycle induced by a node of D contains the cycle induced by any one of its children. Moreover, the cycles induced by siblings do not enclose any common vertex. Proof: Suppose u is neither a leaf nor the root of A, and corresponds to a face {a,b,c} of G. Since G is triangulated, u can have either one or two children. a b c u Case 1: u has only one child v. Case 2: u has two children, v and w.

15-853Page32 Case 1 (a) Case 1: u has one child v. Assume w.l.o.g. that arc (v,u) crosses edge {b,c}, and that {a,b}  T, and {b,c},{c,a}  E-T. Case 1 (a): a does not lie on the cycle C v. a b c u v x0x0 CvCv Node u lies outside C v, so vertex a must also lie outside C v. Hence, C u contains C v and the two cycles enclose the same set of vertices of G. CuCu

15-853Page33 Case 1 (b) Case 1 (b): a lies on the cycle C v. a b cu v x0x0 CvCv CuCu The root, x 0, is outside of C u and u is inside of C u. By Lemma 1, v is also inside C u. Hence, b is inside C u, and C u contains C v. C u encloses one more vertex than C v, b.

15-853Page34 Case 2 Case 2: Node u has two children, v and w. a b cu v x0x0 w g p By Lemma 1, neither v nor w can be on the same side of C u as the root x 0. Hence, b is contained in C u. Since T is a spanning tree of G, there is a unique shortest path p in T from b to the cycle C u, intersecting C u at some vertex g. Path p is contained in C u, and has length at most 2d. Both C v and C w are contained in C u, and because G is planar, G partitions the vertices enclosed in C u. C u also encloses the vertices (except g) on p.

15-853Page35 Assigning Weights to Nodes Lemma: It is possible to assign a non-negative number W(u) to each node u of D (except x 0 ) such that the number of vertices enclosed by the cycle induced by u equals the sum of the weights of the nodes in the subtree rooted at u. The weight of x 0 is defined to be 0. Moreover, the weight of a node is bounded by 2d. x0x0 G D

15-853Page36 Algorithm for Assigning Weights x0x0 G D Leaves and x 0 are assigned weight 0. Let u be an internal node of A. From proof of Lemma 2: Case 1 (a): W(u) = 0; C u encloses no more vertices than C v. Case 1 (b): W(u) = 1; C u encloses one more vertex than C v. Case 2: W(u) = length of path p (at most 2d)

15-853Page37 Total Tree Weight Lemma 4: The sum of the weights of the nodes of D is |V|-3, where G = (V,E). Proof: Since W(x 0 ) = 0, the sum of the weights equals the number of vertices inside the cycle induced by the single child z of x 0. x0x0 G D The cycle C z is a triangle corresponding to the face x 0. Hence, all vertices but the three on the triangle are enclosed by C z. z x0x0 z CzCz

15-853Page38 Finding a Separator Redirect arcs toward greater weight. Find a single-node (1/3,2/3)-separator of the tree A (a terminal node u). v u v u w Even though u is the separator, C u might enclose more than 2n/3 vertices, because of its own weight W(u). If C u encloses 2n/3 or fewer, it is the separator. Otherwise, two cases to consider: u has one child or u has two children in A. The rest is bookkeeping. x0x u C v is the separator Whichever of C v and C w encloses more vertices is the separator