0% found this document useful (0 votes)
77 views19 pages

Attendance5 1

The document discusses the simplex method for solving linear programming problems. It introduces slack variables to ensure feasible solutions. Slack variables are added to constraints such that the constraints hold as equalities. For example, a constraint of "x + 2y ≤ 8" would be rewritten as "x + 2y + s1 = 8" where s1 is the slack variable. Slack variables allow the problem to have corner point solutions and for the simplex method to iteratively move between corner points to find the optimal solution. The simplex method proceeds by identifying a pivot element and pivoting the tableau to create a new tableau, moving the problem closer to optimality at each step.

Uploaded by

Endashaw Debru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views19 pages

Attendance5 1

The document discusses the simplex method for solving linear programming problems. It introduces slack variables to ensure feasible solutions. Slack variables are added to constraints such that the constraints hold as equalities. For example, a constraint of "x + 2y ≤ 8" would be rewritten as "x + 2y + s1 = 8" where s1 is the slack variable. Slack variables allow the problem to have corner point solutions and for the simplex method to iteratively move between corner points to find the optimal solution. The simplex method proceeds by identifying a pivot element and pivoting the tableau to create a new tableau, moving the problem closer to optimality at each step.

Uploaded by

Endashaw Debru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

70

Chapter 5

Linear Programming: The Simplex


Method

We look at how to solve linear programming problems using an algebraic approach,


called simplex method (algorithm). This algorithm, unlike geometric approach de-
scribed in previous chapter, is able to solve linear programming problems with more
than two variables. We first look at solving a special kind of linear programming prob-
lem called standard maximization problem which involves slack variables and pivoting.
In later sections, we look at solving nonstandard linear programming problems using
both Crown’s Rules and duality.

5.1 Slack Variables and Pivoting


Simplex method is an iterative procedure which corresponds, geometrically, to moving
from one feasible corner point to another until optimal feasible point is located. Slack
variables are introduced to ensure corner points are feasible, not outside solution
region. Algebraically, hopping from one feasible corner point to another corresponds
to repeatedly identifying pivot column, pivot row and, consequently, pivot element,
in a succession of matrix tableaus. Having identified pivot element, a new tableau is
created by pivoting (by using Gauss–Jordan method) on this element. We consider
slack variables and pivoting in standard maximization problem in this section,
∙ objective function linear and is maximized,

∙ variables all nonnegative,

∙ structural constraints all of form 𝑎𝑥 + 𝑏𝑦 + ⋅ ⋅ ⋅ ≤ 𝑐, where 𝑐 ≥ 0.

Exercise 5.1 (Slack Variables and Pivoting)


1. Standard maximization problem?

71
72 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

(a) Linear programming problem,


Maximize 4x + 2y + 3z
subject to 0.1x + 0.25y ≤ 40
0.22x + 0.3y + 0.4z ≤ 100
x ≥ 0
y ≥ 0
z ≥ 0
is / is not a standard maximization problem because
i. it obeys three conditions.
ii. objective function minimized (rather than maximized).
iii. constraints not all written with less than or equal to signs,“≤”.
iv. right–hand–sides not all nonnegative.
(b) Linear programming problem,
Minimize -2x - 3y
subject to 5x + 4y ≤ 32
x + 2y ≤ 10
x ≥ 0
y ≥ 0
is / is not a standard maximization problem because
i. it obeys three conditions.
ii. objective function minimized (rather than maximized).
iii. constraints not all written with less than or equal to signs,“≤”.
iv. right–hand–sides not all nonnegative.
(c) Linear programming problem,
Maximize 2x - 3y
subject to 3x + 5y ≥ 20
3x + y ≤ 16
-2x + y = 1
x ≥ 0
y ≥ 0
is / is not a standard maximization problem because
i. it obeys three conditions.
ii. objective function minimized (rather than maximized).
iii. constraints not all written with less than or equal to signs,“≤”.
iv. right–hand–sides not all nonnegative.
(d) Linear programming problem,
Section 1. Slack Variables and Pivoting (LECTURE NOTES 5) 73

Maximize 2x - 3y
subject to 3x + 5y ≤ 20
-3x - y ≥ -16
-2x + y ≤ 1
x ≥ 0
y ≥ 0
is / is not a standard maximization problem because
i. it obeys three conditions.
ii. objective function minimized (rather than maximized).
iii. constraints not all written with less than or equal to signs,“≤”.
iv. right–hand–sides not all nonnegative.
If both sides of constraint −3𝑥 − 𝑦 ≥ −16 multiplied by −1, LP problem
becomes / does not become standard maximization problem.

2. Slack variables. Consider following standard maximization problem.

Maximize 6x + 4y
subject to x + 2y ≤ 8
2x + y ≤ 10
x ≥ 0
y ≥ 0

y y
10
(0,10) s1 = -12, s2 = 0 (0,10)
(0,10)
y
8 2x + y = 10 (s2 zero) 2x + y = 10 (s2 zero)
8
8

