Faster Geometric Algorithms via Dynamic Determinant Computation
1. Faster Geometric Algorithms via Dynamic Determinant Computation
Faster Geometric Algorithms via
Dynamic Determinant Computation
Vissarion Fisikopoulos
joint work with L. Pe˜aranda (now IMPA, Rio de Janeiro)
n
Department of Informatics, University of Athens
ESA, Ljubljana, 12.Sep.2012
V.Fisikopoulos | ESA’12
1 / 16
2. Faster Geometric Algorithms via Dynamic Determinant Computation
Geometric algorithms and predicates
Setting
geometric algorithms → sequence of geometric predicates
many geometric predicates → determinants
as dimension grows predicates become more expensive
V.Fisikopoulos | ESA’12
2 / 16
3. Faster Geometric Algorithms via Dynamic Determinant Computation
Geometric algorithms and predicates
Setting
geometric algorithms → sequence of geometric predicates
many geometric predicates → determinants
as dimension grows predicates become more expensive
Examples
b
Orientation: Does c
lie on, left or right
of ab?
ax ay 1
bx by 1
cx cy 1
V.Fisikopoulos | ESA’12
a
0
c
2 / 16
4. Faster Geometric Algorithms via Dynamic Determinant Computation
Geometric algorithms and predicates
Setting
geometric algorithms → sequence of geometric predicates
many geometric predicates → determinants
as dimension grows predicates become more expensive
Examples
a
inCircle: Does d lie
on, inside or outside
of abc?
ax
bx
cx
dx
ay
by
cy
dy
V.Fisikopoulos | ESA’12
a2 + a2
x
y
b2 + b2
x
y
c2 + c2
x
y
d2 + d2
x
y
b
1
1
1
1
d
0
c
2 / 16
10. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation
Dynamic Determinant Computations
One-column update problem
Given matrix A ⊆ Rd×d , answer queries for det(A) when i-th column of
A, (A)i , is replaced by u ⊆ Rd .
V.Fisikopoulos | ESA’12
6 / 16
11. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation
Dynamic Determinant Computations
One-column update problem
Given matrix A ⊆ Rd×d , answer queries for det(A) when i-th column of
A, (A)i , is replaced by u ⊆ Rd .
Solution: Sherman-Morrison formula (1950)
A −1 = A−1 −
(A−1 (u − (A)i )) (eT A−1 )
i
1 + eT A−1 (u − (A)i )
i
det(A ) = (1 + eT A−1 (u − (A)i )det(A)
i
Complexity: O(d2 )
V.Fisikopoulos | ESA’12
Algorithm: dyn inv
6 / 16
12. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation
Dynamic Determinant Computations
One-column update problem
Given matrix A ⊆ Rd×d , answer queries for det(A) when i-th column of
A, (A)i , is replaced by u ⊆ Rd .
Variant Sherman-Morrison formulas
Q: What happens if we work over the integers?
V.Fisikopoulos | ESA’12
6 / 16
13. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation
Dynamic Determinant Computations
One-column update problem
Given matrix A ⊆ Rd×d , answer queries for det(A) when i-th column of
A, (A)i , is replaced by u ⊆ Rd .
Variant Sherman-Morrison formulas
Q: What happens if we work over the integers?
A: Use the adjoint of A (Aadj ) → exact divisions
V.Fisikopoulos | ESA’12
6 / 16
14. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation
Dynamic Determinant Computations
One-column update problem
Given matrix A ⊆ Rd×d , answer queries for det(A) when i-th column of
A, (A)i , is replaced by u ⊆ Rd .
Variant Sherman-Morrison formulas
Q: What happens if we work over the integers?
A: Use the adjoint of A (Aadj ) → exact divisions
Complexity: O(d2 )
V.Fisikopoulos | ESA’12
Algorithm: dyn adj
6 / 16
16. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Example
V.Fisikopoulos | ESA’12
8 / 16
17. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
18. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
19. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
20. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
21. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
22. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
23. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
24. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
25. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
26. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12
8 / 16
27. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem
Definition
The convex hull of A ⊆ Rd is the smallest convex set containing A.
Incremental convex hull construction
connect each outer point to the
visible segments
visibility test = orientation test
Similar problems: Delaunay, regular triangulations, point-location
V.Fisikopoulos | ESA’12
8 / 16
28. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem: REVISITED
convex hull → sequence of similar orientation predicates
take advantage of computations done in previous steps
V.Fisikopoulos | ESA’12
9 / 16
29. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem: REVISITED
convex hull → sequence of similar orientation predicates
take advantage of computations done in previous steps
Incremental convex hull construction → 1-column updates
p1
A=
p1 p2 p3
1
1
1
p2
p3
Orientation(p1 , p2 , p3 ) = det(A) in O(dω )
V.Fisikopoulos | ESA’12
9 / 16
30. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem: REVISITED
convex hull → sequence of similar orientation predicates
take advantage of computations done in previous steps
Incremental convex hull construction → 1-column updates
p1
A =
p1 p4 p3
p4
1
1
1
p2
p3
Orientation(p1 , p2 , p4 ) = det(A ) in O(d2 )
V.Fisikopoulos | ESA’12
9 / 16
31. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
The convex hull problem: REVISITED
convex hull → sequence of similar orientation predicates
take advantage of computations done in previous steps
Incremental convex hull construction → 1-column updates
p1
A =
p1 p4 p3
p4
1
1
1
p2
p3
Orientation(p1 , p2 , p4 ) = det(A ) in O(d2 )
Store det(A), A−1 + update det(A ), A −1 (Sherman-Morrison)
V.Fisikopoulos | ESA’12
9 / 16
32. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull
Dynamic determinants in geometric algorithms
Given A ⊆ Rd , n = |A| and t = the number of cells
Theorem
Orientation predicates in increm. convex hull: O(d2 ) (space: O(d2 t))
Proof: update det(A ), A −1
Corollary
Orientation predicates involved in point-location: O(d) (space: O(d2 t))
Proof: update only det(A )
Corollary
Incremental convex hull and volume comput.: O(dω+1 nt) → O(d3 nt)
V.Fisikopoulos | ESA’12
10 / 16