You are on page 1of 11

Linear Programming Simplex Method Instructor: Miss Urooj

Question:
Maximize 𝑍 = 3𝑥1 + 5𝑥2 + 4𝑥3
Subject to, 2𝑥1 + 3𝑥2 ≤ 8
2𝑥1 + 5𝑥3 ≤ 10
3𝑥1 + 2𝑥2 + 4𝑥3 ≤ 15
𝑥1 ≥ 0, 𝑥2 ≥ 0, 𝑥3 ≥ 0
Solution:
Introduce a stack variable in each constrain to change the inequality into equality.
2𝑥1 + 3𝑥2 + 𝑠1 = 8
2𝑥1 + 5𝑥3 + 𝑠2 = 10
3𝑥1 + 2𝑥2 + 4𝑥3 + 𝑠3 = 15

𝑍 = 3𝑥1 + 5𝑥2 + 4𝑥3 + 0𝑠1 + 0𝑠2 + 0𝑠3


𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
And write objective function as,
𝑍 − 3𝑥1 − 5𝑥2 − 4𝑥3 = 0
Initial basic feasible solution.
Substitute the non-basic (zero) variable (𝑥1 , 𝑥2 , 𝑥3 ) = (0,0,0) in all equations.
We get, 𝑍=0
𝑠1 = 8
𝑠2 = 10
𝑠3 = 15

1|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Identify the entering and leaving variables.


The starting simplex table is represented as,
Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁 1 -3 -5 -4 0 0 0 0
𝒔𝟏 0 2 3 0 1 0 0 8 8/3=2.66
𝒔𝟐 0 2 0 5 0 1 0 10 10/0=∞
𝒔𝟑 0 3 2 4 0 0 1 15 15/2= 7.5
*Ignore
Conclusion: 𝑥2 is entering variable, 𝑠1 is the leaving variable, 6 is pivot element
Swap the entering variable and leaving variable in table to produce following set of basic and non-basic variables
non-basic (zero) variable (𝑥1 , 𝑠1 , 𝑥3 ) = (0,0,0)
basic variable (𝑥2 , 𝑠2 , 𝑠3 )
Apply Gauss-Jordan row operations
Reduce pivot element to 1, multiply row 𝑠1 by 1/3
Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁
𝒙𝟐 0 2/3 1 0 1/3 0 0 8/3
𝒔𝟐 0 2 0 5 0 1 0 10
𝒔𝟑

Reduce elements above and below the pivot element to zero.


Multiply 𝑥2 row by 5, and add in 𝑍 row and multiply 𝑥2 by -2 and add in 𝑠3 row.

2|Page
Linear Programming Simplex Method Instructor: Miss Urooj

No operation is required in 𝑠2 row.


Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
1+0 = -3+(10/3)= -5+5= -4+0= 0+5/3= 0+40/3=
𝒁 0 0
1 1/3 0 -4 5/3 40/3
𝒙𝟐 0 2/3 1 0 1/3 0 0 8/3
𝒔𝟐 0 2 0 5 0 1 0 10
3+(-4/3)= 2-2= 4+0= 0+(-2/3)= 15+(-16/3)=
𝒔𝟑 0 0 1
5/3 0 4 -2/3 29/3

Identify the entering and leaving variables.


Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁 1 1/3 0 -4 5/3 0 0 40/3 (40/3)/-4=-3.3
𝒙𝟐 0 2/3 1 0 1/3 0 0 8/3 (8/3)/0=∞
𝒔𝟐 0 2 0 5 0 1 0 10 10/5=2
𝒔𝟑 0 5/3 0 4 -2/3 0 1 29/3 (29/3)/4=2.417
*Ignore
Conclusion: 𝑥3 is entering variable, 𝑠2 is the leaving variable, 5 is pivot element
Swap the entering variable and leaving variable in table to produce following set of basic and non-basic variables
non-basic (zero) variable (𝑥1 , 𝑠1 , 𝑠2 ) = (0,0,0)
basic variable (𝑥2 , 𝑥3 , 𝑠3 )
Apply Gauss-Jordan row operations
Reduce pivot element to 1, multiply row 𝑠2 by 1/5