6 6
6 s2 negative
(0,4) s1 = 0, s 2 = 6 (0,4)
(0,4)
4 s1 negative
(4,2) (4,2) s1 = 0, s 2 = 0
(4,2) 2 2 feasible
2
s1 positive s2 positive region x + 2y = 8 (s1 zero)
x + 2y = 8 (s1 zero)
x x
x (0,0) 2 4 6 8 10 2 4 6 10
(0,0) 2 4 6 8 10 s1 = 8, s 2 = 10 (0,0) (8,0)
(5,0) (8,0) (5,0) (8,0) (5,0)
s1 = 3, s 2 = 0 s1 = 0, s 2 = -6

Figure 5.1 (Slack variables and feasible region)

(a) Slack variable 𝑠1 for 𝑥 + 2𝑦 ≤ 8.


Introduce slack 𝑠1 so 𝑥 + 2𝑦 + 𝑠1 = 8, or 𝑠1 = 8 − (𝑥 + 2𝑦).
i. If 𝑥 + 2𝑦 = 8, then 𝑠1 = negative / zero / positive
ii. If 𝑥 + 2𝑦 < 8, then 𝑠1 = negative / zero / positive
iii. If 𝑥 + 2𝑦 > 8, then 𝑠1 = negative / zero / positive
(b) More on slack variable 𝑠1 for 𝑥 + 2𝑦 ≤ 8.
i. If (𝑥, 𝑦) = (0, 0), then 𝑠1 = 8 − (𝑥 + 2𝑦) = 8 − (0 + 2(0)) = 0 / 3 / 8
ii. If (𝑥, 𝑦) = (0, 4), then 𝑠1 = 8 − (0 + 2(4)) = 0 / 3 / 8
74 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

iii. If (𝑥, 𝑦) = (0, 10), then 𝑠1 = 8 − (0 + 2(10)) = 0 / −12 / −20


iv. If (𝑥, 𝑦) = (4, 2), then 𝑠1 = 8 − (4 + 2(2)) = 0 / 3 / 8
v. If (𝑥, 𝑦) = (5, 0), then 𝑠1 = 8 − (5 + 2(0)) = 0 / 3 / 8
vi. If (𝑥, 𝑦) = (8, 0), then 𝑠1 = 8 − (8 + 2(0)) = 0 / 3 / 8
(c) Slack variable 𝑠2 for 2𝑥 + 𝑦 ≤ 10.
Introduce slack 𝑠2 so 2𝑥 + 𝑦 + 𝑠2 = 10, or 𝑠2 = 10 − (2𝑥 + 𝑦).
i. If 2𝑥 + 𝑦 = 10, then 𝑠2 = negative / zero / positive
ii. If 2𝑥 + 𝑦 < 10, then 𝑠2 = negative / zero / positive
iii. If 2𝑥 + 𝑦 > 10, then 𝑠2 = negative / zero / positive
(d) More on slack variable 𝑠2 for 2𝑥 + 𝑦 ≤ 10.
i. If (𝑥, 𝑦) = (0, 0), 𝑠2 = 10 − (2𝑥 + 𝑦) = 10 − (2(0) + 0) = 0 / 8 / 10
ii. If (𝑥, 𝑦) = (0, 4), then 𝑠2 = 10 − (2(0) + 4) = 0 / 6 / 8
iii. If (𝑥, 𝑦) = (0, 10), then 𝑠2 = 10 − (2(0) + 10) = 0 / 6 / 10
iv. If (𝑥, 𝑦) = (4, 2), then 𝑠2 = 10 − (2(4) + 2) = 0 / 6 / 8
v. If (𝑥, 𝑦) = (5, 0), then 𝑠2 = 10 − (2(5) + 0) = 0 / 6 / 8
vi. If (𝑥, 𝑦) = (8, 0), then 𝑠2 = 10 − (2(8) + 0) = 0 / −3 / −6
(e) Summary for slack variables.
corner 𝑠1 = 8 − (𝑥 + 2𝑦) 𝑠2 = 10 − (2𝑥 + 𝑦) feasible?
(0,0) 8 10 yes
(0,4) 0 6 yes
(0,10) -12 0 no
(4,2) 0 0 yes
(5,0) 3 0 yes
(8,0) 0 -6 no
Slack variables (𝑠1 , 𝑠2 ) for all corner (feasible) points are
nonnegative / zero / nonpositive
Non-feasible (𝑠1 , 𝑠2 ) are nonnegative / zero / nonpositive
3. Pivoting. Consider following feasible region.

y
s1 = -12, s2 = 0 (0,10)
x + 2y _ 8,
<
2x + y = 10 (s2 zero) 2x + y <
_ 10,
8
x _> 0,
y _> 0
6

s1 = 0, s 2 = 6 (0,4) C
D 2
(4,2) s1 = 0, s 2 = 0
feasible
region x + 2y = 8 (s1 zero)
x
s1 = 8, s 2 = 10 (0,0) 2 4 6 10
(5,0) (8,0)
s1 = 3, s 2 = 0 s1 = 0, s 2 = -6
A
B E
Section 1. Slack Variables and Pivoting (LECTURE NOTES 5) 75

Figure 5.2 (Corner and other points and feasible region)

