This document describes research on efficient data structures and algorithms for solving range aggregate problems. It begins with introductions to computational geometry and classic problems in the field like finding the closest pair of points. It then discusses concepts like output sensitivity and different computation models. Range searching data structures like range trees are described for solving problems like orthogonal range queries. The document outlines solving problems related to planar range maxima and planar range convex hull queries. It proposes preprocessing point data to speed up queries for problems like reporting the skyline points within a 2-sided range.
WhatsApp š 9892124323 ā Call Girls In Juhu ( Mumbai )
Ā
MS Thesis
1. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Eļ¬cient Data Structures and Algorithms for
Range Aggregate Problems
Jatin Agarwal
Advisor: Dr. Kannan Srinathan and Dr. Kishore Kothapalli
CSTAR, IIIT Hyderabad
November 27, 2013
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
2. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Computational Geometry
What is Computational Geometry?
Study of Geometric Algorithms
Why study CG?
Geometric problems arise in the ļ¬eld of databases,
Geographical Information Systems (GIS), graphics, VLSI etc.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
3. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Classic problems
In Health GIS there is a need to demarcate disease infected areas.
Figure: Convex hull of a ļ¬nite set of points
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
4. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Classic Problems
Problem of ļ¬nding closest pair w.r.t Euclidean distance.
Figure: Closest pair of a ļ¬nite set of points
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
5. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Classic Problems
Location based services (ļ¬nding the nearest restaurant or the
nearest theater)
Figure: Nearest neighbour problem. This lead to discovery of Voronoi
diagram
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
6. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Outline
1 Introduction
2 Background Knowledge
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
3 Problems Solved
Planar Range Maxima
Planar Range Convex Hull and Related problems
4 Conclusion and Future Work
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
7. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Example
Given an unsorted array of n numbers and any given query
q = [a, b] report all the numbers x in range a < x < b.
5 9 3 1 7 6 4 12 2
Figure: Unsorted Array of Numbers
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
8. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Naive Algorithm
Scan the whole Array !!
Query time: O(n).
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
9. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Smart Algorithm
Preprocessing Step: Sort the Array.
Query Algorithm: Binary Search !
Query Time: O(log n + k)
1 2 3 4 5 6 7 9 12
Figure: Unsorted Array of Numbers
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
10. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Output Sensitive
Reporting Problem: Lower bound of Ļ(k) query time, where k
are the number of items reported.
Objective: O(f (n) + k), where f (n) is a small value. An
algorithm which satisļ¬es this objective is considered
output-sensitive.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
11. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Outline
1 Introduction
2 Background Knowledge
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
3 Problems Solved
Planar Range Maxima
Planar Range Convex Hull and Related problems
4 Conclusion and Future Work
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
12. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Ways to Compute
All results in this thesis are either on Comparison Based Model or
word-RAM models.
Cell Probe
Transdichotomous RAM
AC RAM0
Word RAM
Pointer Machine
BST
Pentium RAM
Figure: Hierarchy of the Computation models
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
13. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Models
Cell Probe Model: Used for proving lower bounds as we pay
for each memory operation.
Word RAM Model: word-size on computer changes with input
size n.
Comparison Based Model: Only Comparison is only allowed
operation.
Pointer Machine Model: Described by a directed graph with
constant branching factor.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
14. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Outline
1 Introduction
2 Background Knowledge
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
3 Problems Solved
Planar Range Maxima
Planar Range Convex Hull and Related problems
4 Conclusion and Future Work
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
15. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Applications
Range Tree has tremendous applications in :
GIS
Databases
VLSI
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
16. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Range Query
X
Y
q
Figure: Two dimensional Range Tree
S is the set of given points and q is the query hyperbox. The
objective is to eļ¬ciently
report
count
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
17. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Range Searching
How do we solve this problem?
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
18. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Naive Technique
Linear Scan of the database.
O(n) query time. No pre-processing involved.
Not output sensitive !!!
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
20. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Popular Structures for Range Searching
Reporting data structures
Query Type Query Time Storage Space query region
Range Tree O(logdā1
n + k) O(n logd
n) Orthogonal
kd-Tree O(log1ā1/d
n + k) O(n) arbitrary
Table: n is the number of points, d is the dimensional space and k is the
size of the output
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
21. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Range Tree Example
Figure: Two dimensional Range Tree
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
22. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Partition based on Range Tree
v1 v2 ............................... vl
w1
wm
.
(b)
xlt xrt
w2
.
.
.
Figure: (a)Standard Range Tree (b)Query Region get partition into
O(log2
n) regions
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
23. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Outline
1 Introduction
2 Background Knowledge
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
3 Problems Solved
Planar Range Maxima
Planar Range Convex Hull and Related problems
4 Conclusion and Future Work
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
24. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Four Possible Range Successor queries
(a) (b)
(c) (d)
Figure: Four diļ¬erent types of range successor queries possible in a planeJatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
25. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
Compact Range Trees
Navarro & Nekrich in WADS 2012 proposed following result.
Lemma
There exists a data structure that uses O(n) space and answers
orthogonal range successor queries in O(log n) time.
We will use above result to answer all types of Range Successor
Queries.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
26. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Problems Solved
Planar Range Skyline
2-sided Range Reporting
2-sided Range Counting
3-sided Range Reporting
3-sided Range Counting
Planar Range Convex hull
Othogonal Range Convex hull Reporting
Orthogonal Range Convex Hull Counting
Area of Convex hull in an Orthogonal Range
Perimater of Convex hull in an Orthogonal Range
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
27. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Common Challenge
Maintain order in more than one dimension
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
28. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Common Challenge
Maintain order in more than one dimension
Output sensitivity
Starting with ļ¬nding all points in the range is not output
sensitive
Single-shot algorithm: O(log n + m) time, where m is the total
number of points inside the query range
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
29. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Outline
1 Introduction
2 Background Knowledge
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
3 Problems Solved
Planar Range Maxima
Planar Range Convex Hull and Related problems
4 Conclusion and Future Work
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
30. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Dominating or Maximalpoint
Point A = (xa, ya) is said to
dominate point B = (xb, yb)
iļ¬ xa > xb and ya > yb.
Maximal point or skyline point:
Whose North East quadrant is
empty.
Red point is Maximal point.
Maxima or skyline is used
interchangeably
Empty
Figure: Dominating point or
Maximal point or Skyline
point
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
31. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Maxima
x
y
Figure: Skyline of a ļ¬nite set of points
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
32. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Planar Range Maxima
x
y
q
Figure: Range Maxima for a given orthogonal range query
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
33. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Orthogonal range maxima queries
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
35. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Skyline in 2-sided and 3-sided queries
Infy
InfyInfy
(a,d)
(a,c)
pt
pb(a,c)
pt
pb
Figure: (a) 2-sided query unbounded on top and right (b) 3-sided query
unbounded on the right
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
36. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
2-sided Range Maxima
(a,c)
pt
pb
Figure: 2-sided query unbounded on top and right
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
37. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preprocessing for 2-sided queries
Compute Single shot skyline on given set S of points and discard
remaining points.
Figure: Preprocessing on ļ¬nite set S of points
Time complexity:O(n log n)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
38. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preprocessing Array for 2-sided queries
Construct range successor data structure D on this points.
Figure: Preprocessed on ļ¬nite set S of points
Preprocessing Time complexity:O(n log n)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
39. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
2-sided query
Given any query Q = [a, +ā] Ć [c, +ā].
query q=(a,c)
Figure: 2-sided query to unbounded on top and right
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
40. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Range Successor Query for Reporting
Find the point pt by making Range Successor query unbounded on
bottom.
pt
Figure: Range Successor query unbounded on bottom
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
41. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
2-sided Range Reporting
Keep reporting all the points from pt until we encounter some
point whose x co-ordinate is greater than a.
pt
(a,c)
Figure: 2-sided Range Reporting till x = a
Query Time complexity:O(log n + k) where is total number of
points reported. Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
42. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
2-sided Range counting
To solve counting problem we ļ¬nd point pb.
(a,c)
pt
pb
Figure: 2-sided Range Counting
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
43. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Range Successor Query for Counting
Find the point pt by making Range Successor query unbounded on
left.
pb
Figure: Range Successor query unbounded on left
Time complexity:O(log n)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
44. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
2-sided Range counting
count = index[pt] ā index[pb] + 1 takes constant O(1) time.
(a,c)
pt
pb
Figure: 2-sided Range Counting
Query Time complexity:O(log n)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
46. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Finite set of points on a plane
Figure: Finite Set S of points in 2d-plane
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
47. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preprocessing for 3-sided queries
Point with maximum y
co-ordinate in South-west
quadrant of point pi is its
next maximal point
Every point in set S is
pointing to its next maximal
point in array next
Construct range successor
data structure D on this
points.
Takes preprocessing
O(n log n) time.
Infy
InfyInfy
Figure: Preprocessing 3-sided
maxima queries
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
49. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
3-sided Range Reporting
Find the point pt by making Range Successor query unbounded on
bottom.
Infy
InfyInfy
(a,d)
(a,c)
pt
Figure: 3-sided Range Reporting requires point pt
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
50. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Range Successor Query for Reporting
Find the point pt by making Range Successor query unbounded on
bottom.
pt
Figure: Range Successor query unbounded on bottom
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
51. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
3-sided Range Reporting
Keep reporting all the points from pt until we encounter some
point whose x co-ordinate is greater than a.
Infy
InfyInfy
(a,d)
(a,c)
pt
Figure: 3-sided Range Reporting requires point pt
Query Time complexity:O(log n + k)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
52. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
3-sided Range counting
Report then count is not output sensitive.
Infy
InfyInfy
(a,d)
(a,c)
pt
pb
Figure: 3-sided Range Counting
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
53. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preprocessing for 3-sided Counting
We store a level count of maximal as shown in ļ¬gure.
Infy
InfyInfy
1
2
1
2
3
4
5
6
34
5
3
4
5
4
56
123
Figure: Range Successor query unbounded on left
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
54. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Range Successor Query for Counting
We ļ¬nd point pb using range successor query as shown.
pb
Figure: Range Successor query unbounded on left
Time complexity:O(log n)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
55. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
3-sided Range counting
count =
count[pt] ā count[pb] + 1
takes constant O(1) time.
In this example count is
3 = 4 ā 1 + 1.
Time complexity:O(log n)
Infy
InfyInfy
1
2
1
2
3
4
5
6
3
4
5
3
4
5
4
56
12
3
pt
pb
(a,d)
(a,c)
Figure: 3-sided Range Counting
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
56. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Our Results
Query Type Query Time Storage Space
2-sided Range Reporting O(log n + k) O(n)
2-sided Range Counting O(log n) O(n)
3-sided Range Reporting O(log n + k) O(n)
3-sided Range Reporting O(log n) O(n)
Table: Our Results of Planar Range Skyline Problem
Our results holds only for queries which are either unbounded on
top(and right) or right.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
58. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Outline
1 Introduction
2 Background Knowledge
Output Sensitvity
Computation Models
Range Search
Orthogonal Range Successor Queries
3 Problems Solved
Planar Range Maxima
Planar Range Convex Hull and Related problems
4 Conclusion and Future Work
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
59. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Green Nails on a board
Given point set of size n in a plane.
Figure: Finite set of points
Consider green Nails as shown in the ļ¬gure. Stretch and leave a
rubber band on this green nails.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
60. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Convex Hull
Points on the rubber band forms Convex Hull.
Figure: Finite set of points
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
62. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Planar Range Convex Hull
q
Figure: Range Convex hull for a given query
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
63. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Challenges
Output sensitivity
Reporting and computing convex hull takes time
O(log n + m log h) where m is total number of point on q and
h is points on the convex hull.
Counting/Area/Perimeter by actually reporting all points on
hull is not output sensitive
Output size is O(1)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
64. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Challenges
Output sensitivity
Reporting and computing convex hull takes time
O(log n + m log h) where m is total number of point on q and
h is points on the convex hull.
Counting/Area/Perimeter by actually reporting all points on
hull is not output sensitive
Output size is O(1)
Space constraint
Total number of possible query ranges is O(n4
)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
65. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preliminaries
Combining two disjoint convex
hulls:
Only the common outer
tangents(bridges) need to be
computed
Can be done in O(log n)
(Overmars and van Leeuwen
1994)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
66. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preliminaries
Convex hull can be divided
into 4 parts based on
extreme points
We will compute the āUpper
Right Convex Hullā
(urc-hull)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
67. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Preprocessing
Use a standard 2D range
tree.
In each node, store the
convex hull of all points in
that subtree
A query is split into O(log n)
horizontal regions, each
further split into O(log n)
vertical regions (āblocksā)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
68. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Crux Idea
Total of O(log2
n) nodes per
query
Do polygon version of
Grahamās scan
Takes time O(log3
n + h)
time per query, where h is
the number of points on the
hull
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
69. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Eļ¬cient processing
Many blocks can be
discarded from the urc-hull
without processing
Non
Empty
Block
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
70. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Worst Case
Deļ¬ne ācandidate blockā as
a non-empty block which is
not discarded
Worst case we still have
O(log2
n) candidate blocks
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
72. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Convex Hull as an Cyclic Array
Points on the convex hull
are stored as an array A.
Points in the array are
stored in Anti-clockwise
direction as shown in ļ¬gure.
Starting from Maximum y
co-ordinate to minimum y
co-ordinate and vice versa.
p1
p2
p3
p4
p6
p5
p7
p10
p8
p9
p11
p4 p2 p1 p5 p9 p11 p8
A
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
73. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Counting points on a Convex hull
Each candidate convex hull
contribute some part from
array A.
Diļ¬erence of indices at this
boundaries gives us the
count.
For example
index[p8] ā index[p9] + 1 as
shown in ļ¬gure.
Therefore computing count
for candidate convex hull
takes O(1) time.
p1
p2
p3
p4
p6
p5
p7
p10
p8
p9
p11
p4 p2 p1 p5 p9 p11 p8
A
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
74. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Perimeter of the convex hull
We store commutative sum
of perimeter in Array P.
Each candidate convex hull
contribute some perimeter
to total perimeter A.
Diļ¬erence of indices at this
boundaries gives us the
perimeteri .
P[p8] ā P[p9] + 1 gives
perimeter as shown in ļ¬gure.
Therefore computing
perimeteri for candidate
convex hull takes O(1) time.
p1
p2
p3
p4
p6
p5
p7
p10
p8
p9
p11
p4 p2 p1 p5 p9 p11 p8
A
p42 p41 p43 p46 p411 p48 p44P
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
75. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Area of the convex hull
We store commutative sum of areas in Array Ar.
Each candidate convex hull contribute some area to total area
A.
Diļ¬erence of indices at this boundaries gives us the areai .
Therefore computing areai for candidate convex hull takes
O(1) time.
1
2
3
4
5
6
7
1
2
3
4
5
6
7
Figure: Finite set of pointsJatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
76. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Previous Work
Brass et. al. gave ļ¬rst results on Planar Range Convex hull
problem.
Query Type Query Time Storage Space
Reporting O(log5
n + h) O(n log2
n)
Area O(log5
n) O(n log2
n)
Table: Previous Work on Convex hull and Related problems
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
77. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Planar Range Maxima
Planar Range Convex Hull and Related problems
Our Results
We studied Counting and Perimeter problem for the ļ¬rst time in
the literature.
Query Type Query Time Storage Space
Reporting O(log3
n + h) O(n log2
n)
Counting O(log3
n) O(n log2
n)
Area O(log3
n) O(n log2
n)
Perimeter O(log3
n) O(n log2
n)
Table: Our Results of Planar Range Convex hull and Related problems
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
78. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Conclusion
Skyline and Convex Hull provides ordering in higher
dimensions.
Planar Range provides searching in higher dimensions
Our structures are eļ¬cient for large number of queries.
Our structure provides information like count, area and
perimeter without processing individual data elements.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
79. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Future Work
Generalization: Categorization can be made by assigning
colors to each point and ļ¬nd distinct colors.
Other models of Computation: Studying both planar range
maxima and planar range convex hull in the cell-probe model
to understand lower bound.
Higher Dimensions: Interesting to see this problems in
dimensions greater than two.
Dynamism: Solving on dynamic point sets.
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
80. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Related Work
Improved bounds for Smallest Enclosing Disk Range
Queries(Accepted as full paper), Sankalp Khare, Jatin
Agarwal, Nadeem Moidu, and Kannan Srinathan Conference:
To appear in the proceedings of the 16th Japan Conference on
Discrete and Computational Geometry and Graphs
(JCDCG22013)
Eļ¬cient Range Reporting of Convex Hull(Submitted as
e-print), Jatin Agarwal, Nadeem Moidu, Kishore Kothapalli
and Kannan Srinathan Conference: Computing Research
Repository(CoRR)
Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr
81. Introduction
Background Knowledge
Problems Solved
Conclusion and Future Work
Related Work
Planar Convex Hull Range Query and Related
Problems(Accepted as full paper), Nadeem Moidu, Jatin
Agarwal and Kishore Kothapalli Conference: To appear in
proceedings of the 25th Canadian Conference on
Computational Geometry(CCCG 2013)
On Counting Range Maxima Points in Plane (Accepted as full
paper), Anil Kishore Kalavagattu, Jatin Agarwal, Ananda
Swarup Das, and Kishore Kothapalli. Conference: The 23rd
International Workshop on Combinatorial Algorithms(IWOCA
2012)
Range Aggregate Maximal Points in the Plane. (Accepted as
full paper), Ananda Swarup Das, Prosenjit Gupta, Anil
Kishore Kalavagattu, Jatin Agarwal, Kannan Srinathan,
Kishore Kothapalli. Conference: The 6th Workshop on
Algorithms and Computation(WALCOM 2012)Jatin Agarwal Eļ¬cient Data Structures and Algorithms for Range Aggregate Pr