MAXIMUM FLOW Max-Flow Min-Cut Theorem (Ford Fukerson’s Algorithm)
Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut...
Transcript of Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut...
![Page 1: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/1.jpg)
MaximumFlowsandMinimumCutsII
Lecture6COMP610January242018
![Page 2: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/2.jpg)
Recall:ACapacitatedNetworkDirectedGraphG=(V,E),nonnegativecapacityc(e)(sometimesu(e)isused)foreachedgeeuniquesourcesandsinkt,noedgesintosoroutoft,
1/20/2018 media/31c/31cb1d64-6c66-4f2c-8996-519b583724d0/phpAq5Htc.png (1024×502)
http://d2vlcm61l7u1fs.cloudfront.net/media%2F31c%2F31cb1d64-6c66-4f2c-8996-519b583724d0%2FphpAq5Htc.png 1/1
![Page 3: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/3.jpg)
Recall:Ans-tFlow∀e∈Ehavef(e),0≤ f(e)≤c(e)(capacityconstraints)∀v∈V∑ 𝑓 𝑢𝑣 =)*∈+ ∑ 𝑓(𝑢𝑣)*)∈+ (flowconservationconstraints)
![Page 4: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/4.jpg)
Recall:Ans-tCutisapartition(A,B)ofVwiths∈ 𝐴, 𝑏 ∈ 𝐵.Itscapacityc(A,B)=∑ 𝑐(𝑢𝑣))*∈+,)∈5,*∈6
![Page 5: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/5.jpg)
Recall:Thevalueofaflowandflowacrossa cut
ForallS⊆ 𝑉: fout(S)=∑ 𝑓(𝑥𝑦))*∈+,)∈<,*∈=><
fin(S)=∑ 𝑓(𝑥𝑦))*∈+,)∈=><,*∈<
v(f)=fout({s})Foralls-tcuts(A,B),v(f)=fout(A)-fin(A)≤ c(A,B)Proof:v(f)=∑ (𝑓*∈5
out(v)-fin(v))=∑ 𝑓*∈5out(v)-∑ 𝑓?@*∈< (v)
=(fout(A)+∑ 𝑓(𝑣𝑤)*B∈+,*∈5,B∈5 )- (fin(A)+∑ 𝑓(𝑣𝑤)*B∈+,*∈5,B∈5 )=fout(A)-fin(A)≤ fout(A)≤ c(A,B)
Typeequationhere.
![Page 6: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/6.jpg)
MaxFlowMinCutTheorem
Foreverycapacitatednetwork.Themaximumvolumeofans-tflowisequaltotheminimumvolumeofans-tcut.
Theorem7.14KTIfallthecapacitiesareintegerthenthereisamaximumvolumes-tflowfwhichisintegervalued. CanfindthisflowinO(v(f)|E|)time.
![Page 7: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/7.jpg)
Recall:Matchings andCovers
AmatchingMisadisjointsetofedgesC⊆VisacoverifthereisnoedgewithbothendpointsinV-C.ForamatchingMandcoverCinanyG,|M|≤ |C|
![Page 8: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/8.jpg)
ForBipartiteG:TheMaxSizeofaMatching=MinSizeofacover
![Page 9: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/9.jpg)
MaximumNumberofEdge-DisjointPathsinaDirectedGraphG
V(G’)=V(G),E(G’)=E(G)-{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}Findainteger-valuedmaxvalues-tflowfinG’.Findasetofv(f)edgedisjointpathsfroms-tinG,onlyusingeiff(e)=1.Foranys-tcut(A,B),c(A,B)=|{ab∈ E|a∈ A,b∈ B}|.Foranys-tcut(A,B),removingtheset{ab∈ E|a∈ A,b∈ B}separatessfromt(i.e.destroysalls-tpaths).Theorem:Themaximumsizeofasetofedgedisjoints-tpathsinadirectedgraphequalstheminimumsizeofasetofedgeswhoseremovalseparatessfromt.
![Page 10: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/10.jpg)
MaximumNumberofEdge-DisjointPathsinaDirectedGraphG
V(G’)=V(G),E(G’)=E(G)-{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}Findainteger-valuedmaxvalues-tflowfinG’.Findasetofv(f)edgedisjointpathsfroms-tinG,onlyusingeiff(e)=1.Foranys-tcut(A,B),c(A,B)=|{ab∈ E|a∈ A,b∈ B}|.Foranys-tcut(A,B),removingtheset{ab∈ E|a∈ A,b∈ B}separatessfromt(i.e.destroysalls-tpaths).Theorem:Themaximumsizeofasetofedgedisjoints-tpathsinadirectedgraphequalstheminimumsizeofasetofedgeswhoseremovalseparatessfromt.
![Page 11: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/11.jpg)
MaximumNumberofEdge-DisjointPathsinaDirectedGraphG
V(G’)=V(G),E(G’)=E(G)-{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}Findainteger-valuedmaxvalues-tflowfinG’.Findasetofv(f)edgedisjointpathsfroms-tinG,onlyusingeiff(e)=1.Foranys-tcut(A,B),c(A,B)=|{ab∈ E|a∈ A,b∈ B}|.Foranys-tcut(A,B),removingtheset{ab∈ E|a∈ A,b∈ B}separatessfromt(i.e.destroysalls-tpaths).Theorem:Themaximumsizeofasetofedgedisjoints-tpathsinadirectedgraphequalstheminimumsizeofasetofedgeswhoseremovalseparatessfromt.
![Page 12: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/12.jpg)
MaximumNumberofEdge-DisjointPathsinaDirectedGraphG
V(G’)=V(G),E(G’)=E(G)-{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}Findainteger-valuedmaxvalues-tflowfinG’.Findasetofv(f)edgedisjointpathsfroms-tinG,onlyusingeiff(e)=1.Foranys-tcut(A,B),c(A,B)=|{ab∈ E|a∈ A,b∈ B}|.Foranys-tcut(A,B),removingtheset{ab∈ E|a∈ A,b∈ B}separatessfromt(i.e.destroysalls-tpaths).Menger’s Theorem(1927):Themaximumsizeofasetofedgedisjoints-tpathsinadirectedgraphequalstheminimumsizeofasetofedgeswhoseremovalseparatessfromt.
![Page 13: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/13.jpg)
MaximumNumberofEdge-DisjointPathsinanUndirectedGraphGV(G’)=V(G),E(G’)={uv,vu| uv ∈ 𝐸 𝐺 }−{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}AsetFofkedgedisjoints-tpathsinGyieldans-tflowofvaluekinG’.Asbefore,thereisanalgorithmwhichgivenaninteger-valuedflowfofvaluekinG’yieldsasetFofkdisjoints-tpathsinG’.EachsuchpathyieldsanundirectedpathinG.Thesearedisjointexceptthatthepathusinguv inG’mayintersectwiththepathusingvu.Howdowehandlethis????Iff(uv)=f(vu)=1,setf(uv)=f(vu)=0.ThenfindF.
![Page 14: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/14.jpg)
MaximumNumberofEdge-DisjointPathsinanUndirectedGraphGV(G’)=V(G),E(G’)={uv,vu| uv ∈ 𝐸 𝐺 }−{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}AsetFofkedgedisjoints-tpathsinGyieldans-tflowofvaluekinG’.Asbefore,thereisanalgorithmwhichgivenaninteger-valuedflowfofvaluekinG’yieldsasetFofkdisjoints-tpathsinG’.EachsuchpathyieldsanundirectedpathinG.Thesearedisjointexceptthatthepathusinguv inG’mayintersectwiththepathusingvu.Howdowehandlethis????Iff(uv)=f(vu)=1,setf(uv)=f(vu)=0.ThenfindF.
![Page 15: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/15.jpg)
MaximumNumberofEdge-DisjointPathsinanUndirectedGraphGV(G’)=V(G),E(G’)={uv,vu| uv ∈ 𝐸 𝐺 }−{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}AsetFofkedgedisjoints-tpathsinGyieldans-tflowofvaluekinG’.Asbefore,thereisanalgorithmwhichgivenaninteger-valuedflowfofvaluekinG’yieldsasetFofkdisjoints-tpathsinG’.EachsuchpathyieldsanundirectedpathinG.Thesearedisjointexceptthatthepathusinguv inG’mayintersectwiththepathusingvu.Howdowehandlethis????Iff(uv)=f(vu)=1,setf(uv)=f(vu)=0.ThenfindF.
![Page 16: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/16.jpg)
MaximumNumberofEdge-DisjointPathsinanUndirectedGraphGV(G’)=V(G),E(G’)={uv,vu| uv ∈ 𝐸 𝐺 }−{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}AsetFofkedgedisjoints-tpathsinGyieldans-tflowofvaluekinG’.Asbefore,thereisanalgorithmwhichgivenaninteger-valuedflowfofvaluekinG’yieldsasetFofkdisjoints-tpathsinG’.EachsuchpathyieldsanundirectedpathinG.Thesearedisjointexceptthatthepathusinguv inG’mayintersectwiththepathusingvuinG’.Howdowehandlethis????Iff(uv)=f(vu)=1,setf(uv)=f(vu)=0.ThenfindF.
![Page 17: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/17.jpg)
MaximumNumberofEdge-DisjointPathsinanUndirectedGraphGV(G’)=V(G),E(G’)={uv,vu| uv ∈ 𝐸 𝐺 }−{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}AsetFofkedgedisjoints-tpathsinGyieldans-tflowofvaluekinG’.Asbefore,thereisanalgorithmwhichgivenaninteger-valuedflowfofvaluekinG’yieldsasetFofkdisjoints-tpathsinG’.EachsuchpathyieldsanundirectedpathinG.Thesearedisjointexceptthatthepathusinguv inG’mayintersectwiththepathusingvuinG’.Howdowehandlethis????Iff(uv)=f(vu)=1,setf(uv)=f(vu)=0.ThenfindF.
![Page 18: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/18.jpg)
MaximumNumberofEdge-DisjointPathsinanUndirectedGraphGV(G’)=V(G),E(G’)={uv,vu| uv ∈ 𝐸 𝐺 }−{xs|xs∈ 𝐸(𝐺)} − {𝑡𝑥|𝑡𝑥 ∈E(G)}AsetFofkedgedisjoints-tpathsinGyieldans-tflowofvaluekinG’.Asbefore,thereisanalgorithmwhichgivenaninteger-valuedflowfofvaluekinG’yieldsasetFofkdisjoints-tpathsinG’.EachsuchpathyieldsanundirectedpathinG.Thesearedisjointexceptthatthepathusinguv inG’mayintersectwiththepathusingvuinG’.Howdowehandlethis????Foralluv ∈ 𝐸 𝐺 , iff(uv)=f(vu)=1,setf(uv)=f(vu)=0.ThenfindF.
![Page 19: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/19.jpg)
AirlineScheduling
Setofflights:(Origin,Destination,Departure Time,ArrivalTime)
Flightjisreachablefromflighti ifbetweenthearrivaltimeforflightiandthedeparturetimeforflightjthereistimetodueallscheduledmaintenanceandcleaning,andrelocatefromthedestinationofflightitotheoriginofflightj.
Wewanttofindoutifkplanescanhandlealltheflights.
![Page 20: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/20.jpg)
AirlineScheduling
Setofflights:(Origin,Destination,Departure Time,ArrivalTime)
Flightjisreachablefromflighti ifbetweenthearrivaltimeforflightiandthedeparturetimeforflightjthereistimetodueallscheduledmaintenanceandcleaning,andrelocatefromthedestinationofflightitotheoriginofflightj.
Wewanttofindoutifkplanescanhandlealltheflights.
![Page 21: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/21.jpg)
AirlineScheduling
Setofflights:(Origin,Destination,Departure Time,ArrivalTime)
Flightjisreachablefromflighti ifbetweenthearrivaltimeforflightiandthedeparturetimeforflightjthereistimetodueallscheduledmaintenanceandcleaning,andrelocatefromthedestinationofflightitotheoriginofflightj.
Wewanttofindoutifkplanescanhandlealltheflights.
![Page 22: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/22.jpg)
AirlineScheduling
Setofflights:(Origin,Destination,Departure Time,ArrivalTime)
Flightjisreachablefromflighti ifbetweenthearrivaltimeforflightiandthedeparturetimeforflightjthereistimetodueallscheduledmaintenanceandcleaning,andrelocatefromthedestinationofflightitotheoriginofflightj.
Wewanttofindoutifkplanescanhandlealltheflights.
![Page 23: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/23.jpg)
AirlineSchedulingViaEdgeDisjointPaths
Buildadigraphwithtwoverticesui andvi foreachflight.Thereisanedgefromui tovi foreveryi.Thereisanedgefromvi touj ifflightjisreachablefromflighti.Thereisasourcesandanedgefromstoeveryui.Thereisasinktandanedgefromeveryvi tot.ApathPfromstotpointsoutasetofflightswhichcanbehandledbyoneplane(thoseforwhichuivi isanedgeofP).Wecanscheduletheflightsusingkplanesifthereisasetofatmostkedge-disjointpathsofGusingtheedgeuivi foreveryflighti.
![Page 24: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/24.jpg)
AirlineSchedulingViaEdgeDisjointPaths
Buildadigraphwithtwoverticesui andvi foreachflight.Thereisanedgefromui tovi foreveryi.Thereisanedgefromvi touj ifflightjisreachablefromflighti.Thereisasourcesandanedgefromstoeveryui.Thereisasinktandanedgefromeveryvi tot.ApathPfromstotpointsoutasetofflightswhichcanbehandledbyoneplane(thoseforwhichuivi isanedgeofP).Wecanscheduletheflightsusingkplanesifthereisasetofatmostkedge-disjointpathsofGusingtheedgeuivi foreveryflighti.
![Page 25: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/25.jpg)
AirlineSchedulingViaEdgeDisjointPaths
Buildadigraphwithtwoverticesui andvi foreachflight.Thereisanedgefromui tovi foreveryi.Thereisanedgefromvi touj ifflightjisreachablefromflighti.Thereisasourcesandanedgefromstoeveryui.Thereisasinktandanedgefromeveryvi tot.ApathPfromstotpointsoutasetofflightswhichcanbehandledbyoneplane(thoseforwhichuivi isanedgeofP).Wecanscheduletheflightsusingkplanesifthereisasetofatmostkedge-disjointpathsofGusingtheedgeuivi foreveryflighti.
![Page 26: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/26.jpg)
AirlineSchedulingViaEdgeDisjointPaths
Buildadigraphwithtwoverticesui andvi foreachflight.Thereisanedgefromui tovi foreveryi.Thereisanedgefromvi touj ifflightjisreachablefromflighti.Thereisasourcesandanedgefromstoeveryui.Thereisasinktandanedgefromeveryvi tot.ApathPfromstotpointsoutasetofflightswhichcanbehandledbyoneplane(thoseforwhichuivi isanedgeofP).Wecanscheduletheflightsusingkplanesifthereisasetofatmostkedge-disjointpathsofGusingtheedgeuivi foreveryflighti.
![Page 27: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/27.jpg)
AirlineSchedulingViaEdgeDisjointPaths
Buildadigraphwithtwoverticesui andvi foreachflight.Thereisanedgefromui tovi foreveryi.Thereisanedgefromvi touj ifflightjisreachablefromflighti.Thereisasourcesandanedgefromstoeveryui.Thereisasinktandanedgefromeveryvi tot.ApathPfromstotpointsoutasetofflightswhichcanbehandledbyoneplane(thoseforwhichuivi isanedgeofP).Wecanscheduletheflightsusingkplanesifthereisasetofatmostkedge-disjointpathsofGusingtheedgeuivi foreveryflighti.
![Page 28: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/28.jpg)
AirlineSchedulingViaEdgeDisjointPaths
Buildadigraphwithtwoverticesui andvi foreachflight.Thereisanedgefromui tovi foreveryi.Thereisanedgefromvi touj ifflightjisreachablefromflighti.Thereisasourcesandanedgefromstoeveryui.Thereisasinktandanedgefromeveryvi tot.ApathPfromstotpointsoutasetofflightswhichcanbehandledbyoneplane(thoseforwhichuivi isanedgeofP).Wecanscheduletheflightsusingkplanesifthereisasetofatmostkedge-disjointpathsofGusingtheedgeuivi foreveryflighti.
![Page 29: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/29.jpg)
AirlineSchedulingViaBipartiteMatching
Foranyscheduleusingexactlykplanestohandlefflights,thecorrespondingkedgedisjointpathsusekedgesoutofs,kedgesintot,thefedgesoftheformuivi,andf-kedgesoftheformviuj whereflightjisreachablefromflighti.Theselastf-kedgesformamatching.Thedesiredkpathsexistpreciselyifthereisamatchingofsizef-kinthegraphG’whoseedgesetis{vjui|flighti isreachablefromflightj}.Sothenumberofplanesneededistheminimumkforwhichthereisamatchingofsizen-kinG’.Giventhematchingwecanfindthescheduleeasily,sothetimetofindanoptimalscheduleisO(f^3).
![Page 30: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/30.jpg)
AirlineSchedulingViaBipartiteMatching
Foranyscheduleusingexactlykplanestohandlefflights,thecorrespondingkedgedisjointpathsusekedgesoutofs,kedgesintot,thefedgesoftheformuivi,andf-kedgesoftheformviuj whereflightjisreachablefromflighti.Theselastf-kedgesformamatching.Thedesiredkpathsexistpreciselyifthereisamatchingofsizef-kinthegraphG’whoseedgesetis{vjui|flighti isreachablefromflightj}.Sothenumberofplanesneededistheminimumkforwhichthereisamatchingofsizen-kinG’.Giventhematchingwecanfindthescheduleeasily,sothetimetofindanoptimalscheduleisO(f^3).
![Page 31: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/31.jpg)
AirlineSchedulingViaBipartiteMatching
Foranyscheduleusingexactlykplanestohandlefflights,thecorrespondingkedgedisjointpathsusekedgesoutofs,kedgesintot,thefedgesoftheformuivi,andf-kedgesoftheformviuj whereflightjisreachablefromflighti.Theselastf-kedgesformamatching.Thedesiredkpathsexistpreciselyifthereisamatchingofsizef-kinthegraphG’whoseedgesetis{vjui|flighti isreachablefromflightj}.Sothenumberofplanesneededistheminimumkforwhichthereisamatchingofsizen-kinG’.Giventhematchingwecanfindthescheduleeasily,sothetimetofindanoptimalscheduleisO(f^3).
![Page 32: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/32.jpg)
AirlineSchedulingViaBipartiteMatching
Foranyscheduleusingexactlykplanestohandlefflights,thecorrespondingkedgedisjointpathsusekedgesoutofs,kedgesintot,thefedgesoftheformuivi,andf-kedgesoftheformviuj whereflightjisreachablefromflighti.Theselastf-kedgesformamatching.Thedesiredkpathsexistpreciselyifthereisamatchingofsizef-kinthegraphG’whoseedgesetis{vjui|flighti isreachablefromflightj}.Sothenumberofplanesneededistheminimumkforwhichthereisamatchingofsizen-kinG’.Giventhematchingwecanfindthescheduleeasily,sothetimetofindanoptimalscheduleisO(f^3).
![Page 33: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/33.jpg)
SequentialSchedulingViaBipartiteMatching
![Page 34: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/34.jpg)
ImageSegmentationGraph.
GraphG=(V,E).Visthesetofpixels,Ejoinsneighbours.
![Page 35: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/35.jpg)
ImageSegmentationProblem
• ForeachpixelI,have:ai-likelihoodi isintheforegroundandbi-likelihoodi isinthebackground.
• Foreachedgeij oftheImageSegmentationgraphhaveseparationpenaltypijincurredifwemakedifferentchoicesfori andj.• WewanttofindapartitionofthepixelsintoasetFofforegroundpixelsandasetBofbackgroundpixelssoastomaximize:
∑ 𝑎??∈Y +∑ 𝑏??∈6 −∑ 𝑝?[?[∈+,?∈Y,[∈6
• Thisisthesameasminimizing∑ 𝑎??∈6 +∑ 𝑏??∈Y +∑ 𝑝?[?[∈+,?∈Y,[∈6
![Page 36: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/36.jpg)
ImageSegmentationProblem
• ForeachpixelI,have:ai-likelihoodi isintheforegroundandbi-likelihoodi isinthebackground.
• Foreachedgeij oftheImageSegmentationgraphhaveseparationpenaltypijincurredifwemakedifferentchoicesfori andj.• WewanttofindapartitionofthepixelsintoasetFofforegroundpixelsandasetBofbackgroundpixelssoastomaximize:
∑ 𝑎??∈Y +∑ 𝑏??∈6 −∑ 𝑝?[?[∈+,?∈Y,[∈6
• Thisisthesameasminimizing∑ 𝑎??∈6 +∑ 𝑏??∈Y +∑ 𝑝?[?[∈+,?∈Y,[∈6
![Page 37: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/37.jpg)
ImageSegmentationProblem
• ForeachpixelI,have:ai-likelihoodi isintheforegroundandbi-likelihoodi isinthebackground.
• Foreachedgeij oftheImageSegmentationgraphhaveseparationpenaltypijincurredifwemakedifferentchoicesfori andj.• WewanttofindapartitionofthepixelsintoasetFofforegroundpixelsandasetBofbackgroundpixelssoastomaximize:
∑ 𝑎??∈Y +∑ 𝑏??∈6 −∑ 𝑝?[?[∈+,?∈Y,[∈6
• Thisisthesameasminimizing∑ 𝑎??∈6 +∑ 𝑏??∈Y +∑ 𝑝?[?[∈+,?∈Y,[∈6
![Page 38: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/38.jpg)
ImageSegmentationProblem
• ForeachpixelI,have:ai-likelihoodi isintheforegroundandbi-likelihoodi isinthebackground.
• Foreachedgeij oftheImageSegmentationgraphhaveseparationpenaltypijincurredifwemakedifferentchoicesfori andj.• WewanttofindapartitionofthepixelsintoasetFofforegroundpixelsandasetBofbackgroundpixelssoastomaximize:
∑ 𝑎??∈Y +∑ 𝑏??∈6 −∑ 𝑝?[?[∈+,?∈Y,[∈6
• Thisisthesameasminimizing∑ 𝑎??∈6 +∑ 𝑏??∈Y +∑ 𝑝?[?[∈+,?∈Y,[∈6
![Page 39: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/39.jpg)
ImageSegmentationViaMinCut
• Constructacapacited networkwhosevertexsetisthepixels,sandt.• Addanedgesi foreverypixeli withcapacityai• Addanedgeti foreverypixeli withcapacitybi• Foreverytwoneighbouring pixelsij,addedgesij andji bothwithcapacitypij• Thereisabijection betweens-tcutsandchoicesfortheforegroundFandbackground.Thecutcorrespondingto(F,B)is(s+F,t+B).• Wearelookingfortheminimumcapacitycut.
![Page 40: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/40.jpg)
ImageSegmentationViaMinCut
• Constructacapacited networkwhosevertexsetisthepixels,sandt.• Addanedgesi foreverypixeli withcapacityai• Addanedgeti foreverypixeli withcapacitybi• Foreverytwoneighbouring pixelsij,addedgesij andji bothwithcapacitypij• Thereisabijection betweens-tcutsandchoicesfortheforegroundFandbackground.Thecutcorrespondingto(F,B)is(s+F,t+B).• Wearelookingfortheminimumcapacitycut.
![Page 41: Maximum Flows and Minimum Cuts II - McGill School Of ...breed/2018COMP610/... · Max Flow Min Cut Theorem For every capacitated network. The maximum volume of an s-t flow is equal](https://reader035.fdocuments.us/reader035/viewer/2022063000/5f0d8ae47e708231d43ae0bd/html5/thumbnails/41.jpg)
ImageSegmentationViaMinCut
• Constructacapacited networkwhosevertexsetisthepixels,sandt.• Addanedgesi foreverypixeli withcapacityai• Addanedgeti foreverypixeli withcapacitybi• Foreverytwoneighbouring pixelsij,addedgesij andji bothwithcapacitypij• Thereisabijection betweens-tcutsandchoicesfortheforegroundFandbackground.Thecutcorrespondingto(F,B)is(s+F,t+B).• Wearelookingfortheminimumcapacitycut.