Download presentation
1
Computational Geometry
Chapter 4 Linear Programming Iwama Lab. M1 Atsuki Nagao
2
Manufacturing around us (1/2)
In process for plastic or metal objects, Mold is commonly used. There are object for no good mold exists. Now we have a problem : given an object, is there a mold for it from which it can be removed? liquid metal Mold ⇒ ⇒ casting!
3
Manufacturing around us (2/2)
Assume that object to be constructed is polyhedral. Consider molds of one piece. If some pieces exist, we prepare some molds. Only allow the object to be removed from the mold by a single translation. Not able to remove a screw from its mold.
4
The Geometry of Casting(1/5)
How do we think ? Let be a 3-dimentional polyhedron. It have “Top facet” Assume Top facet lies parallely to xy-plane. Is there a direction such that can be removed ? must have a positive z-component.
5
The Geometry of Casting(2/5)
Lemma 4.1 The polyhedron can be removed from its mold by a translation in direction iff makes an angle of at least 90°with the outward normal of ordinary facets of
6
The Geometry of Casting(3/5)
Let be an ordinary facet. it must move away. be its corresponding facet of the mold. be outward normal.
7
The Geometry of Casting(4/5)
From lemma 4.1, all we consider is direction of , not length of it. So, we represent as Hence, an ordinary facet induces a constraint as below. This inequality describes a half-plane on the plane , the area left or right.
8
The Geometry of Casting(5/5)
We have transformed our manufacturing problem to a purely geometric problem in the plane. we search which facet would be a top facet. Lemma 4.2 Let be a polyhedron with n facets. Is castable? Which mold do we use? time storage ⇒
9
Half-Plane Intersection(1/15)
Let be a set of linear constraints in two variables. , , are constants. at least of and is non-zero. We want to find all the points lying in the common intersection of the half-planes in In previous section, we find “a point”. It is more general that study to find all the points.
10
Half-Plane Intersection (2/15)
The shape of intersection of a set of half- plane. Intersection also can be empty Bounded intersection Unbounded intersection Unbounded intersection Intersection can be a point or line
11
Half-Plane Intersection (3/15)
Let think divide-and-conquer algorithm to compute the intersection. Algorithm Input: A set of n half-planes in the plane. Output: The convex region if card(H) = 1 then C ← the unique half plane else Split H into sets and ←
12
Half-Plane Intersection (4/15)
How do we describe ? Using Chapter2. We can compute the intersection of two polygons.
13
Half-Plane Intersection (5/15)
Analyze this approach. Assume we have already get , . They both have at most n/2 + 1 edges. The algorithm from Chapter2 takes time, k is the # of intersection. Clearly, This gives total running time as below. This leads if if
14
Half-Plane Intersection (6/15)
How do we get , ? Assume that the region are 2-dimentional. Using 2 lists. The lists are sorted bounding list. Denote , Vertices are not stored. We get , with sweeping.
15
Half-Plane Intersection (7/15)
In plane sweep algorithm ... Since , are convex, there are at most 4 intersects. So, have 4 pointers How is they initialized? lower y-coordinate of the top most vertices. sweep
16
Half-Plane Intersection (8/15)
Need a queue to store the events? ⇒ No. Where is the next event? The highest of the lower endpoints of the edges intersecting the sweep line. This takes constant time. sweep next event
17
Half-Plane Intersection (9/15)
At each event point we get new edge e... whether e belong to or , left or right boundary, we call the appropriate procedure sweep next event
18
Half-Plane Intersection (10/15)
Let e : new edge p : upper end point of e Case If p lies between & e contributes an edge to . e →
19
Half-Plane Intersection (11/15)
Case : e intersect Intersection point is a vertex of . If both edge start at the point, e → →
20
Half-Plane Intersection (12/15)
Case : e intersect Intersection point is a vertex of . If both edge end at the point, these edges have already been discovered.
21
Half-Plane Intersection (13/15)
Case : e intersect intersection point is a vertex of . If p lies left of , e contribute to . e →
22
Half-Plane Intersection (14/15)
Case : e intersect intersection point is a vertex of . If p lies right of , does to . →
23
Half-Plane Intersection (15/15)
Each case, we can decide which edge add to or in constant time. Theorem 4.3 The intersection of two convex polygonal region in the plane can be computed in time. This theorem shows below. This means if if
24
Incremental LP(1/10) Previous section, we get all the solution.
In fact, we want just one solution. This turns out getting a faster algorithm For faster algorithm, we use Linear Programming (denote LP). LP is described as objective function and constraints.
25
Incremental LP (2/10) Where the , and are real numbers. d is the
Objective Function Maximize: Where the , and are real numbers. d is the dimension of the linear programming. Subject to: … Constraints feasible region optimal solution
26
Incremental LP (3/10) Assume...
n constraints. 2 variables. want to find one solution. Denote the set of n linear constraints in 2-dimentional linear programming problem by .
27
Incremental LP (4/10) In ... vector of objective function is .
thus, objective function is The feasible region is unbounded in direction vector c The feasible region has an edge e. The linear Programming is infeasible. optimal solution
28
Incremental LP (5/10) Incremental LP adds the constraints one by one.
Assume each intermediate feasible region has a unique optimal vertex. For this requirement, add two additional constraints. They do not depend on the half-planes. if if otherwise otherwise
29
Incremental LP (6/10) Let be a linear programming. This implies
Number the half-plane. Then, clearly we have This implies If for some i, then for all and the linear programming is infeasible.
30
Incremental LP (7/10) Lemma 4.5 Let , If then . If then either or
where is the line bounding .
31
Incremental LP (8/10) Lemma 4.6
1-dimentional linear program can be solved in linear time. Hence, we can compute optimal vertex , or decide that linear program is infeasible, in time. Now, we can describe the linear programming algorithm in detail.
32
Incremental LP (9/10) Algorithm Input : A linear programming
Output : say infeasible or optimal vertex Let be the corner of . Let be the half-planes of . for i ← 1 to n do if then else the point p on that maximize If p does not exist then Infeasible. return
33
Incremental LP (10/10) Lemma 4.7 Algorithm
computes the solution to a bounded linear programming with n constraints and 2 variables in time and linear storage. The worst case of this algorithm. ...a bit slow... …
34
Randomized LP(1/6) For avoid the worst case for Incremental LP, we take “random ordering” of . Algorithm Input : An array Output : The array random permutated. for downto 2 do rndindex ← Random(k) Exchange A[k] and A[rndindex]
35
Randomized LP(2/6) Algorithm Input : A linear programming
Output : say infeasible or optimal vertex Let be the corner of . ← for i ← 1 to n do if then else the point p on that maximize If p does not exist then Infeasible. return
36
Randomized LP(3/6) Is the running time become fast? Lemma 4.8
This is a bit difficult to answer it. We do analyze expected running time. Lemma 4.8 The 2-dimentional Linear Programming problem with n constraints can be solved randomized expected time using worst- case linear storage
37
Randomized LP(4/6) Proof
Hence, the expected time for solving all 1- dimentional linear programs is How do we know ? ⇒ using backwards analysis. if otherwise
38
Randomized LP(5/6) Backward analysis
Assume that it has already finished, and get . Because is vertex, it is defined at least 2 of half-plane. Consider on step backwards. How often do we choose the two? s. At most 2/i.
39
Randomized LP(6/6) Each i-step, 1-dimentinal linear programming happens with 2/i probability. So, Here is (expectancy) faster Algorithm than divide-and-conquer algorithm.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.