The Simplex Method - Problems with Solutions | MATH 0164, Exams of Optimization Techniques in Engineering

Material Type: Exam; Class: OPTIMIZATION; Subject: Mathematics; University: University of California - Los Angeles; Term: Fall 2006;

Typology: Exams

Pre 2010

Uploaded on 08/31/2009

koofers-user-ltg
koofers-user-ltg 🇺🇸

10 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Math 164 Fall 2006
The Simplex method
Stef´an Ingi Valdimarsson
October 23, 2006
We will illustrate the simplex method with an example. We will choose
a two-dimensional example so that we can refer to a picture.
Let us therefore consider the problem
min 2x1x2
s.t. x14
x1+ 3x213
3x1+x215
x1, x20.
We convert this to standard form by adding slack variables, x3, x4, x5, and
get
min 2x1x2
s.t. x1+x3= 4
x1+ 3x2+x4= 13
3x1+x2+x5= 15
x1, x2, x3, x4, x50.
We can write this in the form
min cTx
s.t. Ax =b
x0
1
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download The Simplex Method - Problems with Solutions | MATH 0164 and more Exams Optimization Techniques in Engineering in PDF only on Docsity!

Math 164 – Fall 2006The Simplex method

Stef´an Ingi ValdimarssonOctober 23, 2006

a two-dimensional example so that we can refer to a picture.^ We will illustrate the simplex method with an example. We will chooseLet us therefore consider the problem

min s.t. − 2 xx x 111 −+ 3 xx 22 ≤≤ 413

We convert this to standard form by adding slack variables,^ x^13 , xx^12 +≥^0 x.^2 ≤^15 x 3 , x 4 , x 5 , and

get min s.t. − 2 xx 11 − x 2 + x 3 = 4

x 1 , x^3 xx 211 , x^ + 3+ 3 , xxx 422 , x^5 ≥ + 0.^ x^4 +^ x^5 = 13= 15

We can write this in the form min s.t. cAxTx = b

x 1 ≥ 0

with A =  11 03 10 01

3 1 0 0 1 ^ b^ =^ ^13154 ^ c^ =

 x =  x x x 123

x x 45

solution.slack variables^ To get the simplex method going, we must find an initial basic feasible In our case this is very simple, we let x 3 , x 4 and x 5 be basic. Thus x 1 and x 2 equal 0 and the

B =^ ^100 010 001 ^ N =^ ^113 031 ^ xB =^ ^ x x x^345 ^ xN =^ (x x^12 ).

^ 

^ 

^  (4 1/3,0)

To find the value oflectures. Since^ Our initial basic feasible solution has ( B is the identity matrix this gives just xB we must solve BxB = b as we have noted in previousx^1 , x 2 x) = (0B = b, 0).= (4, 13 , 15)T.

the one for which the coefficient invalue. enter the basis Note: In our case When the non-basic variable we choose becomes basic, the value of. −2 is larger in magnitude than c has the largest (in magnitude) negative −1 so we choose x 1 to

the other basic variables will change. However, in our situation, the objectivefunction is expressed only in terms of the non-basic variables.that we do not need to consider how the basic variables will change when weare contemplating which non-basic variable should become basic to decrease This means

