Sei sulla pagina 1di 22

Linear Programming

http://endrayanto.staff.ugm.ac.id/courses/ MMS2302

he goal is nd the best algorithm for solving it. This theo s with little or no guide as to which algorithm is likely to b the discussion in this chapter and other chapters will refe standard form, that is,

LP: Standard Form

c1 x1 + c2 x2 + + a11 x1 + a12 x2 + + a21 x1 + a22 x2 + + . . . . . . . . . am1 x1 + am2 x2 + + and x1 0, x2 0, . . . , 63

cn xn = z (Min) a1n xn = b1 a2n xn = b2 . . . . . . amn xn = bm , xn 0.

that the reader is familiar with simple matrix notation and oper x A for denitions of these basic concepts. In matrix notatio tten as

LP: Matrix Notation


cTx Ax = b, x 0, A : m n,

Minimize subject to

rectangular matrix of dimension mvector b isxa column vector of c : column n, (n 1) a column vector of dimension n, x vector (n x 1) vector of dimen x : column is a column rscript T stands for transpose. b : column vector (m x 1) by illustrating the method graphically in Section 3.1. In Section orithm will be described; its use, as part of the Simplex Metho in Section 3.3. Next we will examine linear programs in standar these are systems whose nonnegativity constraints have been re

3.2 THE SIMPLEX ALGORITHM

LP: Graphical Illustration


x2 6 5
. . .. .. ... . . . . . . . . . . .

65

. . . . . . 1 . . . . . . . . . ... ... . . ... . ... . . ... ... . . 1 2 ... ... . . ... ... . . . ... ... . . ... ... ... .. . .. ... .. .. . ... ... . . ... ..... . . . ... ....... ... ... . .. . ... .. ... .. .......... . .. ... . ..... . ... ... . . .......... .. . . ... ..... .. . . ... ... ... .. ..... . .. .. ............ ... ...... . .. ... ..... ... . . . .................... .. . . . . ..... ... . ................ ..... .... . .. ... ... .. .. . .. .... .. . ... . .................... .... ... . . . . ... .. ... .. . ........................ ..... . ..... .. . .. .. .. .. .... . .... ............................ .. . . . ... ... ................................... . . ... . . .. . .. ..... . . ...................................... .. . . ..... . ... .. . .......................................... . .. .. . .. ... .... ....................................... ..... .. .. . ... .... . .......................................... ...... . ... ... ............................................ ...... . .. .. .. . .............................................. ...... . 1 . .. . . ....... ..... ... .................................. . . . . ..... ... . . ... .. ... . .. . . .. ... .......................................... . ... ... . ... . ... .. .......................................... . ..... ... ... .. . .. ... . . . . . . . . . . . . . . . . . . . . .. .. .... . .. ... ............... .............. . . . . . . .. .. .. .. .. . . 1 .. .. .. .. . . .. .. .. .. . . .. .. .. .. . . .. .. .. .. . . .. .. . 1 2 .. .. .

x =4

x +x =5

4 A 3 2 1

Optimal at C: x = 4 1 =1 x2 z = 9

C D

2x + 3x2 = 12 6 x

z = 2x x

z = 2x1 x2

Figure 3-1: Graphical Solution of a Two-Variable LP

.. . .. .. .. .. . .

.. .. .. .. . .

z = 2x x z = 2x1 1 2x2

.. .

Simplex Method
2x1 2x1 4x1 x1 4x1 + + + +

Figure 3-1: Graphical Solution of of a Two-Variable Figure 3-1: Graphical Solution a Two-Variable LP LP

consider the problem of minimizing z for xj 0 where

consider the problem of minimizing z for xj 0 where

such as 3x4 and using it to eliminate x4 from the remaining equat 2x1 /3 + 4x obtaining + 11x5 /3 = z 17/3 dividing its equation by 3, 2 /3 7x3 /3
1 2 4 5 If we pivot again by choosing say x2 /33as the pivot we obtain + 2x /3 = 1x /3 + 1x /3 + 2x /3 5

x1 + x2 + 5x3 element (called = 7. A pivot consists in choosing some nonzero + x4 + x5 the pivot) in the such consists and choosing eliminate A pivot as on4X4in using it to some nonzero element (called the pivot) Pivot 3x equation by 3, obtaining x4 from the remaining equations by dividing its
17/3 4x1 /3 + 2x2 /3 + 13x3 /3 + x4 + x5 /3 = 2x1 /3 + 1x2 /3 + 2x3 /3 z + + 11x5 /3 = 4/3. 17/3 2x5 /3 = 1x1 /3 + 4x2 /3 7x3 /3

2x2 + 2x3 + x4 + 4x5 = z 2x + 2x + 3x + x = 17 2x22 + 13x3 3 + 4 x4 +5 4x5 = z x2 + 13x + 3x4 x x = 2x2 + 5x3 3 + x4 + +5 = 5 7. 17

2x1 5x3 + 1x5 = z 11 If we pivot again by choosing say 3x2 /3 1x4 the pivot we obtain x 3 + as x5 = 3 2x1 + 2x5 = 4. x1 + 1x2 + 2x3

4x /3 + 2x /3 + 13x /3 + x + 1 3 2

x /3 =

17/3 4/3.

2x1 4x1 4x1 x1

