0% found this document useful (0 votes)
112 views75 pages

Applications of Network Flow

The document discusses network flow problems and the Ford-Fulkerson method for finding the maximum flow in a network. It defines key terms like flow, capacity, sources and sinks. It explains that the Ford-Fulkerson method works by finding augmenting paths in the residual network from the source to the sink and sending flow along these paths until no more exist. The method relies on concepts like residual capacity, augmenting paths, and bottle neck capacity. It runs in polynomial time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views75 pages

Applications of Network Flow

The document discusses network flow problems and the Ford-Fulkerson method for finding the maximum flow in a network. It defines key terms like flow, capacity, sources and sinks. It explains that the Ford-Fulkerson method works by finding augmenting paths in the residual network from the source to the sink and sending flow along these paths until no more exist. The method relies on concepts like residual capacity, augmenting paths, and bottle neck capacity. It runs in polynomial time.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 75

1

Real Life Presenters:

Applications of Awais Tallat


Muhammad Asif
BSIT-A/025
BSIT-A/020

Network Flow Ifra Mubarik


Umar Farooq
BSIT-A/016
BSIT-A/011

Submitted To:

Maam Sumaira Ajmal


2
 Network.
 Network Flow Problem.
 Flow, Capacity.
 Maximum Flow
 Cancellation.
 Properties of Network Flow.
Table of  Ford-Fulkerson Method.
 Augmenting Paths, Residual Capacity, Bottle

contents Nick Capacity, Time Complexity.


 Real Life Applications of Network Flow.
A network consists of a collection
3
of locations along with
connections between them. The
locations, called the nodes of the
network, can correspond to places
of various kinds such as factories,
warehouses, stores or customers.

Introduction
The connections, known as arcs,
tie together certain pairs of nodes.
A network model is concerned
of Network with a flow of something.
Network Flow is important
because many aspects of actual
situations are readily recognized as
networks and the representation of
the model is much more compact
than the general linear program.
Introduction
• Network Flow Problem 4

Network flow:
A diagram D with two disjoint non-empty distinct subsets of node X and Y, and an integer-
valued function c defined on its set of directed edges E.
Sources node:
node in subsets X are with in degree zero of network N.
Sinks node:
node in subsets Y are with out-degree zero of network N.
Intermediate node:
Vertices which are neither sources nor sinks.(set of intermediate nodes are denoted by I.

Capacity:
Value on directed edge e.(capacity of each directed edge is non-negative)
5
Source: Sink:
Node with net outflow, Node with net inflow,
product point. consumption point

a c

s T

b d

Intermediate node:
Node with net inflow and
outflow
• The max-flow problem is to find a valid flow for a given weighted directed graph
6
Formal definition of the G, that has the maximum value over all valid flows.
max-flow problem:

3
Introduction
• Flow 7

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)
Introduction of
flow
• Flow 8
3

6/12
u v

f(u,v)=6 Flow below capacity

6/6
u v

f(u,v)=6 Maximum flow


Introduction
• A network is a graph G = (V, E), where V is a set of nodes and E is a set of V’s edges – a
subset of V × V – together with a non-negative function c: V × V → R, called
the capacity function
9
capacity

12
u v

c(u,v)=12 Big pipe

6
u v

c(u,v)=6 Small pipe


• Cancellation 10
Introduction

3/3
v1 v3 v1 v3
3/6
3/8 2/3

S source S t
t sink
3
6/6
8/8
v2 v4 v2 v4
6/6
• Network Flow properties 11
Introduction

Flow in G = (V,E): f: V x V€ R with 3 properties:

1) Capacity constraint: For all u,v € V : f(u,v) < c(u,v)

2) Skew symmetry: For all u,v € V : f(u,v) = - f(v,u)

3) Flow conservation: For all u € V \ {s,t}: € f(u,v) = 0


12
 Ford-Fulkerson method is used for calculating the maximum flow in a
