Definition (Network)

A network is a Directed Graph with specified vertices, the source and the sink. It can potentially be weighted.

graph LR;
	a((a)) --> b((b));
	a --> c((c));
	b --> d((d));
	c --> e((e));
	d --> f((f));
	e --> f;

Here, is the source, and is the sink.

Definition (Flow)

In a network, a flow is a collection edged such that for every vertex except the source and the sink,

In the above graph, it has a flow. One example of a not-flow is a

graph LR;
	a((a)) --> b((b));
	c((c)) --> b;
	b --> d((d));

where has in and out, so there is no flow.

Definition (Flow Size)

The size of a flow is the number of edges of leaving the source minus the number of edges of going into the source.

Definition (Network Cut)

A cut in a network (or a network cut) is a partition of the vertices into two sets one of which contains the source and one of which contains the sink.

Related: Cut.

Lemma (Size of Flow Given any Cut)

Suppose we have a network , a flow , with cut to denote the source and sink respectively. Then

This means we can use any network cut to compute the flow.

Proof:

Consider

then the summand is by definition, unless is equal to the source. So really, this is just the number of edges of out of minus the number of edges into . By definition, this is the size of the flow.

We can also compute this over the sum of edges. So,

which is the same.

Definition (Augmenting Path)

Given a flow in a network , and augmenting path is a Path from (source to sink) where each edge is either

  • in but not .
  • whose reverse is in

Given a flow F and augmenting path , we can add a to . In particular, if we have edge , we can add to , then we add the edge to the flow. If whose reverse is in , we can add to .

Lemma (Add Augmenting Path to Flow)

We can make a new flow with

Proof:

If , and we either add to or remove from , then this changes the net flow out of by , and the network flow out of by minus 1. But if

where is the source and is the sink, every intermediate vertex must cancel. For example, give in and out. This gives us a large telescope where every not sink/source vertex cancels.

But gives us one more net flow, and reduces one net flow. Here, we get one extra unit of flow from , giving us the proof.

Lemma (Maxflow is at Most the Mincut)

The maximum flow of a network is the size of the minimum cut.

Proof:

We showed that from lemma, we can pick any cut. So, the mincut is equal to for some cut , which will partition . From the same lemma, we showed that

Clearly, this is at most .