0% found this document useful (0 votes)
6 views

min cut

The Max Flow - Min Cut Theorem states that the maximum flow in a flow network is equal to the capacity of the minimum cut separating the source from the sink. The Ford-Fulkerson algorithm is commonly used to determine the maximum flow by finding augmenting paths and updating the residual graph. Applications of this theorem include network flow problems, assignment problems, image segmentation, and network reliability.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

min cut

The Max Flow - Min Cut Theorem states that the maximum flow in a flow network is equal to the capacity of the minimum cut separating the source from the sink. The Ford-Fulkerson algorithm is commonly used to determine the maximum flow by finding augmenting paths and updating the residual graph. Applications of this theorem include network flow problems, assignment problems, image segmentation, and network reliability.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

‭Max Flow - Min Cut Theorem‬

‭Understanding the Basics‬

‭ flow network is a directed graph where each edge has a capacity, representing the maximum‬
A
‭amount of flow that can pass through‬‭1‬ ‭it.‬

‭‬ S
● ‭ ource Node (s):‬‭The starting point of the flow.‬
‭●‬ ‭Sink Node (t):‬‭The ending point of the flow.‬
‭●‬ ‭Flow:‬‭The amount of material that can be sent from‬‭the source to the sink through the‬
‭network.‬
‭●‬ ‭Cut:‬‭A partition of the vertices into two sets, S‬‭and T, such that the source is in S and the sink‬
‭is in T.‬
‭●‬ ‭Capacity of a Cut:‬‭The sum of the capacities of the‬‭edges going from S to T.‬
‭ ax Flow:‬‭The maximum flow in a network is the maximum‬‭amount of flow that can be sent‬
M
‭from the source to the sink without violating the capacity constraints of the edges.‬‭2‬

‭Min Cut:‬‭The minimum cut in a network is the cut with‬‭the minimum capacity.‬

‭ ax-Flow Min-Cut Theorem:‬‭The Max-Flow Min-Cut Theorem‬‭states that the maximum flow in‬
M
‭a flow network is equal to the capacity of the minimum cut.‬‭3‬

‭Ford-Fulkerson Algorithm:‬

‭ common algorithm to find the maximum flow is the Ford-Fulkerson algorithm. It works as‬
A
‭follows:‬

‭1.‬ ‭Initialize:‬
‭○‬ ‭Set the flow on each edge to 0.‬
‭○‬ ‭Create a residual graph, which initially copies the original graph.‬
‭2.‬ ‭Find an Augmenting Path:‬
‭○‬ ‭Use a search algorithm (like BFS or DFS) to find a path from the source to the sink in the‬
‭residual graph. This path is called an augmenting path.‬
‭3.‬ ‭Augment the Flow:‬
‭○‬ ‭Find the bottleneck capacity of the augmenting path, which is the minimum capacity of‬
‭any edge on the path.‬
‭○‬ ‭Increase the flow on each edge of the augmenting path by the bottleneck capacity.‬
‭○‬ ‭Update the residual graph by subtracting the bottleneck capacity from the forward edges‬
‭and adding it to the backward edges.‬‭4‬
‭4.‬ ‭Repeat:‬
‭○‬ ‭Repeat steps 2 and 3 until no more augmenting paths can be found.‬
‭ inding the Minimum Cut:‬‭Once the Ford-Fulkerson algorithm‬‭terminates, the minimum cut‬
F
‭can be found by examining the residual graph:‬

‭1.‬ ‭Identify Reachable Vertices:‬


‭○‬ ‭Perform a breadth-first search (BFS) from the source node in the residual graph.‬
‭2.‬ ‭Partition Vertices:‬
‭○‬ ‭Vertices reachable from the source form set S.‬
‭ ‬ ‭Vertices not reachable form set T.‬

‭3.‬ ‭Calculate Cut Capacity:‬
‭○‬ ‭Sum the capacities of the edges going from S to T in the original graph. This is the‬
‭capacity of the minimum cut.‬
‭Applications of Max Flow-Min Cut:‬

‭‬
● ‭ etwork Flow Problems:‬‭Routing traffic, water flow,‬‭etc.‬
N
‭●‬ ‭Assignment Problems:‬‭Assigning tasks to workers, matching‬‭students to colleges, etc.‬
‭●‬ ‭Image Segmentation:‬‭Dividing an image into meaningful‬‭regions.‬
‭●‬ ‭Network Reliability:‬‭Analyzing network vulnerability.‬
‭ y understanding the concepts of flow networks, maximum flow, minimum cut, and the‬
B
‭Ford-Fulkerson algorithm, you can effectively solve a variety of problems in computer science‬
‭and operations research.‬

