Bridges and Articulation Points

Slides:



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

Introduction to Graphs
More Graphs COL 106 Slides from Naveen. Some Terminology for Graph Search A vertex is white if it is undiscovered A vertex is gray if it has been discovered.
Graph Traversals Visit vertices of a graph G to determine some property: Is G connected? Is there a path from vertex a to vertex b? Does G have a cycle?
Tirgul 8 Graph algorithms: Strongly connected components.
Applications of graph traversals
16a-Graphs-More (More) Graphs Fonts: MTExtra:  (comment) Symbol:  Wingdings: Fonts: MTExtra:  (comment) Symbol:  Wingdings:
Applications of DFS: Articulation Points and Biconnected Components
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Discussion #36 Spanning Trees
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Can Dijkstra’s Algorithm be modified in an obvious way to give the longest path in a graph? a). Yes b). No c). I have absolutely no idea.
Introduction to Graphs Lecture 18: Nov 16. Seven Bridges of Königsberg Is it possible to walk with a route that crosses each bridge exactly once?
A tree is a simple graph satisfying: if v and w are vertices and there is a path from v to w, it is a unique simple path. a b c a b c.
Tirgul 11 BFS,DFS review Properties Use. Breadth-First-Search(BFS) The BFS algorithm executes a breadth search over the graph. The search starts at a.
Shortest Path Algorithms
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 10 Instructor: Paul Beame.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 14 Strongly connected components Definition and motivation Algorithm Chapter 22.5.
Elementary graph algorithms Chapter 22
Tirgul 13 Today we’ll solve two questions from last year’s exams.
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.
Introduction to Graph Theory
9/10/10 A. Smith; based on slides by E. Demaine, C. Leiserson, S. Raskhodnikova, K. Wayne Adam Smith Algorithm Design and Analysis L ECTURE 8 Greedy Graph.
 Jim has six children.  Chris fights with Bob,Faye, and Eve all the time; Eve fights (besides with Chris) with Al and Di all the time; and Al and Bob.
1 Shortest Path Algorithms Andreas Klappenecker [based on slides by Prof. Welch]
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.
Graphs.
Topological Sort: Definition
Introduction to Graph Theory Lecture 17: Graph Searching Algorithms.
Data Structures Lakshmish Ramaswamy. Tree Hierarchical data structure Several real-world systems have hierarchical concepts –Physical and biological systems.
1 Chapter 22: Elementary Graph Algorithms III. 2 About this lecture Topological Sort.
Tree - in “math speak” An ________ graph is a set of vertices/nodes and a set of edges, each edge connects two vertices. Any undirected graph in which.
7 Finding Bridge in a Graph. What is a bridge ? A C D B F G E.
Graph Search Applications, Minimum Spanning Tree
Introduction to Algorithms
CSE332: Data Abstractions Lecture 7: AVL Trees
Articulation Points 1 of 2 (Ideas)
Graph Graphs and graph theory can be used to model:
Computing Connected Components on Parallel Computers
Graph theory Definitions Trees, cycles, directed graphs.
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Graph Algorithms Using Depth First Search
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 10 Trees Slides are adopted from “Discrete.
Graph Search Applications
Biconnected Graph Articulation Points
CSE 421: Introduction to Algorithms
Graph Algorithms – 2 DAGs Topological order
Lecture 10 Algorithm Analysis
CSCE350 Algorithms and Data Structure
Biconnected Graph Articulation Points
Graph Algorithms – 2.
Advanced Algorithms Analysis and Design
Elementary graph algorithms Chapter 22
CMSC 202 Trees.
Shortest path algorithm
Warm Up – Wednesday.
CSE 421: Introduction to Algorithms
Theorem 5.13: For vT‘, l’(v)= min{l(v), l(vk)+w(vk, v)}
A Introduction to Computing II Lecture 13: Trees
Trees 11.1 Introduction to Trees Dr. Halimah Alshehri.
CPS420 Euler Circuit Construction
Simple Graphs: Connectedness, Trees
Bridges and Articulation Points
Applied Combinatorics, 4th Ed. Alan Tucker
Elementary graph algorithms Chapter 22
Applications of DFS: Articulation Points and Biconnected Components
Kruskal’s Algorithm AQR.
Warm Up – 3/19 - Wednesday Give the vertex set. Give the edge set.
Assignment #2 (Assignment due: Nov. 06, 2018) v1 v2 v3 v4 v5
Chapter 22: Elementary Graph Algorithms III
Presentation transcript:

Bridges and Articulation Points

Articulation Points Is a node u of a graph such as if you remove u from the graph then the number of components increases 3 components 1 component

Articulation Points u is an articulation point if u is root and has more than 2 children u isn't a root and there exists one of its subtrees that has no back edges for an ancestor of u p u Right Wrong The second and third subtree all have back edges to p (an ancestor of u), while the first one hasn't, therefore u is an articulation point (notice that if you remove it, the first subtree will be disconnected from the rest of the graph).

Bridges Is an edge uv of a graph such as if you remove uv from the graph then the number of components increases 2 components 1 component

Bridges uv is a bridge if and only if it doesn't belong to a cycle. Proof uv is a bridge => doesn't belong to a cycle uv doesn't belong to a cycle => uv is a bridge u v u v uv is not in a cycle so if uv is removed there is no other way to get from u to v, so you are cutting the graph into 2 components (one with u and another with v) If you remove uv there is another path that takes from u to v (the graph is still connected), so uv is not a bridge

Bridges The definition on the previous slide gives us that: uv is a bridge ⇔ there is no back edge from a descendant of u to an ancestor of u uv is a bridge => there is no back edge... uv doesn't have a back edge... => uv is a bridge u u v v Assume that uv is not a bridge, then once it’s removed it must have a path between u and v, but we are assuming that there is no back edge, contradiction. Assume that there is a back edge, then uv is part of a cycle and by the previous slide this is a contradiction

Interesting fact If you remove a bridge of a graph the number of components increases by exactly one but if you remove an articulation point the number of components can increase by more than one.

How to implement? Let's define for each node v Example: d[v] = time instant that you enter a node low[v] = the smallest d that v can reach through its descendants (including v itself) Example: d[a] = 1 d[b] = 2 d[c] = 3 d[d] = 8 d[e] = 4 d[f] = 7 d[g] = 5 d[h] = 6 low[a] = 1 low[b] = 1 low[c] = 1 low[d] = 8 low[e] = 3 low[f] = 2 low[g] = 3 low[h] = 6 u is an articulation point if low[v] >= d[u] for some children v uv is a bridge if low[v] > d[u] for some children v Notice that low[e] = 3 and not 1 a b c d e f g h