3|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁
𝒙𝟐
𝒙𝟑 0 2/5 0 1 0 1/5 0 2
𝒔𝟑

Reduce elements above and below the pivot element to zero.


Multiply 𝑥3 row by 4, and add in 𝑍 row
Multiply 𝑥3 row by -4, and add in 𝑠3 row
No operation is required in 𝑥2 row.

Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
1/3+8/5= -4+4= 0+4/5= 40/3+8=
𝒁 1 0 5/3 0
29/15 0 4/5 64/3
𝒙𝟐 0 2/3 1 0 1/3 0 0 8/3
𝒙𝟑 0 2/5 0 1 0 1/5 0 2
5/3+(-8/5)= 4-4= 0+(-4/5)= 29/3+(-8)=
𝒔𝟑 0 0 -2/3 1
1/15 0 -4/5 5/3

4|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Coefficient of
Basic b
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁 1 29/15 0 0 5/3 4/5 0 64/3
𝒙𝟐 0 2/3 1 0 1/3 0 0 8/3
𝒙𝟑 0 2/5 0 1 0 1/5 0 2
𝒔𝟑 0 1/15 0 0 -2/3 -4/5 1 5/3

Answer:
Decision Variables Optimum value
𝒙𝟏 0
𝒙𝟐 8/3
𝒙𝟑 2
𝒁 64/3

Slack variable status


𝑠1 = 0 scarce
𝑠2 = 0 Scarce
𝑠3 = 5/3 Abundant

5|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Question:
A firm produces three products. These products are processed on three different machines. The time required to manufacture
one unit of each of the three products and the daily capacity of the three machines are given as:
Machine Time per unit (minutes) Machine capacity (minutes per day)
Product-1 Product-2 Product-3
M1 2 3 2 440
M2 4 ---- 3 470
M3 2 5 --- 430

It is required to determine the daily number of units to be manufactured for each product. The profit per unit for product 1, 2
and 3 is Rs.4, 3 and 6 respectively. It is assumed that all the amounts produced are consumed in the market.

Solution:

Maximize 𝑍 = 4𝑥1 + 3𝑥2 + 6𝑥3


Subject to,
2𝑥1 + 3𝑥2 + 2𝑥3 ≤ 440
4𝑥1 + 3𝑥3 ≤ 470
2𝑥1 + 5𝑥2 ≤ 430
𝑥1 ≥ 0, 𝑥2 ≥ 0, 𝑥3 ≥ 0

Introduce a stack variable in each constrain to change the inequality into equality.
2𝑥1 + 3𝑥2 + 2𝑥3 + 𝑠1 = 440
4𝑥1 + 3𝑥3 + 𝑠2 = 470
2𝑥1 + 5𝑥2 + 𝑠3 = 430

𝑍 = 4𝑥1 + 3𝑥2 + 6𝑥3 + 0𝑠1 + 0𝑠2 + 0𝑠3


𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0

6|Page
Linear Programming Simplex Method Instructor: Miss Urooj

And write objective function as,


𝑍 − 4𝑥1 − 3𝑥2 − 6𝑥3 = 0
Initial basic feasible solution.
Substitute the non-basic (zero) variable (𝑥1 , 𝑥2 , 𝑥3 ) = (0,0,0) in all equations.
We get, 𝑍=0
𝑠1 = 440
𝑠2 = 470
𝑠3 = 430

Identify the entering and leaving variables.


The starting simplex table is represented as,
Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁 1 -4 -3 -6 0 0 0 0
𝒔𝟏 0 2 3 2 1 0 0 440 440/2=220
𝒔𝟐 0 4 0 3 0 1 0 470 470/3=156
𝒔𝟑 0 2 5 0 0 0 1 430 430/0 = ∞
*Ignore
Conclusion: 𝑥3 is entering variable, 𝑠2 is the leaving variable, 3 is pivot element
Swap the entering variable and leaving variable in table to produce following set of basic and non-basic variables
non-basic (zero) variable (𝑥1 , 𝑥2 , 𝑠2 ) = (0,0,0)
basic variable (𝑠1 , 𝑥3 , 𝑠3 )

