Operations Research Rough Working Notes
Operations Research Rough Working Notes
Operations Research Rough Working Notes
Unit 2
• Assignment based Problem- Hungarian Method
• Transportation Based Problem:
Assignment Problem
Assignment – one to one Allocation
In Assignment Problem, We allocate resources to activities on one
to one basis.
Hungarian Method is used to solve AP
Employee / Job P Q R S
A 20 10 0 5
B 10 15 25 0
C 5 20 10 0
D 5 5 0 5
Find an optimal Assignment of Job & Machine which will minimize the total
cost.
Solution
Step 1: It is not a balanced type problem, No. of rows (Jobs) are not equal to
No. of Columns (Machines)
Job / Machine I II III IV
A 9 12 14 18
B 4 6 8 9
C 5 7 9 11
Dummy D 0 0 0 0
Now It is a balanced type problem, No. of rows (Jobs) are equal to No. of
Columns (Machines)
Step 2: It is a minimization type problem
Step 3: Check Whether it is a prohibited type Problem or not
It is not a prohibited type problem
Step 4 : Row Minimization
Job / Machine I II III IV
A 0 3 5 9
B 0 2 4 5
C 0 2 4 6
Dummy D 0 0 0 0
Step 5 : Column Minimization
Job / Machine I II III IV
A 0 3 5 9
B 0 2 4 5
C 0 2 4 6
Dummy D 0 0 0 0
Modified Solution
Job / Machine I II III IV
A 0 1 1 5
B 0 0 0 1
C 0 0 0 2
Dummy D 4 2 0 0
Optimality Test
Job / Machine I II III IV
A 0 1 1 5
B 0 0 0 1
C 0 0 0 2
Dummy D 4 2 0 0
Find the optimal assignment of salesman to the territories so that total sales is
maximum.
Step 1 : It is balanced type problem.
Step 2: It is unprohibited type problem
Step 3: It is Maximization Type Problem
Convert maximization type problem into Minimization type problem by
calculating Regret or Opportunity Loss / Opportunity cost Matrix.
Highest value (sales) from the given Table
Subtract all the respective values of respective cell from this highest value.
Regret or Opportunity cost Matrix
Salesman /Territory T1 T2 T3 T4
S1 5 13 12 3
S2 12 6 11 0
S3 5 16 8 7
S4 16 8 15 12
Optimality Test
Salesman /Territory T1 T2 T3 T4
S1 0 8 4 0
S2 10 4 6 0
S3 0 11 0 4
S4 8 0 4 6
Minimum number of lines drawn = 4
Size of the matrix = 4
It is optimal solution
Step 7 : Assignment
Salesman / T1 T2 T3 T4
Territory
S1 0 8 4 0
S2 10 4 6 0
S3 0 11 0 4
S4 8 0 4 6
Row Minimization
Employee / Job J1 J2 J3 J4
1 M 5 2 0
2 0 3 1 2
3 2 5 1 0
4 1 4 4 0
Column Minimization
Employee / Job J1 J2 J3 J4
1 M 2 1 0
2 0 0 0 2
3 2 2 0 0
4 1 1 3 0
Optimality Test
Employee / Job J1 J2 J3 J4
1 M 2 1 0
2 0 0 0 2
3 2 2 0 0
4 1 1 3 0
Modified Solution
Employee / Job J1 J2 J3 J4
1 M 1 0 0
2 0 0 0 3
3 2 2 0 1
4 0 0 2 0
Optimality Test
Employee / Job J1 J2 J3 J4
1 M 1 0 0
2 0 0 0 3
3 2 2 0 1
4 0 0 2 0
It is optimal Solution
Assignment and Assignment Schedule
Employee / Job J1 J2 J3 J4
1 M 1 0 0
2 0 0 0 3
3 2 2 0 1
4 0 0 2 0
Employee Job Cost (in Rs
Thousands)
1 J4 0
2 J1 or J2 4 or 7
3 J3 4
4 J2 or J1 6 or 3
RS 14000
5. The quantity of different products (in units) produced by the workers per day
are given in the following matrix along with profit in Rs per unit. Formulate a
profit matrix and find the optimal assignment of workers to product which will
maximise the profit.
Quantity of Products (in Units)
Workers / Quantity of Pencil Rubber Pen Ink
Products
Amit 30 40 100 50
Sumit 25 70 140 30
Vinit 40 90 130 60
Punit 35 45 120 40
Profit in Rs per unit 4 2 1 3
Row Minimization
Workers / Quantity of Pencil Rubber Pen Ink
Products
Amit 30 70 50 0
Sumit 40 0 0 50
Vinit 20 0 50 0
Punit 0 50 20 20
Column Minimization
Workers / Quantity of Pencil Rubber Pen Ink
Products
Amit 30 70 50 0
Sumit 40 0 0 50
Vinit 20 0 50 0
Punit 0 50 20 20
Optimality Test
Workers / Quantity of Pencil Rubber Pen Ink
Products
Amit 30 70 50 0
Sumit 40 0 0 50
Vinit 20 0 50 0
Punit 0 50 20 20
Assignment
Workers / Quantity of Pencil Rubber Pen Ink
Products
Amit 30 70 50 0
Sumit 40 0 0 50
Vinit 20 0 50 0
Punit 0 50 20 20
Assignment Schedule
Workers Type of Product Profit in Rs
Ahm 42 32 50 26 11
Bangalore 34 36 28 46 13
Calcutta 64 54 36 82 19
Demand 6 10 12 15 43\43
Objective :
To Find out how many units to be transported / supplied from respective
Supply centre to Demand centre in such a way that the total transportation
cost is minimum or least,
Structure of Transportation Problem:
• The number of supply centres are finite and known .
• The number of Demand centres are finite and known .
• The Supply capacity from each supply centre is constant for the given
problem
• The Supply capacity of each Demand centre is constant for the given
problem
• Cost of transporting goods from respective supply centre to respective
demand centre is constant for the given problem.
F1 42 32 50 26 11 5
5
6
F2 34 36 28 46 13 8
5 8
F3 64 54 36 82 19 15
4 155
555
Demand 6 10 12 555 15 43\43
5 4 555
5
Transportation Schedule based on IFS of NWCR method:
Allocation Cell Units Allocated TC/ Unit Total TC (in RS)
F1 - M1 6 42 252
F1- M2 5 32 160
F2-M2 5 36 180
F2 -M3 8 28 224
F3-M3 4 36 144
F3-M4 15 82 1230
2190
F1 42 32 50 26 11
11
F2 34 36 28 46 13 1
1 12
F3 64 54 36 82 19 9 4
5 10 4
Demand 6 10 12 15 43\43
5 4
F1- M4 11 26 286
F2 - M1 1 34 34
F2 – M3 12 28 336
F3- M1 5 64 320
F3- M2 10 54 540
F3- M4 4 82 328
1844
IFS by Vogel’s Approximation Method (VAM):
Row Wise Penalties
Plant/Market M1 M2 M3 M4 Supply P1 P2 P3 P4
F1 42 32 50 26 11 6
11
F2 34 36 28 46 13 9 3 6 6 6 8
6 3 4
F3 64 54 36 82 19 7 18 18 18 18
7 12
Demand 6 10 12 15 43\43
4
P1 8 4 8 20
P2 30 18 8 36
P3 30 18 8
P4 18 8
F1- M4 11 26 286
F2 - M1 6 34 204
F2 – M2 3 36 108
F2- M4 4 46 184
F3- M2 7 54 378
F3- M3 12 36 432
1592
Before carrying out optimality, You should always check for Non –
Degeneracy Condition.
Condition for Non – Degeneracy, m+n-1 = No of allocations
Where m =no of rows and n= No of columns
m+n-1 = 3+4-1 = 6
No of allocations =6
There is no degeneracy
Optimality Test:
V1=14 V2=16 V3 = -2 V4= 26
Plant/Market M1 M2 M3 M4 Supply
U1=0 F1 42 32 50 26 11
11
U2= 20 F2 34 36 28 46 13
6 3 4
U3 = 38 F3 64 54 36 82 19
7 12
Demand 6 10 12 15 43\43
For occupied cells , Cost ij = Ui+ Vj
occupied Cost Cost ij = Ui+ Vj
cells ij
F1- M4 26 26 = U1+V4 26 = 0+V4 V4 = 26
F2 - M1 34 34 = U2+V1 34 = 20+V1 V1 = 34-20=14
F2 – M2 36 36 = U2+V2 36 = 20+V2 V2 = 36-20 =16
F2- M4 46 46 = U2+V4 46 = U2+ 26 U2 = 46-26 = 20
F3- M2 54 54 = U3+V2 54 = U3+ 16 U3 = 54-16 =38
F3- M3 36 36 = U3 + V3 36 = 38 +V3 V3 = 36-38 = -2
i j
F1 – M1 ∆11 = Cost 11 – (U1+V1) 42 – (0+14) =28
F1 – M2 ∆12 = Cost 12 – (U1+V2) 32 – (0+16) = 16
F1 – M3 ∆13 = Cost 13 – (U1+V3) 50 – (0-2) =52
F2 – M3 ∆23 = Cost 23 – (U2+V3) 28-(20-2) = 10
F3 – M1 ∆31 = Cost 31 – (U3+V1) 64 – (38+14) =12
F3– M4 ∆34 = Cost 34 – (U3+V4) 82 – (38+26) = 18
2
Find IFS by applying NWCR, LCM and VAM.
Step 1: it is not balanced.
Total Supply = 152+164+154 =470
Total Demand = 144+204+82 = 430
It is balanced now.
Step 2 : it is minimization type problem
Step 3 : it is Unprohibited
Step 4 : IFS based on NWCR , LCM and VAM (any one)
IFS by NWCR
Plant/ M1 M2 M3 Dummy Supply
Market M4
A 16 24 24 0 152
144 8
B 48 72 48 0 164
42 82 40
C 24 48 72 0 154
154
IFS by LCM
B 48 72 48 0 164
164
C 24 48 72 0 154
32 82 40
B 48 72 48 0 164 48 0 0 24
42 82 40
124
C 24 48 72 0 154 24 24 24 24
144 10
P1 8 24 24 0
P2 8 24 24 *
P3 24 24 24 *
P4 * 24 24 *
P5 * *
3.
IBFS of a Transportation Problem is given as below: Find the optimal
Transportation Cost
Plant/Market M1 M2 M3 M4 Supply
A 10 11 7 4 25
14
11
B 7 13 6 11 28
17
11
C 4 9 8 10 17
15 2
Demand 15 30 11 14 70/70
V1 = 6 V2 = 11 V3 = 4 V4 = 4
Plant/Market M1 M2 M3 M4 Supply
U1=0 A 10 11 7 4 25
14
11
U2=2 B 7 13 6 11 28
17
11
U3=-2 C 4 9 8 10 17
15 2
Demand 15 30 11 14 70/70
Plant/Market M1 M2 M3 M4 Supply
A 10 11 7 4 25
14
11
B 7 13 6 11 28
15 2
11
C 4 9 8 10 17
17
Demand 15 30 11 14 70/70
V1 = 5 V2 = 11 V3 = 4 V4 = 4
Plant/Market M1 M2 M3 M4 Supply
U1=0 A 10 11 7 4 25
14
11
U2=2 B 7 13 6 11 28
15 2
11
U3=-2 C 4 9 8 10 17
17
Demand 15 30 11 14 70/70
V1 = 5 V2 = 11 V3 = 4 V4 = 4
Opportunity cost ∆ of Unallocated Cells: ∆ij = Cost ij – ( Ui +Vj)
It represents by how much will the cost change (increase or decrease) if 1
unit is transported to Unallocated / empty cell
Unallocated Cells ∆ij = Cost ij – ( Ui +Vj)
A-M1 10– (U1+V1) = 10 – (5) = 5
A-M3 7– (U1+V3) = 7 – (4) = 3
B-M4 11– (U2+V4) = 11 – (6) = 5
C-M1 4– (U3+V1) = 4 – (3) = 1
C-M3 8– (U3+V3) = 8 – (2) = 6
C-M4 10– (U3+V4) = 10 – (2) = 8
The shipments from Chennai to Hyderabad and Nagpur to Delhi are not
possible due to certain Operational Constraints/Problems.
Find the IFS by LCM, VAM and obtain Optimal Transportation Cost.
Udaipur 38 6 68 18 0 1700
500
500
1200
0
N 68 M 38 58 0 1200 900 38 20 10 10
800 100
100
300
U 38 6 68 18 0 1700 500 6 12 12 20
500
1200
0
De 1000 1200 800 1200 300
man 600 600
d 100
P1 21 22 30 10 0
P2 21 22 30 10 *
P3 21 22 * 10 *
P4 21 * * 10 *
Whether there is degeneracy in the table
How to check whether degeneracy exist in the table or not
No of occupied cells = 7
m+n -1, m = no of rows, n= no of columns-------- 3 + 5 -1 = 7
Condition for Non – Degeneracy, No of Occupied Cells = m+n -1
There is no degeneracy
Optimality Test
V1=17 V2=-4 V3=-12 V4 =8 V5 = -50
Pla M D H C Dummy Supply
nt /
WH
U1 = 0 Ch 17 28 M 8 0 1600
1000 600
00
U2=50 N 68 M 38 58 0 1200
800 100 300
U3=10 U 38 6 68 18 0 1700
1200 500
Now it is balanced.
W2 10 5 7 25 1500 2 2 2
1500
W3 7 8 9 25 1000 1 1 1
300 200 500
P1 7 2 5
P2 * 2 5
P3 * 3 2
V1 = 0 V2=1 V3 = 2 V4=18
WH/ M1 M2 M3 Dummy Supply
Mkt M4
U1= 0 W1 0 3 2 25 2000
1200 800
U2 =4 W2 10 5 7 25 1500
1500
U3 = 7 W3 7 8 9 25 1000
300 200 500
Transportation Schedule:
Occupied Cells No of Units Profit/Unit Total Profit
W1-M1 1200 25 30000
W1-M3 800 23 18400
W2-M2 1500 20 30000
W3-M2 300 17 5100
W3-M3 200 16 3200
W3-M4 500 0 0
86700
6. Profit /unit
W1 W2 W3 Supply
P1 18 20 16 2000
P2 26 22 30 2000
P3 6 2 0 2000
Demand 1500 3000 1500
P2 26 22 30 2000 4 4 4
1000 1000
P3 6 2 0 2000 2 * *
2000
P1 12 18 16
P2 8 2 14
P3 8 2 *
Optimality Test
V1 = V2= V3 =
Plant/ W1 W2 W3 Supply
WH
U1= P1 18 20 16 2000
500 1500
U2 = P2 26 22 30 2000
1000
1000
U3 = P3 6 2 0 2000
2000
P2 26 22 30 2000
2000
P3 6 2 0 2000
1000 1000
V1 = 18 V2=18 V3 = 16
Plant/ W1 W2 W3 Supply
WH
U1= 0 P1 18 20 16 2000
1500 500
U2 =4 P2 26 22 30 2000
2000
U3 = -16 P3 6 2 0 2000
1000 1000
U2=-2 Y 11 12 5 9 7000
5000 2000
U3=2 Z 7 9 11 13 13000
8000 1000 4000
U2=-1 Y 11 12 5 9 7000
1000 6000
U3=2 Z 7 9 11 13 13000
8000 5000
Deman 8000 7000 5000 6000
d
Optimality test
Unoccupied Cells ∆ij = Costij - (Ui+Vj)
X-I 9– (U1 + V1) = 9- (5) = 4
X-IV 11– (U1+V4)= 11 – (10) =1
Y-I 11– (U2+V1)= 11 – (4) = 7
Y-II 12-(U2+V2)=12 – (6) = 6
Z-III 11-(U3+V3)= 11- (8) = 3
Z-IV 13 – (U3+V4) =13-12 =1
Transportation Schedule:
Occupied Cells No of Units TC/Unit Total TC
Note: Before carrying out optimality, You should always check for Non –
Degeneracy Condition.
Plant/ L1 L2 L3 Supply
Market
P1 2 7 4 5000
5000
P2 3 3 1 8000
8000
P3 5 4 7 7000
2000 5000
P4 M 6 2 10000
100000
0
P5 0 0 0 4000
4000