0% found this document useful (0 votes)
4 views5 pages

The Simplex Method

The Simplex Method is a systematic procedure for solving linear programming problems, involving steps such as finding a feasible basis, computing reduced costs, and performing ratio tests to determine entering and leaving variables. An example illustrates the method through a minimization problem with constraints, demonstrating the transformation of inequalities and the use of auxiliary objective functions. The process continues until an optimal solution is found, ensuring all constraints are satisfied.

Uploaded by

gdelia01
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)
4 views5 pages

The Simplex Method

The Simplex Method is a systematic procedure for solving linear programming problems, involving steps such as finding a feasible basis, computing reduced costs, and performing ratio tests to determine entering and leaving variables. An example illustrates the method through a minimization problem with constraints, demonstrating the transformation of inequalities and the use of auxiliary objective functions. The process continues until an optimal solution is found, ensuring all constraints are satisfied.

Uploaded by

gdelia01
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/ 5

The Simplex Method1

The Simplex Method consists of the flowing steps:

1. Find a feasible basis (phase 1)


2. Compute the reduce costs for
𝑢 =𝑐 −𝒂 ∙𝒚
where
𝒚 ≡ (𝑨 )𝑻 . 𝒄
For all 𝑥 not in the basis

3. If 𝑢 ≥ 0, for all k, the solu on is op mal. Otherwise, chose k corresponding to the


most nega ve 𝑢 as the entering column.
4. Choose the leaving column 𝑖 from the minimum ra o test
Compute
𝒙𝑩 = (𝑨 )𝑻 . 𝒃, 𝒘 = (𝑨 )𝑻 . 𝒂𝒌

For each component 𝑤 > 0, compute the ra o 𝑥 ⁄𝑤 . Choose 𝑖 that corresponds to the
smallest such ra o.

5. Exchange columns 𝑖 and 𝑘 and go back to step 2.

Example: Consider the following problem

Objec ve func on

𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑧 = −40𝑥 − 60𝑥 (1)

Constrains: the 𝑥’s are non-nega ve and

2𝑥 + 𝑥 ≤ 70 (2)

𝑥 + 𝑥 ≥ 40 (3)

𝑥 + 3𝑥 = 90 (4)

Note

𝑥 + 𝑥 ≥ 40
Can be converted to

−𝑥 − 𝑥 ≤ −40

1
Numerical Recipes 3rd Edi on: The Art of Scien fic Compu ng, Press, William H.; Teukolsky, Saul A.;
Ve erling, William T.; Flannery, Brian P.
Now

2𝑥 + 𝑥 ≤ 70 (5)

−𝑥 − 𝑥 ≤ −40 (6)

𝑥 + 3𝑥 = 90 7
Or, adding the slack variables

2𝑥 + 𝑥 + 𝑥 = 70 8
−𝑥 − 𝑥 + 𝑥 = −40 (9)

𝑥 + 3𝑥 + 𝑥 = 90 (10)

This can be wri en


𝑥
⎧𝑥 ⎫
2 1 1 0 0 ⎪ ⎪ 70
−1 −1 0 1 0 𝑥 = −40
1 3 0 0 1 ⎨

𝑥 ⎬
⎪ 90
⎩𝑥 ⎭
2 1 1 0 0
𝒂 = −1 , 𝒂 = −1 , 𝒂 = 0 , 𝒂 = 1 𝒂 = 0
1 3 0 0 1

Or, permuta ng columns


𝑥
⎧ ⎫
1 0 0 2 1 ⎪𝑥 ⎪ 70
0 1 0 −1 −1 𝑥 = −40
0 0 1 1 3 ⎨ 𝑥 ⎬
⎪ ⎪ 90
⎩𝑥 ⎭
or

𝑨𝒙 = 𝒃
Par on A

𝑨 = [𝑨 |𝑨 ]
where
1 0 0 2 1
𝑨 = 0 1 0 , 𝑨 −1 −1
0 0 1 1 3

First, replace 𝑥 coefficients with 𝑥 coefficients (𝑥 coefficients would work just as well)
1 0 1
𝑨 = 0 1 −1
0 0 3
The inverse is
1 0 −1⁄3
𝑨 = 0 1 1⁄3
0 0 1⁄3
And
𝑥 1 0 −1⁄3 70 40
𝒙 = 𝑥 =𝑨 ∙ 𝒃 = 0 1 1⁄3 −40 = −10
𝑥 0 0 1⁄3 90 30
This solu on is not feasible because 𝑥 ≱ 0.

