1 / 16

Dynamic rectangular intersection with priorities

Solve the classical problem of range reporting with priorities in a set of intervals by efficiently querying intervals containing a point and finding the minimum priority interval containing it. Implement updates such as insertions and deletions of intervals. Discover how to represent containment trees using dynamic trees for nested intervals and optimize searching for paths with relevant priorities.

beverlyp
Download Presentation

Dynamic rectangular intersection with priorities

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Dynamic rectangular intersection with priorities K, Molad, Tarjan

  2. 0 x 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.

  3. 3 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 5 9 1 7 0

  4. B A 3 3 2 1 190.0.1.0 190.0.7.0 190.0.2.0 190.0.3.0 190.0.4.0 190.0.5.0 190.0.6.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 Motivation – Packet classification Forward to Interface A Forward to Interface B block block & report to Bill IP address

  5. 190.0.*.* 190.1.*.* Forward to Interface A Forward to Interface B 3 3 190.0.1.* block 2 Nested intervals, ip prefixes 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

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

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

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

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

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

  11. Insert

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

  13. Insert (Cont.) Constant number of links and cuts

  14. Summary • Containment tree C • 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 ?

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

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

More Related