Applications of Maximum Flow and Minimum Cut Problems
Applications of Maximum Flow and Minimum Cut Problems
17
11 S1 5 5 B 4 4 D1
9 5 2 17 17
2 2
11 5 T
1 13
O 16 2 A
2 2 8
16 15 5 8
4
S2 19 18 C 9 8 D2 8
16
Assignment Problem
Given: n people and n jobs
Each person can be assigned to exactly one job
Each job should be assigned to exactly one person
Person-job compatibility is given by a directed network
(e.g., having a link A x means “person A can do job x ”)
Goal: Find an assignment of n jobs to n people
people A B C D E
jobs x y z u v
Solving the Assignment Problem via Maximum Flow
The assignment problem can be solved by creating and solving a related instance of
the transshipment problem:
◦ Each person-node is considered as a supply node with supply amount 1.
◦ Each job-node is considered as a demand node with demand amount 1.
◦ Assign capacity 1 to each arc.
◦ Solve the resulting transshipment problem by finding maximum flow in the
auxiliary network.
◦ If maximum flow value = n
then the current maximum flow gives a feasible assignment,
else the assignment problem is infeasible.
1 1 1 1 1
people A B C D E
jobs x y z u v
1 1 1 1 1
Solving the Assignment Problem via Maximum Flow
In our example,
the red numbers on the arcs show the optimal flow values.
Since the maximum flow value is 5,
the assignment problem is feasible.
The feasible assignment is A x , B y, C u , D z , E v .
O
1
1 1 1 1
1 1 1 1 1
people A B C D E
1 1 1
1
1
jobs x y z u v
1 1 1 1 1 1 1
1 1
1
T
Showing the infeasibility of an assignment problem using
maximum-flow-based arguments
Let’s solve the assignment problem below via maximum flow.
The red numbers on the arcs show the optimal flow values.
Since the maximum flow value = 5 < 6 = number of jobs,
the assignment problem is infeasible.
O
1 1 1
1 1
people A B C D E F
1 1 1 1
1
jobs x y z u v w
1 1 1
1 T 1
Showing the infeasibility of an assignment problem using
minimum-cut-based arguments
The O-side of the minimum cut is {O, A, B, C, D, x, y, z} (the set of
the nodes that are reachable from O via augmenting paths)
Return to the original network (delete nodes O and T and the arcs
incident to them).
O
1 1 1
1 1
people A B C D E F
1 1 1 1
1
jobs x y z u v w
1 1 1
1 T 1
Showing the infeasibility of an assignment problem using
minimum-cut-based arguments
The capacity of the modified cut is 0 (since there are no arcs going
from O-side to T-side).
There are 2 people (E, F) and 3 jobs (u, v, w) on T-side.
Thus, one of the 3 jobs should be assigned
people A B C D E F
jobs x y z u v w