0% found this document useful (0 votes)
3K views

Simplex (Minimization Prob)

The document describes solving a linear programming problem using the simplex method. It involves: 1. Converting the minimization problem into a maximization problem by multiplying the objective function by -1. Introducing slack variables to change inequalities into equalities. 2. Setting up the initial simplex table and identifying the entering and leaving variables in each iteration using ratios of right hand sides to coefficients. 3. Performing Gauss-Jordan row operations to reduce the pivot element to 1 and eliminate other elements, arriving at the optimal solution. 4. The optimal solution is given as decision variables x1=4, x2=5, x3=0 with optimal value Z=-11

Uploaded by

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

Simplex (Minimization Prob)

The document describes solving a linear programming problem using the simplex method. It involves: 1. Converting the minimization problem into a maximization problem by multiplying the objective function by -1. Introducing slack variables to change inequalities into equalities. 2. Setting up the initial simplex table and identifying the entering and leaving variables in each iteration using ratios of right hand sides to coefficients. 3. Performing Gauss-Jordan row operations to reduce the pivot element to 1 and eliminate other elements, arriving at the optimal solution. 4. The optimal solution is given as decision variables x1=4, x2=5, x3=0 with optimal value Z=-11

Uploaded by

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

Linear Programming Simplex Method Instructor: Miss Urooj

Question:
Minimize 𝑍 = 𝑥1 − 3𝑥2 + 2𝑥3
Subject to,
3𝑥1 − 𝑥2 + 3𝑥3 ≤ 7
−2𝑥1 + 4𝑥2 ≤ 12
−4𝑥1 + 3𝑥2 + 8𝑥3 ≤ 10
𝑥1 ≥ 0, 𝑥2 ≥ 0, 𝑥3 ≥ 0
Solution:
First convert the problem in to maximization problem.
Multiply the objective function by -1
−𝑍 = −𝑥1 + 3𝑥2 − 2𝑥3
Maximize 𝑍 = −𝑥1 + 3𝑥2 − 2𝑥3 where 𝑍′ = −𝑍

Introduce a stack variable in each constrain to change the inequality into equality.

3𝑥1 − 𝑥2 + 3𝑥3 + 𝑠1 = 7
−2𝑥1 + 4𝑥2 + 𝑠2 = 12
−4𝑥1 + 3𝑥2 + 8𝑥3 + 𝑠3 = 10

𝑍′ = −𝑥1 + 3𝑥2 − 2𝑥3 + 0𝑠1 + 0𝑠2 + 0𝑠3


𝑥1, 𝑥2 , 𝑥3 , 𝑠1, 𝑠2, 𝑠3 ≥ 0
And write objective function as,
𝑍′ + 𝑥1 − 3𝑥2 + 2𝑥3 = 0

1|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Initial basic feasible solution.


Substitute the non-basic (zero) variable (𝑥1 , 𝑥2 , 𝑥3 ) = (0,0,0) in all equations.
We get, 𝑍′ = 0
𝑠1 = 7
𝑠2 = 12
𝑠3 = 10
Identify the entering and leaving variables.
The starting simplex table is represented as,
Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 1 -3 2 0 0 0 0
𝒔𝟏 0 3 -1 3 1 0 0 7 7/-1= -7
𝒔𝟐 0 -2 4 0 0 1 0 12 12/4 = 3
𝒔𝟑 0 -4 3 8 0 0 1 10 10/3 = 3.33
*Ignore
Conclusion: 𝑥2 is entering variable, 𝑠2 is the leaving variable, 4 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 , 𝑥3 ) = (0,0,0)
basic variable (𝑠1, 𝑥2 , 𝑠3)

2|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Apply Gauss-Jordan row operations


Reduce pivot element to 1, multiply row 𝑠2 by ¼

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

Reduce elements above and below the pivot element to zero.


Multiply 𝑥2 row by 3, and add in 𝑍 row
Add 𝑠1row and 𝑥2 row
Multiply 𝑥2 row by 3, and add in 𝑠3 row

Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 -1/2 0 2 0 3/4 0 9
𝒔𝟏 0 5/2 0 3 1 1/4 0 10
𝒙𝟐 0 -1/2 1 0 0 1/4 0 3
𝒔𝟑 0 -5/2 0 8 0 -3/4 1 1

3|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Identify the entering and leaving variables.


Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 -1/2 0 2 0 3/4 0 9
𝒔𝟏 0 5/2 0 3 1 1/4 0 10 10/(5/2)= 4
𝒙𝟐 0 -1/2 1 0 0 1/4 0 3 3/(-1/2)= -6
𝒔𝟑 0 -5/2 0 8 0 -3/4 1 1 1/(-5/2)=-2/5
*Ignore
Conclusion: 𝑥1 is entering variable, 𝑠1 is the leaving variable, 5/2 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, 𝑥3 ) = (0,0,0)
basic variable (𝑥1 , 𝑥2 , 𝑠3)
Apply Gauss-Jordan row operations
Reduce pivot element to 1, multiply row 𝑠1 by 2/5

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

4|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Reduce elements above and below the pivot element to zero.


Multiply 𝑥1 row by 1/2, and add in 𝑍 row
Multiply 𝑥1 row by 1/2, and add in 𝑥2 row
Multiply 𝑥1 row by 5/2, and add in 𝑠3 row
Coefficient of
Basic b
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 0 0 13/5 1/5 8/10 0 11
𝒙𝟏 0 1 0 6/5 2/5 1/10 0 4
𝒙𝟐 0 0 1 3/5 1/5 3/10 0 5
𝒔𝟑 0 0 0 11 1 -1/2 1 11

