SlideShare uma empresa Scribd logo
1 de 26
1
BITS Pilani, Hyderabad Campus
CONTENTS
Slide 2
Algorithm
Flow and Cut
Max Flow and Min Cut
Theorem
Running Time
Proof
3
Network reliability.
Security of statistical data.
Distributed computing.
Egalitarian stable matching.
Distributed computing.
Many many more . . .
Maximum Flow and Minimum Cut
Max flow and min cut.
Two very rich algorithmic problems.
Cornerstone problem in combinatorial optimization.
Beautiful mathematical duality.
Nontrivial applications / reductions.
Network connectivity.
Bipartite matching.
Data mining.
Open-pit mining.
Airline scheduling.
Image processing.
Project selection.
Baseball elimination.
4
Max flow network: G = (V, E, s, t, u) .
(V, E) = directed graph, no parallel arcs.
Two distinguished nodes: s = source, t = sink.
u(e) = capacity of arc e.
Max Flow Network
Capacity
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
5
An s-t flow is a function f: E → ℜ that satisfies:
For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
For each v ∈ V – {s, t}: (conservation)
Flows
∑∑ =
veve
efef
ofouttoin
)()(
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
4
0
0
0
0
0 0
0 4 4
0
4 0
00
Capacity
Flow
∑=∑
∈ Ewvwve
wvfef
),(:ofout
),(:)(∑=∑
∈ Evwwve
vwfef
),(:toin
),(:)(
6
An s-t flow is a function f: E → ℜ that satisfies:
For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
For each v ∈ V – {s, t}: (conservation)
MAX FLOW: find s-t flow that maximizes net flow out of the source.
Flows
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
4
0
0
0
0
0 0
0 4 4
0
4 0
Value = 4
∑=
se
eff
ofout
)(
00
Capacity
Flow
∑∑ =
veve
efef
ofouttoin
)()(
7
An s-t flow is a function f: E → ℜ that satisfies:
For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
For each v ∈ V – {s, t}: (conservation)
MAX FLOW: find s-t flow that maximizes net flow out of the source.
Flows
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
10
6
6
11
11
1 10
3 8 8
0
4 0
Value = 24
00
Capacity
Flow
∑∑ =
veve
efef
ofouttoin
)()(
8
An s-t flow is a function f: E → ℜ that satisfies:
For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity)
For each v ∈ V – {s, t}: (conservation)
MAX FLOW: find s-t flow that maximizes net flow out of the source.
Flows
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
10
9
9
14
14
4 10
4 8 9
1
0 0
Value = 28
00
Capacity
Flow
∑∑ =
veve
efef
ofouttoin
)()(
9
Networks
communication
Network
telephone exchanges,
computers, satellites
Nodes Arcs
cables, fiber optics,
microwave relays
Flow
voice, video,
packets
circuits
gates, registers,
processors
wires current
mechanical joints rods, beams, springs heat, energy
hydraulic
reservoirs, pumping
stations, lakes
pipelines fluid, oil
financial stocks, currency transactions money
transportation
airports, rail yards,
street intersections
highways, railbeds,
airway routes
freight,
vehicles,
passengers
chemical sites bonds energy
10
Cuts
∑∑
∈∈
∈
=
TwSv
EwvSe
wvueu
,
),(ofout
).,(:)(
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
Capacity = 30
11
An s-t cut is a node partition (S, T) such that s ∈ S, t ∈ T.
The capacity of an s-t cut (S, T) is:
Min s-t cut: find an s-t cut of minimum capacity.
Cuts
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
Capacity = 62
∑∑
∈∈
∈
=
TwSv
EwvSe
wvueu
,
),(ofout
).,(:)(
12
An s-t cut is a node partition (S, T) such that s ∈ S, t ∈ T.
The capacity of an s-t cut (S, T) is:
Min s-t cut: find an s-t cut of minimum capacity.
Cuts
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
Capacity = 28
∑∑
∈∈
∈
=
TwSv
EwvSe
wvueu
,
),(ofout
).,(:)(
13
L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent
across the cut is equal to the amount reaching t.
Flows and Cuts
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
fefefef
seSeSe
==− ∑∑∑
ofouttoinofout
)()()(
Value = 24
10
6
6
10
10
0 10
4 8 8
0
4 0
00
14
10
6
6
10
10
0 10
4 8 8
0
4 0
00
L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent
across the cut is equal to the amount reaching t.
Flows and Cuts
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
fefefef
seSeSe
==− ∑∑∑
ofouttoinofout
)()()(
Value = 24
15
10
6
6
10
10
0 10
4 8 8
0
4 0
0
L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent
across the cut is equal to the amount reaching t.
Flows and Cuts
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
fefefef
seSeSe
==− ∑∑∑
ofouttoinofout
)()()(
Value = 24
0
16
Let f be a flow, and let (S, T) be a cut. Then,
Proof by induction on |S|.
Base case: S = { s }.
Inductive hypothesis: assume true for |S| < k.
– consider cut (S, T) with |S| = k
– S = S' ∪ { v } for some v ≠ s, t, |S' | = k-1 ⇒ cap(S', T') = | f |.
– adding v to S' increase cut capacity by
Flows and Cuts
.)()(
toinofout
∑∑ =−
SeSe
fefef
0)()(
toinofout
=− ∑∑
veve
efef
s
v
t
After
s
v
t
S' Before S
17
L2. Let f be a flow, and let (S, T) be a cut. Then, | f | ≤ cap(S, T).
Proof.
Corollary. Let f be a flow, and let (S, T) be a cut. If |f| = cap(S, T), then
f is a max flow and (S, T) is a min cut.
Flows and Cuts
T)cap(S,
)(
)(
)()(
ofout
ofout
toinofout
=
≤
≤
−=
∑
∑
∑∑
Se
Se
SeSe
eu
ef
efeff
s
t
S T
7
6
8
4
18
Max Flow and Min Cut
Corollary. Let f be a flow, and let (S, T) be a cut. If |f| = cap(S, T), then
f is a max flow and (S, T) is a min cut.
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
10
9
9
15
15
4 10
4 8 9
1
0 0
Flow value = 28
00
Cut capacity = 28
19
Max-Flow Min-Cut Theorem
MAX-FLOW MIN-CUT THEOREM (Ford-Fulkerson, 1956): In any
network, the value of the max flow is equal to the value of the min cut.
"Good characterization."
Proof IOU.
s
2
3
4
5
6
7
t
15
5
30
15
10
8
15
9
6 10
10
10154
4
10
9
9
15
15
4 10
4 8 9
1
0 0
Flow value = 28
00
Cut capacity = 28
20
Towards an Algorithm
Find an s-t path where each arc has u(e) > f(e) and "augment" flow
along the path.
s
4
2
5
3 t
4
0 0
0 0 0
0
4
0
4
4
Flow value = 0
10 13 10
21
Towards an Algorithm
Find an s-t path where each arc has u(e) > f(e) and "augment" flow
along the path.
Repeat until you get stuck.
s
4
2
5
3 t
4
0 0
0 0 0
0
4
0
4
4
Flow value = 10
10 13 10
10 10 10X X X
22
Max-Flow Min-Cut Theorem
Augmenting path theorem (Ford-Fulkerson, 1956): A flow f is a max
flow if and only if there are no augmenting paths.
MAX-FLOW MIN-CUT THEOREM (Ford-Fulkerson, 1956): the value of
the max flow is equal to the value of the min cut.
We prove both simultaneously by showing the TFAE:
(i) f is a max flow.
(ii) There is no augmenting path relative to f.
(iii) There exists a cut (S, T) such that |f| = cap(S, T).
23
Proof of Max-Flow Min-Cut Theorem
We prove both simultaneously by showing the TFAE:
(i) f is a max flow.
(ii) There is no augmenting path relative to f.
(iii) There exists a cut (S, T) such that |f| = cap(S, T).
(i) ⇒ (ii)
We show contrapositive.
Let f be a flow. If there exists an augmenting path, then we can
improve f by sending flow along path.
(ii) ⇒ (iii)
Next slide.
(iii) ⇒ (i)
This was the Corollary to Lemma 2.
24
Proof of Max-Flow Min-Cut Theorem
We prove both simultaneously by showing the TFAE:
(i) f is a max flow.
(ii) There is no augmenting path relative to f.
(iii) There exists a cut (S, T) such that |f| = cap(S, T).
(ii) ⇒ (iii)
Let f be a flow with no augmenting paths.
Let S be set of vertices reachable from s in residual graph.
– clearly s ∈ S, and t ∉ S by definition of f
T)(S,
)(
)()(
ofout
toinofout
cap
eu
efeff
Se
SeSe
=
=
−=
∑
∑∑
s
t
Original Network
S T
25
Running Time
Assumption: all capacities are integers between 0 and U.
Invariant: every flow value f(e) and every residual capacities uf (e)
remains an integer throughout the algorithm.
Theorem: the algorithm terminates in at most | f * | ≤ nU iterations.
Corollary: if U = 1, then algorithm runs in O(mn) time.
Integrality theorem: if all arc capacities are integers, then there exists
a max flow f for which every flow value f(e) is an integer.
Note: algorithm may not terminate on some pathological instances
(with irrational capacities). Moreover, flow value may not even
converge to correct answer.
BITS Pilani, Hyderabad Campus
Thanks
Copyright © Mayank Garg. All Rights Reserved
Slide 26
Link to connect with author:
http://www.slideshare.net/MayankGarg25
https://www.linkedin.com/in/gargmayank
http://www.researchgate.net/profile/Mayank_Garg6/
https://www.facebook.com/mayank17692?ref=hl

Mais conteúdo relacionado

Mais procurados (20)

Breadth First Search & Depth First Search
Breadth First Search & Depth First SearchBreadth First Search & Depth First Search
Breadth First Search & Depth First Search
 
Spanning trees
Spanning treesSpanning trees
Spanning trees
 
Bfs and Dfs
Bfs and DfsBfs and Dfs
Bfs and Dfs
 
SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS SINGLE-SOURCE SHORTEST PATHS
SINGLE-SOURCE SHORTEST PATHS
 
Context free grammar
Context free grammarContext free grammar
Context free grammar
 
Relational algebra in dbms
Relational algebra in dbmsRelational algebra in dbms
Relational algebra in dbms
 
Network flows
Network flowsNetwork flows
Network flows
 
Biconnected components (13024116056)
Biconnected components (13024116056)Biconnected components (13024116056)
Biconnected components (13024116056)
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Trees
Trees Trees
Trees
 
Tree in data structure
Tree in data structureTree in data structure
Tree in data structure
 
DATA STRUCTURES
DATA STRUCTURESDATA STRUCTURES
DATA STRUCTURES
 
Generating function
Generating functionGenerating function
Generating function
 
Red black tree
Red black treeRed black tree
Red black tree
 
sum of subset problem using Backtracking
sum of subset problem using Backtrackingsum of subset problem using Backtracking
sum of subset problem using Backtracking
 
Relational algebra ppt
Relational algebra pptRelational algebra ppt
Relational algebra ppt
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Graph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphsGraph Theory: Matrix representation of graphs
Graph Theory: Matrix representation of graphs
 
Dijkstra s algorithm
Dijkstra s algorithmDijkstra s algorithm
Dijkstra s algorithm
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
 

Semelhante a Max flow min cut

Sequential and parallel algorithm to find maximum flow on extended mixed netw...
Sequential and parallel algorithm to find maximum flow on extended mixed netw...Sequential and parallel algorithm to find maximum flow on extended mixed netw...
Sequential and parallel algorithm to find maximum flow on extended mixed netw...csandit
 
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...cscpconf
 
Flow Network Talk
Flow Network TalkFlow Network Talk
Flow Network TalkImane Haf
 
Design and Analysis of Algorithms Assignment Help
Design and Analysis of Algorithms Assignment HelpDesign and Analysis of Algorithms Assignment Help
Design and Analysis of Algorithms Assignment HelpProgramming Homework Help
 
Lecture02_Part02.pptx
Lecture02_Part02.pptxLecture02_Part02.pptx
Lecture02_Part02.pptxMahdiAbbasi31
 
aads_assignment1_answer-1.pdf
aads_assignment1_answer-1.pdfaads_assignment1_answer-1.pdf
aads_assignment1_answer-1.pdfNanaKoori
 
Graph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph AlgorithmsGraph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph Algorithmshtttuneti
 
Transitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal NetworksTransitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal NetworksMoses Boudourides
 
A multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfacesA multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfacesTim Reis
 
Algorithm Design and Complexity - Course 12
Algorithm Design and Complexity - Course 12Algorithm Design and Complexity - Course 12
Algorithm Design and Complexity - Course 12Traian Rebedea
 
On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...
On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...
On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...AIRCC Publishing Corporation
 
A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.Ilya Gikhman
 
ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...
ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...
ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...AIRCC Publishing Corporation
 

Semelhante a Max flow min cut (20)

Sequential and parallel algorithm to find maximum flow on extended mixed netw...
Sequential and parallel algorithm to find maximum flow on extended mixed netw...Sequential and parallel algorithm to find maximum flow on extended mixed netw...
Sequential and parallel algorithm to find maximum flow on extended mixed netw...
 
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...
SEQUENTIAL AND PARALLEL ALGORITHM TO FIND MAXIMUM FLOW ON EXTENDED MIXED NETW...
 
Maxflow
MaxflowMaxflow
Maxflow
 
Flow Network Talk
Flow Network TalkFlow Network Talk
Flow Network Talk
 
Design and Analysis of Algorithms Assignment Help
Design and Analysis of Algorithms Assignment HelpDesign and Analysis of Algorithms Assignment Help
Design and Analysis of Algorithms Assignment Help
 
Lecture02_Part02.pptx
Lecture02_Part02.pptxLecture02_Part02.pptx
Lecture02_Part02.pptx
 
MaximumFlow.ppt
MaximumFlow.pptMaximumFlow.ppt
MaximumFlow.ppt
 
aads_assignment1_answer-1.pdf
aads_assignment1_answer-1.pdfaads_assignment1_answer-1.pdf
aads_assignment1_answer-1.pdf
 
smtlecture.5
smtlecture.5smtlecture.5
smtlecture.5
 
unit 4,5 (1).docx
unit 4,5 (1).docxunit 4,5 (1).docx
unit 4,5 (1).docx
 
Graph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph AlgorithmsGraph Algorithms Graph Algorithms Graph Algorithms
Graph Algorithms Graph Algorithms Graph Algorithms
 
Transitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal NetworksTransitions and Trajectories in Temporal Networks
Transitions and Trajectories in Temporal Networks
 
A multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfacesA multiphase lattice Boltzmann model with sharp interfaces
A multiphase lattice Boltzmann model with sharp interfaces
 
Signals and Systems Assignment Help
Signals and Systems Assignment HelpSignals and Systems Assignment Help
Signals and Systems Assignment Help
 
Algorithm Design and Complexity - Course 12
Algorithm Design and Complexity - Course 12Algorithm Design and Complexity - Course 12
Algorithm Design and Complexity - Course 12
 
flows.ppt
flows.pptflows.ppt
flows.ppt
 
On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...
On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...
On the Implementation of Goldberg's Maximum Flow Algorithm in Extended Mixed ...
 
Maximum flow
Maximum flowMaximum flow
Maximum flow
 
A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.A short remark on Feller’s square root condition.
A short remark on Feller’s square root condition.
 
ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...
ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...
ON THE IMPLEMENTATION OF GOLDBERG'S MAXIMUM FLOW ALGORITHM IN EXTENDED MIXED ...
 

Mais de Mayank Garg

Real time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemReal time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemMayank Garg
 
Habits for computer
Habits for computerHabits for computer
Habits for computerMayank Garg
 
Wireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwavesWireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwavesMayank Garg
 
Presentation on green IT
Presentation on green ITPresentation on green IT
Presentation on green ITMayank Garg
 
Image attendance system
Image attendance systemImage attendance system
Image attendance systemMayank Garg
 
Cell phone operated land rover
Cell phone operated land roverCell phone operated land rover
Cell phone operated land roverMayank Garg
 
Broadband networking through human body
Broadband networking through human bodyBroadband networking through human body
Broadband networking through human bodyMayank Garg
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing ModesMayank Garg
 

Mais de Mayank Garg (20)

Windows CE
Windows CEWindows CE
Windows CE
 
Real time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor systemReal time system in Multicore/Multiprocessor system
Real time system in Multicore/Multiprocessor system
 
3 g successor
3 g successor3 g successor
3 g successor
 
Habits for computer
Habits for computerHabits for computer
Habits for computer
 
Wireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwavesWireless charging of mobilephones using microwaves
Wireless charging of mobilephones using microwaves
 
Radar
RadarRadar
Radar
 
Presentation on green IT
Presentation on green ITPresentation on green IT
Presentation on green IT
 
DTH System
DTH SystemDTH System
DTH System
 
Image attendance system
Image attendance systemImage attendance system
Image attendance system
 
Electronic nose
Electronic noseElectronic nose
Electronic nose
 
Cell phone operated land rover
Cell phone operated land roverCell phone operated land rover
Cell phone operated land rover
 
Oracle Database
Oracle DatabaseOracle Database
Oracle Database
 
Broadband networking through human body
Broadband networking through human bodyBroadband networking through human body
Broadband networking through human body
 
Mems paper
Mems paperMems paper
Mems paper
 
Stegnography
StegnographyStegnography
Stegnography
 
Addressing Modes
Addressing ModesAddressing Modes
Addressing Modes
 
8051 memory
8051 memory8051 memory
8051 memory
 
Cybercrime
CybercrimeCybercrime
Cybercrime
 
Brain gate
Brain gateBrain gate
Brain gate
 
Database
DatabaseDatabase
Database
 

Último

2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf203318pmpc
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 

Último (20)

2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf22-prompt engineering noted slide shown.pdf
22-prompt engineering noted slide shown.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

Max flow min cut

  • 1. 1
  • 2. BITS Pilani, Hyderabad Campus CONTENTS Slide 2 Algorithm Flow and Cut Max Flow and Min Cut Theorem Running Time Proof
  • 3. 3 Network reliability. Security of statistical data. Distributed computing. Egalitarian stable matching. Distributed computing. Many many more . . . Maximum Flow and Minimum Cut Max flow and min cut. Two very rich algorithmic problems. Cornerstone problem in combinatorial optimization. Beautiful mathematical duality. Nontrivial applications / reductions. Network connectivity. Bipartite matching. Data mining. Open-pit mining. Airline scheduling. Image processing. Project selection. Baseball elimination.
  • 4. 4 Max flow network: G = (V, E, s, t, u) . (V, E) = directed graph, no parallel arcs. Two distinguished nodes: s = source, t = sink. u(e) = capacity of arc e. Max Flow Network Capacity s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4
  • 5. 5 An s-t flow is a function f: E → ℜ that satisfies: For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity) For each v ∈ V – {s, t}: (conservation) Flows ∑∑ = veve efef ofouttoin )()( s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 4 0 0 0 0 0 0 0 4 4 0 4 0 00 Capacity Flow ∑=∑ ∈ Ewvwve wvfef ),(:ofout ),(:)(∑=∑ ∈ Evwwve vwfef ),(:toin ),(:)(
  • 6. 6 An s-t flow is a function f: E → ℜ that satisfies: For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity) For each v ∈ V – {s, t}: (conservation) MAX FLOW: find s-t flow that maximizes net flow out of the source. Flows s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 4 0 0 0 0 0 0 0 4 4 0 4 0 Value = 4 ∑= se eff ofout )( 00 Capacity Flow ∑∑ = veve efef ofouttoin )()(
  • 7. 7 An s-t flow is a function f: E → ℜ that satisfies: For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity) For each v ∈ V – {s, t}: (conservation) MAX FLOW: find s-t flow that maximizes net flow out of the source. Flows s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 10 6 6 11 11 1 10 3 8 8 0 4 0 Value = 24 00 Capacity Flow ∑∑ = veve efef ofouttoin )()(
  • 8. 8 An s-t flow is a function f: E → ℜ that satisfies: For each e ∈ E: 0 ≤ f(e) ≤ u(e) (capacity) For each v ∈ V – {s, t}: (conservation) MAX FLOW: find s-t flow that maximizes net flow out of the source. Flows s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 10 9 9 14 14 4 10 4 8 9 1 0 0 Value = 28 00 Capacity Flow ∑∑ = veve efef ofouttoin )()(
  • 9. 9 Networks communication Network telephone exchanges, computers, satellites Nodes Arcs cables, fiber optics, microwave relays Flow voice, video, packets circuits gates, registers, processors wires current mechanical joints rods, beams, springs heat, energy hydraulic reservoirs, pumping stations, lakes pipelines fluid, oil financial stocks, currency transactions money transportation airports, rail yards, street intersections highways, railbeds, airway routes freight, vehicles, passengers chemical sites bonds energy
  • 11. 11 An s-t cut is a node partition (S, T) such that s ∈ S, t ∈ T. The capacity of an s-t cut (S, T) is: Min s-t cut: find an s-t cut of minimum capacity. Cuts s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 Capacity = 62 ∑∑ ∈∈ ∈ = TwSv EwvSe wvueu , ),(ofout ).,(:)(
  • 12. 12 An s-t cut is a node partition (S, T) such that s ∈ S, t ∈ T. The capacity of an s-t cut (S, T) is: Min s-t cut: find an s-t cut of minimum capacity. Cuts s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 Capacity = 28 ∑∑ ∈∈ ∈ = TwSv EwvSe wvueu , ),(ofout ).,(:)(
  • 13. 13 L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent across the cut is equal to the amount reaching t. Flows and Cuts s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 fefefef seSeSe ==− ∑∑∑ ofouttoinofout )()()( Value = 24 10 6 6 10 10 0 10 4 8 8 0 4 0 00
  • 14. 14 10 6 6 10 10 0 10 4 8 8 0 4 0 00 L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent across the cut is equal to the amount reaching t. Flows and Cuts s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 fefefef seSeSe ==− ∑∑∑ ofouttoinofout )()()( Value = 24
  • 15. 15 10 6 6 10 10 0 10 4 8 8 0 4 0 0 L1. Let f be a flow, and let (S, T) be a cut. Then, the net flow sent across the cut is equal to the amount reaching t. Flows and Cuts s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 fefefef seSeSe ==− ∑∑∑ ofouttoinofout )()()( Value = 24 0
  • 16. 16 Let f be a flow, and let (S, T) be a cut. Then, Proof by induction on |S|. Base case: S = { s }. Inductive hypothesis: assume true for |S| < k. – consider cut (S, T) with |S| = k – S = S' ∪ { v } for some v ≠ s, t, |S' | = k-1 ⇒ cap(S', T') = | f |. – adding v to S' increase cut capacity by Flows and Cuts .)()( toinofout ∑∑ =− SeSe fefef 0)()( toinofout =− ∑∑ veve efef s v t After s v t S' Before S
  • 17. 17 L2. Let f be a flow, and let (S, T) be a cut. Then, | f | ≤ cap(S, T). Proof. Corollary. Let f be a flow, and let (S, T) be a cut. If |f| = cap(S, T), then f is a max flow and (S, T) is a min cut. Flows and Cuts T)cap(S, )( )( )()( ofout ofout toinofout = ≤ ≤ −= ∑ ∑ ∑∑ Se Se SeSe eu ef efeff s t S T 7 6 8 4
  • 18. 18 Max Flow and Min Cut Corollary. Let f be a flow, and let (S, T) be a cut. If |f| = cap(S, T), then f is a max flow and (S, T) is a min cut. s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 10 9 9 15 15 4 10 4 8 9 1 0 0 Flow value = 28 00 Cut capacity = 28
  • 19. 19 Max-Flow Min-Cut Theorem MAX-FLOW MIN-CUT THEOREM (Ford-Fulkerson, 1956): In any network, the value of the max flow is equal to the value of the min cut. "Good characterization." Proof IOU. s 2 3 4 5 6 7 t 15 5 30 15 10 8 15 9 6 10 10 10154 4 10 9 9 15 15 4 10 4 8 9 1 0 0 Flow value = 28 00 Cut capacity = 28
  • 20. 20 Towards an Algorithm Find an s-t path where each arc has u(e) > f(e) and "augment" flow along the path. s 4 2 5 3 t 4 0 0 0 0 0 0 4 0 4 4 Flow value = 0 10 13 10
  • 21. 21 Towards an Algorithm Find an s-t path where each arc has u(e) > f(e) and "augment" flow along the path. Repeat until you get stuck. s 4 2 5 3 t 4 0 0 0 0 0 0 4 0 4 4 Flow value = 10 10 13 10 10 10 10X X X
  • 22. 22 Max-Flow Min-Cut Theorem Augmenting path theorem (Ford-Fulkerson, 1956): A flow f is a max flow if and only if there are no augmenting paths. MAX-FLOW MIN-CUT THEOREM (Ford-Fulkerson, 1956): the value of the max flow is equal to the value of the min cut. We prove both simultaneously by showing the TFAE: (i) f is a max flow. (ii) There is no augmenting path relative to f. (iii) There exists a cut (S, T) such that |f| = cap(S, T).
  • 23. 23 Proof of Max-Flow Min-Cut Theorem We prove both simultaneously by showing the TFAE: (i) f is a max flow. (ii) There is no augmenting path relative to f. (iii) There exists a cut (S, T) such that |f| = cap(S, T). (i) ⇒ (ii) We show contrapositive. Let f be a flow. If there exists an augmenting path, then we can improve f by sending flow along path. (ii) ⇒ (iii) Next slide. (iii) ⇒ (i) This was the Corollary to Lemma 2.
  • 24. 24 Proof of Max-Flow Min-Cut Theorem We prove both simultaneously by showing the TFAE: (i) f is a max flow. (ii) There is no augmenting path relative to f. (iii) There exists a cut (S, T) such that |f| = cap(S, T). (ii) ⇒ (iii) Let f be a flow with no augmenting paths. Let S be set of vertices reachable from s in residual graph. – clearly s ∈ S, and t ∉ S by definition of f T)(S, )( )()( ofout toinofout cap eu efeff Se SeSe = = −= ∑ ∑∑ s t Original Network S T
  • 25. 25 Running Time Assumption: all capacities are integers between 0 and U. Invariant: every flow value f(e) and every residual capacities uf (e) remains an integer throughout the algorithm. Theorem: the algorithm terminates in at most | f * | ≤ nU iterations. Corollary: if U = 1, then algorithm runs in O(mn) time. Integrality theorem: if all arc capacities are integers, then there exists a max flow f for which every flow value f(e) is an integer. Note: algorithm may not terminate on some pathological instances (with irrational capacities). Moreover, flow value may not even converge to correct answer.
  • 26. BITS Pilani, Hyderabad Campus Thanks Copyright © Mayank Garg. All Rights Reserved Slide 26 Link to connect with author: http://www.slideshare.net/MayankGarg25 https://www.linkedin.com/in/gargmayank http://www.researchgate.net/profile/Mayank_Garg6/ https://www.facebook.com/mayank17692?ref=hl

Notas do Editor

  1. * flow: abstract entity generated at source, transmitted across edges, absorbed at sink * flow conservation is analogous to Kirchoff&amp;apos;s law
  2. * a more natural quantity to maximize is net flow into t * intuitively net flow into t equal net flow out of s, we&amp;apos;ll show this formally later * assume no arcs enter s or leave t (makes a little cleaner, no loss of generality)
  3. Caveat: from now on, we&amp;apos;ll use terms &amp;quot;flow&amp;quot; and &amp;quot;cut&amp;quot; to mean s-t flow and s-t cut.
  4. total amount of flow that leaves S minus amount flow that &amp;quot;swirls&amp;quot; back