Presentation is loading. Please wait.

Presentation is loading. Please wait.

Connectivity and Paths

Similar presentations


Presentation on theme: "Connectivity and Paths"— Presentation transcript:

1 Connectivity and Paths
Graph Theory Chapter 4 Connectivity and Paths Ch Connectivity and paths

2 Ch. 4. Connectivity and paths
Graph Theory Connectivity 4.1.1 A separating set or vertex cut of a graph G is a set S⊆V(G) such that G-S has more than one component The connectivity of G, written (G), is the minimum size of a vertex set S such that G-S is disconnected or has only one vertex A graph G is k-connected if its connectivity is at least k. Ch Connectivity and paths

3 Example: Connectivity of Kn 4.1.2
Graph Theory Example: Connectivity of Kn 4.1.2 Because a clique has no separating set, we need to adopt a convention for its connectivity. This explains the phrase “or has only one vertex” in Definition We obtain (Kn)=n-1, while (G)≤n(G)-2 when G is not a complete graph With this convention, most general results about connectivity remain valid on complete graphs Ch Connectivity and paths

4 Example: Connectivity of Kn 4.1.2
Graph Theory Example: Connectivity of Kn 4.1.2 Delete one vertex Delete two vertices Delete four vertices Ch Connectivity and paths

5 Example: Connectivity of Km,n 4.1.2
Graph Theory Example: Connectivity of Km,n 4.1.2 Consider a bipartition X,Y of Km,n. Every induced subgraph that has at least one vertex from X and from Y is connected. Hence every separating set of Km,n contains X or Y. Since X and Y themselves are separating sets (or leave only one vertex), we have (Km,n) = min{m,n}. The connectivity of K3,3 is 3; the graph is 1-connected, 2-connected, and 3-connected, but not 4-connected. Ch Connectivity and paths

6 Ch. 4. Connectivity and paths
Graph Theory Edge-Connectivity A disconnecting set of edges is a set F⊆E(G) such that G-F has more than one component. (also called a cut) A graph is k-edge-connected if every disconnecting set has at least k edges. The edge-connectivity of G, written ’(G), is the minimum size of a disconnecting set. Ch Connectivity and paths

7 Ch. 4. Connectivity and paths
Graph Theory Edge-Connectivity Given S, T⊆V(G), we write [S,T] for the set of edges having one end-point in S and the other in T. An edge cut is an edge set of the form [S,Ŝ], where S is a nonempty proper subset of V(G) and Ŝ denotes V(G)-S. (also called a cut-set) Ch Connectivity and paths

8 Ch. 4. Connectivity and paths
Graph Theory Edge-Connectivity 3 S Disconnecting set Edge cut Ch Connectivity and paths

9 Ch. 4. Connectivity and paths
Graph Theory Theorem : If G is a simple graph, then (G)  ’(G)  (G) min vertex-cut  min edge-cut  min degree 1 Proof: The edges incident to a vertex v of minimum degree form an edge cut; hence ’(G)  (G) . It remains to show that (G)  ’(G)  min edge-cut Incident edges is an Edge cut Ch Connectivity and paths

10 Ch. 4. Connectivity and paths
Graph Theory Theorem : If G is a simple graph, then (G)  ’(G)  (G) vertex-cut  edge-cut  minimum degree 1 Proof: continue We have observed that (G)  n(G)-1 (see Example 4.1.2). Consider a smallest edge cut [S, S ]. If every vertex of S is adjacent to every vertex of S, then |[S, S ]| = |S ||S |≥n(G)-1≥ (G), and the desired inequality holds  10 Ch Connectivity and paths