network or a graph. Every edge has the capacity. Two Nodes are provided
named Source and Sink. The source node has all outward edge, no inward
edge, and the sink will have all inward edge no outward edge.

Ford  It was discovered in 1956 by Ford and Fulkerson.

Fulkerson  Ford- Fulkerson Method:


initialize flow to zero

Method choose an augmenting path


start flow along path according to capacity
Ford  Way to Find the Maximum Flow
13
Fulkerson
Method

This method contain


4 important Components:

Augmenting Residual Bottle Nick Time


Paths Capacity Capacity Complexity
The path or way from which the network starts flow from Source and reached at Sink
is called Augmenting Path.
In the given diagram, the Augmenting Path starts from ‘S’ and reached at ‘T’ by
14
Augmenting
Paths passing ‘s1’ and ‘s2’ Nodes.

3\4
s1 s2
3\6 3\3

S T

s3 s4
15
The remaining capacity of all edges of selected augmenting path is called,
Residual Capacity.
Residual In the given diagram, we have calculate residual capacity of all edges of
Networks augmenting path.

3\4 1
s1 s2 s1 s2
3\6 3\3 3 0

S T S T

s3 s4 s3 s4
The total flow which reached at sink from augmenting path is called, Bottle
Nick Capacity. 16
Bottle Nick In the given diagram, the flow which reached at sink from source by passing s1
Capacity and s2 is Bottle Nick Capacity.

3\4
s1 s2
3\6 3\3

S T Bottle Nick Capacity = 3

s3 s4
Time Complexity is the total time required by the program to run till its
completion. The time complexity is most commonly expressed using the big O
17
Time notation.
Complexity

3\4
s1 s2
3\6 3\3

S T 3+4 = 7 = Maximum Flow

4\4 4\4
s3 s4
4\6
Edges (E) = 6
Max Flow (F) = 7
= O (E * F)
= O (6 * 7)
Time Complexity = 42
18
• Oil Transferred to Ship
• Traffic Flow.
• Train Network.
• Flow of Data.
Real Life • Airline Scheduling Network.
Applications of • Internet Connection.
Network Flow: • Electrical Network.
Oil Transferred to Ship 19
Real Life
Application
through Pipeline

Oil Flow from Oil Station (Source) to Ship (Sink) through Pipeline. There is
many routes through which we can flow oil to ship. These routes are called
Edges and the points where these pipes connected to one another are called
Nodes. Every pipe have different capacity for flow of oil. So ,now we will find
the maximum flow of oil which we can flow to ship using these routes and also
calculate Time Complexity.
Oil Transferred to Ship 20
Real Life
Application
through Pipeline

8
v1 v2
12 14

S T
6 4
10
12
v3 v4
8
0
8\8
21
4 v1 v2 6
8\12 8\14

S T 8

6 4
10
12
v3 v4
8
Augmenting Path Bottle Nick Capacity
 S - v1 - v2 - T  8
0
8\8
22
4 v1 v2 6
8\12 8\14

S T 8+8
6 4
8\10 8\12
2 v3 v4 4
8\8
0 Augmenting Path Bottle Nick Capacity
 S - v1 - v2 - T  8
 S - v3 - v4 - T  8
0
8\8
23
0 v1 v2 6
12\12 8\14

S 0 T 8+8+4
6 4\4
8\10 12\12
2 v3 v4 0
8\8
0 Augmenting Path Bottle Nick Capacity
 S - v1 - v2 - T  8
 S - v3 - v4 - T  8
 S - v1 - v4 - T  4
0
8\8
24
0 v1 v2 4
12\12 10\14

S 0 0 T 8+8+4+2
2\6 4\4
10\10 12\12
0 v3 v4 0
8\8
0 Augmenting Path Bottle Nick Capacity
 S - v1 - v2 - T  8
 S - v3 - v4 - T  8
 S - v1 - v4 - T  4
 S - v3 - v2 - T  2
