Created with Snap 1 25 2 25 3 4 5 6 7 8 9 10 11 12 -100 13 14 15 16 17 18 19 20 25 21 22 23 25 24 25 26 27 28 29 30 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 000000000000000000000000000000eps = 04x.25x.5x1x2x4x?def AdmissibleEdge(v,eps):for w in Neighborhood(v):if ReducedCosts((v,w)) < 0:return(v,w)return Nonedef ReducedCosts((u,v)):return cost[(u,v)] + pot[u] - pot[v]eps = RecalculateCosts()# for integer epswhile eps > 1:for e in Edges():if ReducedCosts(e) > 0:flow[e] = 0elif ReducedCosts(e) < 0:flow[e] = cap(e)IsFlow = Falsewhile not IsFlow:v = ActiveVertex()if v:e = AdmissibleEdge(v,eps)if e:delta = Min(res(e),excess(v))if ForwardEdge(e[0],e[1]):flow[(e[0],e[1])] = flow[(e[0],e[1])] + deltaelse:flow[(e[1],e[0])] = flow[(e[1],e[0])] - deltaelse:Lower(v,eps / 2)else:IsFlow = Trueeps = eps / 2123456789101112131415161718192021222324252627282930