An Optimal Dynamic Interval Stabbing-Max Data Structure? Pankaj K. Agarwal, Lars Arge and Ke Yi Department of Computer Science Duke University.

Slides:



Advertisements
Similar presentations
Interval Heaps Complete binary tree. Each node (except possibly last one) has 2 elements. Last node has 1 or 2 elements. Let a and b be the elements in.
Advertisements

Interval Trees Store intervals of the form [li,ri], li <= ri.
Comp 122, Spring 2004 Binary Search Trees. btrees - 2 Comp 122, Spring 2004 Binary Trees  Recursive definition 1.An empty tree is a binary tree 2.A node.
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.
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
Computer Science C++ High School Level By Guillermo Moreno.
1 Self-Adjusting Data Structures. 2 Lists [D.D. Sleator, R.E. Tarjan, Amortized Efficiency of List Update Rules, Proc. 16 th Annual ACM Symposium on Theory.
External Memory Geometric Data Structures
CS 171: Introduction to Computer Science II
I/O-Efficient Batched Union-Find and Its Applications to Terrain Analysis Pankaj K. Agarwal, Lars Arge, Ke Yi Duke University University of Aarhus.
I/O-Algorithms Lars Arge University of Aarhus February 21, 2005.
I/O-Algorithms Lars Arge Aarhus University February 27, 2007.
A Binary Tree root leaf. A Binary Tree root leaf descendent of root parent of leaf.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
I/O-Algorithms Lars Arge Aarhus University February 16, 2006.
I/O-Algorithms Lars Arge University of Aarhus February 13, 2005.
1 Binary Search Trees Implementing Balancing Operations –AVL Trees –Red/Black Trees Reading:
I/O-Algorithms Lars Arge University of Aarhus March 1, 2005.
I/O-Algorithms Lars Arge Spring 2009 March 3, 2009.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Lars Arge1, Mark de Berg2, Herman Haverkort3 and Ke Yi1
I/O-Algorithms Lars Arge Aarhus University March 5, 2008.
I/O-Efficient Structures for Orthogonal Range Max and Stabbing Max Queries Second Year Project Presentation Ke Yi Advisor: Lars Arge Committee: Pankaj.
I/O-Algorithms Lars Arge Aarhus University March 9, 2006.
I/O-Algorithms Lars Arge Aarhus University February 14, 2008.
I/O-Algorithms Lars Arge University of Aarhus March 7, 2005.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part II Prof. Dr. Th. Ottmann Summer Semester 2006.
Lecture 11 : More Geometric Data Structures Computational Geometry Prof. Dr. Th. Ottmann 1 Geometric Data Structures 1.Rectangle Intersection 2.Segment.
Heaps and heapsort COMP171 Fall 2005 Part 2. Sorting III / Slide 2 Heap: array implementation Is it a good idea to store arbitrary.
Important Problem Types and Fundamental Data Structures
Chapter Tow Search Trees BY HUSSEIN SALIM QASIM WESAM HRBI FADHEEL CS 6310 ADVANCE DATA STRUCTURE AND ALGORITHM DR. ELISE DE DONCKER 1.
External Memory Algorithms for Geometric Problems Piotr Indyk (slides partially by Lars Arge and Jeff Vitter)
14/13/15 CMPS 3130/6130 Computational Geometry Spring 2015 Windowing Carola Wenk CMPS 3130/6130 Computational Geometry.
Data Structure & Algorithm II.  Delete-min  Building a heap in O(n) time  Heap Sort.
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
Lars Arge Presented by Or Ozery. I/O Model Previously defined: N = # of elements in input M = # of elements that fit into memory B = # of elements per.
An experimental study of priority queues By Claus Jensen University of Copenhagen.
CSED101 INTRODUCTION TO COMPUTING TREE 2 Hwanjo Yu.
1 Searching Searching in a sorted linked list takes linear time in the worst and average case. Searching in a sorted array takes logarithmic time in the.
I/O-Efficient Batched Union-Find and Its Applications to Terrain Analysis Pankaj K. Agarwal, Lars Arge, Ke Yi Duke University University of Aarhus.
Segment Trees Basic data structure in computational geometry. Computational geometry.  Computations with geometric objects.  Points in 1-, 2-, 3-, d-space.
Four different data structures, each one best in a different setting. Simple Heap Balanced Heap Fibonacci Heap Incremental Heap Our results.
Review for Exam 2 Topics covered (since exam 1): –Splay Tree –K-D Trees –RB Tree –Priority Queue and Binary Heap –B-Tree For each of these data structures.
Tree Data Structures. Heaps for searching Search in a heap? Search in a heap? Would have to look at root Would have to look at root If search item smaller.
CIS 068 Welcome to CIS 068 ! Lesson 12: Data Structures 3 Trees.
Interval S = [3,10]  {x | 3 ≤ x ≤ 10} Closed segment S = (3,10)  {x | 3 < x < 10} Opened segment S = [3,3]  {3} Point.
CMPS 3130/6130 Computational Geometry Spring 2015
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
3.1 Height-Balanced Trees 3.2 Weight-Balanced Trees
Self-Adjusting Data Structures
Computational Geometry
Red-Black Tree Neil Tang 02/07/2008
G64ADS Advanced Data Structures
Data Structures: Disjoint Sets, Segment Trees, Fenwick Trees
CMPS 3130/6130 Computational Geometry Spring 2017
Binary search tree. Removing a node
Experimental evaluation of Navigation piles
Topics covered (since exam 1):
Red Black Trees
Segment tree and Interval Tree
Interval Heaps Complete binary tree.
Advanced Topics in Data Management
Data Structures: Segment Trees, Fenwick Trees
Topics covered (since exam 1):
Topics covered (since exam 1):
STACS arxiv.org/abs/ y 3-sided x1 x2 x1 x2 top-k
Tips on Homework 2 Fei Chen.
Range Queries on Uncertain Data
Topics covered (since exam 1):
Presentation transcript:

An Optimal Dynamic Interval Stabbing-Max Data Structure? Pankaj K. Agarwal, Lars Arge and Ke Yi Department of Computer Science Duke University

2 Problem Definition S : n intervals in 1D w(s) : weight of s  S; w(s)  R Stabbing-max query q  R : max{w(s) | s  S, q  s} q Three operations: Query Insert an interval Delete an interval

3 Trivial if no deletions A binary search tree: O(n) space, O(log n) query & insert Interval tree Size: O(n) Query: O(log 2 n) Insert: O(log n) Delete: O(log n) Kaplan, Molad and Tarjan [STOC ’ 03] The best known result Size: O(n) Query: O(log n) Insert: O(log n) Delete: O(log n loglog n) Previous Results q

4 Trivial if no deletions A binary search tree: O(n) space, O(log n) query & insert Interval tree Size: O(n) Query: O(log 2 n) Insert: O(log n) Delete: O(log n) Kaplan, Molad and Tarjan [STOC ’ 03] The best known result Size: O(n) Query: O(log n) Insert: O(log n) Delete: O(log n loglog n) Our Results q

5 Base Tree T Main idea: use a base interval tree with fan-out f = Height of tree: O(log n / loglog n) Each leaf stores Q (log n) endpoints O(n / log 3/2 n) internal nodes, O(n / log n) nodes in total slab multislab slab multislab O( ) slabs O(log n) multislabs

6 Base Tree T v S(v): Intervals associated with node v Each interval is broken into a left, a right and a middle segment

7 Middle Segments: Overview Answers query within S(v) in O(loglog n) time O(log n / loglog n) nodes on the path O(log n) time in total Insert or delete a segment in O(log n) time Only one M v is affected Total time: O(log n) Size: O(|S(v)| + log 3/2 n) O(n / log 3/2 n) internal nodes Total size: O(n) S(v)S(v) A secondary structure M v for each internal node v of the base tree

8 Secondary Structure M v Build a multislab heap for each multislab Stores all segments spanning exactly this multislab Build a slab heap for each slab Stores the top elements of the relevant multislab heaps Query: O(loglog n) Find the slab heap Update: O(log n) Update the multislab heap: O(log n) Update the slab heaps: Size: O(|S(v)|) Size: O(log 3/2 n)

9 Left Segments: A Static Structure L(v) : segments in  i S(u i ) with left endpoints in the slab of v Basic idea: answer query in L(v) − L( w 4 ) when visiting v f (w j ) : maximum interval in L(v) with left endpoint in the slab of w j Organize in a tournament tree Can find the maximum of the red segments in time O(loglog n) Total: O(log n) w 1 w 2 w 3 w 4 w 5 v u1u1 f(w2)f(w2) u2u2 f(w1)f(w1) f(w2)f(w2) f(w3)f(w3) f(w4)f(w4) q

10 Updating f Each segment at u 2 affects the f values at O(log n / loglog n) descendents Each f can be updated in O(loglog n) time (using additional structures) Total update time: O(log n) Other issues (omitted) Rebalancing of the base tree w 1 w 2 w 3 w 4 w 5 v u1u1 u2u2

11 Is It Really Optimal? Is the O(log n) deletion bound really optimal? The O(log n) query bound is optimal in comparison model Can show O(log n) query → W (log n) insert O(log n) query & insert → W (log n) delete ? Probably yes Errata (Theorem 4.2 & 4.3) Query & update time: O(log d-1 n) → O(log d n)

Thank you!

13 Putting Everything Together y (u, v) = max{ y (u, w), for all of v ’s children w} f (w) = max{ y (u, w), for all v ’s ancestors u execpt p(w)} a b cd e gf hij Base tree y (a,b) y (a,c) y (a,d) y (a,e) TaTa y (b,c) y (b,d) y (b,e) TbTb y (c,e) TcTc y (d,e) TdTd Consider f (e) y (b,f) y (b,g) y (c,f) y (c,g) y (d,f) y (d,g)

14 Putting Everything Together Update: O(log n / loglog n · loglog n) = O(log n) a b cd e gf hij Base tree y (a,b) y (a,c) y (a,d) y (a,e) TaTa y (b,c) y (b,d) y (b,e) TbTb y (c,e) TcTc y (d,e) TdTd Only one T v is affected Total size is still linear