path based depth first search for strong and biconnected
play

Path-based depth-first search for strong and biconnected components - PowerPoint PPT Presentation

Introduction Strong Components Biconnected Components Path-based depth-first search for strong and biconnected components Author of the paper: Harold N. Gabow Reported by: T.T. Liu D.P . Xu B.Y. Chen June 6, 2017 Harold N. Gabow


  1. Introduction Strong Components Biconnected Components Path-based depth-first search for strong and biconnected components Author of the paper: Harold N. Gabow Reported by: T.T. Liu D.P . Xu B.Y. Chen June 6, 2017 Harold N. Gabow Path-based DFS for SCC and BCC

  2. Introduction Strong Components Biconnected Components Outline Introduction 1 Strong Components 2 Reviews Purdom and Munro’s High-Level Algorithm Contribution Discussion Biconnected Components 3 Review High-Level Algorithm Gabow’s Algorithms Harold N. Gabow Path-based DFS for SCC and BCC

  3. Introduction Strong Components Biconnected Components Characterastics of Gabow’s Algorithms One-pass algorithm. But for the algorithm of strong components, what we have learned from the textbook is a two-pass algorithm, by which we must traverse the whole graph twice. Lower time and space complexity. This algorithm only use two stacks and an array, and do not employ a disjoint-set data structure. Harold N. Gabow Path-based DFS for SCC and BCC

  4. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Outline Introduction 1 Strong Components 2 Reviews Purdom and Munro’s High-Level Algorithm Contribution Discussion Biconnected Components 3 Review High-Level Algorithm Gabow’s Algorithms Harold N. Gabow Path-based DFS for SCC and BCC

  5. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Review: What have we learned from the textbook? Concepts of Strong Components Two mutually reachable vertices are in the same strong component . It is a equivalence relation. 1 2 3 4 5 6 Harold N. Gabow Path-based DFS for SCC and BCC

  6. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Review: What have we learned from the textbook? Algorithms to Find Strong Components Idea: Run DFS twice: Once on the original graph G , once on its transpose G T . Trick: Using finishing times of each vertex computed by the first DFS. Linear time complexity: O ( V + E ) Proposed by S. Rao Kosaraju, known as the Kosaraju’s Algorithm . Harold N. Gabow Path-based DFS for SCC and BCC

  7. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Outline Introduction 1 Strong Components 2 Reviews Purdom and Munro’s High-Level Algorithm Contribution Discussion Biconnected Components 3 Review High-Level Algorithm Gabow’s Algorithms Harold N. Gabow Path-based DFS for SCC and BCC

  8. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Purdom and Munro’s High-Level Algorithm: Plain text Initially H is the given graph G . If H has no vertices stop. Otherwise start a new path P by choosing a vertex v and setting P = ( v ) . Continue by growing P as follows. To grow the path P = ( v 1 , · · · , v k ) choose an edge ( v k , w ) directed from the last vertex of P and do the following: If w / ∈ P , add w to P , making it the new last vertex of P . Continue growing P . If w ∈ P , say w = v i , contract the cycle v i , v i + 1 , · · · , v k , both in H and in P . P is now a path in the new graph H . Continue growing P . If no edge leaves v k , output v k as a vertex of the strong component graph. Delete v k from both H and P . If P is now nonempty continue growing P . Otherwise try to start a new path P . Harold N. Gabow Path-based DFS for SCC and BCC

  9. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { } Initially, H = G . Harold N. Gabow Path-based DFS for SCC and BCC

  10. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } } Grow P by adding v 1 . Harold N. Gabow Path-based DFS for SCC and BCC

  11. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 } } Grow P by adding v 2 . Harold N. Gabow Path-based DFS for SCC and BCC

  12. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 } , { 3 } } Grow P by adding v 3 . Harold N. Gabow Path-based DFS for SCC and BCC

  13. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 } } { 3 } As v 3 is isolated, no edge leaves from v 3 , so just delete it. Harold N. Gabow Path-based DFS for SCC and BCC

  14. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 } , { 4 } } { 3 } Grow P by adding v 4 . Harold N. Gabow Path-based DFS for SCC and BCC

  15. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 } , { 4 } , { 5 } } { 3 } Grow P by adding v 5 . Harold N. Gabow Path-based DFS for SCC and BCC

  16. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 , 4 , 5 } } { 3 } The cycle v 2 , v 4 , v 5 in P is detected. Contract this cycle. Harold N. Gabow Path-based DFS for SCC and BCC

  17. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 , 4 , 5 } , { 6 } } { 3 } Grow P by adding v 6 . Harold N. Gabow Path-based DFS for SCC and BCC

  18. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } , { 2 , 4 , 5 , 6 } } { 3 } The cycle { v 2 , v 4 , v 5 } , v 6 , v 4 in P is detected. Contract this cycle. Harold N. Gabow Path-based DFS for SCC and BCC

  19. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { { 1 } } { 2 , 4 , 5 , 6 } , { 3 } No edge leaves from { v 2 , v 4 , v 5 , v 6 } , so we delete it. Harold N. Gabow Path-based DFS for SCC and BCC

  20. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { } { 1 } , { 2 , 4 , 5 , 6 } , { 3 } No edge leaves from { v 1 } , so we delete it. Harold N. Gabow Path-based DFS for SCC and BCC

  21. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Demo: P&M’s High-Level Algorithm 1 2 3 4 5 6 Path P = { } { 1 } , { 2 , 4 , 5 , 6 } , { 3 } Now graph H is empty, which has no vertex. Harold N. Gabow Path-based DFS for SCC and BCC

  22. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Correctness Correctness: If no edge leaves v k then v k is a vertex of the finest acyclic contraction. Easy to prove by contradiction: If no edge leaves v k , but v k is not a vertex of the finest acyclic contraction. That is to say, v k is a part of some strong component S ′ , so there is a vertex v ′ ∈ S ′ , which satisfies v k � = v ′ while v k and v ′ are mutually reachable. Therefore, one edge at least leaving v k must be existent. Harold N. Gabow Path-based DFS for SCC and BCC

  23. Reviews Introduction Purdom and Munro’s High-Level Algorithm Strong Components Contribution Biconnected Components Discussion Three Cases When Growing Path To grow the path P = ( v 1 , · · · , v k ) choose an edge ( v k , w ) directed from the last vertex of P and do the following: If w / ∈ P , add w to P , making it the new last vertex of P . 1 Continue growing P . If w ∈ P , say w = v i , contract the cycle v i , v i + 1 , · · · , v k , both 2 in H and in P . P is now a path in the new graph H . Continue growing P . If no edge leaves v k , output v k as a vertex of the strong 3 component graph. Delete v k from both H and P . If P is now nonempty continue growing P . Otherwise try to start a new path P . Harold N. Gabow Path-based DFS for SCC and BCC

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend