# CMPSCI 311: Theory of Algorithms

### Min Cuts and Max Flows

A flow diagram is a labeled directed graph like this example which I have gratefully lifted from `www.ms.ic.ac.uk/jeb/or/netflow.html`:

``````
3          5            3
------>(2)-------->(5)------
/        ^ <------   |       \
/        1|       4\  |2       \
/   2      |    1    \ v    1    >
>(1)-------->(3)-------->(6)-------->((8))
\          ^           |         >
\         |2          |2       /
\   3    |     2     v      5/
------>(4)-------->(7)------
``````

The edge labels represent the capacity of the edge. A flow is an assignment of an amount, from zero to the capacity, to each edge that has zero net flow in or out of each intermediate vertex. The max-flow problem is to input the diagram and output a flow with the maximum amount leaving the source node and entering the sink node.

A cut is a set of vertices including the source but not the sink. The capacity of a cut is the total capacity of all edges from vertices in the cut to those not in it. The min-cut is the cut of smallest size. The min-cut max-flow theorem says that the min-cut and max-flow always have the same size.

• Question 1: Find the min-cut and the max-flow in the example above.

• Question 2: How many cuts are there in a flow diagram with \$n\$ vertices? Is brute-force search for the min-cut a good general way to find the max-flow?

• Question 3: Argue that the max-flow cannot have greater size than the min-cut.

• Question 4: Argue that the min-cut cannot have greater size than the max-flow. (Hint: Assume we have a flow that is smaller than every cut. Prove that there is an augmenting path -- a path from the source to the sink that uses some positive amount of excess capacity on each edge. Then argue that this shows the given flow is not maximum.)