§ Flows (TODO)
§ Canonical Transformation
- No self loops.
- No loops of the form
s -> u -> s
. (ie, no 2-vertex loops). - This allows us to conflate "positive flow" and "net flow".
§ Notation: Net flow / flow
- A flow on G is a function f:V×V→R such that f(u,v)≤c(u,v) for all vertices u,v.
- Flow conservation : for all vertices u, ∑vf(u,v)=0.
- anti-symmetry : f(u,v)=−f(v,u).
§ Implicit summation notation
The value of a flow f denoted as ∣f∣ (cardinality of f), is denoted as:
∣f∣≡f(s,V)=v∑f(s,v)
§ Properties of flow
- f(X,X)=0. f(a,a)=0 because self loops are not allowed. for two different vertices, we're going to get f(a,b)+f(b,a)=0 by skew symmetry. In general, f(X,Y)=−f(Y,X).
- f(X∪Y,Z)=f(X,Z)∪f(Y,Z) if X∩Y=∅.
§ Theorem: ∣f∣equivf(s,V)=f(V,t)
Recall that ∣f∣=f(s,V). We want to show that ∣f∣=f(s,V)=f(V,t).
So whatever gets pushed out gets pushed in.
∣f∣≡f(s,V)f(s,V)+f(V−s,V)=f(V,V)=0f(s,V)=f(V−s,V)f(s,V)=f(V−s−t,V)+f(t,V)f(s,V)=f(t,V)−f(V−s−t,V)[any vertex in V−s−t is an intermediate vertex, which has 0 net flow]f(s,V)=f(t,V)−0f(s,V)=f(t,V)
§ Cut:
A partition of the network into two parts, such that the source is in one
part and sink in the other. (S,T) is a cut of a flow network G is
a partition of V such that s∈S,t∈T. If f is a flow on G
then the flow across the cut is f(S,T).
§ Capacity of a cut and its relationship to flow
c(S,T)=s∈S,t∈T∑c(s,t)
See that we only get
positive coefficents here. There is no "negative capacity", only "negative flow".
§ Theorem: upper bound flow across a cut
Value of any flow is upeer bounded by the capacity of any cut. We need
more tools to prove this, as this is basically max-flow-min-cut
§ A different characterization of flow value
Lemma: for any flow f and any cut (S,T) we have that ∣f∣=f(S,T).
It's because we have the source on one side, and the sink on the other side.
That gives us the flow! Everything else cancels by conservation.
f(S,T)=f(S,V)−f(S,S)f(S,T)=f(S,V)−0f(S,T)=f(s,V)+f(S−s,V)
As S−s does not contain t, by flow conservation, we must have that f(S−s,V)=0.
Thus we get:
f(S,T)=f(s,V)=∣f∣
So, I can know the capacity of any cut (S,T) bounds the flow of the network!
So if I go look at the min-cut, then I can bound the max flow. We don't know
how to find these min-cuts. That's what we'll need to figure out.
§ Residual network
Network that points us to locations with leftover capacity where we can
push flow. Gf(V,Ef) contains all those edges that have positive (greater than zero)
residual capacity. Edges in Ef admit more flow. If (v,u)∈E, then
c(v,u)=0, but f(v,u)=−f(u,v). So we will have extra edges in the
residual network that don't exist in the original network.
If I have a flow −1 due to a back-edge with capacity 0, I can in fact
send more flow to make it 0! So I can have "back edges" in the residual network
for edges whose flow has to shrink.
§ Augmenting path in Gf
Sid question: A path from s to t in Gf. Why does the existence of an augmenting path in Gf actually mean that we can increase the flow? even when we have "back edges"? Sid answer : Because at the end of the day, we are picking a path from s to t which tells us how to change our flow in a way that we still respect capacity constraints.