(a) Algebraically, corner point A where (𝑥, 𝑦) = (0, 0) and (𝑠1 , 𝑠2 ) = (8, 10) is
𝑥 𝑦 𝑠1 𝑠2
1 2 1 0 8
2 1 0 1 10
Type this 2 by 5 table into MATRIX [A]; use 2nd MATRIX EDIT.
where first row of this (augmented) matrix is
𝒙 + 2𝒚 + 𝒔1 = 8 / 2𝒙 + 𝒚 + 𝒔2 = 10
and second row of this (augmented) matrix is
𝒙 + 2𝒚 + 𝒔1 = 8 / 2𝒙 + 𝒚 + 𝒔2 = 10
(𝑥, 𝑦) are nonbasic variables (where columns not 0s and 1s)
and (𝑠1 , 𝑠2 ) are basic (where columns are 0s and 1s) variables
(b) Corner point A to B. Pivot on element1 2,
𝑥 𝑦 𝑠1 𝑠2
1 2 1 0 8
2 1 0 1 10
with resulting matrix,
1
𝑥 𝑦 𝑠1 𝑠2
𝑅 →𝑅2 ,
2 2
𝑅1 −𝑅2 →𝑅1
−→ 0 1.5 1 -0.5 3
1 0.5 0 0.5 5
2nd MATRIX MATH *row(1/2,[A],2) STO 2nd MATRIX [B];
2nd MATRIX MATH *row+(−1,[B], 2 , 1 ) STO 2nd MATRIX [C]
|{z} |{z}
pivot row zeroed
which corresponds to
i. corner point A where (𝑥, 𝑦) = (0, 0) and (𝑠1 , 𝑠2 ) = (8, 10)
ii. corner point B where (𝑥, 𝑦) = (5, 0) and (𝑠1 , 𝑠2 ) = (3, 0)
iii. corner point C where (𝑥, 𝑦) = (4, 2) and (𝑠1 , 𝑠2 ) = (0, 0)
iv. corner point D where (𝑥, 𝑦) = (0, 4) and (𝑠1 , 𝑠2 ) = (0, 6)
where nonbasic variables (𝑦, 𝑠2 ) = (0, 0) / (5, 3)/ (3, 5)
and basic (𝑥, 𝑠1 ) = (0, 0) / (5, 3) / (3, 5)
(c) Corner point B to C. Pivot on element2 1.5,
𝑥 𝑦 𝑠1 𝑠2
0 1.5 1 -0.5 3
1 0.5 0 0.5 5
1
Force element 2 equal to 1 by dividing row 2 by 2, then zero element above 2 to zero by
subtracting row 2 from row 1. We will find out later why element 2 is pivot.
2
Force element 1.5 equal to 1 by dividing row 1 by 1.5, then zero element below 1.5 to zero by
subtracting row 1 from row 2. We will find out later why element 1.5 is pivot.
76 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

with resulting matrix,


1
𝑥 𝑦 𝑠1 𝑠2
𝑅 →𝑅1 ,
1.5 1
𝑅2 −0.5𝑅1 →𝑅2 2
−→ 0 1 3
− 13 2
1 0 − 13 2
3
4
2nd MATRIX MATH *row(1/1.5,[C],1) STO 2nd MATRIX [D];
2nd MATRIX MATH *row+(−0.5,[D],1,2) STO 2nd MATRIX [E]
which corresponds to
i. corner point A where (𝑥, 𝑦) = (0, 0) and (𝑠1 , 𝑠2 ) = (8, 10)
ii. corner point B where (𝑥, 𝑦) = (5, 0) and (𝑠1 , 𝑠2 ) = (3, 0)
iii. corner point C where (𝑥, 𝑦) = (4, 2) and (𝑠1 , 𝑠2 ) = (0, 0)
iv. corner point D where (𝑥, 𝑦) = (0, 4) and (𝑠1 , 𝑠2 ) = (0, 6)
where nonbasic variables (𝑠1 , 𝑠2 ) = (0, 0) / (2, 4)/ (4, 2)
and basic (𝑥, 𝑦) = (0, 0) / (2, 4) / (4, 2)
(d) Corner point C to D. Pivot on element 32 ,
𝑥 𝑦 𝑠1 𝑠2
2
0 1 3
− 13 2
1 0 − 13 2
3
4

with resulting matrix,

3
𝑥 𝑦 𝑠1 𝑠2
𝑅 →𝑅2 ,
2 2
𝑅1 + 31 𝑅2 →𝑅1 1 1
−→ 2
1 2
0 4
3
2
0 − 21 1 6
2nd MATRIX MATH *row(3/2,[E],2) STO 2nd MATRIX [F];
2nd MATRIX MATH *row+(1/3,[F],2,1) STO 2nd MATRIX [G]
which corresponds to
i. corner point A where (𝑥, 𝑦) = (0, 0) and (𝑠1 , 𝑠2 ) = (8, 10)
ii. corner point B where (𝑥, 𝑦) = (5, 0) and (𝑠1 , 𝑠2 ) = (3, 0)
iii. corner point C where (𝑥, 𝑦) = (4, 2) and (𝑠1 , 𝑠2 ) = (0, 0)
iv. corner point D where (𝑥, 𝑦) = (0, 4) and (𝑠1 , 𝑠2 ) = (0, 6)
where nonbasic variables (𝑥, 𝑠1 ) = (0, 0) / (2, 4)/ (4, 2)
and basic (𝑦, 𝑠2) = (0, 0) / (4, 6) / (6, 4)
(e) Corner A to unfeasible E.
𝑥 𝑦 𝑠1 𝑠2
1 2 1 0 8
2 1 0 1 10
with resulting matrix,
Section 1. Slack Variables and Pivoting (LECTURE NOTES 5) 77

𝑥 𝑦 𝑠1 𝑠2
𝑅2 −2𝑅1 →𝑅2
−→ 1 2 1 0 8
0 -3 -2 1 -6
2nd MATRIX MATH *row+(−2,[A],1,2) STO 2nd MATRIX [H]
which corresponds to
i. corner point A where (𝑥, 𝑦) = (0, 0) and (𝑠1 , 𝑠2 ) = (8, 10)
ii. corner point B where (𝑥, 𝑦) = (5, 0) and (𝑠1 , 𝑠2 ) = (3, 0)
iii. corner point C where (𝑥, 𝑦) = (4, 2) and (𝑠1 , 𝑠2 ) = (0, 0)
iv. corner point D where (𝑥, 𝑦) = (0, 4) and (𝑠1 , 𝑠2 ) = (0, 6)
v. infeasible point (𝑥, 𝑦) = (8, 0) and (𝑠1 , 𝑠2 ) = (0, −6)
where nonbasic variables (𝑦, 𝑠1 ) = (0, 0) / (8, −6)/ (−6, 8)
and basic (𝑥, 𝑠2 ) = (0, 0) / (8, −6) / (−6, 8)

4. More pivoting: party problem.

y
20
20x + 10y = 175
(0, 50/3) constraints or feasible set
16 20x + 10y < _ 175,
B (5/2, 25/2) 25x + 15y <_ 250,
12 x >
_ 0,
y >_ 0
8

4 25x + 15y = 250

0 x
0 2 4 6 8 10
(0,0)
(35/4, 0)
A

Figure 5.3 (Party problem: pivoting)

(a) Initial corner point A. Start at (𝑥, 𝑦) = (0, 0) and (𝑠1 , 𝑠2 ) = (8, 10) where
𝑥 𝑦 𝑠1 𝑠2
20 10 1 0 175
25 15 0 1 250
Type this 2 by 5 table into MATRIX [A]; use 2nd MATRIX EDIT.
where first row of this (augmented) matrix is
20𝒙 + 10𝒚 + 𝒔1 = 175 / 25𝒙 + 15𝒚 + 𝒔2 = 250
and second row of this (augmented) matrix is
20𝒙 + 10𝒚 + 𝒔1 = 175 / 25𝒙 + 15𝒚 + 𝒔2 = 250
(b) Corner point A to B
Pivot in column3 𝑦 (not 𝑥!),
3
We shortly learn why column 𝑦, not 𝑥.
78 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

𝑥 𝑦 𝑠1 𝑠2
20 10 1 0 175
25 15 0 1 250
and pivot on element 10 / 15 in 𝑦,

1
𝑥 𝑦 𝑠1 𝑠2
𝑅 →𝑅2 ,
15 2
𝑅1 −10𝑅2 →𝑅1 10
−→ 3
0 1 − 23 25
3
5 1 50
3
1 0 15 3
2nd MATRIX MATH *row(1/15,[A],2) STO 2nd MATRIX [B];
2nd MATRIX MATH *row+(−10,[B],2,1) STO 2nd MATRIX [C],
then MATH ENTER for fractional form
which corresponds to corner point B where
( ) ( )
50
i. (𝑥, 𝑦) = 3
,0 and (𝑠1 , 𝑠2 ) = 0, 50
3
( ) ( )
ii. (𝑥, 𝑦) = 0, 50
3
and (𝑠1 , 𝑠2 ) = 25
3
,0

5.2 The Simplex Algorithm


Simplex algorithm is iterative procedure which involves repeatedly identifying pivot
column, pivot row and, consequently, pivot element, in succession of matrix tableaus.
Having identified pivot element, new tableau is created by pivoting on this element.
This iterative procedure corresponds, geometrically, to moving from one feasible cor-
ner point to another until optimal feasible point is located. We consider simplex
algorithm for standard maximization problem, which, recall, is

∙ objective function linear and is maximized,

∙ variables all nonnegative,

∙ structural constraints all of form 𝑎𝑥 + 𝑏𝑦 + ⋅ ⋅ ⋅ ≤ 𝑐, where 𝑐 ≥ 0.

Exercise 5.2 (The Simplex Algorithm)

1. A first look.

Maximize 6x + 4y
subject to x + 2y ≤ 8
2x + y ≤ 10
x ≥ 0
y ≥ 0
Section 2. The Simplex Algorithm (LECTURE NOTES 5) 79

y
(0,10)
x + 2y _ 8,
<
2x + y = 10 (s2 zero) 2x + y <
_ 10,
8
x _> 0,
y _> 0
6

(0,4)
C
(4,2)
2 feasible
region x + 2y = 8
x
2 4 6 10
(0,0) (8,0)
(5,0)
A D
B

Figure 5.4 (Simplex algorithm)

(a) Review. True / False. Geometric solution to this linear programming


problem involves calculating value of objective function at four corners,
corner 𝑓 = 6𝑥 + 4𝑦 or −6𝑥 − 4𝑦 + 𝑓 = 0
(0,0) 𝑓 = 6(0) + 4(0) = 0
(5,0) 𝑓 = 6(5) + 4(0) = 30
(4,2) 𝑓 = 6(4) + 4(2) = 32
(0,4) 𝑓 = 6(0) + 4(4) = 16
choosing (𝑥, 𝑦) = (4, 2), where objective function 𝑓 maximum at value 32.
(b) Initial corner point A. Start at (𝑥, 𝑦) = (0, 0), (𝑠1 , 𝑠2 ) = (8, 10) and 𝑓 = 0
𝑥 𝑦 𝑠1 𝑠2 𝑓
1 2 1 0 0 8
2 1 0 1 0 10
-6 -4 0 0 1 0
Type this 3 by 6 table into MATRIX [A]; use 2nd MATRIX EDIT.
where first row of this (augmented) matrix is constraint
𝒙 + 2𝒚 + 𝒔1 = 8 / 2𝒙 + 𝒚 + 𝒔2 = 10 / −6𝒙 − 4𝒚 + 𝒇 = 0
and second row of matrix is constraint
𝒙 + 2𝒚 + 𝒔1 = 8 / 2𝒙 + 𝒚 + 𝒔2 = 10 / −6𝒙 − 4𝒚 + 𝒇 = 0
and third row of matrix is objective function (indicators)
𝒙 + 2𝒚 + 𝒔1 = 8 / 2𝒙 + 𝒚 + 𝒔2 = 10 / −6𝒙 − 4𝒚 + 𝒇 = 0
(c) Corner point A to B.
10
Pivot with smallest quotient 2
= 5 and most negative indicator −6,
𝑥 𝑦 𝑠1 𝑠2 𝑓
8
1 2 1 0 0 8 Quotient: 1
=8
10
2 1 0 1 0 10 Quotient: 2
=5
-6 -4 0 0 1 0
80 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

𝑥 𝑦 𝑠1 𝑠2 𝑓
1
𝑅 →𝑅2 ,
2 2
𝑅1 −𝑅2 →𝑅1 , 𝑅3 +6𝑅2 →𝑅3 0 1.5 1 -0.5 0 3
−→
1 0.5 0 0.5 0 5
0 -1 0 3 1 30
2nd MATRIX MATH *row(1/2,[A],2) STO 2nd MATRIX [B]
2nd MATRIX MATH *row+(−1,[B],2,1) STO 2nd MATRIX [C]
2nd MATRIX MATH *row+(6,[C],2,3) STO 2nd MATRIX [D].
which corresponds to corner point B where
i. (𝑥, 𝑦) = (0, 0), (𝑠1 , 𝑠2 ) = (3, 0) and 𝑓 = 30
ii. (𝑥, 𝑦) = (5, 0), (𝑠1 , 𝑠2 ) = (3, 0) and 𝑓 = 30
objective function 𝑓 has decreased / increased from 𝑓 = 0 to 𝑓 = 30
(d) Corner point B to C.
3
Pivot with smallest quotient 1.5
= 2 and most negative indicator −1,
𝑥 𝑦 𝑠1 𝑠2 𝑓
3
0 1.5 1 -0.5 0 3 Quotient: 1.5
≈2
5
1 0.5 0 0.5 0 5 Quotient: 0.5
= 10
0 -1 0 3 1 30

𝑥 𝑦 𝑠1 𝑠2 𝑓
2
1
𝑅 →𝑅1 ,
1.5 1
𝑅2 −0.5𝑅1 →𝑅2 , 𝑅3 +𝑅1 →𝑅3 0 1 3
− 13 0 2
−→
1 0 − 13 2
3
0 4
2 8
0 0 3 3
1 32
2nd MATRIX MATH *row(1/1.5,[D],1) STO 2nd MATRIX [E];
2nd MATRIX MATH *row+(−0.5,[E],1,2) STO 2nd MATRIX [F];
2nd MATRIX MATH *row+(1,[F],1,3) STO 2nd MATRIX [G].
which corresponds to corner point C where
i. (𝑥, 𝑦) = (4, 0), (𝑠1 , 𝑠2 ) = (0, 2) and 𝑓 = 32
ii. (𝑥, 𝑦) = (4, 2), (𝑠1 , 𝑠2 ) = (0, 0) and 𝑓 = 32
objective function 𝑓 has decreased / increased from 𝑓 = 30 to 𝑓 = 32.
This is optimal solutions because all indicators are nonnegative.
(e) Smallest quotient rule: Corner A to corner B or infeasible D.
10
True / False. Pivoting on element 2, with minimum quotient 2
= 5,
𝑥 𝑦 𝑠1 𝑠2 𝑓
8
1 2 1 0 0 8 Quotient: 1
=8
10
2 1 0 1 0 10 Quotient: 2
= 5, minimum
-6 -4 0 0 1 0
results in matrix with corresponding feasible corner point B,
Section 2. The Simplex Algorithm (LECTURE NOTES 5) 81

𝑥 𝑦 𝑠1 𝑠2 𝑓
1
𝑅 →𝑅2 ,
2 2
𝑅1 −𝑅2 →𝑅1 , 𝑅3 +6𝑅2 →𝑅3 0 1.5 1 -0.5 0 3
−→
1 0.5 0 0.5 0 5
0 -1 0 3 1 30
whereas pivoting on element 1,
𝑥 𝑦 𝑠1 𝑠2 𝑓
8
1 2 1 0 0 8 Quotient: 1
=8
10
2 1 0 1 0 10 Quotient: 2
= 5, minimum
-6 -4 0 0 1 0
results in matrix with corresponding infeasible point D,
𝑥 𝑦 𝑠1 𝑠2 𝑓
𝑅2 −2𝑅1 →𝑅2 , 𝑅3 +6𝑅1 →𝑅3 1 2 1 0 0 8
−→
0 -3 -2 1 0 -6
0 8 6 0 1 48
In other words, pivot using smallest quotient rule to ensure feasibility.

2. Another problem.

Maximize 4x + 2y + 3z
subject to 0.1x + 0.25y ≤ 40
0.22x + 0.3y + 0.4z ≤ 100
x ≥ 0
y ≥ 0
z ≥ 0

(a) Initial corner point.


Start at (𝑥, 𝑦, 𝑧) = (0, 0, 0), (𝑠1 , 𝑠2 ) = (40, 100) and 𝑓 = 0.

𝑥 𝑦 𝑧 𝑠1 𝑠2 𝑓
0.1 0.25 0 1 0 0 40 Quotient:
0.22 0.3 0.4 0 1 0 100 Quotient:
-4 −2 −3 0 0 1 0
Type this 3 by 7 table into MATRIX [A]; use 2nd MATRIX EDIT.
Pivot column, most negative indicator, is column 𝒙 / 𝒚 / 𝒛 / 𝒔1 / 𝒔2
Pivot row, smallest quotient, is row 𝑹1 / 𝑹2
So pivot element: 0.1 / 0.22 / 0.25
(b) Next corner point.
82 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

1
𝑅 →𝑅1 ,
0.1 1
𝑅2 −0.22𝑅1 →𝑅2 , 𝑅3 +4𝑅1 →𝑅3
−→
𝑥 𝑦 𝑧 𝑠1 𝑠2 𝑓
1 2.5 0 10 0 0 400 Quotient:
0 -0.25 0.4 -2.2 1 0 12 Quotient:
0 8 -3 40 0 1 1600
2nd MATRIX MATH *row(1/0.1,[A],1) STO 2nd MATRIX [B]
2nd MATRIX MATH *row+(−0.22,[B],1,2) STO 2nd MATRIX [C]
2nd MATRIX MATH *row+(4,[C],1,3) STO 2nd MATRIX [D].
Pivot column, most negative indicator, is column 𝒙 / 𝒚 / 𝒛 / 𝒔1 / 𝒔2
Pivot row, smallest quotient4 , is row 𝑹1 / 𝑹2
So pivot element: −0.25 / 0 / 0.4
(c) Final corner point.
1
𝑅 →𝑅2 ,
0.4 2
𝑅3 +3𝑅2 →𝑅3
−→
𝑥 𝑦 𝑧 𝑠1 𝑠2 𝑓
1 2.5 0 10 0 0 400
0 -0.6 1 -5.5 2.5 0 30
0 6.1 0 23.5 7.5 1 1690
2nd MATRIX MATH *row(1/0.4,[D],2) STO 2nd MATRIX [E]
2nd MATRIX MATH *row+(3,[E],2,3) STO 2nd MATRIX [F].
Point (𝑥, 𝑦, 𝑧) = (400, 30, 0) / (0, 30, 400) / (400, 0, 30),
with optimal (maximum) 𝑓 = 400 / 1600 / 1690
because all indicators nonpositive / zero / nonnegative
(d) Since this problem involves three variables, (𝑥, 𝑦, 𝑧), rather than two (𝑥, 𝑦),
easy / difficult to solve using geometric method.
3. Acme party problem.
Maximize x + y
subject to 25x + 15y ≤ 250
20x + 10y ≤ 175
x ≥ 0
y ≥ 0
y y
20 20
20x + 10y = 175 20x + 10y = 175
(0, 50/3) constraints or feasible set (0, 50/3) constraints or feasible set
16 20x + 10y ≤ 175, 16 20x + 10y ≤ 175,
2 (5/2, 25/2) 25x + 15y ≤ 250, 4 (5/2, 25/2) 25x + 15y ≤ 250,
12 x ≥ 0, 12 x ≥ 0,
y ≥ 0 3 y ≥ 0
8 8

4 25x + 15y = 250 4 25x + 15y = 250

0 x 0 x
0 2 4 6 8 10 0 2 4 6 8 10
(0,0) (0,0)
(35/4, 0) (35/4, 0)
1 1 2

(a) one way around (b) a longer way around

4
Ignore undefined quotient, so 𝑅1 has smallest quotient by default.
Section 2. The Simplex Algorithm (LECTURE NOTES 5) 83

Figure 5.5 (Two paths to optimal solution)