11 Ch. 4. Connectivity and paths
Graph Theory Theorem Proof: Continue  Otherwise, we choose x S and y S with xy. Let T consist of all neighbors of x in S and all vertices of S -{x} with neighbors in S . Every x, y-path passes through T, so T is a separating set. Also, picking the edges from x to T S and one edge from each vertex of T  S to S (shown bold below) yields |T| distinct edges of [S,S ]. Thus ’(G)= |[ S,S ]|≥ |T| ≥ (G). S S x 1 a 2 neighbors of x : 1, 2 T:{1,2,b,c,d} b 3 c 4 d Ch Connectivity and paths

12 Ch. 4. Connectivity and paths
Graph Theory Bond A bond is a minimal nonempty edge cut. Here “minimal” means that no proper nonempty subset is also an edge cut. We characterize bonds in connected graphs. Ch Connectivity and paths

13 Ch. 4. Connectivity and paths
Graph Theory Proposition : If G is a connected graph, then an edge cut F is a bond if and only if G-F has exactly two components 1 Proof: Let F = [S,S] be an edge cut. Suppose that G-F has exactly two components, and let F’  F. The graph G-F’ contains the two components of G-F plus at least one edge between them, making it connected. Hence F is a minimal disconnecting set and is bond. Ch Connectivity and paths

14 Ch. 4. Connectivity and paths
Graph Theory Proposition :If G is a connected graph, then an edge cut F is a bond if and only if G-F has exactly two components 2 Proof: continue Conversely, suppose that G-F has more than two components. Since G-F is the disjoint union of G[S] and G[S], one of these has at least two components, say G[S]. Then S= AB, where no edges join A and B. Now the edge cuts [A,A] and [B,B] are proper subsets of F, so F is not a bond B  S S A Ch Connectivity and paths

15 Ch. 4. Connectivity and paths
Graph Theory Blocks A block of a graph G is a maximal connected subgraph of G that has no cut-vertex. If G itself is connected and has no cut-vertex, then G is a block. Ch Connectivity and paths

16 Ch. 4. Connectivity and paths
Graph Theory Example of Blocks If H is a block of G, then H as a graph has no cut-vertex, but H may contain vertices that are cut-vertices of G. For example, the graph drawn below has five blocks; three copies of K2, one of K3, and one subgraph that is neither a cycle nor a complete graph. Ch Connectivity and paths

17 Proposition 4.1.19: Two blocks in a graph share at most one vertex.
Graph Theory Proposition : Two blocks in a graph share at most one vertex. Proof: Use contradiction. Suppose that blocks B1, B2 have at least two common vertices. We show that B1∪B2 is a connected subgraph with no cut-vertex, which contradicts the maximality of B1 and B  Ch Connectivity and paths

18 Proposition 4.1.19: Two blocks in a graph share at most one vertex.
Graph Theory Proposition : Two blocks in a graph share at most one vertex. Proof: Continue When delete one vertex v from Bi, what remains is connected. Hence any path in Bi from every vertex in Bi-{v} to any in V(B1)∩V(B2)-{v} is retained. Since the blocks have at least two common vertices, deleting a single vertex leaves a vertex in the intersection. Paths from all vertices to that vertex are retained, so B1∪B2 cannot be disconnected by deleting one vertex. Ch Connectivity and paths

19 Ch. 4. Connectivity and paths
Graph Theory Depth First Search Depth first search: Explore always from the most recently discovered vertex that has unexplored edges. Use stack Breadth first search: Explores from the oldest vertex. Use queue Ch Connectivity and paths

20 Ch. 4. Connectivity and paths
Graph Theory Depth first Search If the selected edge leads to an unexplored vertex, mark the selected edge “used” and go further to the new vertex and continue from there Arbitrary select an unused edge and check the new vertex If the selected edge leads to an explored vertex, mark the selected edge “used” and stay where we are If all the incident edges are used, go back to where we came from. Ch Connectivity and paths

21 Example of Depth First Search 4.1.21
Graph Theory Example of Depth First Search Depth-first search from u u, a, b, c, d, e, f, g From u go to a, b, c, d From d, try to get to b but b is visited From d, no other unvisited edge to go, so go back to c Similarly, no other unvisited edge to go from c , go back to b From b go to e No other unvisited edge to go from e, go back to b and then a From a, go to f and then g From g go to u but u is visited From g go back to f, a, and then u g f e d u a b c 21 Ch Connectivity and paths