t consists in choosing some nonzero element (called the pivot) in th vot consistsin choosing some nonzero element (called the pivot) in the arra sas 3x and using it to eliminate x4x4 from the remaining equations b 3x4 and using it to eliminate from the remaining equations by rs 4 g its equation by 3, obtaining ing its Pivot on X23, obtaining equation by
2x /3 + 2x11 /3 + 4x /3 + 4x11 /3 + 1x /3 + 1x11 /3 + + 4x2 /3 7x3 /3 2 /3 7x3 /3 2x 2 /3 + 13x3 /3 x + 2x2 /3 + 13x3 /3 + +4 x4 1x /3 + 2x3 /3 + 1x2 /3 + 2x3 /3 2 11x5 /3 5= z = 17/3 17/3 + 11x /3 z + x5 /3 5= = 17/3 17/3 x /3 2x /3 /3 + 52x5= = 4/3. 4/3.

+ 2x2 + 2x3 + + x4 + + 2x2 + 13x3 3x4 + 2x2 + 13x3 + 3x4 + + x2 + 5x3 + x4 x1 + x2 + 5x3 + x4 +

Simplex Method

4x5 + x +5 x5

= = 17 x5 z = 17 x5 = 7. = 7.

(3.4

(3.5

pivot again by choosing say x2 /3 as the pivot we obtain ivot again by choosing say x2 /3 as the pivot we obtain 2x1 5x3 + 1x5 = z 11 2x1 3x 3 1x + 1x5 = z 3 11 5x + x5 = 2x1 3 4 3x 2x 1 4 2x = x1 + 1x2 + 2x3 3 + 1x+ 5 x5 = 4. 3

(3.6

n set. Rewriting (3.6) we obtain5x 3 (z) + 2x1


2x1

ay that the original system (3.4) is equivalent to (3.6) because it has the sam ion set. Rewriting (3.6) we obtain is equivalent to (3.6) because it has th that the original system (3.4) + 1x5 = 11 3x3 + 1x4 x5 = 3

x1 + 1x2 + 2x3

+ 2x5 =

4.

(3.7

x1 + x2 + 5x3 + x4 + x5 = 7. Figure 3-1: Graphical Solution of a Two-Variable LP vot consists in choosing some nonzero element (called the pivot) in as 3x4 and using it to eliminate x4 from the remaining equation der the problem of minimizing z for xj 0 where ing its equation by 3, obtaining

SM: Equivalent System

ot consists inby choosing saynonzeroas the pivot we obtain pivot again choosing some same solution set(called the pivot) in the x2 /3 element the as 3x4 and using it to eliminate x4 from the remaining equations by 2x3, + 1x5 = z 11 ng its equation by 1 obtaining 5x3

4x5 = z 2x1 /32x1 + 2x2 + 2x33 /3 x4 ++ 11x5 /3 = z 17/3 + 4x2 /3 7x + = 17 + 2x2 /3 + 13x + + x + 17/3 4x1 /34x1 + 2x2 + 13x33 /3 3x4 4 + x5 x5 /3 = = 7. + + /3 + 2x + 4/3. 1x1 /3 x1 1x2x2 + 5x33 /3 x4 ++ x52x5 /3 =

3x3 + 1x4 x5 = 3 2x1 2x1 /3 + 4x2 /3 7x3 /3 + 11x5 /3 = z 17/3 1x2 + 2x3 + x = 4. x1 +/3 + 13x /3 + x + 2x5/3 = 17/3 4x1 /3 + 2x2 3 4 5 + 2x5 /3 = 4/3. ay that1x1 /3 + 1x2 /3 + (3.4) is equivalent to (3.6) because it has the original system 2x3 /3 ion set. Rewriting (3.6)say x /3 as the pivot we obtain pivot again by choosing we obtain 2 (z) + 2x1 5x3 5x3+ 1x5 =+ 11 = 11 2x1 z 1x5

its equation by 3, obtaining 2x1 /3 + 4x2 /3 4x1 /3 + 2x2 /3 1x1 /3 + 1x2 /3

basic variables,canonical form withvalues to variables (z), x4 , x2 , w ay that (3.7) is in because these respect have 2x1 5x3 alled the dependent variables, In practice, z zbecause variables, ent, or nonbasic variables. or basic+ 1x5 = is 11 these values 3x3 + 1x4 x5 = 3 expressed in 2x1 terms of the independent, or nonbasic variables. In practice the other dependents as basic. + 2x dependents as basic. 4. red to as thex1 + 1xvariable 3and the other 5 = objective 2 + 2x setting the values of the nonbasics the values he basic feasible solution is found by settingto zero. of the nonbasics to

th respect to variables /3 as the pivot we obtain ot again by choosing say x(z), x4 , x2 , which 2

Canonical Form

7x3 /3 THE SIMPLEX + 13x3 /3 + x4 + 2x3 /3

5 METHOD

+ 11x /3 = z 17/3 + x5 /3 = 17/3 + 2x5 /3 = THE SIMPLEX MET 4/3.

.7) it can be read o by inspection:

hat the original system (3.4) is equivalent to (3.6) because it has the Basic Feasible we obtain set. Rewriting (3.6) Solution

eote that choosing (z) and any arbitrary set of variables as basic variab Simplex Algorithm.

Basic Variables 3x3 + Non-Basic 5 = 3 1x4 x Variables 2x1 that in this example the basic solution turned out to be nonnegative. T + is for applying 2x Simplex Algorithm. 4. x1 + nonnegative. This2x5 = tion turned out to be 1x2 +the 3 cessary requirement

11, + x (3, 4), 1 , 1xx ) 11 ), xN z =(x1 , xB ,2x(x4 ,=2(0, 0). xN = (x+ x3 , 5 5== (0, 0, 0). = (z) x3 = 5 ) x ) = 0, 5x3 (3.8) 1

e the canonical form will not necessarily yield a basic feasible solution to

follows: problem consider theand theof minimizingequationj by 0 where of the and by ( h rth equation replaced multiplied the re ced . . . , m except multiplied by (ais rth equationsum = 1,equation i = r, replace the ith ).z for x theith equation uation by the rth equation multiplied by (1/ars ). n and the replaced rth equation 2x + 2x by (ais ). 4x = z multiplied 2x1 equation by 3 + rth 4 + 5 multiplied by (1 1. Replace the rth+ 2 the x equation Since pivoting nserts andideletes redundant+ 2x + 13xby+ 3xsum ofxthe is a process th equations, 4x1 ithinserts it3does not + redundant equ m except is= r, replace the 2 ivoting that inserts and that the originalequations, it does not set, and th a process deletes equationandthe 4 the solution deletes 5 = 17 a process 2. For each i = 1, . redundant system. sulting system is equivalent .to. , m except i = r,alter + x = 7. x1 x2 by (ais x4 e replaced rth equation the+resulting 3 +). replaceequivalent to by multiplied+ 5x system is the ith equation th 5 e solutionresulting system isthe replaced rth equation system. by (ai set, and set, and the ith equation and equivalent to the original multiplied m):A pivot consists m equationssome nonzero element (called the pivot) in A system of in choosing in n variables xj Denition (Canonical s that with 3xand to system to eliminate variables variables j (Canonical Form): deletes redundantequations fromdoes nottoxbe inequatio said form inserts pivotingusingprocess mset inserts4 and n is of remaining equatio an Form): equations, such Since 4 and A is a orderedthat of x in itdeletes redundant canon as respect it of the m equations enition (Canonical A system dethe canonical equation byrespect to to the original system. , . . . , xjm ) if an in resulting system is equivalent an ordered set (xj1 , xj2 form coecient in equation i and a of variables with 3, obtaining nly dividing its unit if xjialter the solution set, and the resulting system is equivalent to the o has a ,said if and only if canonical form with equation i and an ordere xjm ) to be in xji has a unit coecient in respectcoecient in all ot zero to a equations. A 2x /3 of m equations in n variables /3 = z 17/3 cal ,Form): . . , xsystem + 4x2only if x/3 has a unitxcoecient in + 11x5 j 1 x 2 , other equations.and /3 7x3 j ) if xent in jall . Denition (Canonical Form):i A system of m equations in j1 jm x 4x1 /3 + to an ordered + T 4 + x5 /3 = nonical form with respect 2x2 /3 + 13x3 /3set System (3.9) below, 17/3 xB of with T to be in canonical form with variables an ordered s ism ) inand xN = (xm+1 , . . . , xn ) isrespect to said all otherT equations. ( x , x2 , . . x 1x ero 1coecientx1 ,1xa, .+. 1xm /3 + 2x3 /3 (xcanonical, xnaT = for each i, + 4/3. ow, with . xB ,=ji( has /3 unit x 2 ) and xN = m+1 , . . and /3 is , and only if x , x ,2. . .. , x coecient in equation ia .2xbecause 5 ) and ith if i has (xa1unit j jm ) variable equations. j2 coecientifin theonly equationzero equation xi has variable x has a unit coecientxjand ithunit coecient in eq el for each i, the in the other pivotzero coecient in all other /3 as the pivot we obtain elsewhere: i equations. If we again by choosing say x2 T re: (3.9) below, with xB ( x1 , x2 , . . . , xm ) and xN = (x = Ix + Ax T = b. N IxB = ( x x b.. . 2x with N 5x3 x , ,. ..+ x = (3.9) x = ( hal B + AxN ,=for.B , xm ) 1 the variable 1xx2has,,an5)TT is coecient i x because 2 ,(3.9) below, and xx = (xm+1 ,(3.9) 1xm ) z 11 = (xm+ 1 System ... x unitand N each i, B i 3x3in the ith equation (Basic in th + 1x xa = 2xfor each i, the variable4xhas 5 unit coecient Solu h i, the variable xsolution 1obtained by setting the Denition 3 canonical i has aspecial solution obtained iby independent variables e becauseunit coecient ): elsewhere: special (Basic Solution): Thex + 1x + 2x setting o Theand zero elsewhere: + 2x5 = the 4. 1 2 3 t to zero and solving for thesolving for the dependent variables is l variables equal to zero and dependent variables is called a basic solution. +N= =to (3.6) because it ha (3.9) IxB + the = b. IxB We say that AxNoriginal systemIxB + Ax AxN b. b. (3.4) is equivalent ic solution. solution set. Rewriting (3.6) we obtain

Denition: Canonical Form

Denitions
Basic Solutions Degeneracy Basis Basic Columns

+ x1 also + 2x3 et of variables. These relative cost factors are + x2 called the reduced2 our 5x3 3x3 example + Section 3.2, we ssociated withfrom x5 set 11 term redisplay (3.7) withto (3.7) with 3 basic = of variables. Continuing with aour example from Section be used redisplay improve the 3.2, we later The boldfaced will + 3x3 x5 3 (3.15) faced. 2x + x4 5x = + 5x z) + 1 (z) + 2x to (3.15) x5 =be read o = 11 solution= can 11+ x5 by inspection: 3 Section 3.2, Costredisplay (3.7) with + example from 4. ntinuing 3with our 2x5Reduced Costs3(Relatives we Factors) 2 + 2x Denition: 1 ++ 2x + x4 3x = x 3 x = 3x3 + 2x1 (3.15) + x53 + 4 3 (3.1 5 ced. x + x + 2x 1 4), z + 2x = ater to improve the2xx + x = 11,5basic feasible) = (3,4. xN = (x1 , x The 4.+ xx = 1 (z) + solution. + 2x xB = (x4 ,2x = 11 2 3 + 25 11 2 5x 3 5 y inspection: later to improve + 3x + x xbasic feasible will be used the solution. Thesolution. 3 = + be 1used later to 3 2x ( 4 boldfaced term will One relative cost factor in the5canonical form (3.15) improve the The basic feasib n be (3.15) ion toread ocan bex3x1 5the 2coecient inspection: (3.16)x is 4. which, is o = (3, 4), xN =by inspection:xby+0,2x3 of x+ 2x5 3= increased to any (x1 , read + = (0, 0). x ) 3 . If oldfaced 4 , x2 ) =thebe used= (x1 , x3 ,improve the solution. and adjusting fea of the other nonbasic at zero The (3, (3.16) xB = (x term will =values2 )later to xx ) = (0, 0, 0).x5 ) = (0, 0, 0). basic (3.1 ,x z form (3.15) (x4xN = (3,namely= (x1 ,5, = 11, xB 4), negative, 4), 5N c = x3 , anonical can the read o by remain satised, it is evident that the v is n to (3.15) be equations inspection: 3 is relative cost because the (3.15) iswhile (3.15) is of is given any in the value form holding factor in the tofactor positivecorresponding value negative, namely One increased canonical formcanonical negative, namelyzc3 = 5, by c3 = ( t zero and adjusting 3 If basic variables tovalue 3while = (0, 0, 0). that ent ofzx= 11,x3 B = (x4 ,. x2 )xto is increased= soanyxpositive value while holdi h is the 3 . If x is increased = (3, 4), xN coecient of x the 3 any positive (x1 , , x5 ) holding s evident that zero and of z would be reduced, z = 11 5x her nonbasic atthe value adjusting the basic variables so variables values of the other nonbasic at zero and adjusting the basicthat 3 . so th e zsatised, byfactor in the canonical form (3.15) is be reduced, is given it nrelative cost is satised, it evident of would negative, namely c3 = equations remain evident thatisthe valuethatz the value of z would be reduce s the corresponding . If x3 ondingcoecient of x3value of is increased to any positive value while ho use the value of z is given by z is given by ues 11 5x3 . z = of the other nonbasic at zero and adjusting the basic variables so (3.17)

cost factorsrelative because their values depend on the choice of the ba s. cost or objective form of the canonical system (3.11) are called cost factors are also called 1 5x3 + (z) + he These relative These relative cost factors 2xthe reduced costs reduced rel set of variables. are also called the co h a basic set of3.2, we redisplay (3.7) withdepend + 3x3 + of the from Section variables. of variables. + 1 ost factorsrelative because their values2x3x3 on the choicex4 associated with a basic set

Improving a non-optimal BFS

t of variables. to (3.15) can becost factors inspection: solution These relative read o by are also called the reduced c ssociated with a basic set of variables. z = 11, xB = (x4 , x2 ) = (3, 4), xN = (x1 , x3 , x5 ) = (0, ntinuing with our example from Section 3.2, we redisplay (3.7) with One relative cost factor in the canonical form (3.15) is negative, ed. increased to any positive va which is the coecient x3 . 3If x3 is + x5 = 11 of 5x (z) + 2x1 SIMPLEX ALGORITHM the values + 2x1 other + 3x + at4zero x5 = of the nonbasic x and adjusting the basic 3 (3 3 3.2 THE SIMPLEX ALGORITHM the equations x1 + x2satised, it is evident 69 the value of z w + 2x5 that 4. = remain + 2x3 M 69 ORITHMbecause the corresponding value of 3 as large as possible, since th 69 reasonable, therefore, to try to make x z is given by ldfaced term will be used later to improve the solution. The as large a It seems be the value of z. However, make x3case, the reasonable, therefore, to try to in this basic fea e of x , to can x aswill by inspection: the 5x nake x 3asthe smaller value of xpossible, since= 11larger3 value of z. However e, to (3.15) makebe3 read o as the larger z will be the . to try large as possible, since 3 , the smaller the large 3 to try to make x as large as possible, since the larger erefore,increased indenitely this ot be the value ofx cannot while theindenitely of will bez. However, in3this3case,be invalue case,other nonbasic the other nonba z. However, increased the value while variables rem ue of the aller willwhile the = (x4z. 2 ) = (3,variablescase,1the3zero) = (0, 0, 0). be thexvalue of ,nonbasic 4), this =remain value of However, in of variables 5 xN x the basic (3.15) sa (3 z the corresponding values remain basic (x , x ,ofsatisfyingvariablesar nitely = 11, B because theof the zero other x the other nonbasic variables corresponding values indenitely while the other nonbasic variables remain zero alues variables satisfying (3.15) are basic of the basic variables satisfying (3.15) are e relative cost factor in the canonical form ding values of the basic variables satisfying3x(3.15) is negative, namely c3 = (3.15) are x4 = 3 3 x4 = 3 3x3 s 3xx = 3 3x x3 . If x3 is increased to any positive value while hol the 3 coecient of 4 3 x2 2x3 . x 4 2x3 . (3.18) 3x3 x4 = 3nonbasic at 2 =(3.18) adjusting the= 4 variables so ues 2xx2 = other2x3 . the 4 zero and basic of3 . (3.18) x2 = 4 2x3 it is evident that uations remain satised,. that if x3 increasesthe value3of z would x4 becom beyond 3,negative, redu then be and We see 3 3, that if x43 becomes negative, and that if then x4 becomes 3,the corresponding x4beyondbeyond 4 2 then x if then x increases becomes negative, and that also becomes negativ e value beyond 3 3, then increases z is given by x3 then x of also becomes negative.if Obviously, the eases beyond34 2 then xbecomes negative, and 2 that ases beyond 3,

Improving a non-optimal BFS

4 the largest becomes negative. Obviously, 2

these, namely x3 yield permissible value x is the valueincreases is the that 2permissible also smallerisof negative.ofObviously,whichlarges ed, it isxevident smallerofofxthese,becomesthe be reduced, = 1, yields 1,u x3 then 3 2 value of would x3 = these, namely x x3 of 3 beyond 4 the value of znamely smaller 1, which the3 = Continuing with then x substitution (3.17) and 3.2, x3solutionwhich(3.7) feas our3 in beyondz 3is substitutionexample and (3.18) asolutionthatredisplay fact a basicfac (3.17) given by in (3.17) from these, (3.18) new feasible new feasible if 1, (in yields upo value of value of xwith4lower cost: negative, and a(in= feasible basic (in f sespermissibleand3,(3.18)isathe smallerinofSectionnamelywenew fact a solution with becomes lower cost: solution) solution) with ldfaced. also 2 then x2cost: (3.17) and (3.18) a Obviously, solution (in th substitution in becomes negative. new feasible the largest fact a basic feasib lower which 2, x 1, upon x = + solution) with (z) +namely x3 = 1, = z x =x3 = 1 =x2 = 11 0. z = 11these,3 . 2x 5x (3.17) = s the smaller of lower cost: 1 z = 6, x35x31, =26,yields x5x4= 2,x5 1 = x4 = x5 = 0. + + solution (in 3x3 basic x5 = ( d (3.18) z = 6, feasible1,reduces z 2, xfact a 4x4 5to= 0. a new x3 = 2x1 2 solution reduces + from 11 feasible 3 x (3 This solution6, x3 =x from = 2, x1 = x4 = x6. = 0. 4. x2 11 to 6. (3.19 z x1x +=1, + 1 = x = + 2x5 = = This 2x3 z 2 5 Our immediate objective is to discovernot this new solution i Our immediate solutions new feasible basicobjective is to discover whether or whether or not this ne since the he This solution imal. This be 6.a 11This cut is improveisthe new canonical form change boldfaced from 11 time used to time short cut possible since the new basic fea later reduces from n reduces z term willzto imal.short 6. toapossible variable, solution. The4 canonical fs i.e., by making since val respect 1 read is basic variable, i.e., 4 0. 6, x3 Our (3.15) canxbe= xrespect 5to=inspection: by or not this nonbasic x nonbasic lution= 1,immediate objective= x byonly onewhether making xbecause solution is now to x2 = 2, to only4 one to to zero and making x (3.19) new its value its min o discover basic is is m dropped ediate objective is to zero and making x3 basic becausethisvalue issolution 3 dropped to discover solutions or not basic new now positive. to previous whether its compared imal. This time a short cut is possible with new basic variables, x3form x2 , can bewit since the new canonical and changes ob canonical form canonicalpossible since the new canonicalcan be obtained direc form with new basic variables, x3 and x2 , form changes w ime a toto = 11,oneBbasic variable,from 4), xN = (xx4 form, which (0, 0,its value ( , , rom 11 short cutpivot= (xonexpivotcanonical old canonical x3 , x 5 ) = sincex40).Chooseha 6. one is and respect z only x from4the 2 ) = (3, the form, which has x and x basic. x2 basi a old i.e., by making 1 nonbasic has 4 2 term in the 4 value that nly is to discover whethertermnot basic new thatequation theislimitedpositive. value i.e., this because itsnonbasic dropped to zero and making x by 3making xlimited min- since maximum am now the its A new ive one basic variable,term in3thexequation solution isthatmaximum amount by wh term that x3 or One relative cost factor basicand x the variables, be 4 x2 , is be becoming negative, n canonical form with x3 in x canonicalx2 and xvalue without obtained directly = new basic variables, form adjusted be negative, namely c3 b basic canonical form ,(3.15) is now without becoming basic variables, zero and making the new2term 3x43,, couldxitsand couldcanadjustedpositive., the ne because 3we changes 3x . Pivoting on 3x3 A cut is possible since with theIf x is increasedboldfaced positive value while ho which any hich ispivot coecient ofcanonicalwe boldfaced 3x3toPivotingx3 basic.the new canonica one the new byterm 3x3 , 3which 3form, which x itsxvalue has 3x3 , Choose as pivo from basic variables, (z),and has becomes onobtained directly the old x relative to x x , and x. can be2 the making . 4 and variable, x nonbasic since , rm with i.e.,

3 3 t (3.13) is optimal. 3 be increased indenitely while the other nonbasic variables rema x3 cannot increased However, be thisthe other value of satisfying (3.15) zer er x3 cannot be because the indenitely valuescase, thenonbasic variables nonbasic are will be the value of z. corresponding increased the basic variablesthe other remain var = ,thewhile (0, indenitely (3.16) xx3 cannotxin) 3x3 of 0, 0). ofwhilebasic variables satisfying 4 , x 3 corresponding values the (x4 ,Denitioncorrespondingbecause of5the basic variables satisfying (3.15) are (3 x2 ) = (3, 4), xN = (xvalues = 1 3 because the (Reduced Costs or Relative Cost Factors): The coecients ndenitely while the other2nonbasic variables remain zero x = 4 2x3 . x = 3 3x 4 3 the cost or basic variables of the canonical system 3 3x form g values of the objective(3.15) satisfying (3.15) are x = (3.11) 3are called rel in cost canonical form the factorsrelative because = 3 values depend = 5, choice of the isx4 their x3x3 4 2xx43=on 2x . negative, namely 3 . 4 the c 2 = 2 3 3 3,2 = 4 value tha if. x3 x3 is increased to any positive x4 3becomes negative, and (3.18 x 2x . If increasesbeyond relative thenfactorswhile holding the reduced x3 set ofxvariables. 3x These x3 increases beyond 3 beyond 3 becomes negative, and are also 3, then 3 4 = We see that ifWe see that cost increases 3, then x4 called x4 becomes neg 3 if x3 beyond x2 and basic set ofthe then x2 negative. so that Obviously, the then x2 Obviously, the lar nbasic at4zero3 x increasesalso4 becomesthen2 x becomes becomes negative.that basic variables negative. associated if4 increases beyond 23 3, 4 also then x(3.18) negative, and Obv with a adjusting variables. becomesalso increases We see x2 = that 2 3 2x3 . x3 beyond beyond 4

ead o tryof xmake smaller will be of x value of z. However, value of z. However, in this the value to , the x fore, to by inspection:as3large as the , the smaller will be larger this case, the value o the value possible, since the the in

Improving a non-optimal BFS

ible since solution reduces z fromi.e., form changes with to only onethe new canonicaltoby making x4 nonbasic since its va This basic variable, 11 6. ntinuing with our example from Section 3.2, we redisplay (3.7) with to by making x4 nonbasic because valuenot is new positive. and making x3 basic discover whether or has i.e.,zero Our immediate objective is to since itsits value thisnowsolution is mi ced. imal. This time a short cut is possible since the new canonical form changes wi al form with new basic variables,positive.x2Acan be obtained dire x asic because only value is now5x3 3byand + ,x 5nonbasic since its value h its 2x basic variable, i.e., making x new = 11 (z) +one 1 respect to 4 t fromdropped to zero ,and making + 3x3 + xdirectly by basic. Choose + can obtained 4 iables, the old canonical form,3 which has 4 and=is now positive. A ne x3 and x2 2x1 be x basic becausexits x5 x2 3 value at x3which in the with1new x2basic. 3Choose maximumobtained directly b canonical form and+ basic limited 3 and x2 5can be 4. + 2x + 2x = x x rm, term has xequation2thatvariables, xthe as , pivot amount by w 4 one 2 and x , could be adjusted without becoming negative, riables,Choosefrom4the old canonical form, which has x4 and x2 basic. Choose as piv x pivotthepivot used later to improvewhich the hat limited willmaximum amount by the maximum amount by whichfe oldfaced term xa term interm s.t. that limited the solution. The basic t term that 3 be the equation m 3x3 ,(3.15)variables, read o ,by inspection: without becoming new canonic which we boldfaced could adjusted on adjustedcan be x2 and x4 3x3 .benegative,on 3x3 , the negative, name to basic without becoming Pivoting namely e to (z), x3 , and, x2 becomes the term 3x3 which we boldfaced 3x3 . Pivoting on 3x3 , the new canonical for

6. set of variables. These relative cost factors are also called the solution immediate objective is to discover whether or not this new reduced (3.1 = of 3 new = associated with a basic set 6, xvariables. the1 new canonical iscover a short or not this = since 2, x = 4 x5 = his time whethercut isz possible 1, x2solutionxis=min-0. form chang

solution) with lower cost:

Improving a non-optimal BFS

3 3 + 3 x4 3 x5 = 6 ne relative cost factor2(z) + canonical form (3.15) is3negative, namely c3 = in the 3 x1 1 1 11 1 + 2 is increased x 3 any 33x5 = value while ho x5 = 5 +of 3 x2 If x3 x1 + x3 + x3 3+ 4 x positive 1 1 (3.2 is the coecient x3 . x5 = 6 + to 4 3 + 3 x4 7 3 7 zero 2 2 x4 +8 the basic variables so 3 + 8x = lues of the other nonbasic atx1 + x2and adjusting 3x 5 = 2. 2. 3 x4 3 1 1 3 x1 + x2 3 5 + x3 remain 4satised, 5 = evident that the value of z would be red + 3 x 3 x it is 1 (3.20) uations Note that the basic solution, se the corresponding value of z is given by the basic 2 x + 8 x = 2. at solution,

3x3 . zPivoting = (x3xx ,) the new x = (x , x ,form (0, 0, 0). on and = (3, 4), canonical x ) = relative toxB (z), x3 , , 32 x2 becomes N = 11, 4 1 3 5 es (z) + 16 x1 + 5 x4 22x5 = 6 16 5

3 4

3 5

that x3 term in the equation that limited the maximum amount by whic 3 variables, and xx4 could be adjusted without becoming negative, riables, x2x2 and 4 , ,could be adjusted without becoming negative, na erm 3x which we boldfaced 3x m 3x3 , 3 , which weboldfaced 3x 3 . Pivoting on 3x3 ,3the new canonical Pivoting on 3x , the new canoni THE SI ve to70 x3x3and xx2becomes (z), to (z), , , and 2 becomes

31 5 x3 = 1 + 3 x5 that the basic solution, the other nonbasic variables, x = x = 0, a obtained by keeping 1 4 8 at the basic solution, x2 = w values for x2 , x3 , and z in terms of x5 : 2 3 x5 .
3 3

16 (z) +163xx1 + 55x4 2 x5 == 6 (z) + 3obtained by keeping33 x4 other2 nonbasic variables, x + the 3 3 x5 6 solution can be 1 + 2 2 x1 for x2 , x3 ,+ 11xz in terms= x1 : + x3 and 4 1 x5 of 5 ( solving for new values + 33 1 x + x3 + 33 x4 3 1 x5 = 1 3 8 x = SIMPLEX METH 7 2 32x4 + 38THE 2. 7 3 x1 + x2 2 z = 4 ++ 5x5 = 2. 6 x x1 + x2 x 3

Improving a non-optimal BFS

z = 6, xB = (x3 , x2 ) = (1, 2), xN = (x1 , x4 , x5 ) = (0, 0, 0), ThereforeBwe (x3 , x2 ) =5 (1, 2), xN = (x1 , x4 , x5 ) =while keeping x z = 6, x = increase 6 to the maximum possible (0, 0, 0), z = + 2 x5 3 negative. obtained by second relation x = 0, and increasing x e same as thatNote that the setting x1 = 0, in5(3.21) places no bound x3 = the solution set of thexcanonical forms before 1 relation restrictsx 5 = 0, maximum of ( + 1 x5 = 0, (3. to a and increasin oint where x4 = 0. Since 3 ame of x5 , butobtained by setting x1 as that that the third 5 pivoting xx = reduced=the solution set of are canonical 8 x5 in be value 4 is same, the zero. Therefore, the pivot term, 3 x2 2 8 x2 forms th nt where are2the0. Sincetovalues of x5 . and x3 the uniquely determined 3 x4 , x5of = 0 the same,for the next (3.18) and x inspectingvalueright-hand ) (3.20) is used the values elimination. are the the of x2 has voting are whether obtained via of x2 or by 3Sinceuniquely determin ncrease x5 to become positive, (3.18) while inspecting the right-ha 20). and whether maximum the new by basic variables is x3 n x5 ) = 0 x5 hastheobtained viapossibleorset of keeping x3 and x2 an his gives a new basic feasible solution with z = 6. Although the value of

x2 = 2 x5 2 at x3 term in the equation that limited3the. maximum amount by which z = 6 + 3 x5 ariables, x2 and x4 , could be adjusted without becoming negative, nam x = 1 + 3 x5 re we increase x5 to the maximum3 possible 1while keeping x3 and x( 2 m 3x3 , which we boldfaced 3x3 . Pivoting 8 x . 3 , the new canonical f on 3x x2(3.21) places no bound on the inc = 2 . Note that the second relation in 3 5 to (z), x3 , and x2 becomes ut that Therefore werelationxrestricts x5 to a maximumkeeping x3 2) at2 the third increase 5 to the maximum possible while of ( 8 and x 3 negative. Note that the second relation in (3.21) places no the third inc 16 5 2 8 is reduced to zero. xTherefore, the+pivot term,x5 x56bound 8on the equ in (z) + 3 1 3 x4 to a 3 = 3 maximum of ( 2) at w of x5 , but that the third relation restricts x5 3 1 1 t is used valuetheis reduced to zero. Therefore, xthepivot x5 of x2 1 in the third equa for x + 2 x1 next elimination. 3Since the value = 8 x has dropped (3 +x + 3 4 term, 3 5 2 3 3 has become positive, for the nextset of basicSince 8 value of x2 anddropped to of (3.20) is used the new elimination. variables is x3 has x5 . Red the 2 x4 , + 3 xgives 2. x (z) 5 = 7 x1 + x2 , (3.20) toand x5 has become positive, the new3set 5 basic variables is x3 and x5 . Redu canonical 3 form relative to x 3 of

Improving a non-optimal BFS

at the basic solution,x1 + (z) + 19 4

same basic feasible 0. Since nt where x4 = solution the solution set of the canonical forms before 11 5 3 z =5 , x3 = 3, x5 = , x1 = x2 = x4 = 0. ( 11 the values of x4 and x3 are uniquely determined w voting are the same, 4 , x3 = 2 x5 = 2 , x1 = x2 = x4 = 0. , z= x5 ) = 0Since all theobtained4 via (3.18) or by inspecting the right-hand whether relative cost factors 4 the nonbasic variables are now positive, 2 for solution is minimal. In fact it is the unique minimal solution because all the rel ). l the relative cost factors for the nonbasic variables are now positive

1 x2 + 3 x4 3 = 11 11 4 =2 2 (z) + 19 x1 + 1 x2 2 + 2 x4 4 4 1 3 1 + 3 x1 + + x2 x++x3x++1x34+ 1 x4 = = 5 5 x 4 ( 8 , x2 ) = (1, 2), x 2 (x1 , x4 , x5 ) = (0, 4 4 8 8 1 8 = 4 0, 0), z = 6, xB = (x3 N 1 7 3 7x + 3x x 8 x1 + x2 1 8 1 x4+ xx5+=5 = 3 3 2 8 4 4 8 4 4 4 as and theobtained bysolution x1 = 0, x5 = 0, and increasing x that basic feasible setting

system (3.20) to canonical form relative to x3 , x5 , (z) gives

Key component of SM
The optimality test Introducing Non Basic Variable (NBV) into
basis

Why is it feasible, optimal, and unique? feasible solution is optimal.

Exercise 3.3 (Unique Minimum) Prove the Basis. When t Exercise 3.4 (Multiple Minima) Determine by inspection b 2. Introducing a Nonbasic Variable into that the basic solut x2 = 1/3 is a feasible optimal the amount by which we can increa variable into the basis, solution7to = + 15 by requiring that Minimize the adjusted 2 x1 values of the basiczvariabl Minimize subject to x1 + x2 0x3 = z + 15 3 tive. 1 subject to 3 x1 x2 +2 x3 = 4 3 x3 = 3

Exercises

Exercise 3.2 (Infeasible Problem) It1is obvious that the linear p x 0, x3 20.3 = 8 + 3x and x1 0, x2 3 is infeasible. Show algebraically by generating an infeasible inequali and x 0, x2 0, x3 0, the case. feasible, optimal, and 1 Exercise 3.3 (Unique Minimum) Determine by inspection t Why is it unique? Minimize x1 + x2 but that it is not unique. Can you nd another x = 2 basic feas optimal 7 subject to x1 x1 + 2 Minimize Exercise 3.4feasible solutions that areProveoptimal? basic soluti (Multiple Minima) 2 also that the = z + 15 any nonbasic = 3 0 subject to x x1 x2 = 1/3 is a feasible optimal solution to1 + x2 x2 0. 3 + x = 4 Exercise 3.5 (Unbounded Class ofxSolutions) 3 Reduce 2 1 Minimize 0x3 = z + 15 and x1 0, x2 0, x3 0. subject to x2 2 x3 2 = z = 1 Minimize x1 3 x 3

3.2 THE SIMPLEX ALGORITHM

x1 2 x3 2 = 1 + 3 x= 8 3 x3 and x1 0, x2 0, x1 0, 0 Exercise 3.4 (Multiple Minima) Prove that the2basic soluti x 0 x2 = 1/3 it is not unique. Can solution to but that is a feasible optimal you nd another optimal basic feasi to feasible canonical form and generate a class of solutions tha subject to x Why is it feasible, optimal, and unique? 1

solution is optimal.

cing a Nonbasic Variable into the Basis. When bringing a no e into the basis, the amount by which we can increase it is const iring that the adjusted values of the basic variables remain no

Exercise 3.2
x1 + x2 x1 + x2 = 2 x1 0 x2 0.

It is obvious that the linear program shown below is infeasible. (Infeasiblealgebraically by generating an infeasible inequality that Show Problem) It is obvious that the linear program shown Show algebraically by generating an infeasible inequality that this is this is indeed the case

Minimize subject to

E SIMPLEX ALGORITHM

Exercise 3.3
7 x 2 1 x1 3 x 2 1

ise 3.3 Determine by inspection the basic solutionby inspection the basic so (Unique Minimum) Determine to Minimize subject to + x2 = z + 15 = 3 + x3 = 4

and x1 0, x2 0, x3 0. it feasible, optimal, and unique?

Why is it feasible, optimal, and unique? ise 3.4 (Multiple Minima) Prove that the basic solution z = 1 /3 is a feasible optimal solution to

Minimize

0x3 = z + 15

x3 = 4

3 x 2 1

+ x3 = 4

and x1 0, x2 0, x3 0.

and x

it feasible, optimal, and unique?

Prove that the basic solution Exercise 3.4 (Multiple Min se 3.4 (Multiple Minima) Prove that the basic solution z = 15, x1 heis a feasible optimal solution1to 8/3, x2 = 1/3 is a feasible optimal 3 basic solution z = 15, x = is a feasible optimal solution to Mini Minimize 0x3 = z + 15 subj 3 = z + 15 subject to x2 2 x3 = 1 3 3 = 1 3 3 x + 2x = 8

Exercise 3.4

Why is it feasible, optimal, an

8 3

t it is not unique. it is not unique. but that it feasible solution? A but that Can you nd another optimal basicis not unique. Can basic feasible solutionsanother optimal basic feasible solution? mal basic feasible solution? are also optimal?nonbasic feasible solutions Can you nd that Are there any

0,

and x1 0, x2 0, x3 0,

and

Are there any nonbasic feasible solutions that are also optimal? se 3.5 (Unbounded Class of Solutions) Reduce

Reduce

Exercise 3.5 (Unbounded

Minimize

x1 x2 = z

and x1 0, x2 0, x3 0,

not unique. Can you nd another optimal basic feasible solution? A feasible solutions that are also optimal?

Exercise 3.5
x1 x2 = x1 x2 = x1 x2

5 (Unbounded Class of Solutions)


Reduce

Reduce z 1 0 0

Minimize subject to

anonicalto feasible canonical form and generate a class ofthat in the limit c form and generate a class of solutions solutions ction tothat to the limit cause the objective function to go to -innity. go in .

HE SIMPLEX ALGORITHM

Potrebbero piacerti anche