Presentation is loading. Please wait.

Presentation is loading. Please wait.

Kinetic Algorithms: Approximation and Trade-offs Pankaj K. Agarwal Duke University.

Similar presentations


Presentation on theme: "Kinetic Algorithms: Approximation and Trade-offs Pankaj K. Agarwal Duke University."— Presentation transcript:

1 Kinetic Algorithms: Approximation and Trade-offs Pankaj K. Agarwal Duke University

2 Motivation Applications Location based services Animation Physical simulation Mobile and wireless networks Need algorithms and data structures for processing, analyzing, querying moving objects Dynamic data structures not suitable for handling moving objects

3 Modeling Motion p(t) = (x(t),y(t)): Position of p at time t  x(t), y(t): polynomials  Degree of motion: max degree of x(), y()  Linear motion: Degree = 1 p(t) = a t + b, a, b in R 2  Mostly assume motion to be linear  Trajectory of points can change  Trajectory can be piecewise linear

4 Early Work  Off-line setting: Entire motion known in advance  Bound the # combinatorial/topological changes in geometric attributes under algebraic motion [Atallah 1985] Convex hull, closest pair, Voronoi diagram # combinatorial changes in Convex hull: ≈n 2 closest pair:  (n 2 )

5 Early Work: Open Problems  # edge-flips in Delaunay triangulation of a point set, each point moving with fixed velocity Upper Bound O(n 3 ) Lower Bound  (n 2 )  # changes in the smallest disk containing points Smallest disk is defined by 2 or 3 points lying on its boundary

6 Kinetic Data Structures [Basch, Guibas, Hershberger 1999]  Event based framework  Store some auxiliary information to expedite the simulation A<B, C<D, B<D hold: no computation necessary (certificates) A=B, C=D, or B=D : update structure (events) external event internal event

7 Kinetic Data Structure (KDS)  Maintain a set of certficates  Certificates provide a proof of the correctness of the structure  Determine when a certificate fails: event Event times are roots of certain polynomials  Update the structure at an event and compute new certficates  Store events in a global priority queue Proof of Correctnes s Certificate Failure Proof Update Structure Update first event in global queue

8 Kinetic Data Structures (KDS) Performance of KDS measured as  # events (efficiency)  # certificates (compactness)  Time spent at each event (locality ) Efficient KDS developed for many problems [A. et al. 2001][Guibas 2004] Issues  Too many events for many KDS  Computing event times is expensive  Querying moving objects No need to maintain the structure at all times

9 Trade Offs in KDS  Efficiency vs Approximation  Efficiency vs Accuracy  Querying Moving Objects Range searching, nearest-neighbor searching on moving points No need to maintain the structure at all times

10 I. Efficiency vs Approximation

11 KDS using Coresets S: Set of n moving points in R 2 Maintain the diameter (width, smallest enclosing box) of S  [A., Guibas, Hershberger, Veach] Diametral pair can change  (n 2 ) times KDS with ~ n 2 events  Can we maintain the approximate diameter of S more efficiently? Is there a small subset Q of S s.t. for all t diam(Q(t)) ≥ (1-  ) diam(S(t))  Q: coreset of S

12 Extent of Functions  F={f 1, …, f n }: d-variate functions U F : Upper envelope of F U F (x) = max i f i (x) L F : Lower envelope of F L F (x) = min i f i (x) Extent: E F (x) = U F (x) - L F (x)  -kernel: G is  -kernel of F if (1-  ) E F (x) ≤ E G (x)

13 Coresets for Moving Points S: Set of n moving points in R 2  (u,S(t)): Directional width of S(t) in direction u A subset Q is  -kernel of S if For u in S 1, t in R (1-  )  (u,S(t)) ≤  (u,Q(t)) f i (u,t): ‹p i (t), u›, F={f 1 …f n } Claim:  (u,S(t)) = E F (t)  -kernel of F  -kernel of S

