240 likes | 369 Views
Adaptation of S&H Algorithm to the Maximal Planar Subgraph (MPS) Problem. Wen-Lian Hsu. A Necessary and Sufficient Condition for a Graph to be Planar. A graph is planar iff at every iteration i , there exists a rooting and a unique path s.t.
E N D
Adaptation of S&H Algorithm to the Maximal Planar Subgraph (MPS) Problem Wen-Lian Hsu
A Necessary and Sufficient Condition for a Graph to be Planar • A graph is planar iff at every iteration i, there exists a rooting and a unique path s.t. • nodes on this path can be flipped so that all full subtrees lie on one side, and all empty subtrees lie on the other side without violating the cyclic order of any C-node
A Necessary and Sufficient Condition for a Graph to be Planar: At each iteration Root Full side u u' Empty side
An Efficiency Note • Part of the boundary path and essential nodes in iteration i could be shared by many later iterations. • The next time a C-node w of i is traversed (through the smallest j-essential nodes), it is destroyed. Its remaining essential nodes need to change parent pointers to the new C-node • A C-node is short lived. There is no need to keep all the parent pointers
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
j Pj Pj Pj Pj k consecutive m Future Essential nodes are consecutive Group the set of essential nodes on each C-node by iteration A region of essential nodes Pk Pm Pk Pm Pk Pm Pk
j j i Creation of C-Nodes i Bidding
j i How Many Different Ways can We Embed the paths from j to a component of i j i j- essential nodes
k k j j i i Three Consecutive Traversals i, j and k to the boundary of a component of i k j Consider the next iteration k that we revisit the same boundary of a component of i The region to be embedded inside The region to be embedded inside i j- essential nodes The delimiters The critical segment
k k j j i Deleting an old C-node (of i) and creating a new one (for j) Traverse to an existing C-node for i, delete it and create a new C-node for j The region to be embedded inside
What is the least amount of information we need to determine the above? • The subdivision of the boundary cycle by the j-essential nodes • Where, on the cycle, does the back edge traversal from node k first touch What do we need to do afterward? • Embed the other segments inside
Creation of C-node for a component of i • Previously, a new component (a new C-node) for i is formed at the end of the i-th iteration • A boundary cycle consisting of all essential nodes (have complete information about the future) • Now, a new C-node is created for i at the next iteration j when its boundary is first traversed • To keep a cycle of j-essential nodes as delimiters to help determine the critical segment
Creation of C-Node (1) • Previously, the boundary path is determined by labeling full subtrees • But now, it is not clear which one is full until we know which back edges will stay • Hence, it is decided by back edge traversal in later iterations
A Revisit to the Terminal Path A partial terminal path Full side u u' Empty side
Back Edge Elimination in Partial Path Eliminate all back edges in this part ! Full side Empty side
Node and Edge Labeling • Previously, we only need node labeling to decide full, partial nodes • Now we have to pay attention to which edge is traversed by which back edge traversal • Every edge should be traversed twice before it becomes part of a boundary path.
Labeling • Each node has a “stack” of labels (last on top) • For every back edge traversal at iteration k, do • We would label • a node by k (if its top label is < k) • a “new” edge by <k,>, and • an “old” edge (with label <j,>) by <j,k> • We would terminate a traversal when it reaches • a node labeled […,k]. • the node k itself (does not label it)
The Effect of Each Back Edge Traversal • Create a new C-node • Determine a partial boundary path together with some inside nodes • Make some old C-nodes boundary nodes • Locate a new delimiter • Refine the subdivision of a cycle • Locate the critical segment of a boundary path • Embed the remaining segment inside
Back Edge Elimination • Every time a new back edge is added, some other back edges must be deleted • to maintain the unique path, division between inside, outside nodes • Back edge elimination is done gradually since the complete information is unveiled gradually
Deletion of a C-Node • Previously, a component of i (represented by a C-node) is merged (and deleted) the next iteration j it is traversed (its C-node is deleted) • Now, a component of i formed at iteration j is merged (or deleted) the next iteration k it is traversed.
One iteration of the MPS Algorithm • (1) The addition of one back edge and (2) the corresponding back edge traversal • For each new component encountered, a new C-node is created • and a maximal # of internal nodes are determined • For each boundary of an existing C-node encountered, either a delimiter is located or a critical segment is determined • and a maximal # of internal nodes are determined
The C-Node Hierarchy The boundary cycle of a C-node contains other C-nodes recursively u
Hierarchical PC-Trees Potential future traversal (b) The original PC-tree in the S&H algorithm (a) The hierarchical PC-trees in the DPT algorithm