𝑍′ = −𝑍 = −11
Answer:
Decision Variables Optimum value
𝒙𝟏 4
𝒙𝟐 5
𝒙𝟑 0
𝒁 -11

Slack variable status


𝑠1 = 0 scarce
𝑠2 = 0 Scarce
𝑠3 = 11 Abundant

5|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Question:
Minimize 𝑍 = 5𝑥1 − 4𝑥2 + 6𝑥3 − 8𝑥4
Subject to,
𝑥1 + 2𝑥2 + 2𝑥3 + 4𝑥4 ≤ 40
2𝑥1 − 𝑥2 + 𝑥3 + 2𝑥4 ≤ 8
−4𝑥1 + 2𝑥2 − 𝑥3 + 𝑥4 ≥ −10
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ≥ 0
Solution:
First convert the problem in to maximization problem.
Multiply the objective function by -1
−𝑍 = −5𝑥1 + 4𝑥2 − 6𝑥3 + 8𝑥4
Maximize 𝑍 = −5𝑥1 + 4𝑥2 − 6𝑥3 + 8𝑥4 where 𝑍 ′ = −𝑍

Also multiply the third constrain by -1 to change the inequality


4𝑥1 − 2𝑥2 + 𝑥3 − 𝑥4 ≤ 10
Introduce a stack variable in each constrain to change the inequality into equality.

𝑥1 + 2𝑥2 + 2𝑥3 + 4𝑥4 + 𝑠1 = 40


2𝑥1 − 𝑥2 + 𝑥3 + 2𝑥4 + 𝑠2 = 8
4𝑥1 − 2𝑥2 + 𝑥3 − 𝑥4 + 𝑠3 = 10

𝑍 = −5𝑥1 + 4𝑥2 − 6𝑥3 + 8𝑥4 + 0𝑠1 + 0𝑠2 + 0𝑠3
𝑥1, 𝑥2 , 𝑥3 , 𝑠1, 𝑠2, 𝑠3 ≥ 0
And write objective function as,
𝑍′ + 5𝑥1 − 4𝑥2 + 6𝑥3 − 8𝑥4 = 0

6|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Initial basic feasible solution.


Substitute the non-basic (zero) variable (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 ) = (0,0,0,0) in all equations.
We get, 𝑍′ = 0
𝑠1 = 40
𝑠2 = 8
𝑠3 = 10
Identify the entering and leaving variables.
The starting simplex table is represented as,
Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 5 -4 6 -8 0 0 0 0
𝒔𝟏 0 1 2 2 4 1 0 0 40 40/4= 10
𝒔𝟐 0 2 -1 1 2 0 1 0 8 8/2 = 4
𝒔𝟑 0 4 -2 1 -1 0 0 1 10 10/-1 =-10
*Ignore
Conclusion: 𝑥4 is entering variable, 𝑠2 is the leaving variable, 2 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 , 𝑥3 , 𝑠2) = (0,0,0,0)
basic variable (𝑠1, 𝑥4 , 𝑠3)

7|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Apply Gauss-Jordan row operations


Reduce pivot element to 1, multiply row 𝑠2 by ½

Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′
𝒔𝟏
𝒙𝟒 0 1 -1/2 1/2 1 0 1/2 0 4
𝒔𝟑

Multiply 𝑥4 row by 8, and add in 𝑍 row


Multiply 𝑥4 row by -4, and add in 𝑠1 row
Add 𝑥4 and 𝑠3 row

Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 13 -8 10 0 0 4 0 32
𝒔𝟏 0 -3 4 0 0 1 -2 0 24
𝒙𝟒 0 1 -1/2 1/2 1 0 1/2 0 4
𝒔𝟑 0 5 -5/2 3/2 0 0 1/2 1 14

8|P age
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 13 -8 10 0 0 4 0 32
𝒔𝟏 0 -3 4 0 0 1 -2 0 24 24/4=6
𝒙𝟒 0 1 -1/2 1/2 1 0 1/2 0 4 4/(-1/2)=-8
𝒔𝟑 0 4 -2.5 1 -1 0 0 1 10 10/-2.5=-2.5
*Ignore
Conclusion: 𝑥2 is entering variable, 𝑠1 is the leaving variable, 4 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 , 𝑠2) = (0,0,0,0)
basic variable (𝑥2 , 𝑥4 , 𝑠3)
Apply Gauss-Jordan row operations
Reduce pivot element to 1, multiply row 𝑠1 by ¼
Coefficient of
Basic b ratio
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′
𝒙𝟐 0 -3/4 1 0 0 1/4 -1/2 0 6
𝒙𝟒
𝒔𝟑

9|P age
Linear Programming Simplex Method Instructor: Miss Urooj

Multiply 𝑥2 row by 8, and add in 𝑍 row


Multiply 𝑥2 row by 1/2, and add in 𝑥4 row
Multiply 𝑥2 row by 2, and add in 𝑠3 row
Coefficient of
Basic b
𝒁′ 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒔𝟏 𝒔𝟐 𝒔𝟑
𝒁′ 1 7 0 10 0 2 0 0 80
𝒙𝟐 0 -3/4 1 0 0 1/4 -1/2 0 6
𝒙𝟒 0 5/8 0 1/2 1 1/8 1/4 0 7
𝒔𝟑 0 25/8 0 3/2 0 5/8 -3/4 1 29

𝑍′ = −𝑍 = −80
Answer:
Decision Variables Optimum value
𝒙𝟏 0
𝒙𝟐 6
𝒙𝟑 0
𝒙𝟒 7
𝒁 -80

Slack variable status


𝑠1 = 0 scarce
𝑠2 = 0 Scarce
𝑠3 = 29 Abundant

10 | P a g e

You might also like