1
Simplex Method- Problem Examples
Problem Example (1)
A company manufactures three products A, B, and C using three resources, R1, R2,
and R3. Defining variables 𝑥1 , 𝑥2 and 𝑥3 as the number of units of products A, B, and C
respectively, and variables 𝑠1 , 𝑠2 and 𝑠3 as the slacks of resources R1, R2, and R3
respectively, the following table represents a specific simplex iteration. All variables
are nonnegative. The table is not optimal for a maximization problem.
Basic 𝒛 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑 Solution
𝒛 1 6 −7 15 630
2 1 1
𝒙𝟑 0 3 3 3
14
2 1 2
𝒔𝟐 0 3 3
−
3
12
1 1 1
𝒔𝟑 0 3 6
−
3
31
a. Categorize the variables as basic and nonbasic and provide the current values of all
the variables
b. Complete the previous simplex table
c. What is the maximum number of Basic Solutions for this problem
d. Determine the effect of entering 𝑠1 by one unit on the values of 𝑧, 𝑥3 , 𝑠2 , 𝑎𝑛𝑑 𝑠3
e. Determine the entering variable and the leaving variable according to optimality
and feasibility conditions
f. If the optimum solution for this problem is: 𝑥3 = 2, 𝑥2 = 36, 𝑠3 = 25 and 𝑥1 =
𝑠1 = 𝑠2 = 0. Determine the status of each resource
2
Solution
a. Categorize the variables as basic and nonbasic and provide the current values
of all the variables
Basic variables Nonbasic (zero) variables
𝒙𝟑 = 14 units 𝒙𝟏 = 0 units
𝒔𝟐 = 12 units 𝒙𝟐 = 0 units
𝒔𝟑 = 31 units 𝒔𝟏 = 0 units
𝒛 = 630
Remember that:
− Basic variables are listed in the Basic column and their values in the Solution
column
− Nonbasic variables (those not listed in the Basic column) always equal zero.
b. Complete the previous simplex table
Basic 𝒛 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑 Solution
𝒛 1 6 −7 0 15 0 0 630
2 1 1
𝒙𝟑 0 3 3
1 3
0 0 14
2 1 2
𝒔𝟐 0 3 3
0 −
3
1 0 12
1 1 1
𝒔𝟑 0 3 6
0 −
3
0 1 31
Remember that:
− Basic variables that listed in the Basic column must have a unit column (column
with intersection element equals one, and all other elements equal zero)
c. What is the maximum number of Basic Solutions for this problem
The problem consists of a set of 3 equations (𝑚) and 6 variables (𝑛). Thus, the
maximum number of Basic Solutions is:
𝑛! 6!
𝑛
𝐶𝑚 = = 𝐶36 = = 20
𝑚! × (𝑛 − 𝑚)! 3! × (6 − 3)!
3
d. Determine the effect of entering 𝒔𝟏 by one unit on the values of 𝒛, 𝒙𝟑 , 𝒔𝟐 , 𝒂𝒏𝒅 𝒔𝟑
Basic 𝒛 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒔𝟏 𝒔𝟐 𝒔𝟑 Solution
𝒛 1 6 −7 0 15 0 0 630
2 1 1
𝒙𝟑 0 3 3
1 3
0 0 14
2 1 2
𝒔𝟐 0 3 3
0 −
3
1 0 12
1 1 1
𝒔𝟑 0 3 6
0 −
3
0 1 31
𝒛 → Will decrease the value of 𝒛 by 15 units because the parameter of 𝒔𝟏 is positive
𝒙𝟑 → Will decrease the value of 𝒙𝟑 by 𝟏⁄𝟑 unit because the parameter of 𝒔𝟏 is positive
𝒔𝟐 → Will increase the value of 𝒔𝟐 by 𝟐⁄𝟑 unit because the parameter of 𝒔𝟏 is negative
𝒔𝟑 → Will increase the value of 𝒔𝟑 by 𝟏⁄𝟑 unit because the parameter of 𝒔𝟏 is negative
e. Determine the entering variable and the leaving variable according to
optimality and feasibility conditions
− According to optimality condition, the entering variable is (𝒙2 ) because it has the
only negative coefficient in the z-row(−7).
− According to feasibility condition, the leaving variable is determined by
computing the ratios of solution column values to the corresponding coefficients
under the entering variable (𝒙𝟐 ) as the following table shows:
Basic Entering (𝒙𝟐 ) Solution Ratio
1 1
𝒙𝟑 14 𝑥2 = 14 ÷ = 42
3 3
1 1
𝒔𝟐 12 𝑥2 = 12 ÷ = 36 ← minimum
3 3
1 1
𝒔𝟑 31 𝑥2 = 31 ÷ = 186
6 6
Conclusion: 𝒔𝟐 leaves the basic solution
4
f. Determine the status of each resource from the optimum solution
− According to the optimum solution,
Resource Slack value Status
R1 𝒔𝟏 = 0 Scarce
R2 𝒔𝟐 = 0 Scarce
R3 𝒔𝟑 = 25 Abundant
Problem Example (2)
The following table represents a specific simplex iteration. All variables are
nonnegative. The table is not optimal for a maximization problem. Thus, when a
nonbasic variable enters the solution it can either increase or decrease 𝑧 or leave it
unchanged, depending on the parameters of the entering nonbasic variable.
Basic 𝒛 𝒙𝟏 𝒙𝟐 𝒙𝟑 𝒙𝟒 𝒙𝟓 𝒙𝟔 𝒙𝟕 Solution
𝒛 1 0 −5 0 4 −4 0 0 620
𝒙𝟕 0 0 3 0 −2 −3 5 1 12
𝒙𝟑 0 0 1 1 3 0 3 0 6
𝒙𝟏 0 1 −1 0 0 2 1 0 14
a. Categorize the variables as basic and nonbasic and provide the current values of all
the variables
b. Is it always better selecting x2 to enter the solution than selecting x5 (since the
objective coefficient of x2 is −5 and the objective coefficient of x5 is −4)?
c. Which nonbasic variable(s) will not cause a change in the value of 𝑧 when selected
to enter the solution?
5
Solution
a. Categorize the variables as basic and nonbasic and provide the current values
of all the variables
Basic variables Nonbasic (zero) variables
𝒙𝟕 = 12 𝒙𝟐 = 0
𝒙𝟑 = 6 𝒙𝟒 = 0
𝒙𝟏 = 14 𝒙𝟓 = 0
𝒙𝟔 = 0
𝒛 = 620
b. Is it always better selecting 𝒙𝟐 to enter the solution than selecting 𝒙𝟓 (since
the objective coefficient of 𝒙𝟐 = −𝟓 and the objective coefficient of 𝒙𝟓 = −𝟒)?
Although the objective coefficient of 𝑥2 (−5) is higher than the objective coefficient of
𝑥5 (−4), selecting x2 to enter the solution is not always better than selecting x5
because preference is determined by the corresponding change of 𝑧 value (∆ 𝑧)
associated with entering each of the two variables, where:
∆ 𝑧 = The maximum number of units that can be entered from nonbasic variable
× its objective coefficient
Remember that:
The maximum number of units that can be entered from nonbasic variable equals to
the minimum nonnegative ratio
6
− ∆ 𝒛 associated with entering 𝒙𝟐
✓ Objective coefficient of 𝑥2 = 5
✓ The maximum number of units that can be entered from 𝑥2 :
Basic Entering (𝒙𝟐 ) Solution Ratio
12
𝒙𝟕 3 12 𝑥3 = =4 ← minimum
3
6
𝒙𝟑 1 6 𝑥3 = =6
1
14
𝒙𝟏 −1 14 𝑥3 = = −14 ← ignore
−1
∴ 𝒙𝟕 leaves and the maximum number of units that can be entered from 𝒙𝟐 is 4
∴ ∆𝑧 = 4×5
= 20
− ∆ 𝒛 associated with entering 𝒙𝟓
✓ Objective coefficient of 𝑥5 = 4
✓ The maximum number of units that can be entered from 𝑥5 :
Basic Entering (𝒙𝟓 ) Solution Ratio
12
𝒙𝟕 −3 12 𝑥3 = = −4 ← ignore
−3
6
𝒙𝟑 0 6 𝑥3 = =∞ ← ignore
0
14
𝒙𝟏 2 14 𝑥3 = =7 ← minimum
2
∴ 𝒙𝟏 leaves and the maximum number of units that can be entered from 𝒙𝟓 is 7
∴ ∆𝑧 = 7×4
= 28
Conclusion: in this case, selecting 𝑥5 to enter the solution is better than
selecting 𝑥2
7
c. Which nonbasic variable(s) will not cause a change in the value of 𝒛 when
selected to enter the solution?
Nonbasic 𝒙6 cannot change the value of z because its objective coefficient equals to
zero
Problem Example (3)
Consider the following system of equations:
𝑥1 + 2 𝑥2 − 3 𝑥3 + 5 𝑥4 + 𝑠1 =4
5 𝑥1 − 2 𝑥2 + 6 𝑥4 + 𝑠2 =8
2 𝑥1 + 3 𝑥2 + 2 𝑥3 + 3 𝑥4 + 𝑠3 = 3
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
Let 𝑠1 , 𝑠2 and 𝑠3 be a given initial basic feasible solution. Suppose that 𝑥1
becomes basic (entering variable). Which of the given basic variables must
become nonbasic (leaving variable) at zero level to guarantee that all the
variables remain nonnegative, and what is the value of 𝑥1 in the new solution?
Repeat this procedure for 𝑥2 , 𝑥3 and 𝑥4
Solution
According to feasibility condition, the leaving variable is determined by
computing the ratios of right-hand-side values (solution column) to the
corresponding coefficients of the entering variable as follows:
− 𝒙𝟏 becomes basic (entering variable)
Basic Entering (𝒙𝟏 ) Solution Ratio
4
𝒔𝟏 1 4 𝑥1 = =4
1
8
𝒔𝟐 5 8 𝑥1 =
5
3
𝒔𝟑 2 3 𝑥1 = ← minimum
2
3
Conclusion: 𝒔𝟑 becomes nonbasic and new value of 𝒙𝟏 is
2
8
− 𝒙𝟐 becomes basic (entering variable)
Basic Entering (𝒙𝟐 ) Solution Ratio
4
𝒔𝟏 2 4 𝑥2 = =2
2
8
𝒔𝟐 −2 8 𝑥2 = = −4 ← ignore
−2
3
𝒔𝟑 3 3 𝑥2 = = 1 ← minimum
3
Conclusion: 𝒔𝟑 becomes nonbasic and new value of 𝒙𝟐 is 1
− 𝒙𝟑 becomes basic (entering variable)
Basic Entering (𝒙𝟑 ) Solution Ratio
4 4
𝒔𝟏 −3 4 𝑥3 = =− ← ignore
−3 3
8
𝒔𝟐 0 8 𝑥3 = =∞ ← ignore
0
3
𝒔𝟑 2 3 𝑥3 = ← minimum
2
3
Conclusion: 𝒔𝟑 becomes nonbasic and new value of 𝒙𝟑 is
2
9
− 𝒙𝟒 becomes basic (entering variable)
Basic Entering (𝒙𝟒 ) Solution Ratio
4
𝒔𝟏 5 4 𝑥4 = ← minimum
5
8
𝒔𝟐 6 8 𝑥4 =
6
3
𝒔𝟑 3 3 𝑥4 = = 1
3
4
Conclusion: 𝒔𝟏 becomes nonbasic and new value of 𝒙𝟑 is
5
Problem Example (4)
Consider the following LP:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 𝑥1
Subject to
5 𝑥1 ≤ 4
6 𝑥1 ≤ 8
3 𝑥1 ≤ 3
𝑥1 ≥ 0
Solve the problem by inspection (do not use row operations).
Solution
− Converting inequalities into equations with nonnegative right-hand side
5 𝑥1 + 𝑠1 =4
6 𝑥1 + 𝑠2 =8
3 𝑥1 + 𝑠3 = 3
𝑥1 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
− 𝑠1 , 𝑠2 and 𝑠3 be an initial basic feasible solution.
− Nonbasic 𝒙𝟏 becomes basic (entering variable) because it is the only nonbasic
variable
10
− The leaving variable is determined by computing the ratios of right-hand-side
values (solution column) to the corresponding coefficients of the entering
variable (𝒙𝟏 ) as the following table shows:
Basic Entering (𝒙𝟏 ) Solution Ratio
4
𝒔𝟏 5 4 𝑥4 = ← minimum
5
8
𝒔𝟐 6 8 𝑥4 =
6
3
𝒔𝟑 3 3 𝑥4 = = 1
3
4
Conclusion: 𝒔𝟏 becomes nonbasic and new value of 𝒙𝟏 is
5
− New value of 𝒔𝟏 = 0 because it becomes nonbasic variable
− New value of 𝒔𝟐 :
6 𝑥1 + 𝑠2 = 8
4
6 × + 𝑠2 = 8
5
24
+ 𝑠2 = 8
5
24
𝑠2 = 8 −
5
16
∴ 𝑠2 =
5
− New value of 𝒔𝟑 :
3 𝑥1 + 𝑠3 = 3
4
3 × + 𝑠3 = 3
5
12
+ 𝑠3 = 3
5
11
12
𝑠3 = 3 −
5
3
∴ 𝑠3 =
5
− New value of 𝒛:
𝑧 = 𝑥1
4
𝑧 =
5
4 16 3 4
∴ The optimum solution for this problem is: 𝑥1 = , 𝑠1 = 0, 𝑠2 = , 𝑠3 = and 𝑧 =
5 5 5 5
Problem Example (5)
Solve the following problem by inspection (do not use row operations).
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑧 = 5 𝑥1 − 6 𝑥2 + 3 𝑥3 − 5 𝑥4 + 12 𝑥5
Subject to
𝑥1 + 3 𝑥2 + 5 𝑥3 + 6 𝑥4 + 3 𝑥5 ≤ 90
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 ≥ 0
(Hint: A basic solution consists of one variable only.)
Solution
− Converting inequality into equation with nonnegative right-hand side
𝑥1 + 3 𝑥2 + 5 𝑥3 + 6 𝑥4 + 3 𝑥5 + 𝑠1 = 90
𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑠1 ≥ 0
− 𝑠1 be an initial basic feasible solution.
− Nonbasic 𝒙𝟏 , 𝒙𝟑 , and 𝒙𝟓 will improve solution
− Preference is determined by the corresponding change of 𝑧 value (∆ z) associated
with entering each of the three variables, where:
∆ 𝑧 = The maximum number of units that can be entered from nonbasic variable
× its objective coefficient
12
Remember that:
The maximum number of units that can be entered from nonbasic variable equals to
the minimum nonnegative ratio
− ∆ 𝒛 associated with entering 𝒙𝟏
✓ Objective coefficient of 𝑥1 = 5
✓ The maximum number of units that can be entered from 𝑥1 :
Basic Entering (𝒙𝟏 ) Solution Ratio
90
𝒔𝟏 1 90 𝑥1 = = 90
1
∴ 𝒔𝟏 leaves and the maximum number of units that can be entered from 𝒙𝟏 is 90
∴ ∆ 𝑧 = 90 × 5
= 450
− ∆ 𝒛 associated with entering 𝒙𝟑
✓ Objective coefficient of 𝑥3 = 3
✓ The maximum number of units that can be entered from 𝑥3 :
Basic Entering (𝒙𝟑 ) Solution Ratio
90
𝒔𝟏 5 90 𝑥3 = = 18
5
∴ 𝒔𝟏 leaves and the maximum number of units that can be entered from 𝒙𝟑 is 18
∴ ∆ 𝑧 = 18 × 3
= 54
13
− ∆ 𝒛 associated with entering 𝒙𝟓
✓ Objective coefficient of 𝑥5 = 12
✓ The maximum number of units that can be entered from 𝑥5 :
Basic Entering (𝒙𝟓 ) Solution Ratio
90
𝒔𝟏 3 90 𝑥5 = = 30
3
∴ 𝒔𝟏 leaves and the maximum number of units that can be entered from 𝒙𝟓 is 18
∴ ∆ 𝑧 = 30 × 12
= 360
Conclusion: in this case, selecting 𝑥1 to enter the solution is better than
selecting 𝑥3 or 𝑥5
∴ The optimum solution for this problem is: 𝑥1 = 90, 𝑥2 = 𝑥3 = 𝑥4 = 𝑥5 = 𝑠1 = 0,
and 𝑧 = 450