You are on page 1of 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.

as part of the Simplex Metho in Section 3.3.that the reader is familiar with simple matrix notation and oper x A for deﬁnitions of these basic concepts. (n 1) a column vector of dimension n. In matrix notatio tten as LP: Matrix Notation cTx Ax = b.1. b : column vector (m x 1) by illustrating the method graphically in Section 3. A : m × n. its use. x vector (n x 1) vector of dimen x : column is a column rscript T stands for transpose. In Section orithm will be described. Minimize subject to rectangular matrix of dimension mvector b isxa column vector of c : column × n. Next we will examine linear programs in standar these are systems whose nonnegativity constraints have been re . x ≥ 0.

.... .... .. . . .. ... .. .. . . .. ............. ... .. ... .. ..... ....... ... .. . ..... ....... .. .... . ... . .... .. .. . .. ... 1 2 ...... .... . . . ................ ... . . .. ....... .. ...... . ... . ...... ... ....... ....... ... . . .... ...... ....... .. .. .. .... ... .. .. ..... .. ......... . ........ .... ........ 1 .. .. .... . . . 1 .. ...... ......... ... .... .. . . ........ .... ... .... .. ..... .. .. ...... ............... ....2 THE SIMPLEX ALGORITHM LP: Graphical Illustration x2 6 5 . ... ......... ...... .. .. .... . ... .. .... .. ......... ..... .. 1 2 . ...... .. ...... . ......... . .. .... .. .. . .. . . .. .... ..... . . . ... ..... ... .... ..... . ....... .. . . .. . ......... .....3... x =4 x +x =5 4 •A 3 2 1 B • Optimal at C: x∗ = 4 1 ∗=1 x2 z∗ = −9 C • D 2x + 3x2 = 12 6 x O • 1 2 3 • 4 5 z = −2x − x z = −2x1 − x2 Figure 3-1: Graphical Solution of a Two-Variable LP ... ... .. ..... . 1 . . .... . .... .. .... . ... ... ................. .. . ... . .. . . .. ... ... ... ... ......... .. . ...... ...... ... .. ... ............ . .. ....... . .. .... ... . .. ..... . . . ... . .... ..... ... ..... .... .. . .. ....... .. ............. ........... .. . .. . . . .. ............. . . .. ........... ... ...... ....... . . ... ...... ... ...... ... ....... .. ......... ....... ... . . ..... .. ....... . ........ . ..... .. . .. .... ..... . ..... ............ ... ....... .... .. .. ... ...... .... .... .... . ... ...... . ....... ... ...... .... ........ ... .. .... .. 65 . .... .... .. . . . . .... .. ... ..... .. ........... . ....... .. .... .... ......... . . ... ..... .... ......... .. ....... ... .... .... .... ...... ......... .. . . . ... ..... ..... ...... . . . . ..... ... ... .. . .. .... .. .. ... . ... ..... . .... . ... ........ ...... ... . .... ........

