0% found this document useful (0 votes)
8 views

Lab 3 OR Operations Research

The document provides examples of solving linear programming problems using the simplex method. Example 1 maximizes an objective function subject to two constraints and arrives at an optimal solution. Example 2 minimizes an objective function subject to three constraints and finds the optimal solution. Example 3 has an unbounded solution as one coefficient is negative. Example 4 has an infinite number of solutions.

Uploaded by

bnzayd2005
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lab 3 OR Operations Research

The document provides examples of solving linear programming problems using the simplex method. Example 1 maximizes an objective function subject to two constraints and arrives at an optimal solution. Example 2 minimizes an objective function subject to three constraints and finds the optimal solution. Example 3 has an unbounded solution as one coefficient is negative. Example 4 has an infinite number of solutions.

Uploaded by

bnzayd2005
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Section 3

Solving Linear Programming Problem


The Simplex Method Examples
Example 1
Solve the following L.P.P:
Max z = 2 x1 + x2 + 3 x3
Subject to
x1 + 3 x2
+2 x3 ≤6 x1 -
x2
+ 3 x3 ≤
9
and Min z = -2 x1 - x2 - 3 x3
-2 x1 - x2 - 3 x3 – z=0
S.t.x1 , x2 , x3 ≥
x1 + 3 x2 +2 x3 =6
0 + s1 x1 - x2 + 3 x3 + s2 = 9
and
Solution: First, convert xit1 to, xthe
2 , s1 , s2 ≥ 0 .
standard
form, We addS1slacks
Where: and Sto2 get:
are slack variables.
We solve by the simplex tableau as follows:
2
Departing Variable Min. Ratio
Interning Variable

Pivot element Most negative

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)

X3 1/2 3/2 1 1/2 0 0 3 3/0.5=6


S2 -1/2 -11/2 0 -3/2 1 0 0 -

CN - ZN -1/2 7/2 0 3/2 0 1 9 B.F.S.=(0,0,3,0,0)

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

Where: S1 , S2 , S3 are slack variables. We solve by the


12 simplex
tableau as follows: -4x1 + 3 x2 +8x3 + S3 = 10
- So we can use S1 , S2 ,and S3 as the initial basis (Basic
Feasible Solution).
m=3, n=6, m-n=6-3=3.
- The initial basis: BFS
x x s1 s s
 x 1
2 3 2
3
z  0
,
 0 0 0 7 12 1 0
 5
B. V. x1 x2 x3 S1 S2 S3 -Z R.H.S θ (Ratio)

-
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

S1 (5/3) 0 14/3 1 0 1/3 0 31/3 31/5

S2 -22/3 0 22/3 0 1 4/3 0 76/3 -

x2 -4/3 1 8/3 0 0 1/3 0 10/3 -

CN - ZN -3 0 11 0 0 1 1 -10 B.F.S.=(0,10/3,0,31/3,76/3,0)

x1 1 0 14/5 3/5 0 1/5 0 31/5

S2 0 0 156/5 22/5 1 14/5 0 354/5

x2 0 1 32/5 4/5 0 3/5 0 58/5

CN - ZN 0 0 97/5 9/5 0 8/5 1 -143/5 B.F.S.=(31/5,58/5,0,0,354/5,0)

- Since: CN - ZN is non-negative under all variable columns. Then, we have


optimal solution.
- Optimal Solution is: x1 = 31/5, x2 = 58/5 , x3 =0, Zmin =-143/5.

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 .

where S1 and S2 are slack variables. We solve by the simplex


tableau as follows:

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 .

where S1 , S2 and S3 are slack variables. We solve by the simplex tableau


as follows:
9
Example 4 : Solution (Infinite number of solutions)

θ
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

x2 4/10 1 0 1/10 0 0 200

S3 8/10 0 0 -3/10 1 0 300

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  6x32x4
 3x6 4x
 x1 7x20
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
6x32x4  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 

360  5 x 3  3x 4  x 6   3x 6  13x 3  6x 4  2x 6 110


11
B. V. x1 x2 x3 x4 x5 x6 x7 -Z R.H.S θ (Ratio)

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 -24 6 55 0 1 -4 0 1 170 B.F.S.=(0,0,0,10,0,0,30)


x1 1 -1/3 -4/3 0 0 -1/6 1/6 0 0 -
x4 0 -1/3 5/3 1 0 -5/3 4/6 0 10 -
x5 0 1 -10 0 1 (4) -2 0 30 30/4
CN - ZN 0 -2 23 0 0 -8 4 1 170 B.F.S.=(0,0,0,10,0,0,30)

x1 1 -7/24 -7/4 0 1/24 0 1/12 0 5/4

x4 0 1/12 -5/2 1 5/12 0 -1/6 0 45/2

x6 0 1/4 -5/2 0 1/4 1 -1/2 0 15/2

CN - ZN 0 0 3 0 2 0 0 1 230 B.F.S.=(5/4,0,0,45/2,0,15/2,0)

- Since: CN - ZN is non-negative under all variable columns. Then, we have


optimal solution.
- Optimal Solution is: x1 = 5/4, x4 = 45/2 , x6 =15/2, Zmin =-230.
12
Example 6 :Unbounded solution
Solve the following L.P.P:
Min Z  5 x 1 14x 2  7 x 3  9x
4

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  5x12x2 x4

- We know that the objective function given in terms of non-basic


variables.
So we eliminate B.V. from O.F. So, Sub by x3 in O.F.

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

First, convert it to the standard form, We add slacks to get:

Min Z  5 x 1 14x 2  7 x 3 
9x 4 5
s .t  x 1 x 13x2x 2 x5x3 4 x4 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

where S1 and S2 are slack variables. We solve by the


simplex tableau as follows:

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

CN - ZN -12 0 0 2 0 0 1 -35 B.F.S.=(0,0,5,0,10,10)


x1 1 -2 1 1 0 0 0 5 -
s1 0 -5 1 6 1 0 0 15 -

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 -

CN - ZN 0 0 -8/3 0 10 74/6 1 175

Since c"3 = -8/3 is the most negative cost coefficient, all a"i3 ≤ 0, we
have an unbounded solution.

15

You might also like