(a) Review. True / False. Geometric solution to this linear programming
problem involves calculating value of objective function at four corners,
corner 𝑓 = 𝑥 + 𝑦 or −𝑥 − 𝑦 + 𝑓 = 0
(0,0) 𝑓 =0+0=0
( )
0, 50
3
𝑓 = 0 + 50
3
= 50
3
( )
5 25 5
, 𝑓= + 25 = 15
(2 2 ) 2 2
35 35
4
,0 𝑓= 4
( )
(𝑥, 𝑦) = 0, 50
3
, where objective function 𝑓 maximum at value 50
3
.
(b) Initial corner point.
Start at (𝑥, 𝑦) = (0, 0), (𝑠1 , 𝑠2 ) = (250, 175) and 𝑓 = 0.
𝑥 𝑦 𝑠1 𝑠2 𝑓
25 15 1 0 0 250 Quotient:
20 10 0 1 0 175 Quotient:
-1 -1 0 0 1 0
Type this 3 by 6 table into MATRIX [A]; use 2nd MATRIX EDIT.
Pivot column, most negative indicator, is column 𝒙 / 𝒚 / either 𝒙 or 𝒚
Using pivot column 𝑦, pivot row, smallest quotient, is row 𝑹1 / 𝑹2
So pivot element: 10 / 15 / 20
(c) Final corner point.
𝑥 𝑦 𝑠1 𝑠2 𝑃
1
𝑅 →𝑅1 ,
15 1
𝑅2 −10𝑅1 →𝑅2 , 𝑅3 +𝑅1 →𝑅3 5/3 1 1/15 0 0 50/3
−→
10/3 0 −2/3 1 0 25/3
2/3 0 1/15 0 1 50/3
2nd MATRIX MATH *row(1/15,[A],1) STO 2nd MATRIX [B]
2nd MATRIX MATH *row+(−10,[B],1,2) STO 2nd MATRIX [C].
2nd MATRIX MATH
( *row+(1,[C],1,3)
) ( STO) 2nd MATRIX [D]
Point (𝑥, 𝑦) = 50
3
, 0 / 0, 50
3
with optimal (maximum) 𝑓 = 0 / 50 3
because all indicators nonpositive / zero / nonnegative
If pivot column 𝑥 chosen, optimal in three steps, rather than one step.

4. LP problem with no solution.


Maximize x + 2y
subject to -3x + 2y ≤ 5
4x - 3y ≤ 9
x ≥ 0
y ≥ 0
84 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

-3x + 2y = 5
y 10

6 4x - 3y = 9
-3x + 2y <_ 5,
4 4x - 3y <_ 9,
x _> 0,
(0, 5/2) y _> 0
2

(9/4, 0)

(0,0) 2 4 6 8 10
x

Figure 5.6 (Open bound, no optimal solution)

(a) Review. True / False. Geometric solution to this linear programming


