klees measure problem made easy timothy chan u of waterloo & hkust
TRANSCRIPT
![Page 1: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/1.jpg)
Klee’s Measure Problem Made Easy
Timothy ChanU of Waterloo & HKUST
![Page 2: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/2.jpg)
Beginning of Story…
• Victor Klee, “Can the measure of U1n [ai,bi] be
computed in less than O(n log n) steps?”, Amer. Math. Monthly, 84:284-285, 1977
![Page 3: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/3.jpg)
![Page 4: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/4.jpg)
The Problem
• Given n rectangular boxes in d dimensions, compute the measure of the union
![Page 5: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/5.jpg)
Known Result in 2D
• Union may have Ω(n2) boundary edges
• Bentley'77: O(n log n) time
![Page 6: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/6.jpg)
Bentley’s Algorithm in 2D
• Idea: sweep!
dynamic data structure problem in 1D
![Page 7: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/7.jpg)
Known Results in d ≥ 3 Dimensions
• Union may have Ω(nd) boundary faces
• Bentley'77: O(nd-1 log n) time• Van Leeuwen,Wood'81: O(nd-1) time
• Overmars,Yap [FOCS'88]: O(nd/2 log n) time• C.'08: O(nd/2 loglog n)
time
![Page 8: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/8.jpg)
Known Results in d ≥ 3 Dimensions
• Union may have Ω(nd) boundary faces
• Bentley'77: O(nd-1 log n) time• Van Leeuwen,Wood'81: O(nd-1) time
• Overmars,Yap [FOCS'88]: O(nd/2 log n) time• C.'08: O(nd/2 logloglog n)
![Page 9: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/9.jpg)
Known Results in d ≥ 3 Dimensions
• Union may have Ω(nd) boundary faces
• Bentley'77: O(nd-1 log n) time• Van Leeuwen,Wood'81: O(nd-1) time
• Overmars,Yap [FOCS'88]: O(nd/2 log n) time• C.'08: O(nd/2 loglogloglog
n)
![Page 10: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/10.jpg)
Known Results in d ≥ 3 Dimensions
• Union may have Ω(nd) boundary faces
• Bentley'77: O(nd-1 log n) time• Van Leeuwen,Wood'81: O(nd-1) time
• Overmars,Yap [FOCS'88]: O(nd/2 log n) time• C.'08: O(nd/2 2O(log*n)) time• Today: O(nd/2) time
![Page 11: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/11.jpg)
New Algorithm: Warm-Up in 2D
• Idea: good old divide&conquer!
![Page 12: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/12.jpg)
New Algorithm in 2D: First Attempt
• Given set B of n rectangles inside cell C:
1. divide C into Cleft & Cright
2. recurse inside Cleft & inside Cright
![Page 13: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/13.jpg)
New Algorithm in 2D: How to Divide?
• … by median-x
• Problem: “bad” rectangles!
C
Cleft Cright
![Page 14: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/14.jpg)
New Algorithm in 2D
• Given set B of n rectangles inside cell C: 0. simplify B new twist!
1. divide C into Cleft & Cright
2. recurse inside Cleft & inside Cright
![Page 15: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/15.jpg)
New Algorithm in 2D: How to Simplify?
• … by removing all “bad” rectangles that don't have vertices inside C
![Page 16: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/16.jpg)
New Algorithm in 2D: Summary & Analysis
• Given set B of n rectangles inside cell C: 0. simplify B
… by removing all “bad” rectangles that don't have vertices inside C
1. divide C into Cleft & Cright
… by median-x
2. recurse inside Cleft & inside Cright
• Let N = # vertices inside C
T(N) = 2 T(N/2) + O(N) O(N log N)
![Page 17: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/17.jpg)
Extending New Algorithm to 3D
• Given set B of n boxes inside cell C: 0. simplify B
… by removing all “bad” boxes that don't have edges intersecting C
1. divide C into Cleft & Cright
… by weighted median-x
2. recurse inside Cleft & inside Cright
![Page 18: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/18.jpg)
New Algorithm in 3D: How to Simplify?
• … by removing all “bad” boxes that don't have edges intersecting C
![Page 19: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/19.jpg)
New Algorithm in 3D:How to Divide?
• … by weighted median-xx
y
z
![Page 20: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/20.jpg)
New Algorithm in 3D:How to Divide?
• … by weighted median-x
• Define weight of an edge:
• Total weight of edges intersecting Cleft (or Cright) =
… after factoring out 2-2/3
x
y
z
1 21/322/3
1 21/3 /2 22/3 /22-2/3 2-1/322/321/31
![Page 21: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/21.jpg)
New Algorithm in 3D: Analysis
• Let N = total weight of edges intersecting C
Nleft, Nright ≤ 2-2/3 N after renaming axes
T(N) = 2 T(N / 22/3) + O(N) O(N3/2)
![Page 22: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/22.jpg)
Extending New Algorithm to d Dimensions
• Define weight of a (d-2)-dimensional face f= 2(i+j)/d if f is orthogonal to axis i & j
T(N) = 2 T(N / 22/d) + O(N) O(Nd/2)
![Page 23: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/23.jpg)
FINAL REMARKS
![Page 24: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/24.jpg)
Other Applications
• Cover problem: given n boxes in d dimensions, does their union completely cover C?
• Depth problem: given n boxes in d dimensions, find a point q minimizing # of boxes containing q
• Weighted depth problem: given n weighted boxes in d dimensions, find a point q minimizing total weight of boxes containing q
• Etc.
![Page 25: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/25.jpg)
Lower Bounds?
• C'08: Finding cliques of size d in a graph with V=n1/2 vertices reduces to the cover/depth/ measure problem
hard to beat O(Vd) = O(nd/2) time (ignoring log factors) by “purely combinatorial”
algorithms
• Open question: can matrix multiplication help??
![Page 26: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/26.jpg)
Log Factor Speedups
• Cover/depth problem: O**(nd/2 / logd/2 n)by table lookup
• Weighted depth problem: O**(nd/2 / logd/2 - 5 n) by linear decision trees [Meyer auf der
Heide’84,Meiser’93]
• Measure problem: O**(nd/2 / logd/2 - 2 n) by Chinese remainder theorem for integer
input
• Open question: speedup for measure problem for real input?
![Page 27: Klees Measure Problem Made Easy Timothy Chan U of Waterloo & HKUST](https://reader037.vdocuments.net/reader037/viewer/2022110116/551777cc5503463e368b4eb8/html5/thumbnails/27.jpg)
Special Case: Hypercubes (or “Fat” Boxes)
• Union may have Ω(nd/2) boundary faces
• Agarwal,Kaplan,Sharir'07: O(n4/3 log2 n) time (d=3)
• Agarwal'10: O(n log4 n) time (d=3)
• Bringman'10: O(n(d+2)/3) • New: O(n(d+1)/3 polylog
n)by more complicated additional ideas…
• Open question: faster algorithms for hypercubes?