14 Kernels of Moving Points Theorem [A., Har-Peled, Varadarajan] F={f 1, …, f n }: d-variate polynomials of fixed degree ;  > 0 parameter An  -kernel of F of size 1/  O(1) can be computed in time O(n+ 1/  O(1) ). Corollary: S: n points moving with fixed velocity in 2D,  > 0 parameter. An  -kernel of S of size O(1/  3/2 ) can be computed in time O(n+ 1/  3 ).

15 Maintaining a Bounding Box Maintain an  -approximation of the bounding box of S  Compute an  -kernel Q of S  Smallest Bounding box defined by: left-,right, top, and bottom-most points  Use KDS to maintain these 4 points of Q  Events: When one of them changes Same approach works for maintaining width, diameter, … approximately

16 Bounding Box: Quality of Kernels  10,000 moving points  Trajectories linear of quadratic  Error < 0.02 for kernel of size 32 Linear MotionQuadratic Motion

17 Bounding Box: # Events Exact AlgorithmApproximation Algorithm

18 Kinetic Convex Hull with Coresets Quality of Approximation Quality over 200 Random Directions Quality of WidthQuality of Diameter Convex hull of 10,000 moving points

19 Kinetic Event Distribution Original SetCoreset * Input: 10,000 linearly moving points

20  Delaunay triangulation in R 2 O(n 3 ) edge flips  An arbitrary triangulation in R 2 ≈n 2 edge flips [A., Wang, Yu 2004] Can we maintain an almost Delaunay triangulation with ≈n 2 edge flips? Kinetic Triangulations [A., Guibas, Gao, Koltun, Sharir 2006] Maintain a subgraph of Delaunay triangulation that contains  (n) Delauanay edges contains all wide Delaunay edges performs ≈ n 2 edge flips Is there a good definition of almost Delaunay triangulation?

21 Efficiency vs Accuracy Robust KDS

22 Event Scheduling in KDS  The kinetic data structure framework  Events: Computing roots of a polynomial  KDS assumes events are processed in correct order * Need exact root comparison; EXPENSIVE! * Need degeneracy handling (simultaneous events); PAINFUL! Proof of Correctness Certificate Failure Proof Update Structure Update first event in global queue

23 Out-of-Order Event Processing  What if using floating point arithmetic to compute and compare event times inexactly? * Pros: cheaper arithmetic operations * Cons: events may now be processed in the wrong order In-order: Out-of-order: Not scheduled because its computed event time is before current time scheduled processed t

24 Out-of-Order Event Processing  Issues in out-of-order event processing * Does the KDS fall into an infinite loop? * Can an event be delayed for too long? * Can error in the maintained structure be too large? [Abam, A., de Berg, Yu, 2006]  Robust KDS to address these issues KDS is correct at all times except near the event times No event is delayed too long Bonus: Degeneracies are handled automatically

25 Model of Robust KDS  Root computation procedure CROP * : input polynomial; : error bound in CROP * CROP( ) does the following (1) find set of disjoint, open event intervals s.t. each and they cover all roots (2) find parity of the number of roots lying in each (3) return intervals with odd number of roots

26 Computing Event Times + _ + _ + _ + _ If Certificate conforms to schedule a future event at ; Otherwise schedule a past event at.

27 Computing Event Times : failing certificate; : polynomial associated with A past event… A future event…

28 Robust Kinetic Sorting I may encounter a past event… The new EventTime(.) * Almost the same as traditional kinetic sorting algorithm… (but not always, e.g., robust kinetic convex hull)

29 Nice Properties  The KDS does not fall into an infinite loop  List is correct except within -neighborhood of actual event times

30 Nice Properties  Events may be delayed by at most time long  Even when list is incorrect, it is still close to true sorted list geometrically : i-th pt in maintained list : i-th pt in sorted list : maximum velocity over time interval

31 Experimental Results: Kinetic Sorting Input

32 Experimental Results Input

33 Experimental Results Input

