A Self-adjusting Data Structure for Multi-dimensional Point Sets Eunhui Park & David M. Mount University of Maryland Sep. 2012.

Slides:



Advertisements
Similar presentations
Nearest Neighbor Search
Advertisements

Dynamic Graph Algorithms - I
Multidimensional Indexing
Searching on Multi-Dimensional Data
Binary Search Tree AVL Trees and Splay Trees
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture.
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.
AA Trees another alternative to AVL trees. Balanced Binary Search Trees A Binary Search Tree (BST) of N nodes is balanced if height is in O(log N) A balanced.
EECS 311: Chapter 4 Notes Chris Riesbeck EECS Northwestern.
Quad Trees By JJ Shepherd. Introduction So far we’ve only used binary trees to solve problems – Sort data – Search data – Confuse students Trees are not.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
Multiple-key indexes Index on one attribute provides pointer to an index on the other. If V is a value of the first attribute, then the index we reach.
1 One Torus to Rule Them All: Multi-dimensional Queries in P2P Systems Prasanna Ganesan Beverly Yang Hector Garcia-Molina Stanford University.
CSE 326 Multi-Dimensional Search Trees David Kaplan Dept of Computer Science & Engineering Autumn 2001.
Approximate Range Searching in the Absolute Error Model Guilherme D. da Fonseca CAPES BEX Advisor: David M. Mount.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Amortized Analysis Some of these lecture slides are adapted from CLRS.
Rank-Balanced Trees Siddhartha Sen, Princeton University WADS 2009 Joint work with Bernhard Haeupler and Robert E. Tarjan 1.
© 2004 Goodrich, Tamassia (2,4) Trees
CSE 326: Data Structures B-Trees Ben Lerner Summer 2007.
CSE 326: Data Structures Lecture #13 Extendible Hashing and Splay Trees Alon Halevy Spring Quarter 2001.
Balanced Trees Abs(depth(leftChild) – depth(rightChild))
Balanced Trees. Binary Search tree with a balance condition Why? For every node in the tree, the height of its left and right subtrees must differ by.
5.9 Heaps of optimal complexity
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Efficient Distance Computation between Non-Convex Objects By Sean Quinlan Presented by Sean Augenstein and Nicolas Lee.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Splay Trees Splay trees are binary search trees (BSTs) that:
0 Course Outline n Introduction and Algorithm Analysis (Ch. 2) n Hash Tables: dictionary data structure (Ch. 5) n Heaps: priority queue data structures.
Splay Trees and B-Trees
CS 61B Data Structures and Programming Methodology Aug 11, 2008 David Sun.
Data Structures for Computer Graphics Point Based Representations and Data Structures Lectured by Vlastimil Havran.
Spatial Data Structures Jason Goffeney, 4/26/2006 from Real Time Rendering.
Spatial Data Management Chapter 28. Types of Spatial Data Point Data –Points in a multidimensional space E.g., Raster data such as satellite imagery,
New Balanced Search Trees Siddhartha Sen Princeton University Joint work with Bernhard Haeupler and Robert E. Tarjan.
Graphics Graphics Korea University cgvr.korea.ac.kr Solid Modeling 고려대학교 컴퓨터 그래픽스 연구실.
Red Black Tree Smt Genap Outline Red-Black Trees ◦ Motivation ◦ Definition ◦ Operation Smt Genap
Min Chen School of Computer Science and Engineering Seoul National University Data Structure: Chapter 8.
Mehdi Mohammadi March Western Michigan University Department of Computer Science CS Advanced Data Structure.
PRESENTED BY – GAURANGI TILAK SHASHANK AGARWAL Collision Detection.
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.
Advanced Data Structures and Implementation Top-Down Splay Trees Top-Down Splay Trees Red-Black Trees Red-Black Trees Top-Down Red Black Trees Top-Down.
AVL Tree Definition: Theorem (Adel'son-Vel'skii and Landis 1962):
2-3 Tree. Slide 2 Outline  Balanced Search Trees 2-3 Trees Trees.
1 Splay trees (Sleator, Tarjan 1983). 2 Goal Support the same operations as previous search trees.
CMSC420: Splay Trees Kinga Dobolyi Based off notes by Dave Mount.
Oct 26, 2001CSE 373, Autumn A Forest of Trees Binary search trees: simple. –good on average: O(log n) –bad in the worst case: O(n) AVL trees: more.
Segment Trees Basic data structure in computational geometry. Computational geometry.  Computations with geometric objects.  Points in 1-, 2-, 3-, d-space.
CS 61B Data Structures and Programming Methodology Aug 7, 2008 David Sun.
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.
Spatial Indexing Techniques Introduction to Spatial Computing CSE 5ISC Some slides adapted from Spatial Databases: A Tour by Shashi Shekhar Prentice Hall.
R-Trees: A Dynamic Index Structure For Spatial Searching Antonin Guttman.
1 CSE 326: Data Structures Trees. 2 Today: Splay Trees Fast both in worst-case amortized analysis and in practice Are used in the kernel of NT for keep.
IT 60101: Lecture #121 Foundation of Computing Systems Lecture 12 Trees: Part VII.
BATON A Balanced Tree Structure for Peer-to-Peer Networks H. V. Jagadish, Beng Chin Ooi, Quang Hieu Vu.
CMPS 3130/6130 Computational Geometry Spring 2015
CS 5243: Algorithms Balanced Trees AVL : Adelson-Velskii and Landis(1962)
February 17, 2005Lecture 6: Point Location Point Location (most slides by Sergi Elizalde and David Pritchard)
Red-Black Trees an alternative to AVL trees. Balanced Binary Search Trees A Binary Search Tree (BST) of N nodes is balanced if height is in O(log N) A.
ITEC 2620M Introduction to Data Structures Instructor: Prof. Z. Yang Course Website: ec2620m.htm Office: TEL 3049.
Spatial Data Management
Lecture 23 Red Black Tree Chapter 10 of textbook
Self-Adjusting Data Structures
AA Trees.
Self-Adjusting Search trees
Tree-Structured Indexes: Introduction
Red Black Trees
Spatial Indexing I Point Access Methods.
Data Structures Lecture 4 AVL and WAVL Trees Haim Kaplan and Uri Zwick
Quadtrees 1.
Splay Trees Binary search trees.
Presentation transcript:

A Self-adjusting Data Structure for Multi-dimensional Point Sets Eunhui Park & David M. Mount University of Maryland Sep. 2012

Motivation Sleator & Tarjan introduced the splay tree almost 30 years ago. Self adjusts to access distribution Supports insertion and deletion in O(log n) amortized time Efficient access: Balance property – m accesses in O((m+n) log n) time Scanning property [Elmasry 2004] – access all items in O(n) time Working set property – … on temporal locality Static optimality property – Efficient access based on frequency Static & dynamic finger [Cole, 2000] properties – … on spatial locality Is there a multi-dimensional generalization?

Background Compressed Quadtree Hierarchical partition of space O(n) space O(log n) access time if augmented: Topology tree [Frederickson1985, Har-Peled 2005 ] Skip quadtree [Eppstein, Goodrich, Sun 2005] Quadtreap [Mount, Park 2010] based on treap [Seidel, Aragon 1996] Efficient approximate proximity queries Approximate nearest neighbor search Approximate range search

Objective Like quadtrees: A versatile geometric partition tree Supports efficient approximate proximity queries Like splay trees: Adjusts to access distribution Supports insertion/deletion in O(log n) amortized time Supports splay tree access properties: balance, static optimality, working set, static finger Quadtree + Splay tree Splay Quadtree

Overview BD-tree Rotation Splaying operation Basic splaying Splaying Efficiency Insertion/deletion Search and access efficiency

BD-tree Each node is associated with a region of space called a cell. Each cell is defined by an outer box and an optional inner box. Partition operations: split and shrink. Internal nodes: split nodes and shrink nodes. Each leaf has a single point or a single inner box. Box Decomposition tree (BD-tree) : A geometric data structure based on a hierarchical decomposition of space into d-dimensional axis-aligned rectangles Box Decomposition tree (BD-tree) : A geometric data structure based on a hierarchical decomposition of space into d-dimensional axis-aligned rectangles box cell leaves

BD-tree: Partitioning Operations Split Partitions a cell by an axis-orthogonal hyperplane that bisects the cell’s longest side. Shrink Partitions a cell by a shrinking box, which lies within the cell. C D E D E C C F C FC\F C split shrink left right inner outer

BD-tree: Promotion By construction, nodes are generated in shrink-split pairs. We merge each into a single ternary node, called a pseudo-node. Tree can be restructured through a local operation, called promotion. A BC C DE A BDE y y x x CD E AB inner outer left right left right outer shrink node split node pseudo-node

Splay Quadtree Given an internal node, x, splay(x) uses promotions to transform x to the root of the tree This makes future accesses to x more efficient x b c d e f g g b x f c e d splay(x)

Basic Splaying As in Sleator & Tarjan, splaying is based on primitive operations: Zig-zag Zig-zig C DE A B FG A BC DE FG A BC E FG D A BC DE FG A BC E FG D E FG C D A B x x x x x x y y y y y y z z z z z z

The Problem of Right Promotion Inner-left convention: If an internal node’s cell has an inner box, it resides in its left child If necessary, left and right children are relabeled to satisfy this This guarantees that each cell has constant complexity Right promotion may violate this convention E y B CD x A D AE B C y x AD E B C If this cell has an inner box, u Now, y’s cell has two inner boxes, u and v ! u v v v u u

Splaying in 3-Phases Promotions must be carefully structured to avoid this problem 3-phased approach (3 passes from bottom to top) As in Sleator & Tarjan, amortized efficiency is established by a potential-based analysis. a b c d e f g a b c f g e d b g a f c e d g b a f c e d R O O O L L L L R R R R

Insertion and deletion Insert(q): locate leaf x containing q add q as new leaf splay(x) Insertion can be performed in O(log n) amortized time. Deletion can be performed in O(log n) amortized time. x x x q q

Analogous to Splay Trees

Static Finger Theorem ×

×

×

×

×

Conclusions Splay Quadtree: Self-adjusting geometric data structure Supports insertion/deletion in O(log n) amortized time Supports efficient approximate proximity queries Open problems: Other properties of standard splay trees? Dynamic finger theorem Scanning theorem Better notions of distance (or generally locality) in a geometric setting?

References

Thank you!