Tools from Computational Geometry Bernard Chazelle Princeton University Bernard Chazelle Princeton University Tutorial FOCS 2005
Tools from Computational Geometry Bernard Chazelle Princeton University Bernard Chazelle Princeton University Tutorial FOCS 1905
Ruler & Compass Algorithms
Gauss: 17-gon
Constructing Regular N-gons 3folklore 5antiquity 17 Gauss (1796) 257 Richelot (1832) Hermes (1879) Gauss Fermat primes 2 2 k can’t do heptagons +1 proof covers a gym Hilbert proved lower bounds on number of steps
Tools from Computational Geometry Bernard Chazelle Princeton University Bernard Chazelle Princeton University Tutorial FOCS 2005
algorithmic algorithmic analytical analytical TOOLS FROM COMPUTATIONAL GEOMETRY TOOLS FROM COMPUTATIONAL GEOMETRY
1 Algorithmic tools 1 Algorithmic tools geometric divide & conquer geometric divide & conquer
Voronoi Diagram
Works well also for convex hulls, nearest neighbors [3,6]
Works not so well for multidimensional searching: quadtrees, kd-trees: highly sub-optimal
Hopcroft’s problem Any point/line incidence?N points and N lines
Naïve divide & conquer
O(N logN) time Point location in line arrangement
~ O(N ) time 3/2
1 Algorithmic tools 1 Algorithmic tools geometric divide & conquer geometric divide & conquer
1 Algorithmic tools 1 Algorithmic tools geometric divide & conquer geometric divide & conquer
[2, p.123]
N points
number of intersections = O( ) for any line
Often, the number of simple polygons is exponential.
Sometimes, it’s unique… Often, the number of simple polygons is exponential.
Sometimes, it’s unique… Often, the number of simple polygons is exponential.
N points number of intersections = O( ) SPANNING PATH THEOREM for any line
N points number of intersections = O( ) SPANNING PATH THEOREM for random line
Join two closest points; remove; repeat
number of intersections = O( ) for random line
Difficulty 1: Produces a matching, not a simple polygon
Matching Tree
Remove each edge and one of its adjacent vertices
number of intersections = O( ) = O( ) for random line
Tree Hamiltonian Circuit
(via DFS)
Hamiltonian Circuit Simple Polygon
(via edge switching)
Simple Polygon
for random line number of intersections = O( )
Change definition of randomness
New definition: A random line joins 2 of the N points picked at random.
Next goal A random line cuts O( ) edges
Euclidean is wrong metric
prob [ line(random pair) cuts ab ] b a New metric: d(a,b)= pick random pair
New metric has “dimension” 2 b a pick random pair
This ensures that a random line cuts O( ) edges
Final goal: A line between any 2 points picked at cuts O( ) edges
Increase d(a,b) multiplicatively (as in BOOSTING ) a b double probability of picking pair
ANY line cuts O( ) edges
Spanning Path Theorem
APPLICATION: SIMPLEX RANGE COUNTING [2, p.214] How many points in the triangle? 6 6
Ray shooting in O(log N) time
APPLICATION: SIMPLEX RANGE COUNTING How many points in the triangle?
APPLICATION: SIMPLEX RANGE COUNTING Triangle range counting in O( ) time ~
Spanning Path Theorem
-APPROXIMATION (for triangles)
Subset A such that: any triangle T
Subset A such that: any triangle T
Subset A such that: any triangle T
Size of A is O( ) Independent of N Better than random! Size of A is O( ) Independent of N Better than random! -4/3 ~
Keep every other edge
Color randomly red/blue
discrepancy within any triangle = ?
discrepancy within any triangle = 1
discrepancy within any triangle =
Remove red points
Recolor
Remove red points
Repeat until O( ) points left ~ -4/3
Subset A such that: any triangle T
A is called an -approximation A is called an -approximation (for triangles) (for triangles) A is called an -approximation A is called an -approximation (for triangles) (for triangles) Its size O( ) is independent of N Its size O( ) is independent of N -4/3 ~ A is computable in poly(N) A is computable in poly(N)
Set System (X, ) Set System (X, ) 2 2 XX VC dim = max |shattered set|
VC dim = 3 VC dim = 3
Unbounded VC dimension
Bounded VC dim implies that Bounded VC dim implies that Given any Y X, number of distinct sets Y S, where S, is O(|Y| ) Given any Y X, number of distinct sets Y S, where S, is O(|Y| ) cc Dual set system dual shatter exponent primal shatter exponent easy to determine
VC dim = ? VC dim = ? (points, ellipsoids) in d-dim (points, ellipsoids) in d-dim
dual shatter function = O(N ) dual shatter function = O(N ) (points, ellipsoids) in d-dim d by Thom-Milnor
Set System (V, S) Set System (V, S) O( ) -2+2/(d+1) ~ d= VC dimension Size of -approximation is or primal/dual shatter exponent [2, p.179]
Set System (V, S) Set System (V, S) O( ) -2 ~ Size of -approximation is Computable in O(N) poly( ) In comp geom, random bits help with simplicity but not with complexity [2, p.175]
-cutting -cutting N lines
[2, p.204]
Application Hopcroft’s problem [2, p.213]
Dualize point (a,b) line aX+bY=1
Recurse
Hopcroft’s problem
N lines Standard sampling Standard sampling How many lines?
Set System (X, ) Set System (X, ) X = set of N lines X = set of N lines = =
N lines easy to do with an -approximation How many lines?
N lines Product sampling Product sampling How many vertices? [2, p.183]
N lines Unbounded VC-dim: yet can be done! Unbounded VC-dim: yet can be done! How many vertices?
Convex hull of N points in R dd [ 2, p.283]
Voronoi diagram of N points in E dd
Linear programming in linear time with fixed number of variables LP-type programming in linear time with fixed number of variables [1, p.82]
Linear programming in linear time with fixed number of variables LP-type programming in linear time with fixed number of variables [2, p.307]
d Smallest ellipsoid enclosing N points in R [2, p.313] in O (N) time! d
[0] Sampling tool for approximate geometric optimization
2 Analytical tools 2 Analytical tools 2.1 randomized scaling 2.2 backward analysis 2.1 randomized scaling 2.2 backward analysis
2 Analytical tools 2 Analytical tools 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis
2 Analytical tools 2 Analytical tools 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis
K-SETS
n(i,j) = 9 p p i j f = { (i,j) | i<j and n(i,j)= k } k
f = 6 0
Theorem:Theorem: [4, p.141]
X = 3
Theorem:Theorem:
Theorem:Theorem:
2 Analytical tools 2 Analytical tools 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis
The Crossing Lemma: [4, p.55]
Pick each vertex with prob p Set p= 4n/m
Corollary:Corollary: # point/line incidences = O(N ) 4/34/3
Corollary:Corollary: # unit-distance pairs = O(N ) 4/34/3
2 Analytical tools 2 Analytical tools 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis 2.1 randomized scaling k-sets crossing lemma 2.2 backward analysis
Linear Programming Linear Programming [1, p76]
N constraints and d variables
Planar Graph
Planar Separator Theorem Remove O( ) vertices (1/3-2/3) cut
[5, p96]
Stereographic lifting
Centerpoint Theorem (1/3,2/3) cut (1/4,3/4) cut in 3D
Can assume centerpoint is center of sphere
BIBLIOGRAPHYBIBLIOGRAPHY The results mentioned in this tutorial, as well as the history behind them, are discussed in detail in the surveys and monographs below.