Created with Snap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4x.25x.5x1x2x4x?s = PickSource()t = PickSink()InitPotential(s,t)for v in G.Neighborhood(s):flow[(s,v)] = cap((s,v))feasible = Falsewhile not feasible:pushed = Falsev = FindExcessVertex()if not v:feasible = Trueelse:for u in Neighborhood(v):if pot[v] > pot[u]:delta = Min(res((v,u)),excess(v))if ForwardEdge(v,u):flow[(v,u)] = flow[(v,u)] + deltaelse:flow[(u,v)] = flow[(u,v)] - deltapushed = Truebreakif not pushed:pot[v] = minResNeighborPot(v) + 1ShowCut(s)123456789101112131415161718192021222324