Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Sublinear Geometric AlgorithmsSublinear Geometric Algorithms
B. Chazelle, D. Liu, A. MagenPrinceton University / University of
Toronto
STOC 2003
B. Chazelle, D. Liu, A. MagenPrinceton University / University of
Toronto
STOC 2003
CS 468Geometric Algorithms Seminar
Winter 2005/2006
2CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
OverviewOverview
What is this paper about?Sublinear geometric algorithms, forconvex polygons (2D) and convex polyhedra (3D):
• Intersection
• Ray shooting
• Volume approximation
• Shortest path approximation
What is this paper about?Sublinear geometric algorithms, forconvex polygons (2D) and convex polyhedra (3D):
• Intersection
• Ray shooting
• Volume approximation
• Shortest path approximation
3CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Sublinear AlgorithmsSublinear Algorithms
What means sublinear?
• Not reading the complete input
• Hence: No preprocessing
• Assuming “standard” input formats
• Randomized Las-Vegas algorithms
• No wrong answers, but run time may vary• Expected runtimes are sublinear
What means sublinear?
• Not reading the complete input
• Hence: No preprocessing
• Assuming “standard” input formats
• Randomized Las-Vegas algorithms
• No wrong answers, but run time may vary• Expected runtimes are sublinear
4CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
OverviewOverview
Overview:• Basic technique
• Sublinear search algorithm• Optimality
• Polygons / polyhedra intersection
• Ray shooting & applications
• Volume approximation• Shortest path approximation
Overview:• Basic technique
• Sublinear search algorithm• Optimality
• Polygons / polyhedra intersection
• Ray shooting & applications
• Volume approximation• Shortest path approximation
5CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
OverviewOverview
Overview:• Basic technique
• Sublinear search algorithm• Optimality
• Polygons / polyhedra intersection
• Ray shooting & applications
• Volume approximation• Shortest path approximation
Overview:• Basic technique
• Sublinear search algorithm• Optimality
• Polygons / polyhedra intersection
• Ray shooting & applications
• Volume approximation• Shortest path approximation
eachnew
techniquebuildsupon
previoustechniques
eachnew
techniquebuildsupon
previoustechniques
6
Basic TechniqueBasic Technique
7CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Search ProblemSearch Problem
Successor Search:• Given a sorted doubly-linked list of numbers
• And a search value k
• Find first element greater than k
• List stored in continuous memory block(allowing sampling of list elements)
Successor Search:• Given a sorted doubly-linked list of numbers
• And a search value k
• Find first element greater than k
• List stored in continuous memory block(allowing sampling of list elements)
8CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Data StructureData Structure
Looks like this:
Memory Layout:
Looks like this:
Memory Layout:
1 3 7 8 9
1
3
9
7
8
9CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
The Search AlgorithmThe Search Algorithm
Search Algorithm:• Pick √n random list elements
• Determine closest predecessor and successor of k (within the random sample)
• Perform plain, linear search towards k(starting from these two elements)
Search Algorithm:• Pick √n random list elements
• Determine closest predecessor and successor of k (within the random sample)
• Perform plain, linear search towards k(starting from these two elements)
10CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
The Search Algorithm (2)The Search Algorithm (2)
Looks like this:Looks like this:- list -
- random sample -
succ(k)
- linear search -
11CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
AnalysisAnalysis
The Algorithm:• Takes expected O(√n ) time.
• This is optimal.
The Algorithm:• Takes expected O(√n ) time.
• This is optimal.
12CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Why?Why?
Runtime:Runtime:Sampling:
Good case:
Bad case:
13CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
RuntimeRuntime
Runtime AnalysisRuntime depends on “empty” block around succ(k)
Probability of no hit within Factor c√n of targetis O(exp(-c))Hence: Expected distance O(√n ) after √n trials.
Runtime AnalysisRuntime depends on “empty” block around succ(k)
Probability of no hit within Factor c√n of targetis O(exp(-c))Hence: Expected distance O(√n ) after √n trials.
factor c away
14CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
OptimalityOptimality
Why can’t we do O(any better)?
The proof employs Yao’s minimax principle:
The expected running time of an optimal deterministic algorithm for any chosen input distribution
is a lower boundon the expected running time of the optimal Las Vegas
randomized algorithm.
Why can’t we do O(any better)?
The proof employs Yao’s minimax principle:
The expected running time of an optimal deterministic algorithm for any chosen input distribution
is a lower boundon the expected running time of the optimal Las Vegas
randomized algorithm.
15CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Constructing the BoundConstructing the Bound
A Lower Bound for an Opt. Determ. AlgorithmChoose the following scenario:
• Input: Random permutation
• Search for last element
What can the algorithm do?• Op. “A”: Visit neighbor of known node
• Op. “B”: Go to unknown node in memory
A Lower Bound for an Opt. Determ. AlgorithmChoose the following scenario:
• Input: Random permutation
• Search for last element
What can the algorithm do?• Op. “A”: Visit neighbor of known node
• Op. “B”: Go to unknown node in memory
16CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
( )b
nban
n ⎟⎟⎠
⎞⎜⎜⎝
⎛ ++−≥ 1"elem. last not saw"Pr
Constructing the Bound (2)Constructing the Bound (2)
Random input:• Consider the question: How likely is it, to
discover one of the last √n elements?
• With every newly visited node, the chance of discovery increases
• After a A-Op’s and b B-Op’s:
Random input:• Consider the question: How likely is it, to
discover one of the last √n elements?
• With every newly visited node, the chance of discovery increases
• After a A-Op’s and b B-Op’s:
17CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Constructing the Bound (3)Constructing the Bound (3)
Looks like this:Looks like this:
( )b
nban
n ⎟⎟⎠
⎞⎜⎜⎝
⎛ ++−≥ 1"elem. last not saw"Pr
A A B B A A A B AB
unknown
target:last √n
n a bb
Pr(“no discovery”)
new random choice
no-go
18CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Constructing the Bound (3)Constructing the Bound (3)
Number of B-Ops:• Expected value of A and B-op’s until visiting
one of the last √n is O(√n ).
• If last √n elements have not been visited ⇒ √n more A-Ops necessary
Number of B-Ops:• Expected value of A and B-op’s until visiting
one of the last √n is O(√n ).
• If last √n elements have not been visited ⇒ √n more A-Ops necessary
19CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
What’s next?What’s next?
Now: Construct sublinear geometric algorithms• Similar basic idea
• All with O(√n ) time complexity
• Some problems are “more general” than successor-searchingThus: run-time also optimal
Now: Construct sublinear geometric algorithms• Similar basic idea
• All with O(√n ) time complexity
• Some problems are “more general” than successor-searchingThus: run-time also optimal
20
Polygon Intersection
Polygon Intersection
21CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Problem StatementProblem Statement
Polygon Intersection:• Given two polygons A, B
• Encoded as densely storedlinked lists of vertices (same as before)
• Do they intersect?
• If so, report one intersection point.
Polygon Intersection:• Given two polygons A, B
• Encoded as densely storedlinked lists of vertices (same as before)
• Do they intersect?
• If so, report one intersection point.
A
B
22CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Idea of the AlgorithmIdea of the Algorithm
Idea: Employ the same sampling approachIdea: Employ the same sampling approach
two input polygons simplified by random subsampling
23CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Idea of the AlgorithmIdea of the Algorithm
Two step Approach:Two step Approach:
(I) test for simplifiedpolys intersection
(II) test potentially overlappingremaining region
24CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
First StepFirst Step
First Step:• Random subsampling
• Choose O(√n ) sample points
• Compute intersection in linear time
First Step:• Random subsampling
• Choose O(√n ) sample points
• Compute intersection in linear time
A
B
25CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
First Step (2)First Step (2)
First Step:• If no intersection found:
• Compute separating plane• Go to step 2
First Step:• If no intersection found:
• Compute separating plane• Go to step 2
A
B
26CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second StepSecond Step
Second Step:• Compute expected O(√n ) vertices of A
exceeding separating plane
• Test intersection with simplified B
Second Step:• Compute expected O(√n ) vertices of A
exceeding separating plane
• Test intersection with simplified B
A
B
27CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second Step (2)Second Step (2)
Second Step:• If no intersection is found:
• Compute new separating plane• Test against corresponding part of B
Second Step:• If no intersection is found:
• Compute new separating plane• Test against corresponding part of B
A
B
28CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second Step (3)Second Step (3)
Second Step:• If no intersection is found:
• Compute new separating plane• Test against corresponding part of B
Second Step:• If no intersection is found:
• Compute new separating plane• Test against corresponding part of B
A
B
29CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second Step (4)Second Step (4)
Second Step:• If no intersection is found:
• Compute new separating plane• Test against corresponding part of B
Second Step:• If no intersection is found:
• Compute new separating plane• Test against corresponding part of B
A
B
30CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second Step (5)Second Step (5)
Second Step:• Report intersection if found
• Otherwise repeat second step with A and B exchanged for final answer
Second Step:• Report intersection if found
• Otherwise repeat second step with A and B exchanged for final answer
A
B
31
Polyhedra IntersectionPolyhedra
Intersection
32CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Polyhedral IntersectionPolyhedral Intersection
Intersection of Two Convex Polyhedra• Same approach as for polygons
• Some additional technical problems...
Intersection of Two Convex Polyhedra• Same approach as for polygons
• Some additional technical problems...
33CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
First StepFirst Step
First Step:• Simplify Polyhedra
• Take O(√n ) sample vertices
First Step:• Simplify Polyhedra
• Take O(√n ) sample vertices
34CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
First StepFirst Step
First Step:• Test for intersection (lin. programming)
• If no intersection: Compute separating plane
First Step:• Test for intersection (lin. programming)
• If no intersection: Compute separating plane
35CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second StepSecond Step
Second Step:• Compute full resolution part of B
which exceeds separating plane
• Test with simplified A
Second Step:• Compute full resolution part of B
which exceeds separating plane
• Test with simplified A
A
B
36CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second StepSecond Step
Second Step:• If no intersection is found:
Compute new supporting plane...
Second Step:• If no intersection is found:
Compute new supporting plane...
A
B
37CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Second StepSecond Step
Second Step:• Test for intersection with full resolution piece of A
on B-side of plane
• If no intersection found: repeat second step withA and B swapped (as for polygons)
Second Step:• Test for intersection with full resolution piece of A
on B-side of plane
• If no intersection found: repeat second step withA and B swapped (as for polygons)
A
B
38CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Additional ProblemAdditional Problem
Additional Problem for 3D-Polyhedra• How compute full resolution
cut-off pieces?
• Start at a low-res point
• Adjacency search
• Problem: Starting vertexwith large out-degree
Additional Problem for 3D-Polyhedra• How compute full resolution
cut-off pieces?
• Start at a low-res point
• Adjacency search
• Problem: Starting vertexwith large out-degree
39CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
SolutionSolution
Handle Vertices with Large Out-Degree• First, sample O(√n ) edges randomly from
polyhedron (only global sampling possible!)
• If out-degree larger than O(√n ), then one can expect to find some of those edges
• Hence: Start linear search at edges closestto plane (c.f. successor search)
• Otherwise (small out-degree): All edges can be searched linearly
Handle Vertices with Large Out-Degree• First, sample O(√n ) edges randomly from
polyhedron (only global sampling possible!)
• If out-degree larger than O(√n ), then one can expect to find some of those edges
• Hence: Start linear search at edges closestto plane (c.f. successor search)
• Otherwise (small out-degree): All edges can be searched linearly
40CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
ComplexityComplexity
Complexity• The cut-off caps are O(√n )
• Intuition: Similar to successor searching• Formal proof: See paper
• All other steps are also O(√n )
• Yields O(√n ) overall complexity
• The problem is a generalization of successor searching. Hence: Optimal complexity.
Complexity• The cut-off caps are O(√n )
• Intuition: Similar to successor searching• Formal proof: See paper
• All other steps are also O(√n )
• Yields O(√n ) overall complexity
• The problem is a generalization of successor searching. Hence: Optimal complexity.
41
Ray Shooting &Applications
Ray Shooting &Applications
42CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Ray ShootingRay Shooting
Same Technique Can Handle Ray Shooting:• Rays are very skinny polyhedra
• Can use the same algorithm
• Computes intersections in O(√n ) time
• This is also optimal
Same Technique Can Handle Ray Shooting:• Rays are very skinny polyhedra
• Can use the same algorithm
• Computes intersections in O(√n ) time
• This is also optimal
43CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
ApplicationsApplications
Point Location• Point location in Delaunay triangulations
• Shoot vertical ray towardsconvex hull of (x, y, x2 + y2)
• Similar construction also works for Voronoi Diagrams
• Yields point location algorithms with optimalO(√n ) complexity
Point Location• Point location in Delaunay triangulations
• Shoot vertical ray towardsconvex hull of (x, y, x2 + y2)
• Similar construction also works for Voronoi Diagrams
• Yields point location algorithms with optimalO(√n ) complexity
44CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Other ApplicationsOther Applications
Nearest Neighbor Search:• Find nearest neighbor in polyhedron to a
given point in space in O(√n ) time
• Uses (slightly) modified polyhedron intersection algorithm
Nearest Neighbor Search:• Find nearest neighbor in polyhedron to a
given point in space in O(√n ) time
• Uses (slightly) modified polyhedron intersection algorithm
45CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Other Applications (2)Other Applications (2)
Direction Search• Find point with maximum
projection on a line
• Find point with maximumprojection on a line restricting input polyhedronto a plane
• Both in O(√n )
Direction Search• Find point with maximum
projection on a line
• Find point with maximumprojection on a line restricting input polyhedronto a plane
• Both in O(√n )
46
Volume Approximation
Volume Approximation
47CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Volume ApproximationVolume Approximation
The Task:• Determine volume of polyhedron
• With accuracy up to factor ε
Main Idea:• Dudley approximation
• Non-uniform rescaling to be ableto guarantee ε-precision
The Task:• Determine volume of polyhedron
• With accuracy up to factor ε
Main Idea:• Dudley approximation
• Non-uniform rescaling to be ableto guarantee ε-precision
48CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Dudley ApproximationDudley Approximation
Dudley Approximation of Convex Polyhedra• Given a convex
polygon /polyhedron enclosed in a unit sphere
• An approximation of complexity O(1/ε (d-1)/2)with max. Hausdorff-distance εcan be constructed
Dudley Approximation of Convex Polyhedra• Given a convex
polygon /polyhedron enclosed in a unit sphere
• An approximation of complexity O(1/ε (d-1)/2)with max. Hausdorff-distance εcan be constructed
49CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Dudley Approximation (2)Dudley Approximation (2)
Dudley Approximation of Convex PolyhedraDudley Approximation of Convex Polyhedra
O(1/ε (d-1)/2)uniformelydistributedsample points
O(1/ε (d-1)/2)uniformelydistributedsample points
50CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Dudley Approximation (3)Dudley Approximation (3)
Dudley Approximation of Convex PolyhedraDudley Approximation of Convex Polyhedra
find nearestneighbor ofeach point
find nearestneighbor ofeach point
51CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Dudley Approximation (4)Dudley Approximation (4)
Dudley Approximation of Convex PolyhedraDudley Approximation of Convex Polyhedra
convex hull of “supporting”planes
convex hull of “supporting”planes
52CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Dudley Approximation (5)Dudley Approximation (5)
Dudley Approximation of Convex PolyhedraDudley Approximation of Convex Polyhedra
convex hull of “supporting”planes
convex hull of “supporting”planes
maximum error: ε(with respect tounit sphere)
53CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Volume ApproximationVolume Approximation
Volume Approximation using Dudley Construction• Observation: All steps in Dudley Construction
can be peformed in O(√n ) time
• Remaining problem: Poor approximationfor skinny polyhedra
Volume Approximation using Dudley Construction• Observation: All steps in Dudley Construction
can be peformed in O(√n ) time
• Remaining problem: Poor approximationfor skinny polyhedra
bounded absolute errorlarger relative volume error
54CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
RescalingRescaling
Solution: Non-Uniform RescalingSolution: Non-Uniform Rescaling
1 2
3 4
original polyhedron
main axis transform
helper polyhedron
vol. ≥ c· original vol.
enclosed ellipsoid
55CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
ResultResult
Rescaling:• Enclosed ellipsoid has
volume ≥ c·original volume• Volume can be measured with arbitrary,
constant accuracy by rescaling
Overall:• Sublinear operations only• Overall: O(ε -1√n ) running time for
ε -approximation of volume
Rescaling:• Enclosed ellipsoid has
volume ≥ c·original volume• Volume can be measured with arbitrary,
constant accuracy by rescaling
Overall:• Sublinear operations only• Overall: O(ε -1√n ) running time for
ε -approximation of volume
56
Shortest-Path ApproximationShortest-Path Approximation
57CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Approx. Shortest PathApprox. Shortest Path
The Task:• Compute shortest path between
two surface points on convex polyhedron
• Approximate up to factor ε
• Allow path to leave surface of polyhedron(otherwise, any path might be
of complexity Ω(n))
The Task:• Compute shortest path between
two surface points on convex polyhedron
• Approximate up to factor ε
• Allow path to leave surface of polyhedron(otherwise, any path might be
of complexity Ω(n))
58CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
How does it work?How does it work?
Main Idea:• Same basic idea: Dudley approximation
• Construct simplified polyhedron• Constant number of faces⇒ Can then use standard algorithm
to compute shortest path• Problem: Guaranteeing accuracy (again)• Solution: Clipping to O(path-length)-Box
Main Idea:• Same basic idea: Dudley approximation
• Construct simplified polyhedron• Constant number of faces⇒ Can then use standard algorithm
to compute shortest path• Problem: Guaranteeing accuracy (again)• Solution: Clipping to O(path-length)-Box
59CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
Using the Dudley Approx.Using the Dudley Approx.
Dudley Approximation:• Simplify polyhedron (Dudley)
• Build path along simplified w. std. method
Dudley Approximation:• Simplify polyhedron (Dudley)
• Build path along simplified w. std. method
original simplified approximate path
60CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
The ProblemThe Problem
Remaining Problem: Relative Accuracy
• ε -approx for long paths
• Larger relative error for short paths
Remaining Problem: Relative Accuracy
• ε -approx for long paths
• Larger relative error for short paths
long path – smallerrelative error
short path – largerelative error
ε ε
61CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
SolutionSolution
Clipping before Dudleying• Estimate length of shortest
path up to factor 8
• Place box of side length16·est around start point
• Clip simplified polyhedron to box (additional constraints during computation)
• By scaling ε correspondingly, this guaranteesε-approximation of shortest path
Clipping before Dudleying• Estimate length of shortest
path up to factor 8
• Place box of side length16·est around start point
• Clip simplified polyhedron to box (additional constraints during computation)
• By scaling ε correspondingly, this guaranteesε-approximation of shortest path
new ε
62CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
ResultResult
Overall result:• Can approximate shortest path
up to factor (1 +ε )
• Using time O(ε -5/4 √n ) + f (ε -5/4)where f is time for exact solution
• Known: f (k) ∈ O(k log2 k)
• Authors use modified Dudley construction to achieve given bounds; see paper for details.
Overall result:• Can approximate shortest path
up to factor (1 +ε )
• Using time O(ε -5/4 √n ) + f (ε -5/4)where f is time for exact solution
• Known: f (k) ∈ O(k log2 k)
• Authors use modified Dudley construction to achieve given bounds; see paper for details.
63
ConclusionsConclusions
64CS 468 – Geometric Algorithms Seminar – Winter 2005/2006
ConclusionsConclusions
Sublinear Algorithms for Geometric Problems• Convex polygons / polyhedra intersection• Ray shooting (convex P’s, and similar problems)• Volume approximation (convex P’s)• Shortest path approximation (convex P’s)
Properties• All in O(√n )• Techniques are generalizations of
the successor searching algorithm
Sublinear Algorithms for Geometric Problems• Convex polygons / polyhedra intersection• Ray shooting (convex P’s, and similar problems)• Volume approximation (convex P’s)• Shortest path approximation (convex P’s)
Properties• All in O(√n )• Techniques are generalizations of
the successor searching algorithm