Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 4. LINEAR PROGRAMMING

Similar presentations


Presentation on theme: "CHAPTER 4. LINEAR PROGRAMMING"— Presentation transcript:

1 CHAPTER 4. LINEAR PROGRAMMING
Yosuke Suzuki

2 4.5 Unbounded LP 4.5 Unbounded LP
We avoided unbounded LP by adding large enough constraints m1,m2. c px≦M -M≦py

3 4.5 Unbounded LP A linear program (H,c) is unbouded ⇔
Consider the case without constraints m1,m2(Large enough bound M) Lemma 4.9 A linear program (H,c) is unbouded There is a vector d s.t. d・c>0, d・η(h)≧0 for h∈H and (H’,c) is feasible, where H’={h∈H: d・η(h)=0}

4 4.5 Unbounded LP Proof of the “only if” part If (H,c) is unbounded,
there is a ray ρ . Proof of the “only if” part d・η(h) ≧0 p d p+λd (λ>0) ∈ρ fc→∞ c d・c >0

5 4.5 Unbounded LP p d p+λd (λ>0) ∈ρ fc→∞ c

6 4.5 Unbounded LP d・η(h) ≧0 p d p+λd (λ>0) ∈ρ fc→∞ c d・c >0

7 4.5 Unbounded LP d・η(h) ≧0 p d p+λd (λ>0) ∈ρ fc→∞ c d・c >0

8 4.5 Unbounded LP Proof of the “if” part Consider H’
Since (H’,c) is feasible, there is a point p0 . p0+λd is contained in H’. Proof of the “if” part Consider H’ d・η(h) =0 p0 d p0+λd (λ>0) ∈ρ fc→∞ c d・c >0

9 4.5 Unbounded LP Consider H\H’ We choose the rightmost blue point
in the figure. This ray is completely contained in H. Consider H\H’ p0 fc→∞ p=p0+λ’d d c d・c >0

10 4.5 Unbounded LP Test whether (H,c) is unbounded solving a 1D LP.
Rotate the coodinate so that c=(0,1). Generate and solve a 1D LP H. If a feasible solution exists, dx=dx*. c=(0,1) η(h)=(ηx,ηy) d=(dx,1) d・η(h)=dxηx+ηy≧0

11 4.5 Unbounded LP These two LPs generate the same H, while the left one feasible(unbounded), but the right one is infeasible. Solve H’ ,which is the set of constraints whose line is parallel to d, as a 1D LP. c c d d

12 4.5 Certificates If H does not have a feasible solution, (H,c) is bounded. Let h1 a maximum boundary to the left. Let h2 a minimum boundary to the right. We call h1,h2 corresponding h1,h2 certificates. We can say ({h1,h2},c) is bounded. h1 h2 c

13 4.5 Certificates We can use certificates like m1 and m2 in 2DRANDOMIZEDBOUDEDLP. When the 1D LP is infeasible due to η(h1)=(0,-1), we scan the remaining list of half-planes h2 with ηx(h2)>0. h1 h2 c

14 4.5 Certificates We have lexicographically smallest solution.
Project constraints to py=0, and solve the 1D LP with c=(-1,0). If it is unbounded, we have no lexicographically smallest solution. c c c

15 4.5 2DRANDOMIZEDLP Compute: Certificates h1,h2 v1
Random permutation h3~hn Is there d s.t. d・c>0 and d・η(h)≧0? n y loop ends Is H’ feasible? Repeat i=3~n vn y n y vi-1∈hi? Is there p on li that maximizes fc(p) ? “Unbounded” n y n “Infeasible” vi=vi-1 vi=p “Infeasible”

16 4.5 2DRANDOMIZEDLP Compute: Certificates h1,h2 v1
Random permutation h3~hn Is there d s.t. d・c>0 and d・η(h)≧0? n y loop ends Is H’ feasible? Repeat i=3~n vn y n y vi-1∈hi? Is there p on li that maximizes fc(p) ? “Unbounded” n y n “Infeasible” vi=vi-1 vi=p “Infeasible”

