Suppose we are given a range-searching data structure D that can answer rangesearching queries for a set

Question:

Suppose we are given a range-searching data structure D that can answer rangesearching queries for a set of n points in d-dimensional space for any fixed dimension d (like 8, 10, or 20) in time that is O(logd n+k), where k is the number of answers. Show how to use D to answer the following queries for a set S of n rectangles in the plane: 

  • findAllContaining(x, y): Return an enumeration of all rectangles in S that contain the point (x, y). 
  • findAllIntersecting(a, b, c, d): Return an enumeration of all rectangles that intersect the rectangle with x-range [a, b] and y-range [c, d]. 

What is the running time needed to answer each of these queries?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Algorithm Design And Applications

ISBN: 9781118335918

1st Edition

Authors: Michael T. Goodrich, Roberto Tamassia

Question Posted: