Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In the range searching problem, a dynamic set S of points is stored in a data structure so that the points contained in a query

  1. In the range searching problem, a dynamic set S of points is stored in a data structure so that the points contained in a query rectangle R can be reported or counted efficiently. The data structure is constructed and updated by inserting and deleting points. The query R is specified by the coordinates (x0, y0) and (x1, y1) of its bottom left and top right corners respectively. While this problem can be solved by testing each input point against the query rectangle, you will explore a more efficient solution based on augmented red-black trees. In your solution each node of the tree will store a single point from S and use xcoordinate as the key. Furthermore each node v will be augmented with the y- coordinates of the lowest and highest points in the subtree rooted at v. The following operations must be supported:
  • Insert(p, T) :insert point p int tree T
  • Delete(p, T): delete point p from tree T
  • Inside(R, T): report all points from T obtained inside query rectangle R
  1. (a)Explain how to maintain the augmented information during Insert or Delete.
  2. (b)What are the time complexities of insert and delete?
  3. (c)Describe how to use the augmented data structure in order to speed up the execution of Inside query

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Making Hard Decisions with decision tools

Authors: Robert Clemen, Terence Reilly

3rd edition

538797576, 978-0538797573

More Books

Students also viewed these Mathematics questions

Question

Find the unit vector in the opposite direction of (1,2,3)

Answered: 1 week ago