. . .. ... 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. . .. 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. 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. . . 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. 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.. . .. . . z = −2x − x z = −2x1 1 −2x2 . .. . −x1 + 1x2 + 2x3 4x /3 + 2x /3 + 13x /3 + x + 1 3 2 x /3 = 17/3 4/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.

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.6) because it has the sam ion set. Rewriting (3. (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. 4/3.6) we obtain is equivalent to (3. (3.7 .6) because it has th that the original system (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 (3.4 (3.6 n set.4) is equivalent to (3. Rewriting (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) + 1x5 = 11 3x3 + 1x4 − x5 = 3 −x1 + 1x2 + 2x3 + 2x5 = 4.6) we obtain5x − 3 (−z) + 2x1 2x1 ay that the original system (3.

4) is equivalent to (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 + x2 + 5x3 + x4 + x5 = 7. Rewriting (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.6) because it has the original system 2x3 /3 ion set.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 . 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. + + /3 + 2x + 4/3. −x1 +/3 + 13x /3 + x + 2x5/3 = 17/3 4x1 /3 + 2x2 3 4 5 + 2x5 /3 = 4/3. ay that−1x1 /3 + 1x2 /3 + (3. − + 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.

2x(x4 . xN z =(x1 . 5x3 (3.6) because it has the Basic Feasible we obtain set. This2x5 = tion turned out to be 1x2 +the 3 cessary requirement 11. x2 . − 0). z zbecause variables. In practice. or basic+ 1x5 = is− 11 these values 3x3 + 1x4 − x5 = 3 expressed in 2x1 terms of the independent. ent. x1 + nonnegative.canonical form withvalues to variables (−z). In practice the other dependents as basic. + x (3. 1xx ) 11 ). red to as the−x1 + 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. 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. 4). 1 . 5 5== (0. 0.7) is in because these respect have 2x1 − 5x3 alled the dependent variables. Basic Variables 3x3 + Non-Basic 5 = 3 1x4 − x Variables 2x1 that in this example the basic solution turned out to be nonnegative. x4 . w ay that (3.7) it can be read oﬀ by inspection: hat the original system (3. + 2x dependents as basic. Rewriting (3. T + is − for applying 2x Simplex Algorithm. x4 . 0).8) 1 e the canonical form will not necessarily yield a basic feasible solution to . xB . xN = (x+ x3 . or nonbasic variables. 4. 4. . obtaining 2x1 /3 + 4x2 /3 4x1 /3 + 2x2 /3 −1x1 /3 + 1x2 /3 basic variables. = (−z) x3 = 5 ) x ) = 0.its equation by 3. or nonbasic variables.=2(0.4) is equivalent to (3.6) Solution eote that choosing (−z) and any arbitrary set of variables as basic variab Simplex Algorithm. of the nonbasics to th respect to variables /3 as the pivot we obtain ot again by choosing say x(−z).

2.=for. ¯ +N¯= =to (3. ( x . redundant system..9) below. (3. xn ) isrespect to said all otherT equations. solution set.to.follows: problem consider theand theof minimizingequationj by 0 where of the and by (− h rth equation replaced multiplied the re ced .9) x − = ( hal B + AxN .. xsystem + 4x2only if x/3 has a unitxcoeﬃcient in + 11x5 j 1 x 2 . replaceequivalent to by multiplied+ 5x system is the ith equation th 5 e solutionresulting system isthe replaced rth equation system. . . B i 3x3in the ith equation (Basic in th + 1x xa = 2xfor each i. j2 coeﬃcientifin theonly equationzero equation xi has variable x has a unit coeﬃcientxjand ithunit coeﬃcient in eq el for each i. .(3. 4x = z multiplied 2x1 equation by 3 + rth 4 + 5 multiplied by (1 1. .said if and only if canonical form with equation i and an ordere xjm ) to be in xji has a unit coeﬃcient in respectcoeﬃcient in all ot zero to a equations. A 2x /3 of m equations in n variables /3 = z − 17/3 cal . 17/3 xB of with T to be in canonical form with variables an ordered s ism ) inand xN = (xm+1 . For each i = 1.1xa.. xj2 form coeﬃcient in equation i and a of variables with 3. . .4) is equivalent ¯ ic solution. x −1x ero 1coeﬃcientx1 . . with xB ¯ ( x1 . the variable4x−has 5 unit coeﬃcient Solu h i. x . and xx = (xm+1 . 4x1 ithinserts it3does not + redundant equ m except is= r. 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 Deﬁnition (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.6) we obtain Deﬁnition: Canonical Form .6) because it ha ¯ ¯ (3. 1xm /3 + 2x3 /3 (xcanonical. obtaining nly dividing its unit if xjialter the solution set. other equations. . .an5)TT is coeﬃcient i x because 2 . . . . x2 . x unitand N each i. . x2 . .. + 4/3. Deﬁnition (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. with . .9) below.2xbecause 5 ) and ith if i has (xa1unit j jm ) variable equations.+ x = (3. x coeﬃcient in equation ia . xnaT = for each i. replace the 2 ivoting that inserts and that the originalequations. xm ) and xN = (x = ¯Ix + Ax T = b. and the resulting system is equivalent to the o has a . ow. and set. . xm ) 1 the variable 1xx2has. IxB We say that AxNoriginal systemIxB + Ax AxN b. . and /3 is . such Since 4 and A is a orderedthat of x in itdeletes redundant canon as respect it of the m equations eﬁnition (Canonical A system dethe canonical equation byrespect to to the original system. .9) IxB + the = b. the variable xsolution 1obtained by setting the Deﬁnition 3 canonical i has aspecial solution obtained iby independent variables e becauseunit coeﬃcient ): elsewhere: special (Basic Solution): The−x + 1x + 2x setting o Theand zero elsewhere: + 2x5 = the 4.9) ¯ below..B . and only if x .and /3 − 7x3 j ) if xent in jall . xjm ) if an in resulting system is equivalent an ordered set (xj1 . .Form): .=ji( has /3 unit x 2 ) and xN = m+1 .equation i = r. n and the replaced rth equation 2x + 2x by (−ais ). . 2x with N 5x3 x . the in the other pivotzero coeﬃcient in all other /3 as the pivot we obtain elsewhere: i equations. . it does not set. . Rewriting (3.. .alter + x = 7. sulting system is equivalent . m except i = r. b. m except multiplied by (−ais rth equationsum = 1. . . If we again by choosing say x2 T re: (3. .(3. xB . replace the ith ). . and th a process deletes equationandthe 4 the solution deletes 5 = 17 a process 2. x1 x2 by (−ais x4 e replaced rth equation the+resulting 3 +). . . ¯ N IxB = ( x x b.+. by (−ai set..9) 1xm ) z − 11 = (xm+ 1 System . .z for x ≥ theith equation uation by the rth equation multiplied by (1/ars ). . 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. Replace the rth+ 2 the x equation Since pivoting nserts andideletes redundant+ 2x + 13xby+ 3xsum ofxthe is a process th equations.

Deﬁnitions • Basic Solutions • Degeneracy • Basis • Basic Columns .

x5 ) = (0.7) withdepend + 3x3 + of the from Section variables. 0).15) faced. namely c3 = equations remain evident thatisthe valuethatz the value of z would be reduce s the corresponding .x3 B = (x4 .2. cost or objective form of the canonical system (3. by c3 = − ( t zero and adjusting 3 If basic variables tovalue 3while = (0. which. we ssociated withfrom x5 set −11 term redisplay (3. Continuing with aour example from Section be used redisplay improve the 3.x z form (3. so th e zsatisﬁed.7) withto (3. Costredisplay (3. x5 ) holding s evident that zero and of z would be reduced.15) + x53 + 4 3 (3. xB 4). is oﬀ = (3. that ent ofzx= 11.2. negative. 4). If oldfaced 4 . byfactor in the canonical form (3. 4).15) is be reduced. 0). 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 . we redisplay (3. 5N c = x3 . read + = (0.2. and adjusting fea of the other nonbasic at zero The (3. 0).namely= (x1 . namely ¯ One increased canonical formcanonical negative. xN =by inspection:xby+0.2x3 of x+ 2x5 3= increased to any (x1 . xN = (x1 .−5. anonical can the read oﬀ by remain satisﬁed. = 11. it evident of would negative. ¯ is given it nrelative cost is satisﬁed.5basic feasible) = (3. are also called the co h a basic set of3. Thesolution.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.+ xx = 1 (−z) + solution. 2x + x4 − 5x = − + 5x −z) + 1 (−z) + 2x to (3. 0. namelyzc3 = −5. These relative cost factors are + x2 called the reduced2 our 5x3 3x3 − example + Section 3.15) iswhile (3. z = of the other nonbasic at zero and adjusting the basic variables so (3.1 5 ced. it is evident that the v is ¯ n to (3. basic (3. ntinuing 3with our 2x5Reduced Costs3(Relatives we Factors) 2 + 2x Deﬁnition: 1 ++ 2x + x4 − 3x = x 3− x = 3x3 + 2x1 (3. x2 ) =thebe used= (x1 .15) be equations inspection: 3 is relative cost because the (3. of variables.1 .improve the solution. 0). + 2x xB = (x4 .16) xB = (x term will =values2 )later to xx ) = (0. x2 )xto is increased= soanyxpositive value while holdi h is the 3 .4. + 1 ost factors—“relative” because their values2x3x3 on the choicex4 − associated with a basic set Improving a non-optimal BFS . .15) is of ¯is given any in the value form holding factor in the tofactor positivecorresponding value negative.+ − x1 also + 2x3 et of variables. x The 4.2. xN coeﬃcient of x the 3 any positive (x1 .15) (x4xN = (3.. − x + x + 2x 1 4).15) − ion toread oﬀcan bex3x1 5the 2coeﬃcient inspection: (3.7) with 3 basic = of variables. x ) 3 .17) cost factors—“relative” because their values depend on the choice of the ba s. we later The boldfaced will + 3x3 x5 3 (3.15) x5 =be read oﬀ = −11 solution= can −11+ x5 by inspection: 3 − Section 3. z + 2x = ater to improve the2xx + x = 11.15) improve the The basic feasib n be (3. x3 . If x is increased = (3. 3 = + be 1used later to 3 2x ( 4 boldfaced term will One relative cost factor in the5canonical form (3. 0.16)x is 4.7) with + example from 4.2x = −11 2 3 + 25 − 11 2 − 5x 3 5 y inspection: later to improve + 3x + x − xbasic feasible will be used the solution. 4). 0. If x3 ondingcoeﬃcient 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 . (3.

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

the new canonica one the new byterm 3x3 . then 3 4 = We see that ifWe see that cost increases 3.. which has x and x basic. namely 3 . x1 = x4 = x6.2.13) is optimal. and Obv with a adjusting variables. thenonbasic variables nonbasic are will be the value of z. (3. x3form x2 . x3 beyond beyond 4 ead oﬀ tryof xmake smaller will be of x value of z.and has becomes onobtained directly the old x relative to x x . This be 6. the lar nbasic at4zero3 x− increasesalso4 becomesthen2 x becomes becomes negative.Deﬁnitioncorrespondingbecause of5the basic variables satisfying (3. a new x3 = 2x1 2 solution reduces + from 11 feasible 3 x (3 This solution6..becomesthe be reduced. which the3 = Continuing with then x substitution (3.19 z− x1x +=1. =26. z = 11these. x3 and x2 .these. x 1. xN = (xx4 form..that basic variables negative. 4). 4 also then x(3.x5 1 = x4 = x5 = 0. and x. the smaller will be larger this case. ofwhilebasic variables satisfying 4 .18) a Obviously.e. namely x x3 of 3 beyond 4 ÷ the value of znamely smaller 1. choice of the isx4 their x3x3 4 − 2xx43=on− 2x . 3 3 t (3. x = 3 − 3x 4 3 the cost or basic variables of the canonical system 3 − 3x form g values of the objective(3. 3which 3form. indeﬁnitely (3.17) from these. the then x2 Obviously. be thisthe other value of satisfying (3.15) is now without becoming basic variables.15) are x¯ = (3. then x4÷ called x4 becomes neg 3 if x3 beyond ÷x2 and basic set ofthe then x2 negative. can be2 the making . 4 and variable. in this the value to . rom 11 short cutpivot= (xonexpivotcanonical old canonical x3 .17) and 3. yields 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.11) 3are called rel in cost canonical form the factors—“relative” because = 3 −values depend = −5. one is and respect z only x from4the 2 ) = (3.e..18) negative. x 3 corresponding values the (x4 . x2 11 to 6.17) ÷given by in (3. However. namely x3 yield permissible value x is the valueincreases is the that 2permissible also smallerisof negative. x3 Our (3. ÷ becomesalso increases We see x2 = that 2 3 2x3 . and are also 3. 3x These x3 increases beyond 3 ÷ beyond 3 becomes negative. corresponding increased the basic variablesthe other remain var = .from 4).since maximum am now the its A new ive one basic variable. (−z).ofObviously.18) z = 6. 3 be increased indeﬁnitely while the other nonbasic variables rema x3 cannot increased However. this because itsnonbasic dropped to zero and making x by 3making xlimited min.yields x5x4= 2. The4 canonical fs i. This time a short cut is possible with new basic variables. However. be 4 x2 .15) satisfying (3. toapossible variable. (in yields upo value of value of xwith4lower cost: negative. zero and making the new2term 3x43.18) new feasible new feasible if 1.e.term in3thexequation solution isthatmaximum amount by wh term that x3 or One relative cost factor basicand x the variables. namely c3 b basic canonical form . 0. Choose as pivo from basic variables. can bewit since the new canonical and changes ob canonical form canonicalpossible since the new canonicalcan be obtained direc form with new basic variables. = 1.e. value i.its value ( . feasible1.thewhile (0. Pivoting on 3x3 ¯ A cut is possible since with theIf x is increasedboldfaced positive value while ho which any hich ispivot coeﬃcient ofcanonicalwe boldfaced 3x3toPivotingx3 basic. to only4 one to to zero and making x (3. x3 x3 is increased to any positive − x4 3becomes negative.3 . couldxitsand couldcanadjustedpositive..reduces z 2. by making since val respect 1 read is basic variable.18)isathe smallerinofSectionnamelywenew fact a solution with becomes lower cost: solution) solution) with ldfaced.15) zer er x3 cannot be because the indeﬁnitely− valuescase. + + solution (in 3x3 basic x5 = ( d (3. since the the in Improving a non-optimal BFS . xN = (xvalues = 1 3 because the (Reduced Costs or Relative Cost Factors): The coeﬃcients ndeﬁnitely while the other2nonbasic variables remain zero x = 4 − 2x3 . and a(in= feasible basic (in f sespermissibleand3.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. 0). 4. the x fore. which x itsxvalue has 3x3 . .18) asolutionthatredisplay fact a basicfac (3. solution. the form.18 x 2x .u x3 then 3 2 value of would x3 = these. 6. so that Obviously. is be becoming negative. the value o the value possible. value of z. the ne because 3we changes 3x .15) canxbe= xrespect 5to=inspection: by or not this nonbasic x nonbasic lution= 1. x35x31. = z x =x3 = 1 =x2 = −11 0.Chooseha 6. (3.2 = 4 value tha if. x 5 ) = sincex40). solution (in th substitution in becomes negative.immediate objective= x byonly onewhether making xbecause solution is now to x2 = 2. 2x − 5x (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.whichlarges ﬁed. to previous whether its compared imal..oneBbasic variable. upon x = + solution) with (−z) +namely x3 = 1. i. xfact a 4x4 −5to= 0. and (3. negative. it isxevident smallerofofxthese. If increases−beyond relative thenfactorswhile holding the reduced x3 set ofxvariables.17) and (3. x2 basi a old i. x3 =x from = 2.16) xx3 cannotxin) 3x3 of 0. 4 0.17) = s the smaller of lower cost: 1 z = 6. x nonbasic since . to by inspection:as3large as the ..(3.e.15) are (3 x2 ) = (3. associated if4 increases beyond ÷ 23 ÷ 3. new feasible the largest fact a basic feasib lower − which 2. by making 1 nonbasic has 4 2 term in the 4 value that nly is to discover whethertermnot basic new thatequation theislimitedpositive. 4 the c 2 = 2 3 3 ÷ 3. which (0.7) feas our3 in beyondz 3is substitutionexample and (3.(3. form adjusted be negative. = 0. n canonical form with x3 in x canonicalx2 and xvalue without obtained directly = new basic variables. x3solutionwhich(3. also 2 then x2cost: (3. form changes w ime a toto = 11. rm with i.

xthe as . x . on and = (3.15) is3negative.ible since solution reduces z fromi. set of variables. 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. 0. riables.) the new x = (x . canonical x ) = relative toxB (−z).on 3x3 . and making x3 basic discover whether or has i. . x3 .zero Our immediate objective is to since itsits value thisnowsolution is mi ced. − 3 x4 3 1 1 − 3 x1 + x2 3 5 + x3 remain 4satisﬁed. ntinuing with our example from Section 3.x2Acan be obtained dire x asic because only value is now5x3 3byand + . read oﬀ . 5 = evident that the value of z would be red + 3 x − 3 x it is 1 (3. we redisplay (3. 3x3 . This time a short cut is possible since the new canonical form changes wi al form with new basic variables.. imal.2 is the coeﬃcient − x3 . that limited the solution. x3 ..e. 3Choose maximumobtained directly b canonical form and+ basic limited 3 and x2 5can be 4. name to basic without becoming Pivoting namely e to (−z).Choosefrom4the old canonical form. the negative.. the1 new canonical iscover a short or not this = since 2.x 5nonbasic since its value h its 2x basic variable. Choose + can obtained 4 iables. These relative cost factors are also called the solution immediate objective is to discover whether or not this new reduced (3. Pivoting on 3x3 .e. 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. x2solutionxis=min-0. zPivoting = (x3xx . pivot amount by w 4 one 2 and x .positive. 11 6. 32 x2 becomes N = 11. 0).1 = of 3 new = associated with a basic set 6. 4). which has x4 and x2 basic.by inspection: without becoming new canonic which we boldfaced could adjusted on adjustedcan be x2 and x4 3x3 . form changes with to only onethe new canonicaltoby making x4 nonbasic since its va This basic variable. xvariables.e. and.7) with to by making x4 nonbasic because valuenot is new positive. at − solution.form (0. A ne x3 and x2 2x1 be x basic becausexits x5 x2 3 value at x3which in the −with1new x2basic. 4 1 3 5 es (−z) + 16 x1 + 5 x4 − 22x5 = −6 16 5 2 3 4 3 5 . term has xequation2thatvariables. the old canonical form. se the corresponding value of z is given by the basic 2 x + 8 x = 2.and making + 3x3 + xdirectly by basic.benegative. i.2. x = 4 x5 = his time whethercut isz possible 1.20) uations Note that the basic solution. The basic t term that 3 be the equation m 3x3 .3 which has −4 and=is now positive. 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.(3.t. x2 becomes the term 3x3 which we boldfaced 3x3 . making x new − = −11 (−z) +one 1 respect to 4 t fromdropped to zero . the new canonical for 6. 2. + 2x + 2x = x x rm. could be adjusted without becoming negative.15)variables. 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). in5(3. the other nonbasic variables.21) places no bound x3 = the solution set of thexcanonical forms before 1 relation restrictsx 5 = 0.could be adjusted without becoming negative. x2 = w values for x2 . −6 − x − x1 + x2 x 3 Improving a non-optimal BFS z = 6. 0). and xx4 could be adjusted without becoming negative. riables. x = increase −6 to the maximum possible (0. x5 ) =while keeping x z = 6. −z = + 2 x5 3 negative. x2 ) = (1. Pivoting on 3x3 .that x3 term in the equation that limited the maximum amount by whic 3 variables. x + the − 3 3 x5 −6 solution can be 1 + 2 2 x1 for x2 . . .3the new canonical Pivoting on 3x . the zero.18) while inspecting the right-ha 20).+ 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. x4 . which weboldfaced 3x 3 . a obtained by keeping 1 4 8 at the basic solution. 2). Since 3 ame of x5 . − 7 3 x1 + x2 2 −z = 4 ++ 5x5 = 2. x2 ) =5 (1. 3 3 16 (−z) +163xx1 + 55x4 − 2 x5 == −6 (−z) + 3obtained by keeping33 x4 other2 nonbasic variables. Sincetovalues of x5 . ThereforeBwe (x3 . and increasing x e same as thatNote that the setting x1 = 0. the new canoni THE SI ve to70 x3x3and xx2becomes (−z). x4 . obtained by second relation x = 0. 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. 0. x = x = 0. 0. x5of = 0 the same. and 2 becomes 31 5 x3 = 1 + 3 x5 that the basic solution. xN = (x1 . xB = (x3 . to a and increasin oint where x4 = 0.20) is used the values elimination. (3. maximum of ( + 1 x5 = 0. xN = (x1 . and x3 the uniquely determined 3 x4 .for the next (3. 0). x2x2 and 4 . and z in terms of x5 : 2 − 3 x5 . x3 . 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. Therefore. Although the value of . . x5 ) = (0.18) and x inspectingvalueright-hand ) (3. are the the of x2 has voting are whether obtained via of x2 or by 3Sinceuniquely determin ncrease x5 to become positive. the pivot term. (3. x3 . to (−z). na erm 3x which we boldfaced 3x m 3x3 . 3 x2 2 − 8 x2 forms th nt where are2the0. 3 .

20) is used the new elimination. (3. Note that the second relation in 3 5 to (−z). 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 = 2 − x5 2 at x3 term in the equation that limited3the.21) places no the third inc 16 5 2 8 is reduced to zero. the+pivot term. z = 6. 3 . x 2 (x1 . 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. . variables is x3 has x5 . x5 = 0. 0). x3 = 2 x5 = 2 . ( 11 the values of x4 and x3 are uniquely determined w voting are the same. and increasing x that basic feasible setting system (3. for the nextset of basicSince 8 value of x2 anddropped to of (3. Red the − 2 x4 . 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. x2 ) = (1. 2). 2 for solution is minimal. x3 . Pivoting − 8 x . x4 .x5 x5−6bound 8on the equ in (−z) + 3 1 3 x4 − to a 3 = 3 maximum of ( ÷ 2) at w of x5 . maximum amount by which −z = −6 + 3 x5 ariables.21) places no bound on the inc = 2 . 3 5 2 3 3 has become positive.x1 + (−z) + 19 4 same basic feasible 0. z= x5 ) = 0Since all theobtained4 via (3. Since nt where x4 = solution the solution set of the canonical forms before 11 5 3 z =5 . Redu canonical 3 form relative to x 3 of Improving a non-optimal BFS at the basic solution. 4 4 8 8 1 8 = 4 0. x5 = . the new canonical f on 3x x2(3. Note that the second relation in (3. In fact it is the unique minimal solution because all the rel ). x1 = x2 = x4 = 0. + 3 xgives 2. 4 .18) or by inspecting the right-hand whether relative cost factors 4 the nonbasic variables are now positive. which we boldfaced 3x3 . x5 ) = (0. x1 = x2 = x4 = 0. but that the third relation restricts x5 3 1 1 t is used valuetheis reduced to zero. Therefore. the new3set 5 basic variables is x3 and x5 . could be adjusted without becoming negative. (−z) gives .20) to canonical form relative to x3 . 3Since the −value = 8 x has dropped (3 +x + 3 4 term. x5 .20) toand x5 has become positive. x3 = 3. x (−z) 5 = − 7 x1 + x2 . xTherefore. nam x = 1 + 3 x5 re we increase x5 to the maximum3 possible 1while keeping x3 and x( 2 m 3x3 . xthepivot x5 of x2 1 in the third equa for x + 2 x1 next elimination. x2 and x4 .

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

x2 ≥ 0. 1 subject to 3 x1 x2 −+2 x3 = 4 3 x3 = 3 Exercises Exercise 3. x3 ≥ 0. optimal. Exercise 3. x2 ≥ 0. x2 3 is infeasible. subject to x2 − 2 x3 2 = z = 1 − Minimize −x1 3 x 3 3.Why is it feasible. and unique? 1 .3 (Unique Minimum) Prove the Basis. 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.2 (Infeasible Problem) It1is obvious that the linear p x≥ 0. Show algebraically by generating an infeasible inequali and x ≥ 0. x2 ≥ 0. 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. x3 ≥20. Can you ﬁnd another x = −2 basic feas optimal 7 subject to x1 x1 + 2 Minimize Exercise 3. optimal. 3 + x = 4 Exercise 3. ≥ 0 Exercise 3. optimal.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. x3 ≥ 0.4 (Multiple Minima) Determine by inspection b 2.4 (Multiple Minima) Prove that the2basic soluti x ≥ 0 x2 = 1/3 it is not unique. solution7to = + 15 by requiring that Minimize the adjusted 2 x1 values of the basiczvariabl Minimize subject to x1 + x2 0x3 = z + 15 3 tive. and 1 Exercise 3. x1 ≥ 0.5 (Unbounded Class ofxSolutions) 3 Reduce 2 1 Minimize 0x3 = z + 15 and x1 ≥ 0. the case.2 THE SIMPLEX ALGORITHM 2 x1 2 x3 2 = 1 − + 3 x= 8 3 x3 and x1 ≥ 0. and unique? feasible solution is optimal. When t Exercise 3.3 (Unique Minimum) Determine by inspection t Why is it unique? Minimize x1 + x2 but that it is not unique. feasible.3 = 8 + 3x and x1 ≥ 0.

2 x1 + x2 x1 + x2 = −2 x1 ≥ 0 x2 ≥ 0. cing a Nonbasic Variable into the Basis. (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 .solution is optimal. When bringing a no e into the basis. It is obvious that the linear program shown below is infeasible. the amount by which we can increase it is const iring that the adjusted values of the basic variables remain no Exercise 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. and unique? ise 3.E SIMPLEX ALGORITHM Exercise 3. x2 ≥ 0. and unique? Why is it feasible.4 (Multiple Minima) Prove that the basic solution z = −1 /3 is a feasible optimal solution to Minimize 0x3 = z + 15 . optimal. optimal. it feasible.3 7 x 2 1 x1 3 x 2 1 ise 3. x3 ≥ 0.

x3 ≥ 0.4 (Multiple Min se 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.5 (Unbounded Minimize −x1 − x2 = z .4 (Multiple Minima) Prove that the basic solution z = −15. optimal. x2 ≥ 0. 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. an 3 = 8 3 1 3 3 3 t it is not unique. x1 heis a feasible optimal solution1to 8/3. it is not unique. x3 ≥ 0. and Are there any nonbasic feasible solutions that are also optimal? se 3. and x1 ≥ 0.x3 = 4 3 x 2 1 + x3 = 4 . but that it feasible solution? A but that Can you ﬁnd another optimal basicis not unique. and x1 ≥ 0.4 Why is it feasible.5 (Unbounded Class of Solutions) Reduce ? Reduce Exercise 3. and x it feasible. x2 ≥ 0. optimal. and unique? Prove that the basic solution Exercise 3.

go in −∞. HE SIMPLEX ALGORITHM .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 -inﬁnity. x3 ≥ 0. not unique. Can you ﬁnd another optimal basic feasible solution? A feasible solutions that are also optimal? Exercise 3.and x1 ≥ 0. x2 ≥ 0.