Finding maximal planar subgraphs Wen-Lian Hsu 1/33.

Slides:



Advertisements
Similar presentations
Graph Algorithms Algorithm Design and Analysis Victor AdamchikCS Spring 2014 Lecture 11Feb 07, 2014Carnegie Mellon University.
Advertisements

Chapter 9 Graphs.
Divide and Conquer. Subject Series-Parallel Digraphs Planarity testing.
Map Overlay Algorithm. Birch forest Wolves Map 1: Vegetation Map 2: Animals.
1/44 A simple Test For the Consecutive Ones Property.
1 Section 9.4 Spanning Trees. 2 Let G be a simple graph. A spanning subtree of G is a subgraph of G containing every vertex of G –must be connected; contains.
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 excerpts Graphs (breadth-first-search)
Graph Searching (Graph Traversal) Algorithm Design and Analysis Week 8 Bibliography: [CLRS] – chap 22.2 –
Discrete Structures Lecture 13: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Applications of graph traversals
AA Trees another alternative to AVL trees. Balanced Binary Search Trees A Binary Search Tree (BST) of N nodes is balanced if height is in O(log N) A balanced.
CS 171: Introduction to Computer Science II
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Implementation of Graph Decomposition and Recursive Closures Graph Decomposition and Recursive Closures was published in 2003 by Professor Chen. The project.
Data Structures & Algorithms Graph Search Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
Topics: 1. Finding a cycle in a graph 2. Propagation delay - example 3. Trees - properties מבנה המחשב - אביב 2004 תרגול 3#
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
COMP171 Depth-First Search.
Depth-first search COMP171 Fall Graph / Slide 2 Depth-First Search (DFS) * DFS is another popular graph search strategy n Idea is similar to pre-order.
CS 206 Introduction to Computer Science II 11 / 09 / 2009 Instructor: Michael Eckmann.
Voronoi Diagrams.
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.
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
Elementary graph algorithms Chapter 22
Tirgul 7 Review of graphs Graph algorithms: – BFS (next tirgul) – DFS – Properties of DFS – Topological sort.
2/10/03Tucker, Sec Tucker, Applied Combinatorics, Sec. 3.2, Important Definitions Enumeration: Finding all of the possible paths in a rooted tree.
Depth-First Search Lecture 24 COMP171 Fall Graph / Slide 2 Depth-First Search (DFS) * DFS is another popular graph search strategy n Idea is similar.
Trees and Tree Traversals Prof. Sin-Min Lee Department of Computer Science San Jose State University.
Depth-First Search Idea: Keep going forward as long as there are unseen nodes to be visited. Backtrack when stuck. v G G G G is completely traversed.
Graph Algorithms Using Depth First Search Prepared by John Reif, Ph.D. Distinguished Professor of Computer Science Duke University Analysis of Algorithms.
1 PQ Trees, PC Trees, and Planar Graphs Hsu & McConnell Presented by Roi Barkan.
Algorithms for Enumerating All Spanning Trees of Undirected and Weighted Graphs Presented by R 李孟哲 R 陳翰霖 R 張仕明 Sanjiv Kapoor and.
I/O-Efficient Graph Algorithms Norbert Zeh Duke University EEF Summer School on Massive Data Sets Århus, Denmark June 26 – July 1, 2002.
A Test for the Consecutive Ones Property 1/39. Outline Consecutive ones property PQ-trees Template operations Complexity Analysis –The most time consuming.
Chapter 2 Graph Algorithms.
CSC 213 – Large Scale Programming. Today’s Goals  Make Britney sad through my color choices  Revisit issue of graph terminology and usage  Subgraphs,
Tree A connected graph that contains no simple circuits is called a tree. Because a tree cannot have a simple circuit, a tree cannot contain multiple.
Discussion #32 1/13 Discussion #32 Properties and Applications of Depth-First Search Trees.
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.
Graphs.
Lecture 11 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Review 1 Queue Operations on Queues A Dequeue Operation An Enqueue Operation Array Implementation Link list Implementation Examples.
Trees : Part 1 Section 4.1 (1) Theory and Terminology (2) Preorder, Postorder and Levelorder Traversals.
Data Structures and Algorithms in Parallel Computing Lecture 2.
Connectivity1 Connectivity and Biconnectivity connected components cutvertices biconnected components.
Week 10 - Friday.  What did we talk about last time?  Graph representations  Adjacency matrix  Adjacency lists  Depth first search.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
Trees, Binary Search Trees, Balanced Trees, Graphs Graph Fundamentals Telerik Algo Academy
1 Spanning Trees Longin Jan Latecki Temple University based on slides by David Matuszek, UPenn, Rose Hoberman, CMU, Bing Liu, U. of Illinois, Boting Yang,
Depth-First Search Lecture 21: Graph Traversals
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
PC-Trees & PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
Chapter 10: Trees A tree is a connected simple undirected graph with no simple circuits. Properties: There is a unique simple path between any 2 of its.
Graph Connectivity This discussion concerns connected components of a graph. Previously, we discussed depth-first search (DFS) as a means of determining.
S&H Planarity Test Based on PC-Trees Wen-Lian Hsu.
PC-Trees vs. PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
1/44 A simple Test For the Consecutive Ones Property Without PC-trees!
1 Trees : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
Trees CSIT 402 Data Structures II 1. 2 Why Do We Need Trees? Lists, Stacks, and Queues are linear relationships Information often contains hierarchical.
5. Biconnected Components of A Graph If one city’s airport is closed by bad weather, can you still fly between any other pair of cities? If one computer.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
CSC 213 – Large Scale Programming Lecture 31: Graph Traversals.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
PC-Trees & PQ-Trees. 2 Table of contents Review of PQ-trees –Template operations Introducing PC-trees The PC-tree algorithm –Terminal nodes –Splitting.
Conventions Red edges: traversed tree edges White edges: back edges
Elementary Graph Algorithms
Presentation transcript:

Finding maximal planar subgraphs Wen-Lian Hsu 1/33

2/33 Conventions Red edges: traversed tree edges White edges: back edges Dotted edges: paths C-node: double circle

3/33 Preprocessing – the DFS Tree DFS Scan the Graph. The edges of G are split into tree edges and “back edges”. (Reminder: Those non-tree edges connect vertices with their ancestors.) 2.Label the Vertices According to a Post-Order Traversal of the DFS-Tree 3.Keep a List of Back-Vertices, Sorted in Ascending (Post-)Order OX A back edge (4, 1) is defined by a vertex 1 to one of its ancestors 4, which is referred to as the back-ancestor of 1. 1 is called the back-descendant of 4.

4/33 Back Edge Traversal (BET) At iteration i, 1 ≦ i ≦ n, the traversal is from node i via all back edges connecting i to its back-descendants and then through the tree edges of the PC-tree T back to node i. The BET stops if a node marked at the same iteration has already been visited. i f i t b c d a e g f t b c d a e g stop

5/33 The i -component f i t bc d r e g For a traversed child r of i, let the traversed subtree rooted at r be T r *=(v r *,e r *) and T r,i *= T r * ∪ (r, i). (Red Edges) The back edges from the nodes of T r,i * to node i is denoted by β r,i. (green edges) The bi-connected subgraph B r,i =T r,i * ∪ β r,i is called an i- component.

6/33 In MPS, one cannot use the information of future back edges at each iteration Cannot determine all essential nodes Cannot determine all terminal nodes Cannot compute complete separating paths Delayed Planarity Test Determine everything partially as much as we can

7/33 How do we construct a data structure to “maintain” a partial terminal path? Start with any essential node on the path and grow a tree from this node This tree should contain all traversed edges in T r *. This tree is called the BFS-Tree of this component.

8/33 Revisit Theorem 1 Theorem 1 is satisfied if (1) There is a terminal path for every i- component and (2) full subtrees can be permuted to the inner face and empty subtrees can be permuted to the outer face.

9/33 Deferred Planarity Test

10/33 Our Strategy Traverse the graph through back edges (BET). Keep the components traversed at iteration i and leave the determination of the essential nodes at later iterations. For an i -component, use a BFS-tree to manage the partial planar embedding. Theorem 1 should always be satisfied in the traversed subgraph (The terminal path + The correct permutation).

11/33 Different stages of a component 1.All back edges of the component are traversed Vertices and edges of the component are determined 2.The first essential node is encountered A C-node and its BFS-tree is constructed 3.Its terminal path is gradually extended Note that its boundary nodes can be shared with other components

12/33 Traverse the first component A node label L t for node t, L t =, consists of two parameters. –The first parameters is used to indicate the latest iteration when t is traversed. –The second is to check if there is already a C-node representing the i-component which contains t. i stop label response stop

13/33 Revisit “essential nodes” i t j f b c d r e g A node of an i-component is said to be an essential node if it is touched by a BET at some later iteration j (j>i). f i t bc d r e g f i t bc d r e g j