17 4.5 2DRANDOMIZEDLP Compute: Certificates h1,h2 v1
Random permutation h3~hn Is there d s.t. d・c>0 and d・η(h)≧0? n y loop ends Is H’ feasible? Repeat i=3~n vn y n y vi-1∈hi? Is there p on li that maximizes fc(p) ? “Unbounded” n y n “Infeasible” vi=vi-1 vi=p “Infeasible”

18 4.5 2DRANDOMIZEDLP Compute: Certificates h1,h2 v1
Random permutation h3~hn Is there d s.t. d・c>0 and d・η(h)≧0? n y loop ends Is H’ feasible? Repeat i=3~n vn y n y vi-1∈hi? Is there p on li that maximizes fc(p) ? “Unbounded” n y n “Infeasible” vi=vi-1 vi=p “Infeasible”

19 4.5 2DRANDOMIZEDLP A 2D linear programming can be solved in O(n) expected time.

20 4.6 LP in higher dimensions
We generalize the previous algorithm to higher dimensions. Search for the lexicographically smallest solution. The following discussion is when LP is 3D. c=(c1,…,cd) H={half plane in Rd} fc(p)=c・p p=(p1,…,pd)

21 4.6 LP in higher dimensions
First, we determine whether the LP is unbouded.(later…) If not, we get a set of certificates h1,…,hd∈H. We are adding the remaining half-spaces hd+1,…,hn in H. Define Ci a region defined as h1∩h2∩ … ∩ hi . H={half plane in Rd} c=(c1,…,cd) We have C3 and its optimal solution p=v3. And then, we add h4 and obtain C4 and update p=v4. h4 h3 C3 h1 p h2 C4

22 4.6 Lemma 4.11 Generalization of Lemma 4.5 vi:=optimal vertex of Ci
If vi-1 ∈hi, vi=vi-1 Ci-1 vi-1=vi gi gi and Ci-1 have no intersection

23 4.6 Lemma 4.11 If not vi-1∈hi, then Ci=empty set or vi ∈gi ∩Ci-1
To find vi, solve a 2D LP (in this figure). The objective function is a projection of fc to gi. If gi⊥c, find the lexicographically smallest solution. c gi gi∩Ci-1 vi Ci-1 vi-1

24 4.6 General Case Find the point in Ci-1∩gi that maximize fc
→(d-1)-dimensional LP →Recursive call to the algorithm If (d-1)D LP is feasible, verify whether (H’,c) is feasible. If yes, dD LP is unbounded. If no, infeasible. If (d-1)D LP is infeasible, we get k certificate half-spaces h1 ~ hk.

25 4.6 RANDOMIZEDLP Compute: Certificates h1,…,hd vd
Random permutation hd+1~hn Is there d s.t. d・c>0 and d・η(h)≧0? n y loop ends Is H’ feasible? Repeat i=d+1~n vn y n y vi-1∈hi? Is there p on li that maximizes fc(p) ? “Unbounded” n y n “Infeasible” vi=vi-1 vi=p “Infeasible”

26 Theorem 4.12 d-dimensional LP is solved in O(n) expected times.
By induction. Prove that there is Cd s.t. the algorithm takes at most Cdn expected time. Solving d linear programs of (d-1)D:O(dn)+dCd-1n Computing vd:O(d) Testing whether vi-1∈hi:O(d) ⇒The running time except computing p :O(dn) Projecting c onto gi :O(d) Intersect i halfspaces with gi :O(di)

27 4.6 RANDOMIZEDLP Compute: Certificates h1,…,hd vd
Random permutation hd+1~hn Is there d s.t. d・c>0 and d・η(h)≧0? n O(d) Cd-1n y loop ends Is H’ feasible? Repeat i=d+1~n vn n iterations y n O(di) + Cd-1(i-1) y vi-1∈hi? Is there p on li that maximizes fc(p) ? “Unbounded” O(d) n y n “Infeasible” vi=vi-1 vi=p “Infeasible” How often can this answer be yes?

28 Theorem 4.12 d-dimensional LP is solved in O(n) expected times.
Xi:=1 if not vi ∈hi 0 otherwise total expected time : O(dn)+dCi-1n+∑i=d+1 to n(O(di)+Cd-1(i-1))E[Xi])≦Cdn Backward analysis. We remove a half-space and check whether the optimum point changes. The optimum point changes only if we remove one of d half-spaces, So E[Xi]=d/(i-d). Finally, Cd=O(Cd-1d)=O(cdd!)

