"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˜naranda (now IMPA, Rio de Janeiro)
Department of Informatics, University of Athens, Greece
ESA, Ljubljana, 14.Sep.2012
V.Fisikopoulos | ESA’12 1 / 19
2. Faster Geometric Algorithms via Dynamic Determinant Computation
Geometric algorithms and predicates
Setting
geometric algorithms → sequence of geometric predicates
many geometric predicates → determinants
Hi-dim: as dimension grows predicates become more expensive
V.Fisikopoulos | ESA’12 2 / 19
3. Faster Geometric Algorithms via Dynamic Determinant Computation
Geometric algorithms and predicates
Setting
geometric algorithms → sequence of geometric predicates
many geometric predicates → determinants
Hi-dim: as dimension grows predicates become more expensive
Examples
Orientation: Does c
lie on, left or right
of ab?
ax ay 1
bx by 1
cx cy 1
0
a
b
c
V.Fisikopoulos | ESA’12 2 / 19
4. Faster Geometric Algorithms via Dynamic Determinant Computation
Geometric algorithms and predicates
Setting
geometric algorithms → sequence of geometric predicates
many geometric predicates → determinants
Hi-dim: as dimension grows predicates become more expensive
Examples
inCircle: Does d lie
on, inside or outside
of abc?
ax ay a2
x + a2
y 1
bx by b2
x + b2
y 1
cx cy c2
x + c2
y 1
dx dy d2
x + d2
y 1
0
a
b
c
d
V.Fisikopoulos | ESA’12 2 / 19
5. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Outline
1 Motivation and existing work
2 Dynamic determinant computation
3 Geometric algorithms: convex hull
4 Implementation - experiments
V.Fisikopoulos | ESA’12 3 / 19
6. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Outline
1 Motivation and existing work
2 Dynamic determinant computation
3 Geometric algorithms: convex hull
4 Implementation - experiments
V.Fisikopoulos | ESA’12 4 / 19
7. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Motivation
Algorithms for resultant polytopes [Emiris,F,Konaxis,Pe˜naranda SoCG’12]
[YuJensen’12] (discriminant polytopes [Emiris, F, Dickenstein])
Respol: compute resultant, discriminant polytopes up to dim. 6
4-d resultant polytope
V.Fisikopoulos | ESA’12 5 / 19
8. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Motivation
Algorithms for resultant polytopes [Emiris,F,Konaxis,Pe˜naranda SoCG’12]
[YuJensen’12] (discriminant polytopes [Emiris, F, Dickenstein])
Respol: compute resultant, discriminant polytopes up to dim. 6
Counting lattice points in polyhedra [Barvinock’99] [DeLoera et.al’04],
Integer convex optimization [Gr¨otschel,Lov´asz,Schrijver’88]
4-d resultant polytope
V.Fisikopoulos | ESA’12 5 / 19
9. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Motivation
Algorithms for resultant polytopes [Emiris,F,Konaxis,Pe˜naranda SoCG’12]
[YuJensen’12] (discriminant polytopes [Emiris, F, Dickenstein])
Respol: compute resultant, discriminant polytopes up to dim. 6
Counting lattice points in polyhedra [Barvinock’99] [DeLoera et.al’04],
Integer convex optimization [Gr¨otschel,Lov´asz,Schrijver’88]
4-d resultant polytope
Focusing on . . .
Hi-dim CompGeom (3 < d < 10)
Computation over the integers
V.Fisikopoulos | ESA’12 5 / 19
10. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Existing work
Determinant: exact computation
Given matrix A ⊆ Rd×d
Theory: State-of-the-art O(dω), ω ∼ 2.37 [CoppersmithWinograd90]
Practice: Gaussian elimination, O(d3)
V.Fisikopoulos | ESA’12 6 / 19
11. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Existing work
Determinant: exact computation
Given matrix A ⊆ Rd×d
Theory: State-of-the-art O(dω), ω ∼ 2.37 [CoppersmithWinograd90]
Practice: Gaussian elimination, O(d3)
Division-free determinant algorithms
Laplace (cofactor) expansion, O(d!)
[Rote01], O(d4)
[Bird11], O(dω+1)
V.Fisikopoulos | ESA’12 6 / 19
12. Faster Geometric Algorithms via Dynamic Determinant Computation | Motivation and existing work
Existing work
Determinant: exact computation
Given matrix A ⊆ Rd×d
Theory: State-of-the-art O(dω), ω ∼ 2.37 [CoppersmithWinograd90]
Practice: Gaussian elimination, O(d3)
Division-free determinant algorithms
Laplace (cofactor) expansion, O(d!)
[Rote01], O(d4)
[Bird11], O(dω+1)
Dynamic determinant computation
Dynamic transitive closure in graphs [Sankowski FOCS’04]
V.Fisikopoulos | ESA’12 6 / 19
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.
V.Fisikopoulos | ESA’12 8 / 19
15. 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
i A−1)
1 + eT
i A−1(u − (A)i)
det(A ) = (1 + eT
i A−1
(u − (A)i)det(A)
Only vector×vector, vector×matrix → Complexity: O(d2)
Algorithm: dyn inv
V.Fisikopoulos | ESA’12 8 / 19
16. 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 8 / 19
17. 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 8 / 19
18. 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) Algorithm: dyn adj
V.Fisikopoulos | ESA’12 8 / 19
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.
Example
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
28. 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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
29. 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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
30. 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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
V.Fisikopoulos | ESA’12 10 / 19
31. 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 - Beneath-and-Beyond
connect each outer point to the
visible segments
visibility test = orientation test
Similar problems: Delaunay, regular triangulations, point-location
V.Fisikopoulos | ESA’12 10 / 19
32. 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 11 / 19
33. 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
p2 p5
p2 p4 p5
1 1 1
A =
p1
p3
p4
Orientation(p2, p4, p5) = det(A)
V.Fisikopoulos | ESA’12 11 / 19
34. 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
p2 p5
p6 p4 p5
1 1 1
A =
p1
p3
p4
p6
Orientation(p6, p4, p5) = det(A ) in O(d2)
V.Fisikopoulos | ESA’12 11 / 19
35. 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
p2 p5
p6 p4 p5
1 1 1
A =
p1
p3
p4
p6
Orientation(p6, p4, p5) = det(A ) in O(d2)
Store det(A), A−1 + update det(A ), A −1 (Sherman-Morrison)
V.Fisikopoulos | ESA’12 11 / 19
36. 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(d2t))
Proof: update det(A ), A −1
Corollary
Orientation predicates involved in point-location: O(d) (space: O(d2t))
Proof: query point never enters data-set → update only det(A )
Corollary
Incremental convex hull and volume comput.: O(dω+1nt) → O(d3nt)
V.Fisikopoulos | ESA’12 12 / 19