Faster Geometric Algorithms via Dynamic Determinant Computation
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Faster Geometric Algorithms via Dynamic Determinant Computation

on

  • 94 views

Presentation of the paper "Faster Geometric Algorithms via Dynamic Determinant Computation" in the European Symposium on Algorithms (ESA) 2012

Presentation of the paper "Faster Geometric Algorithms via Dynamic Determinant Computation" in the European Symposium on Algorithms (ESA) 2012

Statistics

Views

Total Views
94
Views on SlideShare
94
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Faster Geometric Algorithms via Dynamic Determinant Computation Presentation Transcript

  • 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
  • 5. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation Outline 1 Dynamic determinant computation 2 Geometric algorithms: convex hull 3 Implementation - experiments V.Fisikopoulos | ESA’12 3 / 16
  • 6. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation Outline 1 Dynamic determinant computation 2 Geometric algorithms: convex hull 3 Implementation - experiments V.Fisikopoulos | ESA’12 4 / 16
  • 7. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation Determinant: Exact Computation Given matrix A ⊆ Rd×d Theory: State-of-the-art O(dω ), ω ∼ 2.7 [KaltofenVillard05] Practice: Gaussian elimination, O(d3 ) V.Fisikopoulos | ESA’12 5 / 16
  • 8. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation Determinant: Exact Computation Given matrix A ⊆ Rd×d Theory: State-of-the-art O(dω ), ω ∼ 2.7 [KaltofenVillard05] Practice: Gaussian elimination, O(d3 ) Division-free algorithms Laplace (cofactor) expansion, O(d!) [Rote01], O(d4 ) [Bird11], O(dω+1 ) V.Fisikopoulos | ESA’12 5 / 16
  • 9. Faster Geometric Algorithms via Dynamic Determinant Computation | Dynamic determinant computation Determinant: Exact Computation Given matrix A ⊆ Rd×d Theory: State-of-the-art O(dω ), ω ∼ 2.7 [KaltofenVillard05] Practice: Gaussian elimination, O(d3 ) Division-free algorithms Laplace (cofactor) expansion, O(d!) [Rote01], O(d4 ) [Bird11], O(dω+1 ) Working on integers combinatorics, lattice polyhedra, algebraic geometry V.Fisikopoulos | ESA’12 5 / 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
  • 15. Faster Geometric Algorithms via Dynamic Determinant Computation | Geometric algorithms: convex hull Outline 1 Dynamic determinant computation 2 Geometric algorithms: convex hull 3 Implementation - experiments V.Fisikopoulos | ESA’12 7 / 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
  • 33. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Outline 1 Dynamic determinant computation 2 Geometric algorithms: convex hull 3 Implementation - experiments V.Fisikopoulos | ESA’12 11 / 16
  • 34. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Determinant implementation Dynamic determinant computation C++, GNU Multiple Precision arithmetic library (GMP) Implement dyn inv & dyn adj Exact determinant computation software LU decomposition (CGAL) optimized LU decomposition (Eigen) asymptotically optimal algorithms (LinBox) Maple’s default determinant algorithm (Maple 14) Bird’s algorithm (our implementation) Laplace (cofactor) expansion (our implementation) V.Fisikopoulos | ESA’12 12 / 16
  • 35. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Determinant experiments Uniform distributed rational coefficients, matrix A ⊆ Qd×d . d 3 4 5 6 7 8 9 10 spec: Bird .013 .046 .122 .268 .522 .930 1.520 2.380 CGAL .021 .050 .110 .225 .412 .710 1.140 1.740 Eigen .014 .033 .072 .137 .243 .390 .630 .940 Laplace .008 .020 .056 .141 .993 – – – Maple .058 .105 .288 .597 .824 1.176 1.732 2.380 dyn inv .046 .108 .213 .376 .613 .920 1.330 1.830 dyn adj .023 .042 .067 .102 .148 .210 .310 .430 Intel Core i5-2400 3.1GHz, 6MB L2 cache, 8GB RAM, 64-bit Debian GNU/Linux V.Fisikopoulos | ESA’12 13 / 16
  • 36. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Determinant experiments Uniform distributed integer coefficients, matrix A ⊆ Zd×d . d 3 4 5 6 7 8 9 10 11 12 13 spec: Bird .002 .012 .032 .072 .138 .244 .408 .646 .956 1.379 1.957 CGAL .021 .041 .080 .155 .253 .439 .689 1.031 1.485 2.091 2.779 Eigen .013 .028 .048 .092 .149 .247 .376 .568 .800 1.139 1.485 Laplace .002 .005 .016 .040 .277 – – – – – – Linbox .872 1.010 1.103 1.232 1.435 1.626 1.862 2.160 10.127 13.101 – Maple .045 .094 .214 .602 .716 .791 .906 1.014 1.113 1.280 1.399 dyn inv .030 .058 .119 .197 .322 .486 .700 .982 1.291 1.731 2.078 dyn adj .008 .015 .023 .033 .046 .068 .085 .107 .133 .160 .184 Intel Core i5-2400 3.1GHz, 6MB L2 cache, 8GB RAM, 64-bit Debian GNU/Linux V.Fisikopoulos | ESA’12 13 / 16
  • 37. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Convex hull implementation Hashed dynamic determinants dyn inv & dyn adj + hash table (dets & matrices) geometric software → geometric predicates Convex hull software randomized incremental (triangulation/CGAL) beneath-and-beyond (bb) (polymake) double description method (cdd) gift-wrapping with reverse search (lrs) triangulation + hashed dynamic determinants = hdch z or hdch q V.Fisikopoulos | ESA’12 14 / 16
  • 38. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Convex hull experiments 6-dim points, integer coeffs uniformly distributed inside a 6-ball 70 hdch_q hdch_z triang lrs bb cdd 60 Time (sec) 50 hdch q (hdch z) rational (integer) arithmetic drawback: memory consuption 40 30 20 10 0 100 spec: 150 200 250 300 350 400 Number of input points 450 500 500 6D triang hdch z hdch q points 0.1GB 2.8GB 3.8GB Intel Core i5-2400 3.1GHz, 6MB L2 cache, 8GB RAM, 64-bit Debian GNU/Linux V.Fisikopoulos | ESA’12 15 / 16
  • 39. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Point location experiments triangulation of A ⊆ Zd points uniformly distibuted on a d-ball surface 1K and 1000K query points uniformly distibuted on a d-cube d hdch z triang hdch z triang hdch z triang hdch z triang |A| 8 8 9 9 10 10 11 11 120 120 70 70 50 50 39 39 preprocess time (sec) 45.20 156.55 45.69 176.62 43.45 188.68 38.82 181.35 ds mem (MB) 6913 134 6826 143 6355 127 5964 122 # cells triang 319438 319438 265874 265874 207190 207190 148846 148846 query time (sec) 1K 1000K 0.41 392.55 14.42 14012.60 0.28 276.90 13.80 13520.43 0.27 217.45 14.40 14453.46 0.18 189.56 14.41 14828.67 up to 78 times faster using up to 50 times more memory spec: Intel Core i5-2400 3.1GHz, 6MB L2 cache, 8GB RAM, 64-bit Debian GNU/Linux V.Fisikopoulos | ESA’12 16 / 16
  • 40. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Conclusions and Future work The code http://hdch.sourceforge.net Future work Delaunay triangulations (inSphere predicate) gift-wrapping convex hull algorithms overcome large memory consumption (clean periodically the hash table) filtered computations CGAL submission V.Fisikopoulos | ESA’12 17 / 16
  • 41. Faster Geometric Algorithms via Dynamic Determinant Computation | Implementation - experiments Conclusions and Future work The code http://hdch.sourceforge.net Future work Delaunay triangulations (inSphere predicate) gift-wrapping convex hull algorithms overcome large memory consumption (clean periodically the hash table) filtered computations CGAL submission THANK YOU !!! V.Fisikopoulos | ESA’12 17 / 16