the objective function most sharply.choosing a feasible direction), the next step is to knowrection we can go.Once we have chosen which variable becomes basic (this corresponds to The condition which we must honor is that all of the how far in that di-

variables must be non-negative.first equality constraint Clearly, we get the condition that we cannot take x 1 To see how this works, let us look at the + x 3 = 4. x 1 larger than 4 unless x 3

becomes negative. Similarly, the other equality constraints x 1 + 3x 2 + x 4 = 13

andgive us the conditionsThe value of x 1 we choose must satisfy all of these conditions so it cannot x 1 ≤ 13 and 3 3 x 1 + x 2 x + 1 ≤x 5 15.= 15

be larger than 4. We take this largest allowed value as the new value ofWhat we have done here is thelecture. ratio test which we spoke about in a previous x 1.

^ 

^ 

^ 

When we take^ The furthest we can go in the direction of^ x^1 = 4. x 1 = 4 we see that the condition^ x^1 is to

implies that(Remember that the number of variables in a basis must always be x 3 = 0. Thus x 3 is^ x 1 leaving the basis^ +^ x^3 = 4 and becoming non-basic. m, the

number of equality constraints in the standard form of the problem. In theexample,So, we have arrived at a new basis m = 3.) xB = (x 1 , x 4 , x 5 ) and the non-basic

variables are xN B = ( =x  211 , x 301 ). With respect to this 00 A splits as A = (B N) with

Now to find the value of of the basic variables we have as noted in a previouslecture^3 0 1 ^ N^ =^ ^100 031 ^.

b = Ax = BxB 5 + NxN = BxB

second one and subtract three times the first equality from the third one.This gives: x 1 3 x 2 +− xx 33 + x 4 = 4= 9

Note that there is a simple formula which tells us how to turn the problemin to the form we need. The equality constraints are^ x^2 −^3 x^3 +^ x^5 = 3.^ (1)

wherecolumns of A = ( A B Ncorresponding to the basic variables. It is these columns that) and B is the invertible matrix which consists of the^ Ax^ =^ b

we want to have in as simple form as possible, ideally we would havethe identity matrix because then only one of the basic variables appears ineach equality.This gives: To achieve this, we multiply Ax = b from the left by BB −as 1.

BB−−^1 1 ( (BBx^ N)^ B(−x x^1 BNAx^ )^ = =^ BB−−^11 bb

IxB +B B^ +−^1 NxNxNN^ ) = =^ BB−−^11 bb

(1) it is straightforward to carry out the ratio test.since the basic variablesconditions^ Anyway, once we have the written the equality constraints in the form x 1 , x 4 and x 5 must remain positive that we get the We simply note that

03 xx x 222 ≤≤≤ 493.

Of these, the first one gives no constraint and the second and third both givethe constraint thatwe will takeequation in (1) say that x 2 = 3 but when we do that we notice that the second and third x 2 ≤ 3. This means that at the next basic feasible solution x 4 = x 5 = 0. Thus both x 4 and x 5 are candiates

to leave the basis asWe havethis point there is no slack in any of the inequality constraints in the originalformulation of the problem. x 1 = 4, unchanged from the previous step, but now x 2 enters. On the figure we can see what is happening. This situation is called a degeneracy x 2 = 3 and at for the

problem.resolve that we must simply make an arbitrary choice, we must choose either x matrix corresponding to the basis ( 4 or x 5 to leave the basis asWe will not discuss this in great detail but we will note that to x 2 enters it. Both choices are valid as thex 1 , x 2 , x 5 ) and the B matrix corresponding B

to the basis (With this choice we haveLet us take the second of these two choices, so our new basis is (x 1 , x 4 , x 2 ) are both invertible. x 1 , x 4 , x 2 ).

and so^ B^ =^ ^113 010 031 

sofrom the figure. xB has the values xB = (^ Bx− 11 , x^ = 4 , x^  2 −)^18 T^3 = (4^010 ,− 0013 , 3)T. Here x 4 = 0 as expected

involve the basic variables so that we can determine which of the non-basicvariables is next to enter the basis. Again, we use that the original equalityconstraintsFinally, we must start again and calculate Ax = b and multiply both sides from the left with the current^ c^ in a form which does not

value of B−^1. This gives x 1 + 8 xx 33 + x 4 − 3 x 5 = 4= 0

The first and third of these equations tell us that x^ x^2 −^3 x^3 +^ x^5 = 3.

Thus the objective function may be written as^ x^12 = 4= 3 + 3^ −^ xx^3 3 −and^ x^5.

z = − 2 x 1 − x 2 = −2(4 − x 3 ) − (3 + 3 8 x 3 − x 5 ) = − 11 − x 3 + x 5 = 11 + cTx