problem involves calculating value of objective function at corners,
corner 𝑓 = 𝑥 + 2𝑦 or −𝑥 − 2𝑦 + 𝑓 = 0
(0, 0))
( 𝑓 = 0 + 2(0)
( )= 0
0, 5 𝑓 = 0 + 2 25 = 5
( 2)
9
4
,0 𝑓 = 49 + 2 (0) = 49
However, for example, (𝑥, 𝑦) = (5, 10) is feasible because
−3𝑥 + 2𝑦 = −3(5) + 10(10) = 85 ≤ 5
and 4𝑥 − 3𝑦 = 4(5) − 3(10) = −10 ≤ 9
and has objective function 𝑓 = 5 + 2(10) = 25 ( )
which is larger than maximum 𝑓 = 94 at corner point 49 , 0 .
In fact, objective function 𝑓 unbounded (has no maximum);
(b) Initial corner point.
Start at (𝑥, 𝑦) = (0, 0), (𝑠1 , 𝑠2 ) = (5, 9) and 𝑓 = 0.
𝑥 𝑦 𝑠1 𝑠2 𝑓
-3 2 1 0 0 5 Quotient
4 -3 0 1 0 9 Quotient
-1 -2 0 0 1 0
Type this 3 by 6 table into MATRIX [A]; use 2nd MATRIX EDIT.
Pivot column, most negative indicator, is column 𝒙 / 𝒚
Pivot row, smallest nonnegative quotient5 , is row 𝑹1 / 𝑹2
So pivot element: −3 / 2 / 4
(c) Simplex algorithm stops.
1
𝑅 →𝑅1 ,
2 1
𝑅2 +3𝑅1 →𝑅2 , 𝑅3 +2𝑅1 →𝑅3
−→
𝑥 𝑦 𝑠1 𝑠2 𝑓
-1.5 1 0.5 0 0 2.5 Quotient
-0.5 0 1.5 1 0 16.5 Quotient
-4 0 1 0 1 5
5
Negative quotient not used, so smallest quotient automatically 25 .
Section 2. The Simplex Algorithm (LECTURE NOTES 5) 85

2nd MATRIX MATH *row(1/2,[A],1) STO 2nd MATRIX [B]


2nd MATRIX MATH *row+(3,[B],1,2) STO 2nd MATRIX [C].
2nd MATRIX MATH *row+(2,[C],1,3) STO 2nd MATRIX [D]
Pivot column, most negative indicator, is column 𝒙 / 𝒚
Pivot row, smallest nonnegative quotient: 𝑹1 / 𝑹2 / neither 𝑹1 nor 𝑹2
So pivot element: −1.5 / −0.5 / does not exist
so no optimal solution.

5. LP problem with edge solution.

Maximize 6x + 3y
subject to x + 2y ≤ 8
2x + y ≤ 10
x ≥ 0
y ≥ 0

10
y
2x + y = 10
8 constraints or feasible set
x + 2y ≤ 8,
6 2x + y ≤ 10,
x ≥ 0,
y ≥ 0
(0,4) 4

(4,2) 3
2
x + 2y = 8
x
(0,0) 2 4 6 8 10
(5,0)
1 2 4

Figure 5.7 (LP problem with edge solution)

(a) Geometric solution to this linear programming problem involves calculat-


ing value of objective function at four corners,
vertex 𝑓 = 6𝑥 + 3𝑦
(0, 0) 𝑓 = 6(0) + 3(0) = 0
(0, 4) 𝑓 = 6(0) + 3(4) = 12
(4, 2) 𝑓 = 6(4) + 3(2) = 30
(5, 0) 𝑓 = 6(5) + 3(0) = 30
where objective function 𝑓 maximum at (𝑥, 𝑦) =
(4, 2) / (5, 0) / all points along edge between (5, 0) and (4, 2)
(b) Initial corner point.
Start at (𝑥, 𝑦) = (0, 0), (𝑠1 , 𝑠2 ) = (8, 10) and 𝑓 = 0.
𝑥 𝑦 𝑠1 𝑠2 𝑓
1 2 1 0 0 8 Quotient
2 1 0 1 0 10 Quotient
-6 -3 0 0 1 0
86 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

Type this 3 by 6 table into MATRIX [A]; use 2nd MATRIX EDIT.
Pivot column, most negative indicator, is column 𝒙 / 𝒚
Pivot row, smallest nonnegative quotient, is row 𝑹1 / 𝑹2
So pivot element: 1 / 2 / 4
(c) Next corner.
1
𝑅 →𝑅2 ,
2 2
𝑅1 −𝑅2 →𝑅1 , 𝑅3 +6𝑅2 →𝑅3
−→
𝑥 𝑦 𝑠1 𝑠2 𝑓
0 1.5 1 -0.5 0 3 Quotient
1 0.5 0 0.5 0 5 Quotient
0 0 0 3 1 30
2nd MATRIX MATH *row(1/2,[A],2) STO 2nd MATRIX [B]
2nd MATRIX MATH *row+(−1,[B],2,1) STO 2nd MATRIX [C].
2nd MATRIX MATH *row+(6,[C],2,3) STO 2nd MATRIX [D]
Point (𝑥, 𝑦) = (5, 0) / (0, 5)
with optimal (maximum) 𝑓 = 0 / 30
because all indicators nonpositive / zero / nonnegative
However nonbasic 𝑦 column has zero indicator,
indicating another corner just “as optimal”.
Pivot column, zero indicator, is column 𝒙 / 𝒚
Pivot row, smallest nonnegative quotient, is row 𝑹1 / 𝑹2
So pivot element: 0.5 / 1.5 / 4
(d) Next corner along edge.
1
𝑅 →𝑅1 ,
1.5 1
𝑅2 −0.5𝑅1 →𝑅2 , 𝑅3 +0𝑅1 →𝑅3
−→
𝑥 𝑦 𝑠1 𝑠2 𝑓
0 1 2/3 -1/3 0 2 Quotient
1 0 -1/3 2/3 0 4 Quotient
0 0 0 3 1 30
2nd MATRIX MATH *row(1/1.5,[D],2) STO 2nd MATRIX [E]
2nd MATRIX MATH *row+(−0.5,[E],2,1) STO 2nd MATRIX [F].
2nd MATRIX MATH *row+(0,[F],2,3) STO 2nd MATRIX [G]
Point (𝑥, 𝑦) = (2, 4) / (4, 2)
with optimal (maximum) 𝑓 = 0 / 30
because all indicators nonpositive / zero / nonnegative
Pivot column, zero indicator, is column 𝒚 / 𝒔1
Pivot row, smallest nonnegative quotient, is row 𝑹1 / 𝑹2
So pivot element: 13 / 32 / 1
Pivoting returns to corner (5,0), so edge between (5,0) and (4,2) optimal.

6. Using EXCEL.
Section 2. The Simplex Algorithm (LECTURE NOTES 5) 87

Maximize 6x + 4y
subject to x + 2y ≤ 8
2x + y ≤ 10
x ≥ 0
y ≥ 0

=6*D2 + 4*D3
2
=D2 + 2*D3
=2*D2 + D3

5
4

Figure 5.8 (Simplex algorithm using EXCEL)

(a) Step 1. Type variables, objective function and structural constraints as


given in column B of figure.
(b) Step 2. Define cells as given in figure. They should agree with objective
function and constraints.
(c) Step 3. Open Solver. It is under Data tab in Excel6 . Type information
into Target Cells and By Changing Cells as given in figure.
6
If Solver is not available in Data tab, add it by clicking on large office button in left top corner
of Excel, then on Excel Options a bottom of popup, then click on Add-Ins on left side, then add in
Solver.
88 Chapter 5. Linear Programming: The Simplex Method (LECTURE NOTES 5)

(d) Step 4. Click on Add, then type in information in Add Constraints pop up
box as given in figure. Click Add after each constraint, then Cancel when
done.
(e) Step 5. Click on Options and check both Assume Linear Model and Assume
Non-Negative.
(f) Step 6. Click on Solve.
(g) Step 7. Observe solution, which should be (𝑥, 𝑦) = (4, 2), where objective
function 𝑓 maximum at value 32.

You might also like