Measuring the sky on computing data cubes via skylining the measures.bak
Computing the Volume of the Union of Cubes in R 3
description
Transcript of Computing the Volume of the Union of Cubes in R 3
![Page 1: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/1.jpg)
Computing the Volume of the Union of Cubes in R3
Pankaj K. AgarwalHaim KaplanMicha Sharir
![Page 2: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/2.jpg)
Problem Statement
C: Set of n cubes in R3
U(C): Union of cubes in C
Compute Vol(U(C))
U(C) has (n2) vertices!
Cannot compute U(C) explicitly if looking for o(n2) algorithm!
![Page 3: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/3.jpg)
Related Work
B: Set of n orthogonal boxes in Rd
Compute Vol(U(B)).
d=1: O(nlogn) [Klee, 1977] (nlogn) [Fredman-Weide, 1978]
d=2: O(nlogn) [Bentley,1977]
d≥3: O(nd-1 logn) [Bentley,1977]
O(nd/2 logn) [Overmars-Yap, 1988]
Can one do better if B is a set of cubes?
![Page 4: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/4.jpg)
Our Result
Theorem: Volume of the union of n cubes in R3 can be computed in O(n4/3log n) time.
• Plane sweep algorithm (as Overmars-Yap algorithm)• Dynamic data structure to maintain the union of
squares– O(n1/3log n) (amortized) time per insert/delete
Conjecture: O(npolylog(n)) algorithm
![Page 5: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/5.jpg)
Overmars-Yap Algorithm (d=3)
•Sweep a plane in +z-direction
•Maintain the area of the cross section of the union
![Page 6: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/6.jpg)
Union of Cross-Section
R: Intersection rectangles of B & the sweep plane
Maintain Area(U(R))
![Page 7: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/7.jpg)
Maintaining theArea
Project R on the x-y plane and bound in a box B
Insert/Delete rectangles in R
B
![Page 8: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/8.jpg)
Partition B into slabs, n1/2 vertical edges (& vertices) in a slab
Data StructureB
![Page 9: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/9.jpg)
Partition each slab into n1/2 cells; no vertex in a cell
Maintain the union of rectangles within each cell
B
![Page 10: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/10.jpg)
A segment tree over each slabMaintains the union within slab
Update segment tree when a rectangle intersecting the slab is inserted or deleted
![Page 11: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/11.jpg)
Back to cubes
n1/3 slabs, n1/3 cells in a slab, n1/3 points in a cell
![Page 12: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/12.jpg)
A square intersects a cell in a more complicated way
![Page 13: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/13.jpg)
Classification of Squares in a cell
x0 x1
y0
y1
![Page 14: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/14.jpg)
Pillars (long)
Classification of Rectangles in a cell
![Page 15: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/15.jpg)
lower rim (long)
![Page 16: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/16.jpg)
upper rim (long)
![Page 17: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/17.jpg)
corners (short), #corners = n1/3
![Page 18: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/18.jpg)
floaters (short), #floaters= n1/3
![Page 19: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/19.jpg)
•Easy to maintain the area of the union of each class•Combining the area of different classes is difficult
•Maintain the areas of disjoint regions•rims•pillars – rims•corners – pillars – rims•floaters – corners – pillars – rims
•Update these areas as squares inserted/deleted
•Insertion/deletion of a •Long square: O(log n) time•Short square: O(n1/3log n)
![Page 20: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/20.jpg)
lower rim (long)
Maintain a list of lower rim squares sorted by increasing y coordinate of the top edge
floor
![Page 21: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/21.jpg)
ceiling
Area = [(y1-ceil)+(floor-y0)](x1-x0) + …
![Page 22: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/22.jpg)
π
Area = [(y1-ceil)+(floor-y0)](x1-x0) + π(ceil-floor) +
…
Maintain the cross section of the pillars with the bottom edge
![Page 23: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/23.jpg)
Corners:
Partition their union into disjoint rectangles
![Page 24: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/24.jpg)
Combine corners wilth pillars & rims to maintain
ψ : Area(corners-pillars-rims)
Area = [(y1-ceil)+(floor-y0)](x1-x0) + π(ceil-floor) + ψ…
# rectangles: n1/3
floor
ceiling
![Page 25: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/25.jpg)
Maintaining Floaters
Decompose the portion of union of floaters outside corners into a set R of disjoint rectangles
|R| = n1/3
![Page 26: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/26.jpg)
Combine R with pillars and rims to maintain
φ :Area(R– pillars – rims)
Area = [(y1-ceil)+(floor-y0)](x1-x0) + π(ceil-floor) + ψ + φ
floor
ceiling
![Page 27: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/27.jpg)
Updating the Area• Inserting/deleting a corner/floater
– Recompute ψ, φ
– Time: O(n1/3log n) • Inserting/deleting a pillar
– Update ψ, π, φ
– Time: O(log n)• Inserting/deleting a lower (upper) rim
– Update area of rims, ψ, π, φ– Updating ψ, φ is expensive
floor
ceiling
Recompute ψ, φ whenever flr/ceiling crosses a floater boundary
![Page 28: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/28.jpg)
floor
ceiling
A bottom or top edge of a “floater” can be covered once
Charge the time spent in updating ψ, φ to the floater edge
Amortized time to insert/delete rim: O(log n)
Fortunately:
![Page 29: Computing the Volume of the Union of Cubes in R 3](https://reader036.fdocuments.in/reader036/viewer/2022062422/56813eb8550346895da91f0f/html5/thumbnails/29.jpg)
Summary
• lots of open questions remain:
• Improve the bound for cubes ?• Improve the bound for general boxes ?• Higher dimensions