Dynamic rectangular intersection with priorities

Slides:



Advertisements
Similar presentations
Orthogonal range searching. The problem (1-D) Given a set of points S on the line, preprocess them to build structure that allows efficient queries of.
Advertisements

1 IP-Lookup and Packet Classification Advanced Algorithms & Data Structures Lecture Theme 08 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
 Definition of B+ tree  How to create B+ tree  How to search for record  How to delete and insert a data.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
I/O-Algorithms Lars Arge Fall 2014 September 25, 2014.
Binary Trees, Binary Search Trees CMPS 2133 Spring 2008.
Binary Trees, Binary Search Trees COMP171 Fall 2006.
Tries Standard Tries Compressed Tries Suffix Tries.
CS 171: Introduction to Computer Science II
Spatial Access Methods Chapter 26 of book Read only 26.1, 26.2, 26.6 Dr Eamonn Keogh Computer Science & Engineering Department University of California.
1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced.
Chapter 6: Priority Queues Priority Queues Binary Heaps Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Fibonacci Heaps. Single Source All Destinations Shortest Paths
B + -Trees (Part 1). Motivation AVL tree with N nodes is an excellent data structure for searching, indexing, etc. –The Big-Oh analysis shows most operations.
B + -Trees (Part 2) Lecture 21 COMP171 Fall 2006.
IP-Lookup and Packet Classification Computational Geometry, WS 2007/08 Lecture 14 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 11 : More Geometric Data Structures Computational Geometry Prof. Dr. Th. Ottmann 1 Geometric Data Structures 1.Rectangle Intersection 2.Segment.
O RTHOGONAL R ANGE S EARCHING الهه اسلامی فروردین 92, 1.
B + -Trees (Part 2) COMP171. Slide 2 Review: B+ Tree of order M and of leaf size L n The root is either a leaf or 2 to M children n Each (internal) node.
AVL Trees / Slide 1 Deletion  To delete a key target, we find it at a leaf x, and remove it. * Two situations to worry about: (1) target is a key in some.
R-Trees: A Dynamic Index Structure for Spatial Data Antonin Guttman.
Chapter 61 Chapter 6 Index Structures for Files. Chapter 62 Indexes Indexes are additional auxiliary access structures with typically provide either faster.
Orthogonal Range Searching I Range Trees. Range Searching S = set of geometric objects Q = query object Report/Count objects in S that intersect Q Query.
Cs6390 summer 2000 Tradeoffs for Packet Classification 1 Tradeoffs for Packet Classification Members: Jinxiao Song & Yan Tong.
1 B Trees - Motivation Recall our discussion on AVL-trees –The maximum height of an AVL-tree with n-nodes is log 2 (n) since the branching factor (degree,
1 2-D Trees You are given a set of points on the plane –Each point is defined by two coordinates (x, y) (5,45) (25,35) (35,40) (50,10) (90,5) (85,15) (80,65)
14/13/15 CMPS 3130/6130 Computational Geometry Spring 2015 Windowing Carola Wenk CMPS 3130/6130 Computational Geometry.
Binary Trees, Binary Search Trees RIZWAN REHMAN CENTRE FOR COMPUTER STUDIES DIBRUGARH UNIVERSITY.
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.
Starting at Binary Trees
1 Tree Indexing (1) Linear index is poor for insertion/deletion. Tree index can efficiently support all desired operations: –Insert/delete –Multiple search.
Segment Trees Basic data structure in computational geometry. Computational geometry.  Computations with geometric objects.  Points in 1-, 2-, 3-, d-space.
Binary Tree. Some Terminologies Short review on binary tree Tree traversals Binary Search Tree (BST)‏ Questions.
CMPS 3130/6130 Computational Geometry Spring 2015
CSE 2331/5331 Topic 8: Binary Search Tree Data structure Operations.
B+-Tree Deletion Underflow conditions B+ tree Deletion Algorithm
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
Fibonacci Heaps. Fibonacci Binary insert O(1) O(log(n)) find O(1) N/A union O(1) N/A minimum O(1) O(1) decrease key O(1) O(log(n)) delete O(log(n) O(log(n))
Mehdi Kargar Department of Computer Science and Engineering
Balanced Search Trees 2-3 Trees AVL Trees Red-Black Trees
Self-Adjusting Data Structures
AA Trees.
Geometric Data Structures
CMPS 3130/6130 Computational Geometry Spring 2017
Binary search tree. Removing a node
Chapter 25: Advanced Data Types and New Applications
Extra: B+ Trees CS1: Java Programming Colorado State University
Multidimensional Range Search
Tonga Institute of Higher Education
O(lg n) Search Tree Tree T is a search tree made up of n elements: x0 x1 x2 x3 … xn-1 No function (except transverse) takes more than O(lg n) in the.
Binary Trees, Binary Search Trees
Segment tree and Interval Tree
Chapter 3: Dynamic Routing
Segment Trees Basic data structure in computational geometry.
Chapter 14: Augmenting Data Structures
Reporting (1-D) Given a set of points S on the line, preprocess them to build structure that allows efficient queries of the from: Given an interval I=[x1,x2]
Priority Search Trees Modified Prof. Sahni’s notes.
COMP171 B+-Trees (Part 2).
CMSC 341 Splay Trees.
Binary Trees, Binary Search Trees
Advanced Implementation of Tables
Topic 6: Binary Search Tree Data structure Operations
COMP171 B+-Trees (Part 2).
CMSC 341 Splay Trees.
Chapter 12&13: Binary Search Trees (BSTs)
Priority Queues Binary Heaps
Binary Trees, Binary Search Trees
Dynamic rectangular intersection with priorities
Presentation transcript:

Dynamic rectangular intersection with priorities K, Molad, Tarjan

Related classical problem: Range reporting Given a set of intervals S on the line, preprocess them to build a structure that allows efficient queries of the from: Given a point x find all intervals containing it. x

Range reporting + priorities Given a set of intervals S on the line, each with priority assigned to it, build a structure that allows efficient queries of the from: Given a point x find interval with minimum priority containing it. Updates – insert or delete an interval 9 5 3 1 7 x

Motivation – Packet classification B Forward to Interface A Forward to Interface B 1 2 3 block block & report to Bill This problem can be stated as follows: The basic task of a router is to classify incoming packets into streams, and to handle each stream in a certain way. A good way of doing that is to define intervals on the ip of the sender. In this way, a packet with a sender which falls into a certain interval can be forwarded to an interface… Or forwarded to another interface… Or maybe blocked. What happens when the packet falls into 2 intervals? We need priorities to decide. IP address 190.0.1.0 190.0.2.0 190.0.3.0 190.0.4.0 190.0.5.0 190.0.6.0 190.0.7.0 190.0.8.0 190.0.9.0 190.0.10.0 190.0.11.0 190.0.12.0 190.0.13.0 190.0.14.0

Nested intervals, ip prefixes 190.0.*.* 190.1.*.* 190.0.1.* block Forward to Interface A Forward to Interface B 2 3 IP address 190.1.0.0 190.0.0.0 190.0.1.0 190.0.2.255 190.0.255.255 190.1.255.255

Extension to 2D Query = point in R2 interval = rectangle with priority (Sender IP, receiver IP) interval = rectangle with priority 5 9 7

One dimensional data structure for nested intervals 4 5 2 9 2 7 1

Nested Intervals Containment tree: 4 5 2 9 2 7 1 Containment tree: The parent of interval v is the smallest interval containing v 2 7 1 2 9 5 4

Nested Intervals Query: 4 5 2 9 2 7 1 Query: Starting node s = smallest interval containing the query point Relevant priorities are on the path from s to the root. 2 7 1 2 9 5 Problem: path may be long… 4

Hey, dynamic trees know how to do that 4 5 2 9 2 7 1 We can use a dynamic tree to represent the containment tree. 2 7 1 Problem: Updates => Many cuts & links 2 9 5 4

Insert

Binarization Node v => node v 4 5 2 9 2 7 1 Node v => node v Leftmost child of v => Left child of v 9 7 5 ∞ Adjust costs: Left edge => priority of parent Right edge => ∞ 2 7 1 Any other child of v => right child of its left sibling 2 9 5 4

Insert (Cont.) Constant number of links and cuts

Summary Containment tree C Represent C by binarized version B Query = min cost on path from starting point to root Represent C by binarized version B Represent B by dynamic tree D How do you find the point to start the query ? How do you find the edges to cut ?

How do you start the query ? 4 2 9 5 2 7 1 Use a balanced search tree on the endpoints 7 1 9 Min(Mincost( ), pri( ))

query (cont) 4 2 9 5 2 7 1 7 1 9 Mincost( )