MthSc-440/640: Linear ProgrammingLecture 17Pietro BelottiDept. of Mathematical SciencesClemson UniversityOctober 21, 2010Reading for today: pages 105-113.Reading for Tuesday: pages 148-166.Homework #5 will be out next Tue, October 26. Due Thu,November 4.The revised sim plex methodREVISED SIMPLEX(n, m, A, b, c)1 B ← {n + 1, n + 2 . . . , n + m}2 xB← b3 while true4 do5 Solve y⊤B = cB(to compute c⊤BB−1)6¯c ← c⊤N− y⊤N7 if¯c ≤ 0, then STOP: optimum8 Select i ∈ N :¯ci> 0 (entering variable)9 Consider a ← column i of N10 Solve Bd = a (to compute B−1a)11 If d ≤ 0, then STOP: unbounded12 t ← argminj∈B:dj>0(xBj/dj)13 Select j ∈ B : xBj− tdj= 0 (leaving variable)14 xB← xB− td; xi← t15 B ← B \ {j} ∪ {i}Taking advantage of s mall changes in B◮All steps are simple, except:◮Solve y⊤B = cB◮Solve Bd = a◮However, at every iteration k of the simplex me thod,matrix Bkis very similar to Bk−1.⇒ To solve y⊤Bk= cBand Bkd = a, we could use the fact thatBkis constructed from Bk−1◮It is useful to look for a matrix Eksuch thatBk= Bk−1Ek.Differences betwee n Bk−1and BkWhat would Eklook like?◮For X = YZ, i-th column of X is Y times i-th column of Z⇒ the i-th column of Bkis Bk−1times the i-th column of Ek.◮Suppose Bkand Bk−1differ only for the p-th column.◮For i ∈ B \ {p}, i-th column of Bk= i-th column of Bk−1⇒ i-th column of Ekis ei,i.e. a vector of all zeros and a “1” at position i.◮The new p-th column of Bk, instead, is a, a column of N.i.e. Bk−1times the p-th column of Ekmust be equal to a⇒ Free lunch! We already have it, since Bk−1d = a: It’s d.We have Ek. Now what?◮At iteration k, we have cBand a◮We want to find y and a new d′such thaty⊤Bk= cB⇔ y⊤Bk−1Ek= cBBkd′= a ⇔ Bk−1Ekd′= a◮How do we solve y⊤Bk−1Ek= cB?◮Idea: Solve u⊤Ek= cB, then solve y⊤Bk−1=u⊤◮How do we solve Bk−1Ekd′= a?◮Similar idea: so lve Bk−1v = a and then Ekd′= vu⊤Ek= cBis easy(u1u2· · · um)p-th col.z}|{1 0 · · · d1· · · 00 1 · · · d2· · · 0...............0 0 · · · dp· · · 0...............0 0 · · · dm· · · 1=(cB)1(cB)2...(cB)p...(cB)mu⊤Ek= cBis easyIt looks likeu1= (cB)1u2= (cB)2...d1u1+ d2u2+ · · · + dmum= (cB)p...um= (cB)mSo set u1, u2. . . , up−1, up+1. . . , umandup=(cB)p−Pj∈{1,2...,m}\{p}dj(cB)jdpComplexity: m multiplies, m sums ⇒ O(m)Ekd′= v is easy too1 0 · · · d1· · · 00 1 · · · d2· · · 0...............0 0 · · · dp· · · 0...............0 0 · · · dm· · · 1d′1d′2...d′p...d′m=v1v2...vp...vmEkd′= v is easy tooIt looks liked′1+ d1d′p= v1d′2+ d2d′p= v2......dpd′p= vp......dmd′p+ d′m= vmSo set d′p=vpdpandd′i= vi− did′p∀i ∈ {1, 2 . . . , m} \ {p}Complexity: m multiplies, m sums ⇒ O(m)Easy and not so easy systems◮However, y⊤Bk−1= u is not easy (Bk−1might be dense).◮Bk−1v = a is not easy either.However, Bk−1= Bk−2Ek−1= Bk−3Ek−2Ek−1, henceBk= B0E1E2· · · Ek−1Ekwhere B0is the initial basis.If we choose the slack variables as the initial basis, B0= I andBk= E1E2· · · EkTwo series of easy systemsHence solving y⊤Bk= y⊤E1E2· · · Ek= cBis as easy as◮solve u⊤kEk= cB◮for j = (k − 1) → 2◮solve u⊤jEj= uj+1◮solve y⊤E1= u2Solving Bkd = E1E2· · · Ekd = a is as easy as◮solve E1v1= a◮for j = 2 → (k − 1)◮solve Ejvj= vj−1◮solve Ekd = vk−1Two problemsProblem #1: what if B06= I?y⊤Bk= y⊤B0E1E2· · · Ek= cB: last ste p (y⊤E1= u1) becomes:◮solve u⊤0E1= u1◮solve y⊤B0= u0Bkd =B0E1E2· · · Ekd = a: replace first step (E1v1= a) with◮solve B0v0= a◮solve E1v1= v0Problem #2: too many (easy) systems.◮At iteration k, we have to solve 2k (easy) systems.◮For k large, solving 2k easy systems might be longer thansolving y⊤Bk= cBand Bkd = a directly⇒ Solve y⊤Bk= cBand Bkd = a directly . .
View Full Document