SlideShare a Scribd company logo
1 of 17
Introduction to
Network Flows
Luckshay Batra
luckybatra17@gmail.com
Table of Content
• Examples
• Networks
• Flows
• Cuts in a Network
Practical Examples of a Network
• liquids flowing through pipes
• parts through assembly lines
• current through electrical network
• information through communication network
• goods transported on the road…
Delhi Metro Master Plan 2021
Networks
• Network - A diagraph D with two disjoint non-empty distinct
subsets of vertices X and Y, and an integer-valued function c defined
on its set of directed edges E.
• Sources - Vertices in subsets X are the with in degree zero of
network N.
• Sinks – Vertices in subsets Y are with out-degree zero of network N.
• Intermediate vertices - Vertices which are neither sources nor
sinks.(set of intermediate vertices are denoted by I)
• Capacity – Value on directed edge e.(capacity of each directed edge
is non-negative)
Networks
Flows
A flow f in the network is an integer-valued function defined on its set of
directed edges E, such that
• Capacity Constraint- 0≤f (e)≤c (e) for all e εE
Integer f (e) is the flow along directed edge e.
• Conservation Condition- f⁺(v)=f⁻(v) for all v εI
where, f⁺(v) is sum of the flows along all the directed edges
directed to vertex v is the inflow into v, and f⁻(v) is sum of the
flows along all the directed edges directed from vertex v is
the outflow from v.
If f is feasible flow (i.e. f⁺(v)=f⁻(v) ) in a network N, then directed
edge e is
f-zero : f(e)=0
f-positive : f(e)>0
f-unsaturated : f(e)<f(c)
f-saturated : f(e)=f(c)
Maximum Flow Network
Consider a network and a feasible flow defined on its set of directed edges E, along
each directed edge-
first number represent flow along the directed edge and second is its capacity.
• Maximum Flow – A feasible flow in a network such that the value of the flow is as
large as possible.
• Maximum Flow Problem - The problem of finding the feasible flow in the network
such that its flow value is maximum.
• Resultant Flow out of S - f⁺(S)-f⁻(S)
• Resultant Flow into S - f⁻(S) -f⁺(S)
where, S is the subset of vertices in a network N and f is flow in network N.
Maximum Flow Problem
Consider a directed graph G=(V,E)
F(u,v)=6
F(u,v)=6
Maximum Flow Network
Value of the flow- f⁺(X)-f⁻(Y)
as, resultant flow out of X is equal to the resultant flow into Y.
The problem of determining a maximum flow of an arbitrary network can be
reduced to the case of networks that have just one source and one sink.
Method is given as-
• Introduced two new vertex x and y in N.
• Draw a directed edge from x to all the vertices of vertex set X with
capacity ∞.
• Draw a directed edges from all the vertices of vertex set Y to vertex y with
capacity ∞.
• In the new network N’ obtained by the above operation and x becomes
source and y becomes sink.
New Network N’ :
Maximum Flow Problem
Flows in new network N’ -
This can be obtained from the network N in a simple way as if f is a
flow in N such that the resultant flow out of each source and into each
sink is non-negative then the function f’ is defined as:
• If e is an edge of N then f ’= f(e)
• If e=(x,v) then f ’= f⁺(v)-f⁻(v)
• If e=(v,y) then f ’= f⁻(v)-f⁺(v)
From above defined flow, we can easily verify that
val f’ = val f
Cuts in a Network
• Say, N be a network with a single source x and single sink y. A
cut in N is a set of directed edges of the form (S,S’), where x ε
S and y ε S’.
• If we delete all the edges of the cut from network then there
is no flow from source to sink.
• The capacity of the cut is the sum of the capacities of its
directed edges. We denote the cut by K and capacity of cut as
Cap K. Therefore,
Minimum Cut - If capacity of a cut K in N does not exceed the
capacity of any other cut.
𝐶𝑎𝑝 𝐾 =
𝑒∈𝐸
𝑐(𝑒)
Cuts in a Network
Consider the network
Let S={x,a,b} and S’={c,d,y}, cut is indicated by bold lines and
capacity of cut is 5.
Note: Cut includes only the edges directed from S to S’ and no
edges included in cut, which are directed from S’ to S.
Minimum cut in a network
A method of finding minimum cut in a network. Consider a
network with all cut which has 3 intermediate vertices.
S
• {x}
{x,a}
{x,b}
{x,c}
{x,a,b}
{x,b,c}
{x,a,c}
{x,a,b,c}
S’
• {a,b,c,y}
{b,c,y}
{a,c,y}
{a,b,y}
{c,y}
{a,y}
{b,y}
{y}
Capacity of (S,S’)
• 2+3+4=9
4+3+2+3=12
2+4+6=12
2+3+6+5+4=20
4+3+6=13
2+6+4+5=17
3+3+4+6+12=18
3+6+4=13
Theorems on Flow and Cuts
• Theorem1: If f is any feasible flow in network N and if (S,S’) is
any cut then
Val f = f⁺(S)-f⁻(S)
• Theorem2: If f is any feasible flow and if (S,S’)is any cut then
Val f ≤ CapK
• Theorem3: If f is a feasible flow and K be a cut such that Val f
= Cap K. Then f is maximum flow and K is a minimum cut.
References
• Saurabh pal, graph theory book
• https://www.google.co.in/search?q=network+flows&source=l
nms&tbm=isch&sa=X&ved=0ahUKEwiOstT9q7TMAhXOUY4KH
TtZCQcQ_AUICCgC&biw=1366&bih=667#imgrc=_
• https://en.wikipedia.org/wiki/Flow_network
Introduction to Network Flows: Examples, Definitions, Maximum Flow Problem, and Minimum Cuts