34 Other Robust KDS [Abam, A., de Berg, Yu, 2006]  Kinetic tournament  Convex hull, kd-tree, range-tree, …  Is there a robust KDS for Delaunay triangulation? Find a sequence of edge-flips to convert a self- intersecting triangulation to Delaunay triangulation

35 Soft KDS [Czumaj, Sohler 2005]  Approximate KDS  Repair the structure only when necessary  Use the ideas from property testing to ensure KDS is almost correct with high probability  Competitive analysis to measure the performance of KDS

36 III. Querying Moving Objects

37 Kinetic Range Searching S: Set of points, each moving with fixed velocity in R 2 Preprocess S into a data structure:  (Q1) Given rectangle R at time t, report all points S(t)∩R  (Q2) Given R and time interval [a,b], report all points of that pass thru R during the time interval [a,b]

38 KDS Approach  Kientic range trees [A., Arge, Erickson 2003] O(n log n) space, O(log n + k) query (Q1) Use KDS approach to update range tree   (n 2 ) events; O(log 2 n) (amortized) time at each event Queries have to arrive in chronological order  Kinetic kd-trees [A. Gao, Guibas 2003] O(n) space, O(n 1/2 + k) query (Q1)   (n 2 ) events; O(log 2 n) (amortized) time at each event Queries have to arrive in chronological order  What if queries do not arrive in chronological order? Why spend time processing events?

39 Kinetic Range Searching Partition tree based approach [A., Arge, Erickson]  O(n) space, O(n 1/2 + k) query time  O(log 2 n) insertion/deletion of a point Answering (Q1) query A similar approach works for (Q2) queries

40 Time-Responsive Indexing  Time-responsiveness * Near future queries need to be answered more quickly * Optimize structure for near future * Approximate distant future  Results [A., Arge, Erickson, Yu, 2004] * Orthogonal range queries in R 1, R 2 ~n space, (  (t q )/n) 1/2 + log O(1) n + k query time  (t q ): # events between current time and t q (near future) (distant future)

41  : set of linearly moving points in R 1 * Given interval and time, report  In tx-plane, reduces to stabbing query * Report all lines intersecting a vertical segment  Overall structure * Divide tx-plane into slabs * i-th slab contains events (vertices) * A window structure for each slab to answer stabbing query Example: 1D Time-Responsive Indexing

42 Window Structure  Hierarchical triangulation of the i-th slab * triangles * Each triangle intersects at most lines  Partition tree for each triangle * Size:, query time:  Overall * Space:, query: (note that ) * Update every other events ( amortized per event) cutting tree partition tree -cutting

43 References [Abam, Agarwal, de Berg, Yu, 2006] Out-of-order event processing in kinetic data structures. ESA’06. [Abam, de Berg, 2005] Kinetic sorting and kinetic convex hulls. SoCG’05. [Agarwal, Arge, Erickson, 2003] Indexing moving points. J. Comput. Syst. Sci., 66(1). [Agarwal, Arge, Erickson, Yu, 2004] Efficient tradeoff schemes in data structures for querying moving objects. ESA’04. [Agarwal, Arge, Vahrenhold, 2001] Time responsive external data structures for moving points. WADS’01. [Agarwal, Gao, Guibas, Koltun, Sharir, 2006] Stable Delaunay triabgulation, manuscript. [Agarwal, Har-Peled, Varadarajan, 2004] Approximating extent measures of points. J. ACM, 51(4). [Agarwal, Wang, Yu] Kinetic triangulation, SOCG’04. [Czumaz, Sohler, 2005] Soft kinetic data structures, SODA. [Guibas 2004] Kinetic data structures, Handbook of DCG, 2 nd edition, [Yu, Agarwal, Poreddy, Varadarajan, 2004] Practical methods for shape fitting and kinetic data structures using coresets. SoCG’04.

44 Example: Kinetic Sorting List: scheduled processed Scheduled as a past event because current configuration is inconsistent with


Download ppt "Kinetic Algorithms: Approximation and Trade-offs Pankaj K. Agarwal Duke University."

Similar presentations


Ads by Google