‭ ure! The Max-Flow Min-Cut Theorem is a fundamental concept in network flow theory. It states‬
S
‭that the maximum flow in a flow network from a source to a sink is equal to the total weight of‬
‭the edges in the smallest cut that separates the source and the sink. Let's break down the steps‬
‭to understand this concept in a simple and easy-to-learn manner:‬

‭### Max-Flow Min-Cut Theorem Steps‬

‭#### 1. **Understand the Flow Network**‬

‭ flow network is a directed graph where each edge has a capacity, and each edge receives a‬
A
‭flow. The goal is to find the maximum flow from a source node (S) to a sink node (T).‬

‭#### 2. **Max-Flow Problem**‬

‭ he max-flow problem involves finding the maximum amount of flow that can be sent from the‬
T
‭source to the sink without violating the capacity constraints of the edges.‬

‭#### 3. **Min-Cut Problem**‬

‭ he min-cut problem involves finding the smallest set of edges that, if removed, would‬
T
‭disconnect the source from the sink. The total capacity of these edges is the minimum cut.‬
‭#### 4. **Ford-Fulkerson Algorithm**‬

‭ he Ford-Fulkerson algorithm is used to solve the max-flow problem. It repeatedly finds‬


T
‭augmenting paths in the residual graph and increases the flow until no more augmenting paths‬
‭can be found.‬

‭#### 5. **Residual Graph**‬

‭ he residual graph represents the remaining capacities of the edges after considering the‬
T
‭current flow. It includes reverse edges to account for possible flow reduction.‬

‭#### 6. **Finding Augmenting Paths**‬

‭ se a search algorithm (like BFS or DFS) to find paths from the source to the sink in the‬
U
‭residual graph where all edges have positive capacity.‬

‭#### 7. **Augment Flow**‬

I‭ncrease the flow along the augmenting path by the minimum capacity of the edges in the path.‬
‭Update the residual capacities accordingly.‬

‭#### 8. **Repeat**‬

‭ epeat the process of finding augmenting paths and augmenting flow until no more augmenting‬
R
‭paths can be found.‬

‭#### 9. **Max-Flow**‬

‭ he maximum flow is the total flow from the source to the sink after no more augmenting paths‬
T
‭can be found.‬

‭#### 10. **Min-Cut**‬

‭ he min-cut can be found by identifying the edges that, if removed, would disconnect the source‬
T
‭from the sink. These edges are the ones that are fully utilized in the final residual graph.‬
‭### Example‬

‭Let's go through an example to illustrate these steps:‬

‭#### Example Graph‬

‭Consider a graph with 4 vertices (S, A, B, T) and the following capacities:‬

‭̀``‬

‭S‬

‭/ \‬

‭10 5‬

‭/ \‬

‭A B‬

‭\ /‬

‭15 10‬

‭\ /‬

‭T‬

‭̀``‬

‭1. **Initialize Flow**: Start with a flow of 0 for all edges.‬

‭ . **Residual Graph**: Initially, the residual graph is the same as the original graph since the‬
2
‭flow is 0.‬

‭ . **Find Augmenting Path**: Use BFS to find a path from S to T. One possible path is S -> A ->‬
3
‭T.‬
‭ . **Augment Flow**: The minimum capacity along the path S -> A -> T is 10. Increase the flow‬
4
‭along this path by 10 and update the residual capacities:‬

‭- S -> A: 10 - 10 = 0 (residual capacity)‬

‭- A -> T: 15 - 10 = 5 (residual capacity)‬

‭- Add reverse edges with the flow value:‬

‭- A -> S: 10 (reverse edge)‬

‭- T -> A: 10 (reverse edge)‬

‭5. **Repeat**: Find another augmenting path. Another possible path is S -> B -> T.‬

‭- The minimum capacity along the path S -> B -> T is 5. Increase the flow along this path by 5‬
‭and update the residual capacities:‬

‭- S -> B: 5 - 5 = 0 (residual capacity)‬

‭- B -> T: 10 - 5 = 5 (residual capacity)‬

‭- Add reverse edges with the flow value:‬

‭- B -> S: 5 (reverse edge)‬

‭- T -> B: 5 (reverse edge)‬

‭ . **Max-Flow**: No more augmenting paths can be found. The maximum flow from S to T is the‬
6
‭sum of the flows along the paths found, which is 10 + 5 = 15.‬

‭ . **Min-Cut**: The min-cut can be found by identifying the edges that are fully utilized in the‬
7
‭final residual graph. In this case, the edges S -> A and S -> B are fully utilized, forming the‬
‭min-cut with a total capacity of 10 + 5 = 15.‬

‭### Summary‬

‭ he Max-Flow Min-Cut Theorem shows that the maximum flow in a network is equal to the‬
T
‭capacity of the smallest cut that separates the source from the sink. The Ford-Fulkerson‬
‭algorithm helps find this maximum flow by repeatedly finding augmenting paths and updating‬
‭the residual graph.‬

You might also like