22 Example of Depth First Search 4.1.21
Graph Theory Example of Depth First Search Other Depth-first search paths from u u, a, f, g, b, e, d, c u, g, f, a, b, c, d, e f g f g e d e d u a b c u a b c Ch Connectivity and paths

23 Ch. 4. Connectivity and paths
Graph Theory Lemma : If T is a spanning tree of a connected graph G grown by DFS from u, then every edge of G not in T consists of two vertices v,w such that v lies on the u,w-path in T. Proof: Let v w be an edge of G, with v encountered before w in the depth-first search. Because v w is an edge, we cannot finish v before w is added to T. Hence w appears somewhere in the subtree formed before finishing v, and the path from w to u contains v. See example in the next page Ch Connectivity and paths

24 Ch. 4. Connectivity and paths
Graph Theory Lemma : If T is a spanning tree of a connected graph G grown by DFS from u, then every edge of G not in T consists of two vertices v,w such that v lies on the u,w-path in T. g f e w u a v c Ch Connectivity and paths

25 Algorithm: 4.1.23 Computing the blocks of a graph 1/2
Graph Theory Algorithm: Computing the blocks of a graph 1/2 Input: A connected graph G. Idea: Build a depth-first search tree T of G, discarding portions of T as blocks are identified. Maintain one vertex called ACTIVE. Initialization: Pick a root x∈V(H); make x ACTIVE; set T={x}. Ch Connectivity and paths

26 Algorithm 4.1.23 : Computing the blocks of a graph 2/2
Graph Theory Algorithm : Computing the blocks of a graph 2/2 Iteration: Let v denote the current active vertex. 1) If v has an unexplored incident edge vw, then 1A) If wV(T), then add vw to T, mark vw explored, make w ACTIVE. 1B) If w∈V(T), then w is an ancestor of v; mark vw explored. 2) If v has no more unexplored incident edges, then 2A) If v ≠ x, and w is the parent of v, make w ACTIVE. If no vertex in the current subtree T’ rooted at v has an explored edge to an ancestor above w, then V(T’)∪{w} is the vertex set of a block; record this information and delete V(T’) from T. ( see example in the next page) 2B) If v = x, terminate. Ch Connectivity and paths

27 Algorithm 4.1.23 : Computing the blocks of a graph 2/2
Graph Theory Algorithm : Computing the blocks of a graph 2/2 Example of Step 2A: g f v w - Consider the subgraph in blue color which is the current subtree T’ rooted at v . - Since no vertex in T’ has an explored edge to an ancestor above w, then V(T’)∪{w} is the vertex set of a block Ch Connectivity and paths

28 Ch. 4. Connectivity and paths
Graph Theory Theorem : A graph G having at least three vertices is 2-connected if and only if for each pair u,v∈V(G) there exist internally disjoint u,v-paths in G. (Whitney [1932a]) Sufficiency: When G has internally disjoint u,v-paths, deletion of one vertex cannot separate u from v. Since this condition is given for every pair u,v, deletion of one vertex cannot make any vertex unreachable from any other. We conclude that G is 2-connected. Necessity: by induction method Ch Connectivity and paths

29 Ch. 4. Connectivity and paths
Graph Theory Lemma: (Expansion Lemma) If G is a k-connected graph, and G’ is obtained from G by adding a new vertex y with at least k neighbors in G, then G’ is k-connected Proof: We prove that a separating set S of G’ must have size at least k. If y S, then S-{y} separates G, so |S|k+1. If y S and N(y)S, then |S |  k. Otherwise, y and N(y)-S lie in a single component of G’-S. Thus again S must separate G and |S|  k. Ch Connectivity and paths

