64
Sublinear Geometric Algorithms Sublinear Geometric Algorithms B. Chazelle, D. Liu, A. Magen Princeton University / University of Toronto STOC 2003 B. Chazelle, D. Liu, A. Magen Princeton University / University of Toronto STOC 2003 CS 468 Geometric Algorithms Seminar Winter 2005/2006

Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 2: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 3: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 4: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 5: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 6: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

6

Basic TechniqueBasic Technique

Page 7: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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)

Page 8: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 9: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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)

Page 10: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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 -

Page 11: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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.

Page 12: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

12CS 468 – Geometric Algorithms Seminar – Winter 2005/2006

Why?Why?

Runtime:Runtime:Sampling:

Good case:

Bad case:

Page 13: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 14: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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.

Page 15: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 16: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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:

Page 17: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 18: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 19: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 20: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

20

Polygon Intersection

Polygon Intersection

Page 21: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 22: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 23: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 24: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 25: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 26: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 27: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 28: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 29: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 30: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 31: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

31

Polyhedra IntersectionPolyhedra

Intersection

Page 32: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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...

Page 33: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 34: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 35: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 36: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 37: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 38: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 39: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 40: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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.

Page 41: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

41

Ray Shooting &Applications

Ray Shooting &Applications

Page 42: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 43: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 44: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 45: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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 )

Page 46: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

46

Volume Approximation

Volume Approximation

Page 47: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 48: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 49: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 50: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 51: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 52: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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)

Page 53: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 54: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 55: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 56: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

56

Shortest-Path ApproximationShortest-Path Approximation

Page 57: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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))

Page 58: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 59: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

Page 60: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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

ε ε

Page 61: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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 ε

Page 62: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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.

Page 63: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

63

ConclusionsConclusions

Page 64: Sublinear Geometric Algorithms - Computer Graphicsgraphics.stanford.edu/courses/cs468-06-winter/Slides/michael_subli… · Geometric Algorithms Seminar Winter 2005/2006. CS 468 –

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