7|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Apply Gauss-Jordan row operations


Reduce pivot element to 1, multiply row 𝑠2 by 1/3

Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁
𝒔𝟏
𝒙𝟑 0 4/3 0 1 0 1/3 0 156
𝒔𝟑

Reduce elements above and below the pivot element to zero.


Multiply 𝑥3 row by 6, and add in 𝑍 row.
Multiply 𝑥3 by -2 and add in 𝑠1 row.
No operation is required in 𝑠3 row.

Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
-4+24/3= -6+6= 0+6/3= 0+936=
𝒁 1 -3 0 0
4 0 2 936
2+(-8/3)= 2+(-2)= 0+(-2/3)= 440+(-312)=
𝒔𝟏 0 3 1 0
-2/3 0 -2/3 128
𝒙𝟑 0 4/3 0 1 0 1/3 0 156
𝒔𝟑 0 2 5 0 0 0 1 430

8|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Identify the entering and leaving variables.


Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁 1 4 -3 0 0 2 0 936
𝒔𝟏 0 -2/3 3 0 1 -2/3 0 128 128/3=42.67
𝒙𝟑 0 4/3 0 1 0 1/3 0 156 156/0= ∞
𝒔𝟑 0 2 5 0 0 0 1 430 430/5=86
*Ignore

Conclusion: 𝑥2 is entering variable, 𝑠1 is the leaving variable, 3 is pivot element


Swap the entering variable and leaving variable in table to produce following set of basic and non-basic variables
non-basic (zero) variable (𝑥1 , 𝑠1 , 𝑠2 ) = (0,0,0)
basic variable (𝑥2 , 𝑥3 , 𝑠3 )
Apply Gauss-Jordan row operations

Reduce pivot element to 1, multiply row 𝑠1 by 1/3


Coefficient of
Basic b ratio
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁
𝒙𝟐 0 -2/9 1 0 1/3 -2/9 0 42.67
𝒙𝟑
𝒔𝟑

9|Page
Linear Programming Simplex Method Instructor: Miss Urooj

Reduce elements above and below the pivot element to zero.


Multiply 𝑥2 row by 3, and add in 𝑍 row.
Multiply 𝑥2 by -5 and add in 𝑠3 row.
No operation is required in 𝑥3 row.

Coefficient of
Basic b
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
4+(-2/3)= -3+3= 0 0+1= 2+(-2/3)= 936+128=
𝒁 1 0
10/3 0 1 4/3 1064
𝒙𝟐 0 -2/9 1 0 1/3 -2/9 0 42.67
𝒙𝟑 0 4/3 0 1 0 1/3 0 156
2+(10/9)= 5-5= 0+(-5/3)= 0+(10/9)= 430+(-4267/20)=
𝒔𝟑 0 0 1
28/9 0 -5/3 10/3 216.65

Coefficient of
Basic b
𝒁 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁 1 10/3 0 0 1 4/3 0 1064
𝒙𝟐 0 -2/9 1 0 1/3 -2/9 0 42.67
𝒙𝟑 0 4/3 0 1 0 1/3 0 156
𝒔𝟑 0 28/9 0 0 -5/3 10/3 1 216.65

10 | P a g e
Linear Programming Simplex Method Instructor: Miss Urooj

Answer:
Decision Variables Optimum value Recommendation.
𝒙𝟏 0 Produce 0 units of product 1
𝒙𝟐 42.67 Produce 42.67 units of product 2
𝒙𝟑 156 Produce 156 units of product 3
𝒁 1064 Daily profit is Rs. 1064

Resources Slack variable status


Machine M1 𝑠1 = 0 scarce
Machine M2 𝑠2 = 0 Scarce
Machine M3 𝑠3 = 216.65 Abundant

11 | P a g e

You might also like