Presentation is loading. Please wait.

Presentation is loading. Please wait.

Dynamic Algorithms for Planar Point Location Kanat Tangwongsan in collaboration with Guy Blelloch, Umut Acar, Srinath Sridhar. Aladdin Center - Summer.

Similar presentations


Presentation on theme: "Dynamic Algorithms for Planar Point Location Kanat Tangwongsan in collaboration with Guy Blelloch, Umut Acar, Srinath Sridhar. Aladdin Center - Summer."— Presentation transcript:

1 Dynamic Algorithms for Planar Point Location Kanat Tangwongsan in collaboration with Guy Blelloch, Umut Acar, Srinath Sridhar. Aladdin Center - Summer 2004

2 Planar Point Location Classical geometric retrieval problem.Classical geometric retrieval problem. Subdivide a Euclidean plane into polygons by line segments. (These segments intersect only at their endpoints).Subdivide a Euclidean plane into polygons by line segments. (These segments intersect only at their endpoints). Identify which polygon the query point (red spot) is in.Identify which polygon the query point (red spot) is in.

3 Static vs Dynamic Static: fixed structureStatic: fixed structure Dynamic: possible insertion/deletion of segmentsDynamic: possible insertion/deletion of segments

4 Motivation Applications of Point LocationApplications of Point Location –Geographic Information Systems (GIS) –User Interface (Mouse/Windows relation) –Graphics and CAD/CAM –etc. Why dynamic?Why dynamic? –Interesting –Heavy use in circuit layout, computer graphics, etc.

5 Some Previous Work Many solutions to this problem:Many solutions to this problem: –[Kirkpatrick 1983]; [Edelsbrunner, Guibas 1986]; [Overmars 1985]; [Sarnak, Tarjan 1986], etc. Various approaches and techniques: persistent trees, segment trees, etc.Various approaches and techniques: persistent trees, segment trees, etc. See Chiang and Tamassia’s “Dynamic Algorithms in Computational Geometry” for pointers to these.See Chiang and Tamassia’s “Dynamic Algorithms in Computational Geometry” for pointers to these. Close look at Sarnak-Tarjan solution.Close look at Sarnak-Tarjan solution.

6 Sarnak-Tarjan Solution Idea: (partial) persistenceIdea: (partial) persistence – O(log n) -query-time, O(n)- space solution. Static: unable to insert/delete segments.Static: unable to insert/delete segments. Relies on Cole’s observation and Dobkin-Lipton construction.Relies on Cole’s observation and Dobkin-Lipton construction.

7 Dobkin-Lipton Construction Draw a vertical line through each vertex, splitting the plane into vertical slabs.Draw a vertical line through each vertex, splitting the plane into vertical slabs.

8 Locate a point with two binary searches - O(log n)- query time.Locate a point with two binary searches - O(log n)- query time. Nice but space inefficient – can cause O(n 2 ).Nice but space inefficient – can cause O(n 2 ).

9  (n) segments in each slabs, and  (n) slabs.  (n) segments in each slabs, and  (n) slabs. If storing a tree for each slab, order n 2 space usage. If storing a tree for each slab, order n 2 space usage.

10 time A B Sets of line segments intersecting contiguous slabs are similar.Sets of line segments intersecting contiguous slabs are similar. Cole’s Observation

11 Reduces the problem to storing a “persistent” sorted set.Reduces the problem to storing a “persistent” sorted set.

12 Some Notions of Persistency Ephemeral data structure: cannot go back in time.Ephemeral data structure: cannot go back in time. Persistent data structure: keeps all previous versions accesible.Persistent data structure: keeps all previous versions accesible. –Partial persistence Various solutions: see e.g. Driscoll et al., Overmars, etc.Various solutions: see e.g. Driscoll et al., Overmars, etc. Trees:Trees: –“path-copying” is simple and powerful –Native to functional programming languages e.g. ML, Scheme, etc.

13 Path-copying illustrated 2 14 2 1 4 1 5 5 3 Insert 3 2 1 2 4 4 5 3 Version Dictionary

14 Friendly “Dynamic/Stability” 101 What is a “Dynamic Algorithm”?What is a “Dynamic Algorithm”? –Maintains its input/output relationship as the input changes. Some Words of the DaySome Words of the Day –to “dynamize” an algorithm is to make it dynamic. –“dynamization” is the process of making an algorithm dynamic. “stable” = a change to the input does not change the execution trace (function call tree) too dramatically.“stable” = a change to the input does not change the execution trace (function call tree) too dramatically.

15 Dynamizing Persistent Data Structure Acar et al (SODA 2004) shows a way to dynamize static algorithms.Acar et al (SODA 2004) shows a way to dynamize static algorithms. The efficiency depends on “stability”.The efficiency depends on “stability”.

16 Traditional linked-list is bad for look-up [ O(n) ].Traditional linked-list is bad for look-up [ O(n) ]. An additional layer saves a lot of “probing”.An additional layer saves a lot of “probing”. Achieve O(log n) by adding a few more layers.Achieve O(log n) by adding a few more layers. –Say with n/4, n/8 and so forth nodes. –Sadly, maintaining this perfect structure is hard. Digression #1: Skip Lists 0 12 3 45 6 7 0 24 6 0 4 0 1 1 1 1 0 12 3 45 6 7 0 24 6 1 1 0 12 3 45 6 7 1

17 Pugh[1990] invented “skip lists”.Pugh[1990] invented “skip lists”. 0 0 1 1 1 1 2 3 3 45 6 6 6 7 7 7 7 8 9 9 ! ! ! ! ! 1 1 1 1 1 The level of a node is drawn from the geometric distribution i.e. a node has level k - 1 with probability 1 / 2 kThe level of a node is drawn from the geometric distribution i.e. a node has level k - 1 with probability 1 / 2 k Skip Lists: expected O(n) -space, and expected O(log n) insert/delete/look-up.Skip Lists: expected O(n) -space, and expected O(log n) insert/delete/look-up.

18 Our Unified Goals Dynamize Sarnak-TarjanDynamize Sarnak-Tarjan –use the idea of persistent data structure and be able to support insertion/deletion/lookup on-the-fly. “stability” is the key to efficiency.“stability” is the key to efficiency. Treaps and skip lists looks promising.Treaps and skip lists looks promising. “path-copying” as the starting point.“path-copying” as the starting point. Benchmark against existing techniques.Benchmark against existing techniques.

19 Questions?

20 Thank you!


Download ppt "Dynamic Algorithms for Planar Point Location Kanat Tangwongsan in collaboration with Guy Blelloch, Umut Acar, Srinath Sridhar. Aladdin Center - Summer."

Similar presentations


Ads by Google