Kinetic Algorithms Data Structure for Mobile Data.

Slides:



Advertisements
Similar presentations
Two Segments Intersect?
Advertisements

Geometry Introduction
Computational Geometry
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
Dynamic Planar Convex Hull Operations in Near- Logarithmic Amortized Time TIMOTHY M. CHAN.
2/14/13CMPS 3120 Computational Geometry1 CMPS 3120: Computational Geometry Spring 2013 Planar Subdivisions and Point Location Carola Wenk Based on: Computational.
Brute-Force Triangulation
Convex Hull obstacle start end Convex Hull Convex Hull
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
1 Voronoi Diagrams. 2 Voronoi Diagram Input: A set of points locations (sites) in the plane.Input: A set of points locations (sites) in the plane. Output:
The Divide-and-Conquer Strategy
Convex Hulls May Shmuel Wimer Bar Ilan Univ., Eng. Faculty Technion, EE Faculty.
By Groysman Maxim. Let S be a set of sites in the plane. Each point in the plane is influenced by each point of S. We would like to decompose the plane.
CSCE 620: Open Problem Voronoi Diagram of Moving Points Asish Ghoshal Problem 2 from The Open Problems Project 1.
9/5/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Plane Sweep Algorithms and Segment Intersection Carola Wenk.
Intersections. Intersection Problem 3 Intersection Detection: Given two geometric objects, do they intersect? Intersection detection (test) is frequently.
Query Processing in Databases Dr. M. Gavrilova.  Introduction  I/O algorithms for large databases  Complex geometric operations in graphical querying.
K-structure, Separating Chain, Gap Tree, and Layered DAG Presented by Dave Tahmoush.
Robert Pless, CS 546: Computational Geometry Lecture #3 Last Time: Convex Hulls Today: Plane Sweep Algorithms, Segment Intersection, + (Element Uniqueness,
Computational Geometry -- Voronoi Diagram
17. Computational Geometry Chapter 7 Voronoi Diagrams.
BST Data Structure A BST node contains: A BST contains
Trees and Red-Black Trees Gordon College Prof. Brinton.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Kinetic Data Structures and their Application in Collision Detection Sean Curtis COMP 768 Oct. 16, 2007.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
General Trees and Variants CPSC 335. General Trees and transformation to binary trees B-tree variants: B*, B+, prefix B+ 2-4, Horizontal-vertical, Red-black.
The Complexity of Algorithms and the Lower Bounds of Problems
Chapter 1 Introduction Definition of Algorithm An algorithm is a finite sequence of precise instructions for performing a computation or for solving.
Brute-Force Triangulation
Randomized Algorithms - Treaps
9/7/06CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2006 Triangulations and Guarding Art Galleries Carola Wenk.
UNC Chapel Hill M. C. Lin Point Location Reading: Chapter 6 of the Textbook Driving Applications –Knowing Where You Are in GIS Related Applications –Triangulation.
David Luebke 1 10/3/2015 CS 332: Algorithms Solving Recurrences Continued The Master Theorem Introduction to heapsort.
Brought to you by Max (ICQ: TEL: ) February 5, 2005 Advanced Data Structures Introduction.
Line Arrangement Chapter 6. Line Arrangement Problem: Given a set L of n lines in the plane, compute their arrangement which is a planar subdivision.
Multiway Trees. Trees with possibly more than two branches at each node are know as Multiway trees. 1. Orchards, Trees, and Binary Trees 2. Lexicographic.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
CSIS7101 – Advanced Database Technologies Spatio-Temporal Data (Part 1) On Indexing Mobile Objects Kwong Chi Ho Leo Wong Chi Kwong Simon Lui, Tak Sing.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 8 Arrangements and Duality.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 9.
Kinetic data structures. Goal Maintain a configuration of moving objects Each object has a posted flight plan (this is essentially a well behaved function.
Open Problem: Dynamic Planar Nearest Neighbors CSCE 620 Problem 63 from the Open Problems Project
CMPS 3130/6130 Computational Geometry Spring 2015
CSC 413/513: Intro to Algorithms Solving Recurrences Continued The Master Theorem Introduction to heapsort.
MotivationKinetic Data StructuresExampleKDS Properties Networks play a central role in numerous applications, and the design of good networks is therefore.
1 Binary Search Trees  Average case and worst case Big O for –insertion –deletion –access  Balance is important. Unbalanced trees give worse than log.
9/8/10CS 6463: AT Computational Geometry1 CS 6463: AT Computational Geometry Fall 2010 Triangulations and Guarding Art Galleries Carola Wenk.
Center for Graphics and Geometric Computing, Technion 1 Computational Geometry Chapter 9 Line Arrangements.
Polygon Triangulation
Computational Geometry
Kinetic Data Structures: for computational geometry and for graph drawing Sue Whitesides Computer Science Department.
CMPS 3130/6130 Computational Geometry Spring 2017
3. Polygon Triangulation
Computational Geometry
CMPS 3130/6130 Computational Geometry Spring 2017
Geometric Graphs and Quasi-Planar Graphs
Query Processing in Databases Dr. M. Gavrilova
Algorithm design techniques Dr. M. Gavrilova
CMPS 3130/6130 Computational Geometry Spring 2017
August 20, 2002 (joint work with Umut Acar, and Guy Blelloch)
Advanced Associative Structures
Enumerating Distances Using Spanners of Bounded Degree
Computational Geometry Capter:1-2.1
Depth Estimation via Sampling
Ch. 8 Priority Queues And Heaps
I. The Problem of Molding
Kinetic Collision Detection for Convex Fat Objects
June 12, 2003 (joint work with Umut Acar, and Guy Blelloch)
Computational Geometry
Presentation transcript:

Kinetic Algorithms Data Structure for Mobile Data

Plan Motivation Introduction Illustrative example Applications 2-D Convex Hull Closest pair in 2-D Others Issues

Motivation Maintain an attribute of interest in a system of geometric objects undergoing continuous motion. Take advantage of the coherence present in continuous motion to process a minimal number of combinatorial event.

Introduction Problems such as convex hull and closest pair maintenance have been extensively studied: Static objects Insertion and deletion operations Wasteful of computation Compute form scratch

Introduction KDS? KDS: Kinetic Data Structure Process of discrete events associated with continuously changing data. Kinetisation Process of transforming an algorithm on static data into a data structure which is valid for continuously changing data.

Introduction The Big Picture Resemble to a sweep-line/plane algorithm Use of a global event queue as interface between KDS and object in motion. Time Sweep line

Introduction Flight plan Use of flight plans The motion of the objects is known in advance BUT: Can be imprecise (use of intervals) Can be updated

Introduction How does it work? The correctness of whatever configuration can be guaranteed with a conjunction of low-degree algebraic conditions involving a bounded number of objects each. A B C ABC A B C To Collinear Inverse

Introduction Certificates A certificates will guarantee the correctness of any configurations

Introduction Timeline Event queue contains KDS events corresponding to times (precise / interval) when certificates might change sign. IF ( flight plan of O updated ) THEN All the certificates involving O must be recalculated and updated.

Recapitulation Attribute certificates for any configurations Keep track of the change in the certificates and update when necessary Time Certificates Update

Definitions Certificates Guarantee the correctness Complexity Number of points moving in a system. Small cost If it running time of the order or

Definitions Internal events (IE) Events process by the structure for its internal needs External events (EE) Events affecting the configuration we are maintaining. Lower bound for IE

Definitions Efficiency If the ratio IE / EE is small. Range: 1 to Infinity Responsiveness Worst-case cost of processing a certificate Size Maximum number of events it needs to schedule in the event queue

Definitions Compact If size linear to the number of moving objects Local If the maximum number of events in the event queue that depend on a single object is small

Illustrative example Consider the following1D situation Given a set of n points moving continuously along the y-axis, we are interested to know which is the topmost point. Constant speed Arbitrary initial configuration Y

Solution 1 Trivial Case Draw the lines in the ty-plane Compute the upper envelope of the set of lines. Efficient algorithm but does not support update of the flight plan.

Solution 2 Schedule-Deschedule Maintain, on-line, the sorted order along the y-axis Schedule event that is the first time when two consecutive points cross. Destroy and create 2 adjacencies Schedule and deschedule up to 2 new events Not efficient: process up to events.

Solution 3 Heap For each link in the heap, a certificate guarantees that the child point is below the parent point. We associate an event at the time these points meet.

Solution 3 Heap For an event we may interchange parent and child

Solution 4 Kinetic Tournament Consider a divide-and-conquer algorithm, like a tournament from bottom to up for computing a global leader. comparisons As long as each of the comparison remain valid the identity of the maximum remains valid.

Solution 4 Kinetic Tournament Imagine that a particular comparison involved flip and precolated up the tree. For a balanced tree the computation is made in time and can affect at most certificates.

Solution 4 Kinetic Tournament For points with constant speed, similar to the computation of the upper-envelope in the ty-plane. In the worst case we have new leaders, each computed in time, for a total worst case running time of

Solution 4 Kinetic Tournament KDS efficient compact local Winner

2D Convex Hull Problem Maintain the convex hull of a set of moving points in 2D. Dual form Point (p,q) to the line y=px+q

2D Convex Hull Goal: Maintain the upper envelope of the set of lines

2D Convex Hull Perform a kinetic tournament. From a red and a blue chain maintain the purple upper envelope of the 2 chains

2D Convex Hull Kinetisation We keep a record of the entire computation in a balanced binary tree Each node is in charge of maintaining the upper envelope of two upper envelopes computed by its children If a event creates a change, the event is process through the tree.

2D Convex Hull Operators <x X value comparison <yY value comparison <sSlope comparison Ce(ab)Contender edge Color of the vertex

2D Convex Hull Certificates

2-D Convex Hull Certificates

2D Convex Hull Example

2-D Convex Hull Lemma 2.1 Consider a configuration C of two convex piecewise linear functions and the certificate list L for their upper envelope as defined earlier. Let C’ be a configuration for which all the certificates of L hold. Then the upper envelope of C’ has the same combinatorial description as that of C.

2D Convex Hull Proof The x-certificates prove the correctness of the contender edge pointer. Any vertex that has a y-certificate in L is also guaranteed to be placed in C’ and in C.

2D Convex Hull Proof We can show that the vertices without y-certificates can not be placed differently in C and C’

2D Convex Hull Certificate updates Lemma 2.2 The following procedure correctly updates the certificate list when the configuration events happen

2D Convex Hull Analysis Theorem 2.3 The KDS for maintaining the convex hull is efficient, responsive, compact and local Proof Responsive: Compact : Local: Efficient: in the worst case

2D Convex Hull Demo Demo

Closest Pair in 2D Problem definition Given a set S of n moving points find the two closest points in S. Traditional static algorithms are ill- adapted for the kinematisation.

Closest Pair in 2D Static Algorithm We divide the space around each vertex into six 60º wedges, the nearest neighbor of each point is the closest of the nearest neighbor in the six wedges. ADD PICTURE

Closest Pair in 2D Definitions Dom(p): The right extending wedge that make ±30º angles with the x axis. Circ(p, r): The circle of radius r centered at p. We denote the closest pair in S, (a,b)

Closest Pair in 2D Problem definition Lemma 3.1 Point b is not contained in Dom(p) for any third point p with a to the left of b. Lemma 3.2 The leftmost point in Dom(a) is b.

Closest Pair in 2D C ontradictions Lemma 3.1Lemma 3.2

Closest Pair in 2D Algorithm The plane sweep algorithm performs a set of operation three times, for S rotated by 0 and ±60º.

Closest Pair in 2D Algorithm For each point p in S from right to left Set Cands(p) = Maxima Dom(p) Set lcand(p) to be the leftmost element of cands(p) Delete points of Cands(p) from Maxima Insert p into Maxima at its proper place in y-order Repeat for the three directions

Closest Pair in 2D Algorithm Analysis Sorting: Compute Cands(p): Finding lcand(p): in the worst case Splitting and inserting: Total:

Closest Pair in 2D Kinetisation Certificates The projection of the point on x for S rotated by 0 and ±60º. Each point belong to a maximum of six certificates, involving is two neighbors in each of the three sorted order.

Closest Pair in 2D Events Three types of event: Change of order in x Change of order in ±60º

Closest Pair in 2D Updates

Closest Pair in 2D Analysis The KDS for the closest pair problem is efficient, responsive, compact and local. Efficient: The number of events process by the KDS is a logarithmic factor more then the maximum number of external events.

Closest Pair in 2D Analysis Compact: There is events in the queue at any time, for the certificates and for the kinetic tournament. Local: Each point belongs to ar most six certificates and to at most three pair and in pair participate to at most events in the kinetic tournament

Closest Pair in 2D Demo Demo

Summary The way it works

Further Issues Avoid the problem related to the finite precision arithmetic. (sequencing of the events) Change the definition of efficiency to make it proportional to the number if external events Adapt the algorithm to real time computation

References J. Basch and J.Guilbas. Data Structures for Mobile Data. J. of Algorithms 31, 1-28 (1999). J. Basch and al. Data Structures for Mobile Data. SODA 1997,