Unions of Onions - staff.science.uu.nlloffl001/publications/slides/unions_of_onio… · ONIONS Let...
Transcript of Unions of Onions - staff.science.uu.nlloffl001/publications/slides/unions_of_onio… · ONIONS Let...
1
UNIONS OF ONIONS
Maarten Loffler Wolfgang MulzerFreie Universitat BerlinUniversiteit Utrecht
2
CHAPTER I
THE PROBLEM
3
PREPROCESSING PARADIGM
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
R
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
R
Soon, we get P: one point per region of R.
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
R
Soon, we get P: one point per region of R.
P
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
R
Soon, we get P: one point per region of R.
P
What we really want is some structure S(P ).
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
R
Soon, we get P: one point per region of R.
P
What we really want is some structure S(P ).
S(P )
3
PREPROCESSING PARADIGM
Once upon a time, we were given R.
R
Soon, we get P: one point per region of R.
P
What we really want is some structure S(P ).
S(P )
But time is precious!
3
PREPROCESSING PARADIGM
R P
S(P )
QUESTION: Can we do some of the computation of
S(P ) before we know P?
3
PREPROCESSING PARADIGM
R P
S(P )
QUESTION: Can we do some of the computation of
S(P ) before we know P?
First, compute an intermediary structure H(R).
3
PREPROCESSING PARADIGM
R P
S(P )
QUESTION: Can we do some of the computation of
S(P ) before we know P?
First, compute an intermediary structure H(R).
H(R)
3
PREPROCESSING PARADIGM
R P
S(P )
QUESTION: Can we do some of the computation of
S(P ) before we know P?
First, compute an intermediary structure H(R).
H(R)
Then, once we get P, compute S(P ) using H(R).
3
PREPROCESSING PARADIGM
R P
S(P )
QUESTION: Can we do some of the computation of
S(P ) before we know P?
First, compute an intermediary structure H(R).
H(R)
Then, once we get P, compute S(P ) using H(R).
3
PREPROCESSING PARADIGM
R P
S(P )H(R)
Linear time algorithms are known for:
[Held & Mitchell]
[L & Snoeyink]
[Ezra & Mulzer]
• Triangulations
• Delaunay triangulations
Superlinear, but o(n logn):
• Convex hull (lines)
4
ONIONS
4
ONIONS
Let P be a set of n points in the plane.
4
ONIONS
Let P be a set of n points in the plane.
P
4
ONIONS
Let P be a set of n points in the plane.
DEFINITION: The onion of P is the convex hull
of P, plus the onion of the rest of the points.
P
4
ONIONS
Let P be a set of n points in the plane.
DEFINITION: The onion of P is the convex hull
of P, plus the onion of the rest of the points.
P
4
ONIONS
Let P be a set of n points in the plane.
DEFINITION: The onion of P is the convex hull
of P, plus the onion of the rest of the points.
P
4
ONIONS
Let P be a set of n points in the plane.
DEFINITION: The onion of P is the convex hull
of P, plus the onion of the rest of the points.
P
4
ONIONS
Let P be a set of n points in the plane.
DEFINITION: The onion of P is the convex hull
of P, plus the onion of the rest of the points.
P
Onions have many useful and tasty applications.
5
THE ONION PREPROCESSING PROBLEM
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
Preprocessing algorithm: compute some magical
structure H(R).
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
Preprocessing algorithm: compute some magical
structure H(R).
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
Preprocessing algorithm: compute some magical
structure H(R).Reconstruction algorithm: given P and H(R),compute the onion of P.
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
Preprocessing algorithm: compute some magical
structure H(R).Reconstruction algorithm: given P and H(R),compute the onion of P.
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
Preprocessing algorithm: compute some magical
structure H(R).Reconstruction algorithm: given P and H(R),compute the onion of P.
5
THE ONION PREPROCESSING PROBLEM
Let R be a set of n disjoint unit disks.
Preprocessing algorithm: compute some magical
structure H(R).Reconstruction algorithm: given P and H(R),compute the onion of P.
6
CHAPTER II
THE SOLUTION
7
PREPROCESSING ALGORITHM
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
LEMMA: There exists a line that intersects at
most√n logn disks and has at most half of the
disks completely on each side.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
LEMMA: There exists a line that intersects at
most√n logn disks and has at most half of the
disks completely on each side.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
LEMMA: There exists a line that intersects at
most√n logn disks and has at most half of the
disks completely on each side.
R
[Alon et al.]
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
T
7
PREPROCESSING ALGORITHM
Consider a set R of n disjoint unit disks.
We apply the lemma recursively, and get a
binary space partition tree T.
R
T
LEMMA: T has height logn+O(1).
7
PREPROCESSING ALGORITHM
R
T
HINT: T = H(R) is our magical structure!
8
RECONSTRUCTION ALGORITHM
R
T
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
R
T
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
R
P
T
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
P
T
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Remove any empty leaves of T.
P
T
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
T
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
P
8
RECONSTRUCTION ALGORITHM
First, locate P in R and T.
Then, recursively unite the onions.
Remove any empty leaves of T.
P
Done!
9
BUT!
9
BUT! ...how do you unite two onions?
9
BUT! ...how do you unite two onions?
9
BUT! ...how do you unite two onions?
OBSERVATION: We can find the convex hull of two
onions in O(logn) time.
9
BUT! ...how do you unite two onions?
OBSERVATION: We can find the convex hull of two
onions in O(logn) time.
9
BUT! ...how do you unite two onions?
OBSERVATION: We can find the convex hull of two
onions in O(logn) time.
Let’s remove it and recurse.
9
BUT! ...how do you unite two onions?
OBSERVATION: We can find the convex hull of two
onions in O(logn) time.
Let’s remove it and recurse.
9
BUT! ...how do you unite two onions?
OBSERVATION: We can find the convex hull of two
onions in O(logn) time.
Let’s remove it and recurse.
Unfortunately, what is left are no longer
proper onions...
10
ONION RESTAURATION & UNIFICATION
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
10
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
11
ONION RESTAURATION & UNIFICATION
Compute convex hulls of the individual onions.
Recurse once again.
Etc...
That took O(k2 logn) time to compute k layers.
12
THE FINAL RESULT
12
THE FINAL RESULT
We can split a set of n unit disks in O(n) time.
12
THE FINAL RESULT
We can split a set of n unit disks in O(n) time.
So, we can compute H(R) in (n logn) time.
12
THE FINAL RESULT
We can split a set of n unit disks in O(n) time.
So, we can compute H(R) in (n logn) time.
We can unite a pair of onions in O(k2 logn) time.
12
THE FINAL RESULT
We can split a set of n unit disks in O(n) time.
So, we can compute H(R) in (n logn) time.
We can unite a pair of onions in O(k2 logn) time.
So, we can reconstruct an onion in O(n log k) time.
13
THANK YOU!
any questions?