1、清华大学算法分析与设计 第09讲动态规划方法Cut A cut (S,T) divides the flow G=(E,V) into two parts S and T, where S T=, and ST=E, sS, tT. Net flow across a cut (S,T) is defined to be f(S,T), the capacity of (S,T) is c(S,T) c(S,T)=u S,v Tc(u,v) f(S,T)=u S,v T f(u,v)清华大学软件学院宋斌恒 23The Basic Ford-Fulkerson algorithm Ford-Fu
2、lkerson(G,s,t)1. For each edge (u,v) in EG1. fu,v02. fv,u02. While there exists a path p from s to t in the residual network Gf1. cf(p)mincf(u,v): (u,v) in p2. For each edge (u,v) in p 1. fu,v fu,v+ cf(p) 2. fv,u - fu,v清华大学软件学院宋斌恒 29 Proof of step1(Lemma 26.8) Suppose that there exists a flow f, a n
3、ext augmented flow f and a vertex v in V-s,t not satisfies the property mentioned in step1,that is f(s,v) f(s,v) does not hold, then we choose v be one of such elements which takes the minimum distance from s in Gf it means 【假设不满足递增规律】 【蓝字什么意思?为什么能这样假设?】清华大学软件学院宋斌恒 44 f(s,v) f(s,v) Let p=s-uv be a shortest path from s to v, so that (u,v) in Ef and f(s,u) f(s,v)-1 and f(s,u) f(s,u), We claim (u,v) not in Ef. If it is, then f(s,v) f(s,u)+1 (triangle inequality) f(s,u)+1 (see above) f(s,v) A contradiction!【如下所示】 How can we have (u,v) not in Ef but in Ef?清华大学软件学院宋斌恒 45