29 CHAPTER 4. LINEAR PROGRAMMING
Yosuke Suzuki

30 4.7 Smallest Enclosing Discs
Set a robot arm whose base is fixed to the floor. It is for picking up items on the floor. Its position should be somewhere “in the middle” of the items.

31 4.7 Smallest Enclosing Discs
Given a set P of n points in the plane,find the smallest enclosing disc for P. We will apply randomized technique.

32 Algorithm:MINIDISC(P)
Generate a random permutation of points in P. p6 p4 p1 p8 p3 p5 p9 p2 p7

33 Algorithm:MINIDISC(P)
Focus on p1 and p2. D2 =the smallest disc that has p1 and p2 on its boundary p3 is in D2 so D3=D2 p4 is out of D4 so D4=MINIDISCWITHPOINT Repeat to pn p4 D3 D2 p1 D4 p3 p2 MINIDISCWITHPOINT({p1,p2,p3},p4)

34 Algorithm:MINIDISCWITHPOINT(P,q)
Focus on p1 and q. D1 =the smallest disc that has p1 and q on its boundary p2 is in D1 so D2=D1 p3 is out of D2 so D3=MINIDISCWITH2POINTS Repeat to pn q D1 D2 p2 p1 D3 p3 MINIDISCWITH2POINTS({p1 ,p2},p3,q)

35 Algorithm:MINIDISCWITH2POINTS(P,q1,q2)
Focus on q1 and q2. D0 =the smallest disc that has q1 and q2 on its boundary p1 is in D0 so D1=D0 p2 is out of D1 so D2=a disc that has q1,q2,p2 Repeat to pn D1 p1 q2 D2 p2 The disc that has q1,q2,and p2 on the boundary.

36 Lemma 4.13 p4 (ii) p4 lies on the boudary of D4.
(i) p3 is in D2, so D2=D3. D3 D2 p1 D4 p3 p2 MINIDISCWITHPOINT({p1,p2,p3},p4)

37 Lemma 4.14(i) If there is a disc md(P,R) that encloses P and has all points of R its boundary, md(P,R) is unique. ∈R ∈P If we assume there are two md(P,R) with the same radius and the distinct center. We can find a more small md(P,R), a contradiction.

38 Lemma 4.14(ii)(iii) md(P,R)= md(P\{p},R) if p∈md(P\{p},R)
md(P \{p},R∪{p}) otherwise ∈R D= md(P\{p},R) p ∈P\{p} ???????????????????????????? If there is a disc D’=md(P,R) that is smaller than D, D’ satisfies the condition of D, a contradiction.

39 Lemma 4.14(ii)(iii) md(P,R)= md(P\{p},R) if p∈md(P\{p},R)
md(P \{p},R∪{p}) otherwise D1= md(P\{p},R\{p}) ∈R If p is in D1, the red disc is smaller than D1, a contradiction. So p must be on the boundary of D1. ∈P\{p} ???????????????????????????? p D0= md(P\{p},R)

40 Theorem 4.15 The smallest enclosing disc problem … O(n) expected time using worst-case linear storage MINIDISCWITH2POINTS runs in O(n).(n iteration) MINIDISCWITHPOINT runs in O(n) without counting the time calling MINIDISCWITH2POINTS… Backward analysis. Only when we remove one of red points,md(P,R) shrinks. So the probability of calling in one iteration is 2/i. O(n)+∑(i=2~n){O(i)・(2/i)}=O(n) By the same discussion, the expected time of MINIDISC is O(n) as well. q 2/5*O(n)+2/4*O(n)+…

41 4.8 Notes : Why randomization?
Randomized algorithms may take much longer time. So some says that randomized algorithms cannot be trusted. However, in practice, randomized algorithms cause fewer hardware malfanction and soft errors than deterministic algorithms due to its simplicity.


Download ppt "CHAPTER 4. LINEAR PROGRAMMING"

Similar presentations


Ads by Google