Maximum Flow Problem

You might also like

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 2

Maximum Flow Problem

Q1.
A T
5
1 3 9

O 7 4
B
D
4
2 1 6
5

C
4 E

To
From O A B C D E T
O 0 5 7 4 0 0 0
A 0 0 1 0 3 0 0
B 0 0 0 2 4 5 0
C 0 0 0 0 0 4 0
D 0 0 0 0 0 0 9
E 0 0 0 0 1 0 6
T 0 0 0 0 0 0 0

To
From O A B C D E T Row Sum
O 0 4 7 3 0 0 0 14
A 0 0 1 0 3 0 0 4
B 0 0 0 0 4 4 0 8
C 0 0 0 0 0 3 0 3
D 0 0 0 0 0 0 8 8
E 0 0 0 0 1 0 6 7
T 0 0 0 0 0 0 0 0
Col Sum 0 4 8 3 8 7 14
Z= 14

Q2. 4 20
0 0 5
5
10 0 0
1 30 10
20
20 0

0 30
3
2 0
40

To
From 1 2 3 4 5
1 0 20 30 10 0
2 0 0 40 0 30
3 0 0 0 10 20
4 0 0 5 0 20
5 0 0 0 0 0

To
From 1 2 3 4 5 Row Sum
1 0 20 30 10 0 60
2 0 0 0 0 20 20
3 0 0 0 10 20 30
4 0 0 0 0 20 20
5 0 0 0 0 0 0
Col Sum 0 20 30 20 60

Z= 60

You might also like