30 Ch. 4. Connectivity and paths
Graph Theory Theorem For a graph G with at least three vertices, the following conditions are equivalent. A) G is connected and has no cut-vertex. B) For all x, y  V(G), there are internally disjoint x, y-paths C) For all x, y  V(G), there is a cycle through x and y. D) (G)  1, and every pair of edges in G lies on a common cycle. Ch Connectivity and paths

31 Ch. 4. Connectivity and paths
Graph Theory Corollary : If G is 2-connected, then the graph G’ obtained by subdividing an edge of G is 2-connected. Proof: Let G’ be formed from G by adding vertex w to subdivide uv. To show that G’ is 2-connected, it suffice to find a cycle through arbitrary edges e,f of G’(by Theorem 4.2.4D). Since G is 2-connected, any two edges of G lie on a common cycle (Theorem 4.2.4D). When our given edges e, f of G’ lie in G, a cycle through them in G is also in G’, unless it uses uv, in which case we modify the cycle. Here “modify the cycle” means “replace the edge uv with the u, v-path of length 2 through w”. When e ∈ E(G) and f ∈ {uw, wv}, we modify a cycle passing through e and uv in G. When {e, f}={uw, wv}, we modify a cycle through uv. Ch Connectivity and paths

32 Ch. 4. Connectivity and paths
Graph Theory Network Flow Problems 4.3 A network is : A digraph with a nonegative capacity c(e) on each edge e and A distinguished source vertex s and sink vertex t. Vertices are also called node s. Ch Connectivity and paths

33 Ch. 4. Connectivity and paths
Graph Theory Network Flow Problems 4.3 A flow f assigns a value f(e) to each edge e. Let: f+(v) : the total flow on edges leaving v and f –(v): the total flow on edges entering v A flow is feasible if it satisfies The capacity constraints 0≤f(e)≤c(e) for each edge and The conservation constraints f+ (v) = f – (v) for each node v{s,t}. Ch Connectivity and paths

34 Ch. 4. Connectivity and paths
Graph Theory Maximum Network Flow The value val(f) of a flow f is the net flow f –(t)-f +(t) into the sink. A maximum flow is a feasible flow of maximum value. Ch Connectivity and paths

35 Ch. 4. Connectivity and paths
Graph Theory Example of Max Flow The zero flow assigns flow 0 to each edge It is feasible. u (0)1 v (0)2 (0)2 (0)1 s f t (0)2 (0)2 x (0)1 y Ch Connectivity and paths

36 Ch. 4. Connectivity and paths
Graph Theory Example of Max Flow In the network below we illustrate a non-zero feasible flow. Capacities are shown in bold, flow values in parentheses. Our flow f assigns f(sx) = f(vt) = 0, and f(e) = 1 for every other edge e. This is a feasible flow of value 1. (1)1 (0)2 (1)2 s v x y u t f Ch Connectivity and paths

37 Ch. 4. Connectivity and paths
Graph Theory Example of Max Flow A path from the source to the sink with excess capacity would allow us to increase flow. In this example, no path remains with excess capacity, but the flow f’ with f’(vx) = 0 and f’(e) = 1 for e ≠ vx has value 2. (1)1 (0)1 (1)2 s v x y u t f (1)1 (0)2 (1)2 s v x y u t f Ch Connectivity and paths

38 Ch. 4. Connectivity and paths
Graph Theory f-Augmenting Path 4.3.4 When f is a feasible flow in a network N, an f-augmenting path is a source-to-sink path P in the underlying graph G such that for each e ∈ E(P), a) if P follows e in the forward direction, then f(e) < c(e). b) if P follows e in the backward direction, then f(e)>0. Let ε(e)=c(e) - f(e) when e is forward on P, and let ε(e)=f(e) when e is backward on P. The tolerance of P is mine∈E(P)ε(e). Ch Connectivity and paths

