Graph Theory
Ch. 4. Connectivity and paths1
Chapter 4
Connectivity and Paths
Graph Theory
Ch. 4. Connectivity and paths2
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.
Graph Theory
Ch. 4. Connectivity and paths3
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 4.1.1.
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
Graph Theory
Ch. 4. Connectivity and paths4
Example: Connectivity of Kn 4.1.2
Delete four vertices
Delete one vertex
Delete two vertices
Graph Theory
Ch. 4. Connectivity and paths5
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.
Graph Theory
Ch. 4. Connectivity and paths6
Edge-Connectivity 1 4.1.7
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.
Graph Theory
Ch. 4. Connectivity and paths7
Edge-Connectivity 2 4.1.7
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)
Graph Theory
Ch. 4. Connectivity and paths8
Edge-Connectivity 3
Disconnecting set Edge cut
S
S
Graph Theory
Ch. 4. Connectivity and paths9
Theorem 4.1.9 : 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).
Incident edges is
an Edge cut
min edge-cut
Graph Theory
Ch. 4. Connectivity and paths10
Theorem 4.1.9 : 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.
Graph Theory
Ch. 4. Connectivity and paths11
Theorem 4.1.9 2
Proof: Continue Otherwise, we choose x S and y S with xy.
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
xabcd
1234
neighbors of x : 1, 2T:{1,2,b,c,d}
Graph Theory
Ch. 4. Connectivity and paths12
Bond 4.1.14
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.
Graph Theory
Ch. 4. Connectivity and paths13
Proposition 4.1.15: 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.
Graph Theory
Ch. 4. Connectivity and paths14
Proposition 4.1.15: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= AB, 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
SS
B
A
Graph Theory
Ch. 4. Connectivity and paths15
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.
Graph Theory
Ch. 4. Connectivity and paths
Example of Blocks 4.1.17
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.
Graph Theory
Ch. 4. Connectivity and paths17
Proposition 4.1.19: 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 B2.
Graph Theory
Ch. 4. Connectivity and paths18
Proposition 4.1.19: 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.
Graph Theory
Ch. 4. Connectivity and paths19
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
Depth first Search
Graph Theory
Ch. 4. Connectivity and paths20
Arbitrary select an unused edge and check the new vertex
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
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.
Graph Theory
Ch. 4. Connectivity and paths21
Example of Depth First Search 4.1.21
Depth-first search from u– u, a, b, c, d, e, f, g
u a b c
defg
1. From u go to a, b, c, d2. From d, try to get to b but b is
visited3. From d, no other unvisited
edge to go, so go back to c4. Similarly, no other unvisited
edge to go from c , go back to b
5. From b go to e6. No other unvisited edge to go
from e, go back to b and then a
7. From a, go to f and then g 8. From g go to u but u is visited9. From g go back to f, a, and
then u
Graph Theory
Ch. 4. Connectivity and paths22
Example of Depth First Search 4.1.21
Other Depth-first search paths from u– u, a, f, g, b, e, d, c
– u, g, f, a, b, c, d, e
u a b c
defg
u a b c
defg
Graph Theory
Ch. 4. Connectivity and paths23
Lemma 4.1.22: 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
Graph Theory
Ch. 4. Connectivity and paths24
Lemma 4.1.22: 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.
u a v c
wefg
Graph Theory
Ch. 4. Connectivity and paths25
Algorithm: 4.1.23 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}.
Graph Theory
Ch. 4. Connectivity and paths26
Algorithm 4.1.23 : 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 wV(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, then2A) 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.
Graph Theory
Ch. 4. Connectivity and paths27
Algorithm 4.1.23 : Computing the blocks of a graph 2/2
w v
fg
- 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
Example of Step 2A:
Graph Theory
Ch. 4. Connectivity and paths28
Theorem 4.2.2 : 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
Graph Theory
Ch. 4. Connectivity and paths29
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. 4.2.3
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.
Graph Theory
Ch. 4. Connectivity and paths30
Theorem 4.2.4.
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.
Graph Theory
Ch. 4. Connectivity and paths31
Corollary 4.2.6 : 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.
Graph Theory
Ch. 4. Connectivity and paths32
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.
Graph Theory
Ch. 4. Connectivity and paths33
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}.
Graph Theory
Ch. 4. Connectivity and paths34
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.
Graph Theory
Ch. 4. Connectivity and paths35
Example of Max Flow
The zero flow assigns flow 0 to each edge It is feasible.
(0)1
(0)1(0)2
(0)2
(0)2
(0)2
(0)1
s
v
x y
u
tf
Graph Theory
Ch. 4. Connectivity and paths36
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
(1)1(0)2
(0)2
(1)2
(1)2
(1)1
s
v
x y
u
tf
Graph Theory
Ch. 4. Connectivity and paths37
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
(1)1(0)2
(0)2
(1)2
(1)2(1)1
s
v
x y
u
tf
(1)1
(0)1(1)2
(1)2
(1)2
(1)2(1)1
s
v
x y
u
tf
Graph Theory
Ch. 4. Connectivity and paths38
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).
Graph Theory
Ch. 4. Connectivity and paths39
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).
+ +
- +
+ -
- -
New Flow after Augmenting
Graph Theory
Ch. 4. Connectivity and paths40
Examples
+ + +
C=6, f=4Slack =2
C=16, f=10Slack =6
C=12, f=5Slack =7
20 14 6 11
+ + +
C=6, f=6Slack=0
C=16, f=12Slack =4
C=12, f=7Slack =5
20 14 6 11
+2
New Flow after Augmenting
Graph Theory
Ch. 4. Connectivity and paths41
+k +k -k +k-k
Examples
New Flow after Augmenting
Graph Theory
Ch. 4. Connectivity and paths42
Examples
f/c= 6/9S=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
12 15 9 6 6 4 17 9
3 more3 more
Graph Theory
Ch. 4. Connectivity and paths43
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.
- + - -+ + +
Graph Theory
Ch. 4. Connectivity and paths44
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.
Graph Theory
Ch. 4. Connectivity and paths45
Ford-Fulkerson Labeling Alg. For Max- flow 1 4.3.9
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.
Graph Theory
Ch. 4. Connectivity and paths46
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.
Graph Theory
Ch. 4. Connectivity and paths47
Theorem 4.3.11
In every network,
The maximum flow =
The minimum source/sink cut
Graph Theory
Ch. 4. Connectivity and paths48
Max Flow and Bipartite Matching
S T
C=1C=1
Top Related