25
Augmenting Path Bottle Nick Capacity
S - v1 - v2 - T 8
S - v3 - v4 - T 8
S - v1 - v4 - T 4
S - v3 - v2 - T 2
Maximum Flow = 8+8+4+2 = 22

Edges (E) = 08
Maximum Flow (F) = 22
= O (E * F)
= O (8 * 22)
Time Complexity = O (176)
Real life
Traffic flow 26
application

We have traffic flow from Lahore(source) to Islamabad(sink)


which are connected by roads(edges). There is other many small
cities(intermediate nodes) between them. the traffic can flow
from Lahore to these small cities and then flow to Islamabad.
Every road has different capacity so Now we will find
maximum flow and time complexity of that flow through
network flow diagram.
Real life
Traffic Flow 27
application

9 v5

v1
8 6

4 v6
5 6

7 v2
1
2
S v7 T
3 3
v3 9
6
5 v8
6
v4
3
v9
28
5
4/9 v5
2
v1
8 4/6
0
4/4 v6
5 6
7 v2 1
2
S v7 T 4
3 3
v3 9
6
5 v8 Augmenting Bottle nick
6 path Capacity
v4  S-v1-v5-t  4
3
v9
29
5
4/9 v5
2
v1
8 4/6
0
4/4 v6
5 6
7 v2 1
2
S v7 T 4+3
3 3
v3 9
3/6
5 v8 Augmenting Bottle nick
3
path Capacity
v4 3/6  S-v1-v5-t  4
3  S-v4-v9-t  3
3/3 v9
0
30
5
4/9 v5
2
v1
8 4/6
0
0 1
4/4 v6
5/5 5/6
2
5/7 v2
1
2
S v7 T 4+3+5
3 3
v3 9
3/6
5 v8 Augmenting Bottle nick
3
path Capacity
v4 3/6  S-v1-v5-t  4
3  S-v4-v9-t  3
 S-v2-v6-t  5
3/3 v9
0
31
5
4/9 v5
2
v1
8 4/6
0
0 1
4/4 v6
5/5 5/6
2
5/7 v2 0
1
2/2
1 1 v7 T 4+3+5+2
S
2/3 2/3
v3 9
3/6
5 v8 Augmenting Bottle nick
3
path Capacity
v4 3/6  S-v1-v5-t  4
3  S-v4-v9-t  3
 S-v2-v6-t  5
3/3 v9
 S-v3-v7-t  2
32
5
4/9 v5
2
v1
8 4/6
0
0 1
4/4 v6
5/5 5/6
2
5/7 v2 0
1
2/2
1 1 v7 T 4+3+5+2+3
S
2/3 2/3
6
v3 3/9
6/6 2
0 3/5 v8 Augmenting Bottle nick
path Capacity
v4 3/6  S-v1-v5-t  4
3  S-v4-v9-t  3
 S-v2-v6-t  5
3/3 v9
 S-v3-v7-t  2
 S-v4-v9-t  3
Augmenting Path Bottle Nick Capacity 33
S - v1 - v5 - T 4
S - v4 - v9 - T 3
S - v2 - v6 - T 5
S - v3 - v7 - T 2
S - v4 - v9 - T 3
Maximum Flow = 4+3+5+2+3 = 17

Edges (E) = 14
Maximum Flow (F) = 17
= O (E * F)
= O (14 * 17)
Time Complexity = O (238)
Flow of Data 34
Real life
application

Flow of data From one computer(source) to other


computer(sink) through cables(edges). There are many
computers(intermediate nodes) between them. First data can
flow from (source)computer to these (intermediate
nodes)computers and then flow to (sink)computer . Every
cables have different capacity.
Now we will find the maximum flow and time complexity of
data from source to sink computers through network flow
diagram.
Flow of Data 35
Real life
application

4
p1 p4
2 3
6 8

5 8 7
p2 p5 T
S

3 2 3 4

5
p3 p5
0
4/4
36
p1 p4
2 4
2 3
4/6 4/8

5 8 7
S
p2 p5 T 4

3 2 3 4