Now we replace the objec ve func on with a so-called auxiliary objec ve func on

𝑧 = 𝒄 . 𝒙 = −𝑥
i.e,

𝒄 = {0 −1 0}
We now compute the reduced costs using

𝑢 =𝑐 −𝒂 ∙𝒚
where

𝒚 ≡ (𝑨 )𝑻 . 𝒄

Here, 𝑘 = 1,

𝑢 =𝑐 −𝒂 ∙𝒚
and
1 0 0 0 0
𝒚= 0 1 0 . −1 = −1
−1⁄3 1⁄3 1⁄3 0 −1⁄3

0
𝑢 = 0 − 𝒂 ∙ 𝒚 = 0 − {2 1 1}. −1 = − 2⁄3
−1⁄3
Because 𝑢 < 0, 𝑥 should enter the computa on and another 𝑥 should leave. To determine which
variable should leave we perform a minimum ra o test using
1 0 −1⁄3 2 5 ⁄3
𝑨 ∙ 𝒂𝟏 = 0 1 1⁄3 −1 = −2⁄3
0 0 1⁄3 1 1 ⁄3
Ra os
40 −10 30
= 24, = 15, = 90
5 ⁄3 − 2⁄3 1 ⁄3
The middle number is associated with 𝑥 and is the minimum ra o so 𝑥 goes out.

Now the basic variables are 𝑥 , 𝑥 , 𝑥

Now we repeat the procedure

1 2 1 1 5⁄2 1 ⁄2
𝑨 = 0 −1 −1 , 𝑨 = 0 −3⁄2 −1⁄2
0 1 3 0 1⁄2 1 ⁄2
𝑥 1 5⁄4 1 ⁄2 70 15
𝒙 = 𝑥 =𝑨 ∙𝒃= 0 −1⁄4 −1⁄2 −40 = 15
𝑥 0 1⁄2 1 ⁄2 90 25
All variables are posi ve, so the solu on is feasible, and we enter phase II

Now
𝑐 0
𝒄 = 𝑐 = −40
𝑐 −60
1 0 0 0 0
𝒚 = (𝑨 )𝑻 .𝒄 = 5 ⁄ 2 −3⁄2 1⁄2 . −40 = 30
1⁄2 −1⁄2 1⁄2 −60 −10
0
𝑢 = 𝑐 − 𝒂 ∙ 𝒚 = 0 − {0 1 0} ∙ 30 = −30
−10
This result says that 𝑥 should reenter.

Find which should leave


1 5⁄4 1 ⁄2 0 5 ⁄2
𝒘=𝑨 ∙ 𝒂 = 0 −1⁄4 −1 2 1 = −3⁄2

0 1⁄2 1 ⁄2 0 1 ⁄2
Ra os (only consider posi ve 𝑤 )
15 25
= 6, = 50
5 ⁄2 1 ⁄2
Hence, 𝑥 being associated with the smallest ra o, it leaves and new solu on is 𝑥 , 𝑥 , 𝑥

Now we repeat the procedure


0 2 1 0.4 1 0.2
𝑨 = 1 −1 −1 , 𝑨 = 0.6 0 −0.2
0 1 3 −0.2 0 0.4
𝑥 0.4 1 0.2 70 6
𝒙 = 𝑥 =𝑨 ∙𝒃= 0.6 0 −0.2 −40 = 24
𝑥 −0.2 0 0.4 90 22

𝑐 0
𝒄 = 𝑐 = −40
𝑐 −60
0.4 0.6 −0.2 0 −12
𝒚 = (𝑨 )𝑻 . 𝒄 = 1 0 0 . −40 = 0
0.2 −0.2 0.4 −60 −16
−12
𝑢 = 𝑐 − 𝒂 ∙ 𝒚 = 0 − {1 0 0} ∙ 0 = 12
−16
As 𝑢 > 0, we have found the op mum solu on: 𝑥 = 24, 𝑥 = 22, and 𝑥 = 6

Constrains are sa sfied

2𝑥 + 𝑥 = 70 ≤ 70
𝑥 + 𝑥 = 46 ≥ 40
𝑥 + 3𝑥 = 90 = 90
𝑥 >0
𝑥 >0

You might also like