halfplane intersection and linear programming
TRANSCRIPT
Halfplane Intersectionand
Linear Programming
Dan Halperin, Tel Aviv University
Figures and pseudocode taken from:
CGAA: Chapter 4 in Computational Geometry Algorithms and Applications, de Berg et al
Overview
β’ The casting problem
β’ Half-plane intersection
β’ Linear programming (LP) in low dimensions
β’ Minimum enclosing disc
β’ The casting problem, take II (later on in the semester)
Credits
β’ CGAA: Chapter 4 in Computational Geometry Algorithms and Applications, Linear Programming, by de Berg et al
β’ L5vK: Lecture 5 in Computational Geometry, Casting a polyhedron, by Marc van Kreveld
Slides, Part I
β’ Lecture 5 in Computational Geometry, Casting a polyhedron, by Marc van Kreveld (Slides4a):β’ The casting problem
β’ Half-plane intersection
β’ Linear programming (LP) in low dimensions
β’ Supplements, here:β’ The space of directions
β’ Probabilistic analysis of LP2D
β’ Unbounded LP2D
β’ LP3D
The space of directions
[blog.weatherflow.com]
Representing directions in the plane
β’ Using the unit circle π1
β’ The point π represents the vector from the origin to π
Representing upward directions
β’ Using the line π¦ = 1
β’ The point πβ² represents the vector from the origin to πβ²
Representing directions in (3-)space
β’ Using the unit sphere π2
β’ Upward directions: the plane π§ = 1
LP2D randomized, boundedAnalysis
Running time analysis
β’ Random permutation: π(π)
β’ Line 5, the `easyβ case, π£π β 1 β π»π : π(π) (π£ subscript π minus 1)
β’ It remains to estimate the running time of all the `hardβ cases
β’ Let ππ be the indicator random variable, which is 1 if Step π is a hard case and 0 otherwise
β’ The running time of all the hard cases: Οπ=1π π π ππ
β’ Randomized analysisβthe expected value of the running time πΈ(Οπ=1
π π π ππ)
β’ In what follows, we assume that the first two half-planes β1, β2 are fixed, so our randomized analysis focuses on steps π = 3,β¦ , π
Running time analysis, contβd
β’ Randomized analysisβthe expected value of the running time πΈ(Οπ=3
π π π ππ)
β’ Using linearity of expectation, πΈ(Οπ=3π π π ππ) = Οπ=3
π π π πΈ(ππ)
β’ πΈ ππ = ?
β’ The expected value of an indicator random variable is the probability that ππ = 1
β’ Letβs start with ππ
The last step
β’ What is the probability that ππ = 1?
β’ Pr[ππ = 1]β€2
πβ2
β’ Why at most?β’ more than two lines meet at π£πβ’ π£π is defined by β1 or β2
[CGAA]
The πth step
β’ What is the probability that ππ = 1?
β’ Letβs first assume that the set of half-planes β3 β¦ βπ is fixed
β’ Then the previous argument holds and the probability is β€2
πβ2
β’ But every subset of π β 2 half-planes has the same probability to be those β3 β¦ βπ
β’ Hence, Pr[ππ = 1]β€2
πβ2
Summary
β’ πΈ(Οπ=3π π π ππ) = Οπ=3
π π π πΈ(ππ) β€ Οπ=3π π π
2
πβ2= π(π)
β’ Together with the other costs, the algorithm runs in expected π(π) time
LP2D unbounded
Possible outcomes of LP2D
β’ We now consider also the case where the program may be unbounded
β’ Possible output:β’ The optimal (maximal) solution, as before
β’ The program is infeasible, as before
β’ The program is unbounded: a ray along which the solution gets arbitrarily large values
Overall scheme for general LP2D
β’ We will start by testing for the unbounded case, with possible outcomes:β’ The program is infeasible, stop
β’ The program is unbounded, with the desired ray, stop
β’ The program is bounded, together with two witness half-planes β1, β2 for the boundedness, continue to the previous, bounded, procedure
β’ Notice that our guarantee that the program is bounded does not preclude the case that it is infeasible, which will be found by the previous (bounded) procedure
Notation
β’ LP2D(π», Τ¦π)
β’ π» = {β1, β¦ , βπ}
β’ Τ¦π is the objective vector
β’ The LP is unbounded if there is a ray π fully contained in the feasible region and such that the objective function grows arbitrarily as we proceed along π away from its terminus π
β’ We denote the rayβs direction by Τ¦π
β’ π = {π + π Τ¦π: π > 0}
Notation, contβd
β’ For a half-plane β β π» , Τ¦π (β) is the normal to the line defining the half-plane and pointing into the feasible region of β
Necessary conditions for unboundedness
π = {π + π Τ¦π: π > 0}
β’ Τ¦π β Τ¦π > 0
β’ for each half-plane β β π» , Τ¦π (β) β Τ¦π β₯ 0
Let π»β² = {β β π»: Τ¦π (β) β Τ¦π = 0}, the we also require the following boundary condition:
β’ the linear program π»β², Τ¦π is feasible
Conditions for unboundedness
Claim: (π», Τ¦π) is unbounded iff there is a direction Τ¦π with Τ¦π β Τ¦π > 0 such that for each β β π» , Τ¦π (β) β Τ¦π β₯ 0 , and the linear program π»β², Τ¦π is feasible
β’ We showed that the conditions are necessary. We will show that they are sufficient by constructing the witness ray π
Constructing the ray π
β’ Assume Τ¦π = (0,1)
β’ Then the ray must be directed upward, and we can represent the possible directions Τ¦π by the line π¦ = 1, Τ¦π =(dx,1)
β’ Every constraint of the form Τ¦π (β) β Τ¦π β₯ 0 becomes a half-line, ray, on the line π¦ = 1
β’ The valid directions:
The intersection of all
these rays
The valid directions
β’ Recall
[L5vK]
β’ Assume first that the intersection is not empty
β’ We take the direction at the left endpoint of the interval (if it is bounded only on the right, we take the right endpoint)
β’ Denote it by Τ¦π
β’ We first need to check that Τ¦π is valid (relevant only if the interval is a single point)
β’ The validity check is in the original plane, where we aim to construct the ray π
β’ The test: is the linear program π»β², Τ¦π is feasible
Is the linear program π»β², Τ¦π is feasible?
β’ Recall: π»β² = {β β π»: Τ¦π (β) β Τ¦π = 0}
β’ Outcome 1: If infeasible, report that the original LP infeasible and stop
If π»β², Τ¦π is feasible
β’ Outcome 2: Stick to the left wall of the feasible region and construct the ray there
If no valid direction Τ¦π exists
β’ Namely ππ > ππ, then the half-planes inducing ππ and ππ are witnesses to the boundedness of the LP
β’ Outcome 3: Go to the bounded procedure and start with these two half-planes as β1 and β2
LP3D
The input
β’ LP3D(π», Τ¦π)
β’ π» = β1, β¦ , βπ , half-spacesβ’ βπ is bounded by the plane ππ
β’ Τ¦π is the objective vector
β’ Assume we have already run LP3DUnbounded, and obtained three witnesses to the boundedness of LP3D(π», Τ¦π)
β’ Letβs rename these three half-space β1, β2, β3β’ They define an optimum π£3
The incremental step
β’ We now add β4β’ If π£3 β β4 then π£4: = π£3β’ Else, π£4 lies on π4
β’ How do we find π£4?
[gdbooks/3dcollisions]
THE END