39 New Flow after Augmenting
Graph Theory New Flow after Augmenting The edges of P incident to an internal vertex v of P occur in one of the four ways shown below. In each case, the change to the flow out of v is the same as the change to the flow into v, so f ⁻(v) = f ⁺(v). + - Ch Connectivity and paths

40 New Flow after Augmenting
Graph Theory New Flow after Augmenting Examples 14 11 20 6 + + + C=6, f=4 Slack =2 C=16, f=10 Slack =6 C=12, f=5 Slack =7 14 11 20 6 +2 + + + C=6, f=6 Slack=0 C=16, f=12 Slack =4 C=12, f=7 Slack =5 Ch Connectivity and paths

41 New Flow after Augmenting
Graph Theory New Flow after Augmenting Examples +k +k -k -k +k Ch Connectivity and paths

42 New Flow after Augmenting
Graph Theory New Flow after Augmenting Examples f/c= 6/9 S=3 3/8 S=5 6/9 S=6 4/11 S=4 4/11 S=7 12 15 9 6 6 4 17 9 Σin = 6+12 , Σout = 3+15 f/c= 9/9 6/8 3/9 1/11 7/11 3 more 3 more 12 15 9 6 6 4 17 9 Ch Connectivity and paths

43 Ch. 4. Connectivity and paths
Graph Theory Lemma. If P is an f-augmenting path with tolerance z, then changing flow by +z on edges followed forward by P and by –z on edges followed backward by P produces a feasible flow f’ with val(f’) = val(f)+z. Proof: The definition of tolerance ensures that 0 ≤ f’(e) ≤ c(e) for every edge e, so the capacity constraints hold. We need only check vertices of P, since flow elsewhere has not changed. For every vertex v, f+(v) = f–(v) Finally, the net flow into the sink t increases by z. - + - + + - + Ch Connectivity and paths

44 Ch. 4. Connectivity and paths
Graph Theory Source/sink cut In a network, a source/sink cut [S,T] consists of the edges from a source set S to a sink set T, where S and T partition the set of nodes, with s ∈ S and t ∈ T. The capacity of the cut [S, T],written cap(S, T), is the total of the capacities on the edges of [S, T]. Keep in mind that in a digraph [S, T] denotes the set of edges with tail in S and head in T. Thus the capacity of a cut [S, T] is completely unaffected by edges from T to S. Ch Connectivity and paths

45 Ford-Fulkerson Labeling Alg. For Max- flow 1 4.3.9
Graph Theory Ford-Fulkerson Labeling Alg. For Max- flow Input: A feasible flow f in a network. Output: An f-augmenting path or a cut with capacity val(f). Idea: Find the nodes reachable from s by paths with positive tolerance. Reaching t completes an f-augmenting path. During the search, R is the set of nodes labeled Reached, and S is the subset of R labeled Searched. Ch Connectivity and paths

46 Ford-Fulkerson Labeling Alg. For Max- flow 2
Graph Theory Ford-Fulkerson Labeling Alg. For Max- flow 2 Initialization: R = {s}, S = . Iteration: Choose v ∈ R-S. For each exiting edge vw with f(vw) < c(vw) and w ∉ R, add w to R. For each entering edge uv with f(uv>0) and u ∉ R, add u to R. Label each vertex added to R as “reached”, and record v as the vertex reaching it. After exploring all edges at v, add v to S. If the sink t has been reached (put in R), then trace the path reaching t to report an f-augmenting path and terminate. If R = S, then return the cut [S, Ŝ] and terminate. Otherwise, iterate. Ch Connectivity and paths

47 Ch. 4. Connectivity and paths
Graph Theory Theorem In every network, The maximum flow = The minimum source/sink cut Ch Connectivity and paths

48 Max Flow and Bipartite Matching
Graph Theory Max Flow and Bipartite Matching C=1 C=1 S T Ch Connectivity and paths


Download ppt "Connectivity and Paths"

Similar presentations


Ads by Google