More Related Content

What's hot (20)

Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory
Graph  theoryGraph  theory
Graph theory
 
Graph theory
Graph theory Graph theory
Graph theory
 
Max flow min cut
Max flow min cutMax flow min cut
Max flow min cut
 
Minimum spanning tree
Minimum spanning treeMinimum spanning tree
Minimum spanning tree
 
Slides Chapter10.1 10.2
Slides Chapter10.1 10.2Slides Chapter10.1 10.2
Slides Chapter10.1 10.2
 
Trees
Trees Trees
Trees
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
The Floyd–Warshall algorithm
The Floyd–Warshall algorithmThe Floyd–Warshall algorithm
The Floyd–Warshall algorithm
 
minimum spanning trees Algorithm
minimum spanning trees Algorithm minimum spanning trees Algorithm
minimum spanning trees Algorithm
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Maximum flow
Maximum flowMaximum flow
Maximum flow
 
2.4 mst prim’s algorithm
2.4 mst  prim’s algorithm2.4 mst  prim’s algorithm
2.4 mst prim’s algorithm
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Prim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning treePrim's Algorithm on minimum spanning tree
Prim's Algorithm on minimum spanning tree
 
Kruskal's algorithm
Kruskal's algorithmKruskal's algorithm
Kruskal's algorithm
 
Shortest Path in Graph
Shortest Path in GraphShortest Path in Graph
Shortest Path in Graph
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Trees
TreesTrees
Trees
 
Chapter 4: Linear Algebraic Equations
Chapter 4: Linear Algebraic EquationsChapter 4: Linear Algebraic Equations
Chapter 4: Linear Algebraic Equations
 

Similar to Introduction to Network Flows: Examples, Definitions, Maximum Flow Problem, and Minimum Cuts

Lecture 14 data structures and algorithms
Lecture 14 data structures and algorithmsLecture 14 data structures and algorithms
Lecture 14 data structures and algorithmsAakash deep Singhal
 
Graphs in data structures
Graphs in data structuresGraphs in data structures
Graphs in data structuresSavit Chandra
 
Application Of vector Integration and all
Application Of vector Integration and allApplication Of vector Integration and all
Application Of vector Integration and allMalikUmarKhakh
 
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 ...ijcsit
 
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
 
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
 
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
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfvasusingh34
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfvasusingh34
 
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...KUSHDHIRRA2111026030
 
Algorithms and data Chapter 3 V Graph.pptx
Algorithms and data Chapter 3 V Graph.pptxAlgorithms and data Chapter 3 V Graph.pptx
Algorithms and data Chapter 3 V Graph.pptxzerihunnana
 
Lecture02_Part02.pptx
Lecture02_Part02.pptxLecture02_Part02.pptx
Lecture02_Part02.pptxMahdiAbbasi31
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashingVictor Palmar
 

Similar to Introduction to Network Flows: Examples, Definitions, Maximum Flow Problem, and Minimum Cuts (20)

Lecture 14 data structures and algorithms
Lecture 14 data structures and algorithmsLecture 14 data structures and algorithms
Lecture 14 data structures and algorithms
 
10.graph
10.graph10.graph
10.graph
 
