Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms
Advertisements

Nearest Neighbor Search
INTERVAL TREE & SEGMENTATION TREE
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part I Prof. Dr. Th. Ottmann Summer Semester 2006.
COSC 6114 Prof. Andy Mirzaian. References: [M. de Berge et al] chapter 5 Applications: Data Base GIS, Graphics: crop-&-zoom, windowing.
1 Theory I Algorithm Design and Analysis (2 - Trees: traversal and analysis of standard search trees) Prof. Th. Ottmann.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Spatial Indexing I Point Access Methods. PAMs Point Access Methods Multidimensional Hashing: Grid File Exponential growth of the directory Hierarchical.
Orthogonal Range Searching 3Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Parallel Prefix Computation Advanced Algorithms & Data Structures Lecture Theme 14 Prof. Dr. Th. Ottmann Summer Semester 2006.
Computational Geometry, WS 2007/08 Lecture 15 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für Angewandte Wissenschaften.
Lecture 5: Orthogonal Range Searching Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees.
Accelerated Cascading Advanced Algorithms & Data Structures Lecture Theme 16 Prof. Dr. Th. Ottmann Summer Semester 2006.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 – Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
1 Geometric Solutions for the IP-Lookup and Packet Classification Problem (Lecture 12: The IP-LookUp & Packet Classification Problem, Part II) Advanced.
Geometric Data Structures Computational Geometry, WS 2007/08 Lecture 13 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Point Location Computational Geometry, WS 2007/08 Lecture 5 Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik Fakultät für.
Linear Programming Computational Geometry, WS 2006/07 Lecture 5, Part III Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
Orthogonal Range Searching Computational Geometry, WS 2006/07 Lecture 13 - Part I Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für.
Augmenting Data Structures Advanced Algorithms & Data Structures Lecture Theme 07 – Part II Prof. Dr. Th. Ottmann Summer Semester 2006.
Lecture 6: Point Location Computational Geometry Prof. Dr. Th. Ottmann 1 Point Location 1.Trapezoidal decomposition. 2.A search structure. 3.Randomized,
Lecture 11 : More Geometric Data Structures Computational Geometry Prof. Dr. Th. Ottmann 1 Geometric Data Structures 1.Rectangle Intersection 2.Segment.
Lecture 4: Linear Programming Computational Geometry Prof. Dr. Th. Ottmann 1 Linear Programming Overview Formulation of the problem and example Incremental,
Line Segment Intersection Computational Geometry, WS 2006/07 Lecture 3 – Part II Prof. Dr. Thomas Ottmann Algorithmen & Datenstrukturen, Institut für Informatik.
O RTHOGONAL R ANGE S EARCHING الهه اسلامی فروردین 92, 1.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
Spatial Indexing I Point Access Methods. Spatial Indexing Point Access Methods (PAMs) vs Spatial Access Methods (SAMs) PAM: index only point data Hierarchical.
AALG, lecture 11, © Simonas Šaltenis, Range Searching in 2D Main goals of the lecture: to understand and to be able to analyze the kd-trees and.
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.
UNC Chapel Hill M. C. Lin Orthogonal Range Searching Reading: Chapter 5 of the Textbook Driving Applications –Querying a Database Related Application –Crystal.
14/13/15 CMPS 3130/6130 Computational Geometry Spring 2015 Windowing Carola Wenk CMPS 3130/6130 Computational Geometry.
B-trees and kd-trees Piotr Indyk (slides partially by Lars Arge from Duke U)
The Binary Heap. Binary Heap Looks similar to a binary search tree BUT all the values stored in the subtree rooted at a node are greater than or equal.
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.
P ARALLEL O RTHOGONAL R ANGE S EARCHING Project Presentation by Savitha Parur Venkitachalam.
2IL50 Data Structures Fall 2015 Lecture 9: Range Searching.
Search Trees. Binary Search Tree (§10.1) A binary search tree is a binary tree storing keys (or key-element pairs) at its internal nodes and satisfying.
Orthogonal Range Search
CS 253: Algorithms Chapter 13 Balanced Binary Search Trees (Balanced BST) AVL Trees.
Computational Geometry Piyush Kumar (Lecture 5: Range Searching) Welcome to CIS5930.
Segment Trees Basic data structure in computational geometry. Computational geometry.  Computations with geometric objects.  Points in 1-, 2-, 3-, d-space.
CMSC 341 K-D Trees. 8/3/2007 UMBC CSMC 341 KDTrees 2 K-D Tree Introduction  Multiple dimensional data Range queries in databases of multiple keys: Ex.
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
UNC Chapel Hill M. C. Lin Geometric Data Structures Reading: Chapter 10 of the Textbook Driving Applications –Windowing Queries Related Application –Query.
May 2012Range Search Algorithms1 Shmuel Wimer Bar Ilan Univ. Eng. Faculty Technion, EE Faculty.
School of Computing Clemson University Fall, 2012
Binary Search Trees < > =
AA Trees.
Geometric Data Structures
Search Trees.
Binary Search Trees < > =
CMPS 3130/6130 Computational Geometry Spring 2017
Red Black Trees
Orthogonal Range Searching and Kd-Trees
(2,4) Trees (2,4) Trees 1 (2,4) Trees (2,4) Trees
Search Sorted Array: Binary Search Linked List: Linear Search
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]
Heaps 12/4/2018 5:27 AM Heaps /4/2018 5:27 AM Heaps.
Orthogonal Range Searching Querying a Database
CMSC 341 K-D Trees.
Binary Search Trees < > =
CMPS 3130/6130 Computational Geometry Spring 2017
Binary Search Trees < > =
CMPS 3130/6130 Computational Geometry Spring 2017
Search Sorted Array: Binary Search Linked List: Linear Search
Presentation transcript:

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 1 Orthogonal Range Searching 1.Linear Range Search : 1-dim Range Trees 2.2-dimensional Range Search : kd-trees 3.2-dimensional Range Search : 2-dim Range Trees 4.Range Search in Higher Dimensions

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 2 Range search Salary Children Age Input: Set of data points in d-space, orthogonal (iso-oriented) query range R Output: All points contained in R

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 3 Binary search tree (1-dimensional)

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 4 Binary leaf search tree

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 5 Range search

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 6 1-Dimensional range query Finding the split node for query range [x, x´] FindSplitNode (T, x, x´) v = root (T) while not leaf(v) && (x´  v.x || x > v.x) if (x´  v.x) then v = left(v) else v = right(v) return v Running time : O(log n) Note : Only O(log n) subtrees fall into the query range.

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 7 Example – Binary Search Tree Split node Query range: [22, 77]

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 8 Algorithm 1-d-range-search 1DRangeQuery (T, [x, x´]) v split = FindSplitNode (T, x, x´) if ( leaf (v split ) && v split in R=[x, x´]) then write v split ; return; v = left-child(v split ); while (not leaf (v)) if (x  v.x ) then write Subtree (right-child(v)); v= left-child(v); else v = right-child(v) if (v in R) write v ; v = right-child(v split )... rchild(v) s v p xx´

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 9 Theorem A 1-dim range query in a set of n points can be answered in time O(log n + k) using a 1-d-range tree, where k is the number of reported points which fall into the given range. Proof : FindSplitNode: O(log n) Leaf search: O(log n) The number of green nodes is O(k), since number of internal nodes is O(k)  O((log n)+k) total time.

Orthogonal Range Searching-1Computational Geometry Prof. Dr. Th. Ottmann 10 Summary Let P be a set of n points in 1-dimensional space. The set P can be stored in a balanced binary search tree, which uses O(n) storage and has O(n log n) construction time, such that the points in a query range can be reported in time O(k + log n), where k is the number of reported points.