Lab 3 OR Operations Research
Lab 3 OR Operations Research
B.V X1 X2 X3 S1 S2 -Z R.H.S θ
S1 1 3 2 1 0 0 6 6/2=3
S2 1 -1 3 0 1 0 9 9/3=3
CN - ZN -2 -1 -3 0 0 1 0 B.F.S.=(0,0,0,9,6)
X1 1 3 2 1 0 0 6
S2 0 -4 1 -1 1 0 3
CN - ZN 0 5 1 2 0 1 12 B.F.S.=(6,0,0,0,3)
Optimal Solution:
z 12 at x 1 6, x 2 0, x 3
0. 3
Example 2
Solve the following L.P.P:
Min z = x1 - 3 x2 + 3 x3
Subject to
3x1 - x2 +2 x3 ≤ 7
2x1 + 4 x2 ≥ -12
-4x1 + 3 x2 +8x3 ≤ 10
and x1 , x2 , x3 ≥ 0
Solution:
- Make all the bi ’s (R.H.S) positive:
2x1 + 4 x2 ≥ -12
Multiplying the second constraint
throughout by (-1).
- 2x1 - 4 x2 ≤ 12
4
Example 2 : Solution
Solution: First, convert it to the standard form, We add slacks to get:
Min z = x1 - 3 x2 + 3 x3
Subject to
3x1 - + 2 x 3 + S1 =
-2x1 - 4 x2 + S2
x2 7
and x1 , x2 , x3 , S=
1 , S2 , S3 ≥0
-
S1 3 -1 2 1 0 0 0 7
S2 -2 -4 0 0 1 0 0 12 -
S3 -4 (3) 8 0 0 1 0 10 10/3
B.F.S.=(0,0,0,7,12,10)
CN - ZN 1 -3 3 0 0 0 1 0
CN - ZN -3 0 11 0 0 1 1 -10 B.F.S.=(0,10/3,0,31/3,76/3,0)
6
Example 3 :Unbounded solution
Solve the following L.P.P:
Min z = -3 x1 -2 x2
Subject to
x1 - 3x1 - 2x2 ≤
x2 ≤ and
1 6
Solution: First, convert it to the standard
x1 , x2 form,
≥ We add slacks to get:
0
Min z = -3 x1 -2 x2
S.t. x1 - x2 + s1 =1
3x1 - 2x2 + s2 =6
and x1 , x2 , s1 , s2 ≥ 0 .
7
Example 3 : Solution (Unbounded solution )
θ
B. V. x1 x2 S1 S2 -Z R.H.S
1
S1 (1) -1 1 0 0 1
2
s2 3 -2 0 1 0 6
CN - ZN -3 -2 0 0 1 0
-
x1 1 -1 1 0 0 1
3
s2 0 (1) -3 1 0 3
CN - ZN 0 -5 3 0 1 3
-
x1 1 0 -2 1 0 4
-
x2 0 1 -3 1 0 3
CN - ZN 0 0 -12 5 1 18
Since c"3 = -12 is the most negative cost coefficient, all a"i3 ≤ 0, we have
an unbounded solution.
8
Example 4: Infinite number of solutions
Solve the following L.P.P:
Min Z = -40 x1 -100 x2
Subject to 10 x1 + 5 x2 ≤ 2500
4x1 + 10 x2 ≤ 2000
2x1 + 3 x2 ≤ 900
and x1 , x2 ≥ 0 .
Solution: First, convert it to the standard form, We add slacks
to get:
s.t.Min Z = -4010
x1 x-100
1 + 5xx
2 2 + S1 = 2500,
4x1 + 10 x2 + = 2000
2x
S21 + 3 x2 + S3 = 900
and x1 , x2 , s1 , s2 , s3 ≥ 0 .
θ
B. V. x1 x2 S1 S2 S3 -Z R.H.S.
S1 10 5 1 0 0 0 2500 500
200
S2 4 (10) 0 1 0 0 2000
300
S3 2 3 0 0 1 0 900
CN - ZN -40 -100 0 0 0 1 0
S1 8 0 1 -1/2 0 0 1500
CN - ZN 0 0 0 10 0 1 20000
Since all c"i ≥ 0 , the present solution is optimum and is given by:
x2 = 200, S1 = 1500, S3 = 300, … basic variables, x1 = S2 = 0 , … non-
basic variables, Zmin = -20000.
Since the cost coefficient corresponding to the non-basic variable x1 is
c"1=0, we have an infinite number of solutions. 10
Example 5
Solve the following L.P.P
Min Z 4 x 1 x 2 30 x 3 11x 4 3x 5 3x 6
s .t 2x 1 6x32x4
3x6 4x
x1 7x20
2 7 x 3 x 4 x6 10
5 x 3 3x x 5 x 6 60
4
Solution:
i 0, i 1, 2,..., 7
- We see that and
x2 , x5xand x7 are Basic Variable.
x 2 10 4x 7x3 x4 x6
1
5 x 3 3x 4 x6
x 5 60
6x32x4 3x
7 20
-x We know 2xthat the
6 objective function given in terms of non-basic
variables.
1 So we eliminate B.V. from O.F. So, Sub by x2 , x5 and x7 in O.F.
Z 4 x 1 10 4x 1 7 x 3 x 4 x 6 30 x 3 11x 4
x7 -2 0 6 2 0 -3 1 0 20 10
x2 -4 1 7 (1) 0 -1 0 0 10 10
x5 0 0 -5 3 1 -1 0 0 60 20
CN - ZN 0 0 13 -6 0 2 0 1 110 B.F.S.=(0,10,0,0,60,0,20)
x7 (6) -2 -8 0 0 -1 1 0 0 0
x4 -4 1 7 1 0 -1 0 0 10 -
x5 12 -3 -26 0 1 2 0 0 30 30/12
CN - ZN 0 0 3 0 2 0 0 1 230 B.F.S.=(5/4,0,0,45/2,0,15/2,0)
s .t x 3 x 5x 4 10x 1
1
2x2 2 x 3 x 4 5
4x 4
and 2x x i1
20,x i 1, 10
2, 3,
Solution:
4 2
- We see that x3 is a Basic Variable.
x3 5x12x2 x4
Min Z 5 x 1 14x 2 7 5 x 1 2 x 2 x 4 9x 4
12x 1 2x 4 35 13
Example 6: Solution
Min Z 5 x 1 14x 2 7 x 3
9x 4 5
s .t x 1 x 13x2x 2 x5x3 4 x4 s1
2 10 s2
x2x 1 2 x 4x 10
and 1 , x 2 , x 3 , x 4 , s 1 , s 2 4 , 0
2
14
θ (Ratio)
B. V. x1 x2 x3 x4 s1 s2 -Z R.H.S
x3 (1) -2 1 1 0 0 0 5 5
s1 -1 -3 0 5 1 0 0 10 -
s2 2 2 0 -4 0 1 0 10 5
s2 0 (6) -2 -6 0 1 0 0 0
CN - ZN 0 -24 12 14 0 0 1 25 B.F.S.=(5,0,0,0,0,15,0)
x1 1 0 1/3 -1 0 1/3 0 5 -
s1 0 0 -2/3 (1) 1 5/6 0 15 15
x2 0 1 -1/3 -1 0 1/6 0 0 -
CN - ZN 0 0 4 -10 0 4 1 25 B.F.S.=(5,0,0,0,15,0)
x1 1 0 -1/3 0 1 7/6 0 20 -
x4 0 0 -2/3 1 1 5/6 0 15 -
x2 0 1 -1 0 1 1 0 15 -
Since c"3 = -8/3 is the most negative cost coefficient, all a"i3 ≤ 0, we
have an unbounded solution.
15