5
p3 p5 Augmenting Bottle nick
path Capacity
 S-p1-p4-t  4
0
4/4
37
p1 p4
2 4
2 3
4/6 4/8

5 8 7
S
p2 p5 T 4+3
0
1
3/3 2 3 3/4
2
3/5
p3 p5 Augmenting Bottle nick
path Capacity
 S-p1-p4-t  4
 S-p3-p5-t  3
0
4/4
38
p1 p4
2 4
2 3
4/6 4/8

0 3 2
5/5 5/8 5/7
S
p2 p5 T 4+3+5
0
1
3/3 2 3 3/4
2
3/5
p3 p5 Augmenting Bottle nick
path Capacity
 S-p1-p4-t  4
 S-p3-p5-t  3
 S-p2-p5-t  5
0
4/4
39
p1 p4
0 0 4
3 4/8
4/6 2/2

0 3 0
5/5 5/8 5/7
S
p2 p5 T 4+3+5+2
0
1
3/3 2 3 3/4
2
3/5
p3 p5 Augmenting Bottle nick
path Capacity
 S-p1-p4-t  4
 S-p3-p5-t  3
 S-p2-p5-t  5
 S-p1-p5-t  2
40
Augmenting Path Bottle Nick Capacity
S - p1 - p4 - T 4
S - p3 - p5 - T 3
S - p2 - p5 - T 5
S - p1 - p5 - T 2
Maximum Flow = 4+3+5+2 = 14

Edges (E) = 10
Maximum Flow (F) = 14
= O (E * F)
= O (10 * 14)
Time Complexity = O (140)
Flow of Train Network 41
Real life
application

We have train network which can flow From one place to


another. Now we have a flow of train network from
Lahore(source) to Karachi(sink). The train flow to different
cities(intermediate nodes) and then reach to Karachi through
railway track. Every track has different capacity of trains. Now
we will find maximum flow and time complexity of this train
network through network flow diagram
Flow of Train Network 42
Real life
application

8
6 s2 s3
8
s1
6 s4
8 6
s7 8

S T

s6 6
8
s5 4

4
43
0 6\8
6\6 s2 s3 2
6\8
s1
2 6 s4 0
6\8 6\6
s7 8

S T 6
4

s6 6
8
s5 4

Augmenting path Bottle nick Capacity


 S-s1-s2-s3-s4-T  6
44
2
0 6\8
6\6 s2 s3 2
6\8
s1
2 6 s4 0
6\8 6\6
s7 8

S T 6+4
4

s6 4\6
4\8 2
4 s5 4\4
0
Augmenting path Bottle nick
 S-s1-s2-s3-s4-T Capacity
 S-s5-s6-T  6
 4
45
0 6\8
6\6 s2 s3 2
6\8
s1 4
0 2\6 s4 0
8\8 6 6\6
s7 2\8

S T 6+4+2
4

s6 4\6
4\8 2
4 s5 4\4
0
Augmenting path Bottle nick Capacity
 S-s1-s2-s3-s4-T  6
 S-s5-s6-T  4
 S-s1-s7-T  2
0 6\8
2
46
6\6 s2 s3
6\8
s1 4
0 2\6 s4 0
8\8 2 6\6
s7 6\8
0
S T 6+4+2+4
4\4

s6 4\6
8\8 2
0 s5 4\4
0
Augmenting path Bottle nick
 S-s1-s2-s3-s4-T Capacity
 S-s5-s6-T  6
 S-s1-s7-T  4
 S-s5-s7-T  2
 4
47
Augmenting Path Bottle Nick Capacity
S - s1 - s2 - s3 - s4 - T 6
S - s5 - s6 - T 4
S - s1 - s7 - T 2
S - s5 - s7 - T 4
Maximum Flow = 6+4+2+4 = 16

Edges (E) = 11
Maximum Flow (F) = 16
= O (E * F)
= O (11 * 16)
Time Complexity = O (176)
Airline scheduling Network 48
Real life
application

