Math 482: Linear Programming1 Mikhail Lavrov Lecture 9: The Revised Simplex Method September 20, 2019 University of Illinois at Urbana-Champaign 1 Formulas for a simplex tableau Again, we assume that our linear program has the form minimize cTx x2Rn subject to Ax = b x ≥ 0 m n where A is an m × n matrix, b 2 R , and c 2 R ; the rows of A are linearly independent. To find a basic feasible solution, we begin by choosing m variables B so that the m × m matrix AB is invertible. Then we can rewrite Ax = b as ABxB + AN xN = b −1 −1 and solve for xB in terms of xN : we have xB + AB AN xN = AB b, or −1 −1 xB = AB b − AB AN xN : In terms of xN , we have T T T T −1 −1 T c x = cB xB + cN xN = cB (AB b − AB AN xN ) + cN xN which simplifies to T −1 T T −1 cB AB b + cN − cB AB AN xN : Define −1 • p = AB b. This is the value of xB when we set xN = 0. −1 • Q = AB AN , so that xB = p − QxN . T T T −1 T T • r = cN − cB AB AN = cN − cB Q. This is the row vector of reduced costs of xN : the contribution of xN to the objective function. T −1 T • z0 = cB AB b = cB p. This is the objective value when we set xN = 0. The simplex tableau, in general, has the form xB xN xB IQ p T T −z 0 r −z0 1 This document comes from the Math 482 course webpage: https://faculty.math.illinois.edu/~mlavrov/ courses/482-fall-2019.html 1 although when we perform the simplex method, usually the columns corresponding to B and N are not sorted neatly the way they are here. All of these formulas make sense for any choice of B. But we want to choose B so that p ≥ 0, and we get a feasible solution by setting xN = 0. (Note: I've used the notation from section 5.5 of G¨artnerand Matouˇsek,with one deviation: their −1 definition of Q is −AB AN , the negative of ours. This is because their simplex tableaux are written differently.) 2 The revised simplex method The basic premise of the revised simplex method is to avoid useless computations in the simplex tableau: only compute the entries we need. Specifically, at each stage of the simplex method, we keep track of only the following informa- tion: • B and N : we need to know which variables are basic. −1 • The matrix AB : it is used in all of the formulas above, and recomputing a matrix inverse would be expensive if we didn't keep track of this. −1 • The vector p = AB b, telling us the values of xB in the current basic feasible solution. Al- though it's not hard to recompute, we might as well keep track of it, because we're guaranteed to need it at every step. 2.1 The algorithm The first step of the revised simplex method is pricing. Here, we compute the entries of the reduced cost vector rT, one at a time, to find a variable we can pivot on. T T T −1 We have the formula r = cN −cB AB AN , but we shouldn't use it directly: that would compute all the reduced costs at once, which is \too much work". Instead, to find the reduced cost of a nonbasic variable xj, we compute T −1 rj = cj − cB AB Aj th T −1 (where Aj is the j column of A). Since cB AB is common to all these formulas, we begin by finding it, and then go through the nonbasic variables one at a time. Ideally, we use the revised simplex method with Bland's rule for pivoting, so that we pick the first nonbasic variable we can to be the entering variable. This means that as soon as we find a reduced cost rj which is negative (if we're minimizing) or positive (if we're maximizing), we stop computing entries of rT. The second step is column generation. Now that we know the entering variable xj, we can go −1 ahead and compute the xj column of the current tableau: Qj = AB Aj. (We avoid computing the entire matrix Q: only one column is relevant.) Finally, we go on to pivot. We choose a leaving variable in the usual way: we consider all positive −1 entries of the column Qj = AB Aj, and of these, pick the one with the smallest ratio to be the 2 leaving variable. Mathematically, the ratio of basic variable xi is −1 pi (AB b)i = −1 : Qij (AB Aj)i We still need to row-reduce to update the tableau, but we row-reduce a smaller tableau. All we −1 need in our grid is the matrix AB , the new column Qj, and the right-hand-side vector p. th Do the row reductions that turn Qj into a pivot column: a 1 in the i position, and 0's elsewhere. −1 When we mirror them in AB and p, it updates them for the new basis, and we are ready for the next step of the revised simplex method. 2.2 An example Consider the linear program maximize x1 + x2 + x3 + x4 x1;x2;x3;x4 subject to 3x1 − x2 + x3 ≤ 4 2x2 + x4 ≤ 5 x1; x2; x3; x4 ≥ 0 or in equational form: maximize x1 + x2 + x3 + x4 x1;x2;x3;x4;s1;s2 subject to 3x1 − x2 + x3 + s1 = 4 2x2 + x4 + s2 = 5 x1; x2; x3; x4 ≥ 0: Our initial basis is B = (s1; s2) with 1 0 4 A−1 = and p = : B 0 1 5 We do a pricing step. The complete formula for the reduced cost vector is 1 0 3 −1 1 0 rT = c T − c TA−1A = 1 1 1 1 − 0 0 : N B B N 0 1 0 2 0 1 T Because of the zero vector cB , the reduced costs will just be the regular costs and we don't have to do any actual computation. The first reduced cost is the reduced cost of x1, and it's 1: we can go ahead and pick it, since we're maximizing. −1 Multiplying by AB does nothing right now: it's the identity matrix. So to find the x1 column, we just take the corresponding column of A. For our purposes, the tableau looks like −1 B A x1 p B s1 1 0 3 4 s2 0 1 0 5 3 We pivot as in the ordinary simplex method. Only s1 is a valid leaving variable, so x1 replaces s1 and we get: −1 B A x1 p B x1 1=3 0 1 4=3 s2 0 1 0 5 We are ready to do another step. First, the pricing. Again, we could write out a complete formula for the reduced cost vector (note that the order of variables in the vectors below is B = (x1; s2) and N = (x2; x3; x4; s1)) 1=3 0 −1 1 0 1 rT = c T − c TA−1A = 1 1 1 0 − 1 0 : N B B N 0 1 2 0 1 0 T −1 But we don't just simplify the whole thing. First, we simplify cB AB so that the formula be- comes T −1 1 0 1 r = 1 1 1 0 − 1=3 0 : 2 0 1 0 Then we go through the reduced costs and compute them one by one. The first one (for x2) is 1 1 4 1 − ( 3 · −1 + 0 · 2) = 1 + 3 = 3 . That's positive, so we pivot on x2. None of the other reduced costs need to be computed! −1 Now compute x2's column by multiplying AB and the original x2 column of A, and write out our extremely pared-down version of the tableau: −1 B A x2 p B x1 1=3 0 −1=3 4=3 s2 0 1 2 5 Looking at x2's column, only s2 is a valid leaving variable. We do the row-reduction and get: −1 B A x2 p B x1 1=3 1=6 0 13=6 x2 0 1=2 1 5=2 We could keep going from here, but that's the idea. 4.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages4 Page
-
File Size-