overmars and van leeuwen(1981) algorithm · overmars and van leeuwen(1981) algorithm for online...
TRANSCRIPT
![Page 1: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/1.jpg)
Overmars and van Leeuwen(1981)Algorithm
For online convex hull computation
Michal [email protected]
1
![Page 2: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/2.jpg)
Contents
• Dynamic convex hull• Algorithmic approach• Data structure• Challenges• Example• Conclusion• Questions?
2
![Page 3: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/3.jpg)
Convex hull• Smallest convex set, which is superset of given set.
• Convex set: Set of points:∀u,v∈A, k ∈ <0,1>: u.k+v(1-k) ∈ A,
• We are looking for boundary
3
![Page 4: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/4.jpg)
Algorithm properties
• Online construction• Dynamic convex hull• Point removal – must store all the points in convenient way– Could be done by reconstructing whole structure from scratch (expensive)
• 2D only• Query in O( lg(n)), Update in O( lg2(n))
4
![Page 5: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/5.jpg)
Construction• Solve upper(UH) and lower(LH) convex hull separately
• Final CH is union of UH and LH
• Construction is symmetric
ymin
ymax
5
![Page 6: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/6.jpg)
Data structure – Binary tree• Each interior node of the tree represents UH
• Only leaves are pointsBridge
[g, h]
• Each node keeps information about points of CH, which are not in parent CH.
• Concatenable queue(also tree, insert,delete,find,concat,cut in lg(n))
• Queue in root contains all points of upper(lower) convex hull
[d]
[Q1⋃Q4]
h
d
g
Q1
Q4
13
![Page 7: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/7.jpg)
Data structure – Binary tree
[1] {128}
7
![Page 8: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/8.jpg)
Construction ‐ Bridging• Bridging problem• From two distinct CH create one.
• Apply binary search on both CH
[1] {127}
[1] {127}67
![Page 9: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/9.jpg)
Update• Add and delete, Similar operations
• Algorithm:– Descend (Splitting)
– Update– Ascend (reconstruct)
[g, h]
hd
g
[d]
[Q1⋃Q4]
Q1
[g, h, Q4]
h
d g
[Q1 ,d]
Q4
Descend
Ascend
Nope
![Page 10: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/10.jpg)
Update
11 4 3 129 61 7 82 510
[2]
[11,4,1,5,12]
[7]
[10]
[6][8]
[][]
[][]
[3, 9]
• Add and delete, Similar operations
10
• Example inspired by [1] {131}
![Page 11: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/11.jpg)
Update
11 4 3 129 61 7 82 510
[2]
[11,4,1,5,12]
[7]
[10]
[6][8]
[][]
[][]
[3, 9]
• Add and delete, Similar operations
carrot
![Page 12: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/12.jpg)
Update
11 4 3 129 61 7 82 510
[2, 5, 12][11,4,1,7]
[10]
[6][8]
[][]
[][]
[3, 9]
12
![Page 13: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/13.jpg)
Update
11 4 3 129 61 7 82 510
[11,4,1,7]
[6][8]
[5,12][]
[][]
[3, 9]
13
Hello
![Page 14: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/14.jpg)
Update
11 4 3 129 61 7 82 510
[11,4,1,7]
[6][8]
[5,12][]
[][]
[3, 9]
13
[10,13]
14
![Page 15: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/15.jpg)
Update
11 4 3 129 61 7 82 510
[11,4,1,7]
[2,13]
[6][8]
[5,12][]
[][]
[3, 9]
13
[10]
π
![Page 16: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/16.jpg)
Update
11 4 3 129 61 7 82 510
[11,4,1,7]
[]
[6][8]
[5][]
[][]
[3, 9]
13
[10]
[2,13, 12]
16
![Page 17: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/17.jpg)
Update
11 4 3 129 61 7 82 510
[7]
[]
[6][8]
[5][]
[][]
[3, 9]
13
[10]
[2]
[11,4,1,13,12]
17
Done
![Page 18: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/18.jpg)
Complexity
• Add and delete are almost the same• Descending: log(n)• Update: 1• Ascend and reconstruction: log(n)* log(k)
• Ascend + Bridging, k<n
• Query: O(log(n))• Update: O(log2(n))• Build: O(n. log2(n)) !• Space: O(n)
18
![Page 19: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/19.jpg)
• Unsurpassed until T. M. Chan. Dynamic planar convex hull operations in near‐logarithmic amortized time(log(1+ε)(n)) – after 20 years
• Current optimal algorithm have log(n) update time.(Brodal,Jacob), [3]
666
![Page 20: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/20.jpg)
Pseudo‐code
[1] {131}20
![Page 21: Overmars and van Leeuwen(1981) Algorithm · Overmars and van Leeuwen(1981) Algorithm For online convex hull computation Michal Fuksa fuksamic@fel.cvut.cz 1](https://reader033.vdocuments.site/reader033/viewer/2022052007/601afd10c525c31233507a36/html5/thumbnails/21.jpg)
References
• [1] Computational Geometry, An Introduction: Franco P. Preparata, Michael Ian Shamos {1985}
• [2] Time‐Space Optimal Convex Hull Algorithms, Hla Min, S. Q. Zheng
• [3] Dynamic Planar Convex Hull, Gerth StøltingBrodal, Riko Jacob
42