Graphs in data structures
Graphs in data structuresGraphs in data structures
Graphs in data structures
 
Application Of vector Integration and all
Application Of vector Integration and allApplication Of vector Integration and all
Application Of vector Integration and all
 
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 ...
 
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 ...
 
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 ...
 
Dijkstra
DijkstraDijkstra
Dijkstra
 
d
dd
d
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
 
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 ...
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
 
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdfMA101-Lecturenotes(2019-20)-Module 13 (1).pdf
MA101-Lecturenotes(2019-20)-Module 13 (1).pdf
 
Graph 1
Graph 1Graph 1
Graph 1
 
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
 
Algorithms and data Chapter 3 V Graph.pptx
Algorithms and data Chapter 3 V Graph.pptxAlgorithms and data Chapter 3 V Graph.pptx
Algorithms and data Chapter 3 V Graph.pptx
 
Lecture02_Part02.pptx
Lecture02_Part02.pptxLecture02_Part02.pptx
Lecture02_Part02.pptx
 
Lecture 5b graphs and hashing
Lecture 5b graphs and hashingLecture 5b graphs and hashing
Lecture 5b graphs and hashing
 
MaximumFlow.ppt
MaximumFlow.pptMaximumFlow.ppt
MaximumFlow.ppt
 

More from Luckshay Batra

Values and ethics in mathematics
Values and ethics in mathematicsValues and ethics in mathematics
Values and ethics in mathematicsLuckshay Batra
 
Motivation in Education
Motivation in EducationMotivation in Education
Motivation in EducationLuckshay Batra
 
R Programming language model test paper
R Programming language model test paperR Programming language model test paper
R Programming language model test paperLuckshay Batra
 
Mathematica model test paper
Mathematica model test paperMathematica model test paper
Mathematica model test paperLuckshay Batra
 
Matlab-Data types and operators
Matlab-Data types and operatorsMatlab-Data types and operators
Matlab-Data types and operatorsLuckshay Batra
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative methodLuckshay Batra
 
Application of laplace wave equation in music
Application of laplace wave equation in musicApplication of laplace wave equation in music
Application of laplace wave equation in musicLuckshay Batra
 

More from Luckshay Batra (12)

Values and ethics in mathematics
Values and ethics in mathematicsValues and ethics in mathematics
Values and ethics in mathematics
 
Motivation in Education
Motivation in EducationMotivation in Education
Motivation in Education
 
R Programming language model test paper
R Programming language model test paperR Programming language model test paper
R Programming language model test paper
 
Mathematica model test paper
Mathematica model test paperMathematica model test paper
Mathematica model test paper
 
Matlab-Data types and operators
Matlab-Data types and operatorsMatlab-Data types and operators
Matlab-Data types and operators
 
Black scholes model
Black scholes modelBlack scholes model
Black scholes model
 
Jacobi iterative method
Jacobi iterative methodJacobi iterative method
Jacobi iterative method
 
Sas
SasSas
Sas
 
Markov chain
Markov chainMarkov chain
Markov chain
 
Cyclic group in music
Cyclic group in musicCyclic group in music
Cyclic group in music
 
Big m method
Big m methodBig m method
Big m method
 
Application of laplace wave equation in music
Application of laplace wave equation in musicApplication of laplace wave equation in music
Application of laplace wave equation in music
 

Recently uploaded

Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 

Recently uploaded (20)

Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 