14/33 The Terminal Path Node f and e are the two terminal nodes. If there is a planer embedding, node i and the essential nodes should be placed on the boundary. f i t b c d a e g If there is a path in T r,i * connecting all essential nodes, the path is called the terminal path. The two end nodes of the terminal path are called the terminal nodes

Creating the first C-node when every node is a P-node

16/33 i j Bidding Creation of C-Nodes i j

17/33 Creating the first C-node i t stop j, i<j label response Create a new C-node i t stop j i t j w

18/33 BFS-Tree Reorganizing the component based on node t f i t bc d r e g f t bc d r e g Suppose we have the first essential node t for an i-component. One can change the root from r to t i t b c r i T r * is called the BFS-tree of B r,i after changing the root to the first essential node t simply because breadth-first search (BFS) is used to change the parent pointers of the nodes of T r *.

19/33 Artificial Edge i t j τbτb τaτa τcτc a c b c i The AEε c,i τ c + The back edges to i c i A boundary path (CP) is the path consisting of concrete and artificial edges in an i-component connecting two essential nodes. An edge that acts as a bridge from c to i encapsulating its internal structure to facilitate future BET efficiently

20/33 The Use of Artificial Edges i t j f b r l g c e d h Extend the path.

How do we generate the entire terminal path from one essential node? How are the future essential nodes distributed? –At one iteration –At different iterations When can we determine the two terminal nodes? –Could wait some time 21/33

22/33 Future Essential nodes are consecutive j k m

23/33 PjPj PjPj PjPj PjPjj Future Essential nodes are consecutive Group the set of essential nodes on each C-node by iteration A region of essential nodes k consecutive m PkPk PkPk PkPk PkPk PmPm PmPm PmPm

Expanding the terminal path There are two possibilities –Both ends closed Both terminal nodes found early –One end is open The other end is a terminal node The second terminal node resides in an artificial edge 24/33

25/33 The Terminal Path One cannot find a valid terminal path under the following two cases. i t f b c d r e g Essential nodes i t f b c d r e g (i) Three BFS-subtrees of node t contain the essential nodes. (ii) Two BFS-subtrees of an internal node contain the essential nodes.

26/33 The Creation of the C-node in General when there are both P-nodes and C-nodes in the graph

27/33 The Creation of the C-node in General The i-component contains P-nodes and C-nodes –The BFS-tree may contain C-node –The first essential node t can be a C-node

28/33 The BFS-tree may contain C-node i t j Shaving the C-nodes immediately after the BFS tree is created.

29/33 If the first essential node w is a C-node f i b c d r e g j i j f b c de r g i j f de g w1w1 t r c b t Children of t should be children of the C-node

30/33 The general cases II i t j w t’ label response “Find” the top-tier C-node w. w is labeled as. k>j. Create a new C-node for the j-component. FIND k

31/33 How Many Different Ways can We Embed the BET paths from j to a component of i i j i j j - essential nodes

32/33 j - essential nodes The delimiters The region to be embedded inside Three Consecutive Traversals i, j and k to the boundary of a component of i i j k i j k The region to be embedded inside i j k Consider the next iteration k that we revisit the same boundary of a component of i The critical segment

33/33 Deleting an old C-node (of i ) and creating a new one (for j ) The region to be embedded inside i j k Traverse to an existing C-node for i, delete it and create a new C-node for j j k

34/33 The “Find” procedure

35/33 The hierarchy of the C-nodes i t j c d e x a b i t j c d e x a b

36/33 The Hierarchy of C-nodes A node w q is said to be directly contained in a C-node w p (denoted as w p >w q ), if the node w q is exactly on the traversed subtree of the component shrunk into w p. w1w1 w2w2 w3w3 t An essential node for w 1 An example for w 1 >w 2 >w 3

37/33 u The boundary cycle of a C- node contains other C-nodes recursively The C-Node Hierarchy

38/33 u The Find C-Node Operation

39/33 Parallel Search In DPT Parallel Search from the entering node The artificial edges The AE traversal The boundary traversal essential nodes of previous iterations sentinel nodes Case 2 Case 1

40/33 Case 1 in Parallel Search Parallel Search Starts from a node on the boundary. (Same as Parallel Search in S&H) Note that, the boundary traversal crosses the AEs on the boundary directly.

41/33 Case 2 in Parallel Search Parallel Search Starts from a AE on the boundary. Those BFS-subtrees that are not allowed for future essential node are eliminated to ensure all the essential nodes of the C-node creating the AE are on its terminal path.

42/33 How many times can an edge be traversed? An edge embedded inside A tree edge A edge in an AE A boundary link An edge embedded inside