Operatios Research-1

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Example:-

Solution:-
MaxZ=3𝑥1 + 5𝑥2

3𝑥1 + 2𝑥2 + 𝑆1 = 18

𝑥1 + 𝑆2 = 4

𝑥2 + 𝑆3 = 6

𝑥1, 𝑥2 ≥ 0

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 Sol
𝑆1 3 2 1 0 0 18
𝑆2 1 0 0 1 0 4
𝑆3 0 1 0 0 1 6
Z -3 -5 0 0 0 0
𝑅1 − 2𝑅3 , 𝑅4 − 5𝑅3

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 Sol
𝑆1 3 0 1 0 -2 6
𝑆2 1 0 0 1 0 4
𝑥2 0 1 0 0 1 6
Z -3 0 0 0 5 30
1
𝑅 , 𝑅2 − 𝑅1 , 𝑅4 − 3𝑅1
3 1

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 Sol
1 2
𝑥1 1 0 0 -3 2
3
1 2
𝑆2 0 0 -3 1 2
3
𝑥2 0 1 0 0 1 6
Z 0 0 1 0 3 36

𝑥1 = 2 , 𝑥2 = 6 , Z=36

Now, Addition of new variable

MaxZ=3𝑥1 + 5𝑥2 + 2𝑥3

3𝑥1 + 2𝑥2 + 𝑥3 + 𝑆1 = 18
𝑥1 + 𝑥3 + 𝑆2 = 4

𝑥2 + 𝑥3 + 𝑆3 = 6

𝑥1, 𝑥2 , 𝑥3 , 𝑆1 , 𝑆2 , 𝑆3 ≥ 0

1 2
0 −
3 3 1
1 2 [1]
− 1
3 3 1
[ 0 0 1 ]
1 2 1
+0− −
3 3 3
1 2 4
− +1+
3 3 3
[ 0 + 0+ 1 ][ 1 ]

𝑍3 − 𝐶3 = 𝐶𝑏 𝑦3 − 𝐶3

1

3
𝑍3 − 𝐶3 = (305) 4 − 2 > 0
3
[ 1 ]

= (−1 + 0 + 5) − 2 > 0

= (4) − 2 > 0

Hence, current solution is itself optimal.


Sensitivity Analysis:-
Introduction:

In a liner programming problem we have the values of cost coefficient, 𝑐𝑗 availability of


resources 𝑏𝑖 , and constrains coefficient 𝑎𝑖𝑗 which contribute very much in arriving at an optimal
solution. If there is any change or error in any of these parameters it give rise to a change in the
optimal solution. Also it may sometimes be required to analyse the effect of changes in these
parameters on the optimal solution. Such change may be discrete or continuous. A study of the
effect on the optimal solution due to discrete changes in the parameters is called sensitivity
analysis or post optimal analysis

. In the case of continuous change it is called parametric programming. Here we shall discuss
the sensitivity analysis only. In most of case it is not necessary to slove the problem again. Some
simple calculations applied to the current optimal solution will give the desired result.

There are five type of change which are possible in an LLP.

1:- Change in cost coefficient ( 𝑐𝑗 )

2:- Change in availibilty resources ( 𝑏𝑖 )

3:- Change in matrix element ( 𝑎𝑖𝑗 )

4:- Addition of a new variable

5:- Addition of new constrains

Discrete changes in cost coefficient (𝒄𝒋 ) :-

Let the cost coefficient of 𝑐𝑘 be changed to 𝑐𝑘 +∆𝑐𝑘 . Hence the solution to be optimal if

1: 𝑍𝑘 − 𝐶𝑘 ≥ ∆𝑐𝑘 .

2: ∆𝑐𝑘 ≥ −(𝑍𝑗 − 𝑐𝑗 )/𝑎𝑘𝑗

Example:-
Consider the LLP Maximize Z=4𝑥1 + 6𝑥2 + 2𝑥3 subject to the constrains

𝑥1 + 𝑥2 + 𝑥3 ≤ 3

𝑥1 + 4𝑥2 + 7𝑥3 ≤ 9
𝑥1 , 𝑥2 , 𝑥3 ≥ 0

Find the effect on the optimality of the current solution when the objective function is changed
to 3𝑥1 + 8𝑥2 + 5𝑥3 .

Solution:-
MaxZ=4𝑥1 + 6𝑥2 + 2𝑥3

𝑥1 + 𝑥2 + 𝑥3 + 𝑆1 = 3

𝑥1 + 4𝑥2 + 7𝑥3 + 𝑆2 = 9

𝑥1 , 𝑥2 , 𝑥3 , 𝑆1 , 𝑆2 > 0

Basic 𝑥1 𝑥2 𝑥3 𝑆1 𝑆2 Sol
𝑆1 1 1 1 1 0 3
𝑆2 1 4 7 0 1 9
Z -4 -6 -2 0 0 0
1
𝑅1 (4) , 𝑅3 − 6𝑅2 , 𝑅1 − 𝑅2

Basic 𝑥1 𝑥2 𝑥3 𝑆1 𝑆2 Sol
𝑆1 3 0 3 1 1 3
− −
4 4 4
𝑥2 1 1 7 0 1 9
4 4 4
Z 5 0 17 0 3 27

2 2 2
4 1 5
𝑅1 (3) , 𝑅2 − 4 𝑅1 , 𝑅3 + 2 𝑅1

Basic 𝑥1 𝑥2 𝑥3 𝑆1 𝑆2 Sol
𝑥1 1 0 −1 4 1 1

3 3
𝑥2 0 1 2 1 1 2
− −
3 3
Z 0 0 6 10 2 16
3 3
Hence the optimal solution

𝑥1 = 1, 𝑥2 = 2, 𝑍 = 16

Now, Change the objective function

MaxZ=3𝑥1 + 8𝑥2 + 5𝑥3


𝑥1 + 𝑥2 + 𝑥3 + 𝑆1 = 3

𝑥1 + 4𝑥2 + 7𝑥3 + 𝑆2 = 9

Basic 𝑥1 𝑥2 𝑥3 𝑆1 𝑆2 Sol
𝑆1 1 1 1 1 0 3
𝑆2 1 4 7 0 1 9
Z -3 -8 -5 0 0 0
1
𝑅2 (4) , 𝑅3 − 8𝑅2 , 𝑅1 − 𝑅2

Basic 𝑥1 𝑥2 𝑥3 𝑆1 𝑆2 Sol
𝑆1 3 0 3 1 1 3
− −
4 4 4
𝑥2 1 1 7 0 1 9
4 4 4
Z −1 0 9 14 2 18

Basic 𝑥1 𝑥2 𝑥3 𝑆1 𝑆2 Sol
𝑥1 1 0 −1 4 1 1

3 3
𝑥2 0 1 2 1 1 2
− −
3 3
Z 0 0 8 46 5 19
3 3
Hence the optimal solution

𝑥1 = 1, 𝑥2 = 2, 𝑍′ = 19

Hence the change in objective function is Z=16 to 𝑍′ = 19.

Change in avalibility resources 𝒃𝒊 :-


Example:-
Consider the LLP Maximize Z≤3𝑥1 + 5𝑥2 subject to constraints

3𝑥1 + 2𝑥2 ≤ 18

𝑥1 ≤ 4

𝑥2 ≤ 6

𝑥1, 𝑥2 ≥ 0

Discuss the effect of adding a new constraint 2𝑥1 + 𝑥2 ≤ 8 to the given set of constraints.

Solution:-
MaxZ=3𝑥1 + 5𝑥2

3𝑥1 + 2𝑥2 + 𝑆1 = 18

𝑥1 + 𝑆2 = 4

𝑥2 + 𝑆3 = 6

𝑥1, 𝑥2 , 𝑆1 , 𝑆2 ≥ 0

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 Sol
𝑆1 3 2 1 0 0 18
𝑆2 1 0 0 1 0 4
𝑆3 0 1 0 0 1 6
Z -3 -5 0 0 0 0
𝑅1 − 2𝑅3 , 𝑅4 − 5𝑅3

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 Sol
𝑆1 3 0 1 0 -2 6
𝑆2 1 0 0 1 0 4
𝑥2 0 1 0 0 1 6
Z -3 0 0 0 5 30
1
𝑅 , 𝑅2 − 𝑅1 , 𝑅4 − 3𝑅1
3 1
Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 Sol
1 2
𝑥1 1 0 0 -3 2
3
1 2
𝑆2 0 0 -3 1 2
3
𝑥2 0 1 0 0 1 6
Z 0 0 1 0 3 36