Introduction to Network Flows: Examples, Definitions, Maximum Flow Problem, and Minimum Cuts

  • 1. Introduction to Network Flows Luckshay Batra luckybatra17@gmail.com
  • 2. Table of Content • Examples • Networks • Flows • Cuts in a Network
  • 3. Practical Examples of a Network • liquids flowing through pipes • parts through assembly lines • current through electrical network • information through communication network • goods transported on the road…
  • 4. Delhi Metro Master Plan 2021
  • 5. Networks • Network - A diagraph D with two disjoint non-empty distinct subsets of vertices X and Y, and an integer-valued function c defined on its set of directed edges E. • Sources - Vertices in subsets X are the with in degree zero of network N. • Sinks – Vertices in subsets Y are with out-degree zero of network N. • Intermediate vertices - Vertices which are neither sources nor sinks.(set of intermediate vertices are denoted by I) • Capacity – Value on directed edge e.(capacity of each directed edge is non-negative)
  • 7. Flows A flow f in the network is an integer-valued function defined on its set of directed edges E, such that • Capacity Constraint- 0≤f (e)≤c (e) for all e εE Integer f (e) is the flow along directed edge e. • Conservation Condition- f⁺(v)=f⁻(v) for all v εI where, f⁺(v) is sum of the flows along all the directed edges directed to vertex v is the inflow into v, and f⁻(v) is sum of the flows along all the directed edges directed from vertex v is the outflow from v. If f is feasible flow (i.e. f⁺(v)=f⁻(v) ) in a network N, then directed edge e is f-zero : f(e)=0 f-positive : f(e)>0 f-unsaturated : f(e)<f(c) f-saturated : f(e)=f(c)
  • 8. Maximum Flow Network Consider a network and a feasible flow defined on its set of directed edges E, along each directed edge- first number represent flow along the directed edge and second is its capacity. • Maximum Flow – A feasible flow in a network such that the value of the flow is as large as possible. • Maximum Flow Problem - The problem of finding the feasible flow in the network such that its flow value is maximum. • Resultant Flow out of S - f⁺(S)-f⁻(S) • Resultant Flow into S - f⁻(S) -f⁺(S) where, S is the subset of vertices in a network N and f is flow in network N.
  • 9. Maximum Flow Problem Consider a directed graph G=(V,E) F(u,v)=6 F(u,v)=6
  • 10. Maximum Flow Network Value of the flow- f⁺(X)-f⁻(Y) as, resultant flow out of X is equal to the resultant flow into Y. The problem of determining a maximum flow of an arbitrary network can be reduced to the case of networks that have just one source and one sink. Method is given as- • Introduced two new vertex x and y in N. • Draw a directed edge from x to all the vertices of vertex set X with capacity ∞. • Draw a directed edges from all the vertices of vertex set Y to vertex y with capacity ∞. • In the new network N’ obtained by the above operation and x becomes source and y becomes sink. New Network N’ :
  • 11. Maximum Flow Problem Flows in new network N’ - This can be obtained from the network N in a simple way as if f is a flow in N such that the resultant flow out of each source and into each sink is non-negative then the function f’ is defined as: • If e is an edge of N then f ’= f(e) • If e=(x,v) then f ’= f⁺(v)-f⁻(v) • If e=(v,y) then f ’= f⁻(v)-f⁺(v) From above defined flow, we can easily verify that val f’ = val f
  • 12. Cuts in a Network • Say, N be a network with a single source x and single sink y. A cut in N is a set of directed edges of the form (S,S’), where x ε S and y ε S’. • If we delete all the edges of the cut from network then there is no flow from source to sink. • The capacity of the cut is the sum of the capacities of its directed edges. We denote the cut by K and capacity of cut as Cap K. Therefore, Minimum Cut - If capacity of a cut K in N does not exceed the capacity of any other cut. 𝐶𝑎𝑝 𝐾 = 𝑒∈𝐸 𝑐(𝑒)
  • 13. Cuts in a Network Consider the network Let S={x,a,b} and S’={c,d,y}, cut is indicated by bold lines and capacity of cut is 5. Note: Cut includes only the edges directed from S to S’ and no edges included in cut, which are directed from S’ to S.
  • 14. Minimum cut in a network A method of finding minimum cut in a network. Consider a network with all cut which has 3 intermediate vertices. S • {x} {x,a} {x,b} {x,c} {x,a,b} {x,b,c} {x,a,c} {x,a,b,c} S’ • {a,b,c,y} {b,c,y} {a,c,y} {a,b,y} {c,y} {a,y} {b,y} {y} Capacity of (S,S’) • 2+3+4=9 4+3+2+3=12 2+4+6=12 2+3+6+5+4=20 4+3+6=13 2+6+4+5=17 3+3+4+6+12=18 3+6+4=13
  • 15. Theorems on Flow and Cuts • Theorem1: If f is any feasible flow in network N and if (S,S’) is any cut then Val f = f⁺(S)-f⁻(S) • Theorem2: If f is any feasible flow and if (S,S’)is any cut then Val f ≤ CapK • Theorem3: If f is a feasible flow and K be a cut such that Val f = Cap K. Then f is maximum flow and K is a minimum cut.
  • 16. References • Saurabh pal, graph theory book • https://www.google.co.in/search?q=network+flows&source=l nms&tbm=isch&sa=X&ved=0ahUKEwiOstT9q7TMAhXOUY4KH TtZCQcQ_AUICCgC&biw=1366&bih=667#imgrc=_ • https://en.wikipedia.org/wiki/Flow_network