Professional Documents
Culture Documents
f (x, z) +
zV Y xV Y
zV Y xV
f (x, z) =
zV Y xY
By flow conservation
zV Y
f (x, z) = 0
And
xV Y
f (z, x) +
zV Y xV Y
f (x, z) =
f (z, x)
zV Y xY
f (z, x)
zV Y xV Y
zV Y xY
modify the capacities of G to create a new flow network G in which any minimumcut
in G is a minimum cut with the smallest number of edges in G. SOLUTION
Basic idea: Construct a new graph G with same set of vertices and edges with
modified capacity for each edge. Each capacity of edge will be increase by a constant
. So old minimum cut with more edges will end up increasing more than the minimum
cut with least number of edges. Meanwhile can not be too large eighter. Because
it might make cuts which was not minimum but with much fewer edges becoming
minimum cut in the new graph.
Details: Define
m
=
2|E|
where m is the minimum dierence between minimum cut and non-minimum cut in
G. Then increse every edge by , we have G .
To prove the correctness of this algorithm, we need to prove:
(1) the minimum cut with least number of edges in G will be the only minimum cut
in G
(2) non-minimum cut in G will never be minimum cut in G
Denote sum of capacity if edges of cut (X,Y) to be c(X,Y).
Proof of (1): Let (S,T),(X,Y) be minimum cut in G, |(S, T )| < |(X, Y )|, we have
c (S, T ) = c(S, T ) + |(S, T )|
< c(X, Y ) + |(X, Y )|
= c (X, Y )
Proof of (2): Let (S,T) be minimum cut in G, c(S, T ) < c(X, Y ), we will prove c (X, Y )
is not minimum cut in G .
c (S, T ) = c(S, T ) + |(S, T )|
c(S, T ) + |E|
|(S, T )| |E|
m
= c(S, T ) +
2
c(X, Y )
(c(X, Y ) c(S, T ) m
< c (X, Y )
Correctness proven.
[30pt] CLRS Exercise 26.3 on page 761-762
SOLUTION
a. For contradiction, assume for a finite-capacity cut (S,T), Ji T and Ak S for
some Ak Ri . Then the capacity of dege (Ak , Ji ) should be included in the cut, which
would make c(S, T ) = . Thus Ji T and Ak T .
b. To calculate the maximum revenue, we need maximum income and minimum cost
to hair experts.
Denote accepted job as J , denote Ri as the hired experts for Ji . The total income of
accepted jobs is
Ji J
Pi .
So
the net revenue = total income expert cost
=
Pi
ck
Ji J
Pi
Ji J
Ak R
Ji J
Ji
ck
Ak R
Ji J
/
Pi (
Pi
Pi +
J
/
ck )
Ak R
Pi c(S, T )
Ji J
(b) f (u, v) = c(u, v), which might indicate that (u,v) could be part of minimum cut.
What we need to do is to check if there is a new augmenting path available. if so,
one iteration of Ford-Fulkerson will be enough. This will take O(|V | + |E|)
b.Decrease the capacity of a single edge (u, v) E by 1, c (u, v) = c(u, v) 1 then we
have the following cases:
(a) f (u, v) c(u, v) 1, then the change will not change anything of the flow, we
need to do nothing.
(b) f (u, v) > c(u, v) 1, then the capacity constrain is violated. We need to do DFS
or BFS to decrease one unit along with path from s to v and from v to t. This
should take O(|V | + |E|).