We want to make airline schedule from London(source) to Pakistan(sink).we have many


routes(edges) from London to Pakistan . There is many countries(intermediate nodes)
between London and Pakistan. Aeroplan will go to Pakistan through these countries.
Every routes has different capacity. Now we use network flow diagram to find how
many maximum flight we can send Pakistan through these routes and also we find the
time complexity of that.
Airline scheduling Network 49
Real life
application

15 11
p1 p4 p7
4 5 20
3 11
9

10 7 6 19
S p2 p5 p8 T
7
11 5 3
15
p3 p6 p9
9 8
Airline Scheduling Network 50
Real life
application

15 11
p1 p4 p7
4 5 20
3 11
9
4 0 13
1
6/10 6/7 6/6 6/19
S p2 p5 p8 T 6

7
11 5 3
15
p3 p6 p9
9 8
Augmenting Bottle nick
path Capacity
 S-p2-p5-p8-t  6
51
11 7
4/15 4/11
0 p1 p4 p7 16
4/4 5 4/20
3 11
9
4 0 13
1
6/10 6/7 6/6 6/19
S p2 p5 p8 T 6+4

7
11 5 3
15
p3 p6 p9
9 8

Augmenting Bottle nick


path Capacity
 S-p2-p5-p8-t  6
 S-p1-p4-p7-t  4
11
4/15
p4
7
4/11
52
0 p1 p7 16
4/4 5 4/20
3 11
9
4 0 13
1
6/10 6/7 6/6 6/19
S p2 p5 p8 T 6+4+8

7
5 3
8/11 8/15
3 p3 7
p6 p9
8/9 8/8
1 0
Augmenting Bottle nick
path Capacity
 S-p2-p5-p8-t  6
 S-p1-p4-p7-t  4
 S-p3-p6-p9-t  8
11
4/15
p4
4
7/11
53
0 p1 p7 13
4/4 5 7/20
3/3 11
0 9
1 0 13
1
9/10 6/7 6/6 6/19
S p2 p5 p8 T 6+4+8+3

7
5 3
8/11 8/15
3 p3 7
p6 p9
8/9 8/8
1 0
Augmenting Bottle nick
path Capacity
 S-p2-p5-p8-t  6
 S-p1-p4-p7-t  4
 S-p3-p6-p9-t  8
 S-p2-p4-p7-t  3
11
4/15
p4
4
7/11
54
0 p1 p7 13
4/4 5 7/20
3/3 11
0 9
1 0 10
1
9/10 6/7 6/6 9/19
S p2 p5 p8 T 6+4+8+3+3

7
3/5 3
11/11 8/15
2
0 p3 7
p6 p9
8/9 8/8
1 0
Augmenting Bottle nick
path Capacity
 S-p2-p5-p8-t  6
 S-p1-p4-p7-t  4
 S-p3-p6-p9-t  8
 S-p2-p4-p7-t  3
 S-p3-p8-t  3
11
4/15
p4
4
7/11
55
0 p1 p7 13
4/4 5 10 7/20
3/3 1/11
0 1/9
0 8 0 10
0
10/10 7/7 6/6 9/19
S p2 p5 p8 T 6+4+8+3+3+1

7
3/5 3
11/11 8/15
2
0 p3 7
p6 p9
8/9 8/8
1 0
Augmenting Bottle nick
path Capacity
 S-p2-p5-p8-t  6
 S-p1-p4-p7-t  4
 S-p3-p6-p9-t  8
 S-p2-p4-p7-t  3
 S-p3-p8-t  3
 S-p2-p5-p4-t  1
Augmenting Path Bottle Nick Capacity 56
S - p2 - p5 - p8 - T 6
S - p1 - p4 - p7 - T 4
S - p3 - p6 - p9 - T 8
S - p2 - p4 - p7 - T 3
S - p3 - p8 - T 3
S - p2 - p5 - p4 - T 1
Maximum Flow = 6+4+8+3+3+1 = 25