𝑥1 = 2 , 𝑥2 = 6 , Z=36

Now add the new constraints, then

MaxZ=3𝑥1 + 5𝑥2

3𝑥1 + 2𝑥2 ≤ 18

𝑥1 ≤ 4

𝑥2 ≤ 6

2𝑥1 + 𝑥2 ≤ 8

𝑥1, 𝑥2 ≥ 0

Convert into equations

MaxZ=3𝑥1 + 5𝑥2

3𝑥1 + 2𝑥2 + 𝑆1 = 18

2𝑥1 + 𝑥2 + 𝑆2 = 8

𝑥1 + 𝑆3 = 4

𝑥2 + 𝑆4 = 6

𝑥1, 𝑥2 , 𝑆1 , 𝑆2 ≥ 0

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 𝑆4 Z
𝑆1 3 2 1 0 0 0 18
𝑆2 2 1 0 1 0 0 8
𝑆3 1 0 0 0 1 0 4
𝑆4 0 1 0 0 0 1 6
Z -3 -5 0 0 0 0 0
𝑅1 − 2𝑅3 , 𝑅2 − 𝑅3 , 𝑅4 − 5𝑅3
Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 𝑆4 Z
𝑆1 3 0 1 0 0 -2 6
𝑆2 2 0 0 1 0 -1 2
𝑆3 1 0 0 0 1 0 4
𝑥2 0 1 0 0 0 1 6
Z -3 0 0 0 0 5 30
𝑅1 − 3𝑅2 , 𝑅3 − 𝑅2 , 𝑅4 + 2𝑅2

Basic 𝑥1 𝑥2 𝑆1 𝑆2 𝑆3 𝑆4 Z
𝑆1 0 0 1 3 0 1 3
− −
2 2
𝑥1 1 0 0 1 0 1 1

2 2
𝑆3 0 0 0 1 1 1 2

2
𝑥2 0 1 0 0 0 1 6
Z 0 0 0 3 0 7 33
2 2
𝑥1 = 1 , 𝑥2 = 6 , Z’=33

Hence the change in objective function is Z=36 to Z’=33.

Example:-
Consider the LLP Maximize Z= 5𝑥1 + 12𝑥2 + 4𝑥3 subject to the constraints

𝑥1 + 2𝑥2 ≤ 5

5𝑥1 − 𝑥2 + 2𝑥3 = 2

𝑥1, 𝑥2 , 𝑥3 ≥ 0

5 7
Analyse the effect of changing the requirement vector form ( ) to ( ) on the optimal solution.
2 2

Solution:-
Inequilities convert into equation by adding slack variables.

𝑥1 + 2𝑥2 + 𝑆1 = 5

5𝑥1 − 𝑥2 + 2𝑥3 + 𝑅 = 2

𝑥1, 𝑥2 , 𝑥3 , 𝑆1 , 𝑅 ≥ 0
Put 𝑥1 = 𝑥2 = 𝑥3 = 0

S=5 , R=2

Initial solution (S,R)=(5,2)

Max Z= 5𝑥1 + 12𝑥2 + 4𝑥3 − 𝑀𝑅

Basic 𝑥1 𝑥2 𝑥3 S R Sol
S 1 2 0 1 0 5
R 5 -1 2 0 1 2
Z -5 -12 -4 0 100 0
Z=200

New Z row= old Z row – 100 (R-row)

= −5𝑥1 − 12𝑥2 − 4𝑥3 + 100𝑅 − 100(5𝑥1 − 𝑥2 + 2𝑥3 + 𝑅)

= −5𝑥1 − 500𝑥1 − 12𝑥2 + 100𝑥2 − 4𝑥3 − 200

= −505𝑥1 + 88𝑥2 − 204𝑥3

Basic 𝑥1 𝑥2 𝑥3 S R Sol
S 1 2 0 1 0 5
R 5 -1 2 0 1 2
Z -505 88 -204 0 0 -200
1
𝑅2 (5) , 𝑅1 − 𝑅′2 , 𝑅3 + 505𝑅′2

Basic 𝑥1 𝑥2 𝑥3 S R Sol
S 0 11 2 1 1 23
− −
5 5 5 5
𝑥1 1 1 2 0 1 2

5 5 5 5
Z 0 -13 -2 0 101 2
5 1
𝑅1 (11) , 𝑅2 − 5 𝑅′1 , 𝑅3 + 13𝑅′1

Basic 𝑥1 𝑥2 𝑥3 S R Sol
𝑥2 0 1 2 5 1 23
− −
1 11 11 11
𝑥1 1 0 4 1 2 9
11 11 11 11
Z 0 0 8 65 1098 321
11 11 11 11
S is leaving variable and 𝑥2 is entering variable
9 23 321
𝑥1 = 11, 𝑥2 = 11, Z= 11
Z=5𝑥1 + 12𝑥2
9 23
=5(11) + 12(11)

45 276
= +
11 11
321
=
11
7
If the requirement vector becoms ( ) then
2
5 1

(11 11) (7)
1 2 2
11 11
35 2 33
− 33
(11 11 11
) − ( ) = (11)
1 4 11
+ 1
11 11 11
3
Z=5( ) + 12(1) + 4(0)
11
165 165+132
= 11 + 12 = 11

297
=
11
𝑍 = 27

Example:-
Consider the LLP Maximize Z= 5𝑥1 + 12𝑥2 + 4𝑥3 subject to the constraints

𝑥1 + 2𝑥2 ≤ 5

5𝑥1 − 𝑥2 + 2𝑥3 = 2

𝑥1, 𝑥2 , 𝑥3 ≥ 0

1 −5
Discuss the effect of changing the column 𝑎3 = ( ) 𝑡𝑜 ( )
3 2
No optimal solution.

Solution:-
Inequilities convert into equation by adding slack variables.

𝑥1 + 2𝑥2 + 𝑆1 = 5

5𝑥1 − 𝑥2 + 2𝑥3 + 𝑅 = 2

𝑥1, 𝑥2 , 𝑥3 , 𝑆1 , 𝑅 ≥ 0

Put 𝑥1 = 𝑥2 = 𝑥3 = 0

S=5 , R=2

Initial solution (S,R)=(5,2)

Max Z= 5𝑥1 + 12𝑥2 + 4𝑥3 − 𝑀𝑅

Basic 𝑥1 𝑥2 𝑥3 S R Sol
S 1 2 0 1 0 5
R 5 -1 2 0 1 2
Z -5 -12 -4 0 100 0
Z=200

New Z row= old Z row – 100 (R-row)

= −5𝑥1 − 12𝑥2 − 4𝑥3 + 100𝑅 − 100(5𝑥1 − 𝑥2 + 2𝑥3 + 𝑅)

= −5𝑥1 − 500𝑥1 − 12𝑥2 + 100𝑥2 − 4𝑥3 − 200

= −505𝑥1 + 88𝑥2 − 204𝑥3

Basic 𝑥1 𝑥2 𝑥3 S R Sol
S 1 2 0 1 0 5
R 5 -1 2 0 1 2
Z -505 88 -204 0 0 -200
1
𝑅2 (5) , 𝑅1 − 𝑅′2 , 𝑅3 + 505𝑅′2
Basic 𝑥1 𝑥2 𝑥3 S R Sol
S 0 11 2 1 1 23
− −
5 5 5 5
𝑥1 1 1 2 0 1 2

5 5 5 5
Z 0 -13 -2 0 101 2
5 1
𝑅1 (11) , 𝑅2 − 5 𝑅′1 , 𝑅3 + 13𝑅′1

Basic 𝑥1 𝑥2 𝑥3 S R Sol
𝑥2 0 1 2 5 1 23
− −
1 11 11 11
𝑥1 1 0 4 1 2 9
11 11 11 11
Z 0 0 8 65 1098 321
11 11 11 11
S is leaving variable and 𝑥2 is entering variable

−5
When 𝑥3 column is changed to ( ) the new𝑥 −1 column is
2
5 1
𝑎13 −
(𝑎 ) = (11 11) (−5)
23 1 2 2
11 11
−25 2 −27

= ( 11 11) = ( 11 )
−5 4 −1
+
11 11 11

You might also like