Edges (E) = 16
Maximum Flow (F) = 25
= O (E * F)
= O (16 * 25)
Time Complexity = O (400)
Internet Connection 57
Real life
application

Flow of internet connection from one place to another. We have


a network(source) which provide internet connection to
office(sink). Flow of internet through cables(edges) from
network to office. Every cable has different capacity. These
cables are connected to one another at many points(intermediate
nodes). Problem is there every cables has different capacity then
how much flow of internet is possible and how much time they
get to flow from network to office. Now we will find maximum
flow and time complexity using network flow diagram.
Internet connection 58
Real life
application

9 14
d1 d4 d7
11 15
8 8 6
4 8
5
7
20 12 15 18
S d2 d5 d9 T

4 2 2 11
6
9 6
d3 d6 d10
8 8
5
59
0
9/9 9/14
2 d1 d4 d7 6
9/11 9/15
8 8 6
4 8
5
7
20 12 15 18
S d2 d5 d9 T 9

4 2 2 11
6
9 6
d3 d6 d10 Augmenting Bottle nick
8 8 path Capacity
 S-d1-d4-d7-t  9
5
60
0
9/9 9/14
2 d1 d4 d7 6
9/11 9/15
8 8 6
4 8
5
8 7 6
0 3
12/20 12/12 12/15 12/18
S d2 d5 d9 T 9+12

4 2 2 11
6
9 6
d3 d6 d10 Augmenting Bottle nick
8 8 path Capacity
 S-d1-d4-d7-t  9
 S-d2-d5-d9-t  12
5
61
0
9/9 9/14
2 d1 d4 d7 6
9/11 9/15
8 8 6
4 8
5
8 7 0 3 6
12/20 12/12 12/15 12/18
S d2 d5 d9 T 9+12+6

4 2 2 11
6
6/9 6/6
3 0 Augmenting Bottle nick
d3 d6 d10
6/8 6/8 path Capacity
2 2  S-d1-d4-d7-t  9
 S-d2-d5-d9-t  12
 S-d3-d6-d10-t
 6
5
62
0
9/9 9/14
2 d1 d4 d7 6
9/11 9/15
8 8 6
4 8
5
8 7 0 3 4
12/20 12/12 12/15 14/18
S d2 d5 d9 T 9+12+6+2
4
4 2 2 11
2/6
8/9 6/6
1 0 Augmenting Bottle nick
d3 d6 d10
8/8 6/8 path Capacity
0 2  S-d1-d4-d7-t  9
 S-d2-d5-d9-t  12
 S-d3-d6-d10-t
 S-d3-d6-d9-t  6
 2
5
63
0
9/9 9/14
0 d1 d4 d7 6
11/11 9/15
8 8 6
4 5 8
5
8 2/7 0 3 2
12/20 12/12 12/15 16/18
S d2 d5 d9 T 9+12+6+2+2
2
4 2 2 11
4/6
8/9 6/6
1 0 Augmenting Bottle nick
d3 d6 d10
8/8 6/8 path Capacity
0 2  S-d1-d4-d7-t  9
 S-d2-d5-d9-t  12
 S-d3-d6-d10-t
 S-d3-d6-d9-t  6
 S-d1-d6-d9-t  2
 2
5
64
0
9/9 9/14
0 d1 d4 d7 6
11/11 9/15
2 8 8 6
2/4 3 8
5
6 4/7 0 3 0
14/20 12/12 12/15 18/18
S d2 d5 d9 T 9+12+6+2+2+2
0
4 2 2 11
6/6
8/9 6/6
1 Augmenting Bottle nick
d3 d6 d10 0
8/8 6/8 path Capacity
 S-d1-d4-d7-t  9
0 2  S-d2-d5-d9-t  12
 S-d3-d6-d10-t
 S-d3-d6-d9-t  6
 S-d1-d6-d9-t  2
 S-d2-d1-d6-  2
d9-t
 2
Augmenting Path Bottle Nick Capacity 65
S - d1 - d4 - d7 - T 9
S - d2 - d5 - d9 - T 12
S - d3 - d6 - d10 - T 6
S - d3 - d6 - d9 - T 2
S - d1 - d6 - d9 - T 2
S- d2 - d1 - d6 - d9 - T 2
Maximum Flow = 9+12+6+2+2+2 = 33

Edges (E) = 15
Maximum Flow (F) = 33
= O (E * F)
= O (15 * 33)
Time Complexity = O (495)
Electrical Network 66
Real life
application

We have electrical network. We can flow current from grade(source) to house(sink). The
current will flow from grade to house through different transformers(intermediate
nodes). Now every transformer has different capacity for the flow of current. We have
problem here that the capacity of every transformer is different. So we will find that how
many maximum current we can flow from grade to house using network flow diagram
and also find time complexity.
Electrical network 67
Real life
application

9
p1 p4
11
10 9
8 8

9 7 14
S p2 p5 T 9

8 8
11
9
p3 p6
5
68
0
9/9
p1 p4 2
1
9/11
9/10 9
8 8

9 7 14
S p2 p5 T 9

8 8
11
9
p3 p6
5 Augmenting Bottle nick
path Capacity
 S-p1-p4-t  9
69
0
9/9
p1 p4 2
1
9/11
9/10 9
8 8
2 0 7
7/9 7/7 7/14
S p2 p5 T 9+7

8 8
11
9
p3 p6
5 Augmenting Bottle nick
path Capacity
 S-p1-p4-t  9
 S-p2-p5-t  7
70
0
9/9
p1 p4 2
1
9/11
9/10 9
8 8
2 0 7
7/9 7/7 7/14
S p2 p5 T 9+7+5

8 8
5/11
5/9
6 p3 p6 4
5/5 Augmenting Bottle nick
0 path Capacity
 S-p1-p4-t  9
 S-p2-p5-t  7
 S-p3-p6-t  5
71
0
9/9
p1 p4 2
1 7
6 9/11
9/10 2/9
6 2/8
0 0 5
9/9 7/7 9/14
S p2 p5 T 9+7+5+2

8 4
5/11
5/9
6 p3 p6 4
5/5 Augmenting Bottle nick
0 path Capacity
 S-p1-p4-t  9
 S-p2-p5-t  7
 S-p3-p6-t  5
 S-p2-p4-p5-t  2
72
0
9/9
p1 p4 2
1 2
1 9/11
9/10 7/9
6 7/8
0 0 0
9/9 7/7 14/14
S p2 p5 T 9+7+5+2+5
3
5/8 4
10/11
5/9
1 p3 p6 4
5/5 Augmenting Bottle nick
0 path Capacity
 S-p1-p4-t  9
 S-p2-p5-t  7
 S-p3-p6-t  5
 S-p2-p4-p5-t  2
 S-p3-p2-p4-
p5-t  5
73
0
9/9
p1 p4 2
1 1
0 9/11
9/10 8/9
6 8/8
0 0 0
9/9 7/7 14/14
S p2 p5 T 9+7+5+2+5+1
2 3
6/8 1/4
11/11
6/9 Augmenting Bottle nick
0 p3 p6 3 path Capacity
5/5  S-p1-p4-t  9
0  S-p2-p5-t  7
 S-p3-p6-t  5
 S-p2-p4-p5-t  2
 S-p3-p2-p4-
p5-t  5
 S-p3-p2-p4-
p5-p6-t  1
Augmenting Path Bottle Nick Capacity 74
S - p1 - p4 - T 9
S - p2 - p5 - T 7
S - p3 - p6 - T 5
S - p2 - p4 - p5 - T 2
S - p3 - p2 - p4 - p5 - T 5
S-p3-p2-p4-p5-p6-t 1
Maximum Flow = 9+7+5+2+5+1 = 29

Edges (E) = 13
Maximum Flow (F) = 29
= O (E * F)
= O (13 * 29)
Time Complexity = O (377)
75

THANK YOU !!!

You might also like