Geometric Applications of BSTs

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

Flashcards for reviewing geometric applications of Binary Search Trees (BSTs), including range search, interval search, and intersection problems.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

What are some geometric applications of BSTs?

Intersection of geometric objects in 1 and 2 dimensional spaces. Applications include CAD, games, movies, virtual reality, databases, and GIS.

2
New cards

What is an example application of Orthogonal line segment and rectangle intersection?

Computer Assisted Design (CAD), and CAD for Very Large Scale Integration (VLSI). Useful for checking that wires must not intersect and have some minimum distance between them in electronic chip design.

3
New cards

What are the applications of 1-D & 2-D range search, 1-D interval search?

Databases, Geographic information systems (GIS), Games and physic simulations, e.g., via collision detection

4
New cards

What is the naïve solution for intersection of geometric objects?

For each of the object pairs, check if they intersect, resulting in O(n^2) worst-case time complexity.

5
New cards

How can the worst-case time complexity of range search be improved?

By using BSTs

6
New cards

What is the problem definition for 1-Dimensional Range Search?

Given points on the axis and a range (i.e., two points), output the points contained in the range. (Count version): output the number of points contained in the range.

7
New cards

What Dictionary ADT extensions are needed for 1-Dimensional Range Search?

void insert(Key key, Value value), Value Search(Key k), void delete(Key k), List rangeSearch(Key keyLeft, Key keyRight), int rangeCount(Key keyLeft, Key keyRight)

8
New cards

What is the time complexity of rangeCount?

O(log n) time

9
New cards

What is the time complexity of rangeSearch?

O(R + log n) time, where R is the number of keys contained in the range.

10
New cards

What is the problem with Orthogonal Line Segment Intersection?

Given line segments (either horizontal or vertical), find all intersections.

11
New cards

How is the 2D Orthogonal Line Segment Intersection problem reduced to a 1D problem?

Using the Sweep-Line Algorithm, which transforms the 2D problem into a sequence of 1D range search problem instances.

12
New cards

What is the time complexity for Orthogonal Line Segment Intersection?

O(n log n + R), when there are R intersections.

13
New cards

What is the Sweep-line technique?

A common technique for solving geometrical problems such as convex hull, convex object intersection, and Voronoi diagrams.

14
New cards

What's the goal of 1D Interval Search?

Given intervals, determine whether a search interval intersects any of the other intervals

15
New cards

What operations are supported by an Interval Search Tree?

void insert(Key low, Key high, Value value), Value search(Key low, Key high), void delete(Key low, Key high), LinkedList intersects(Key low, Key high)

16
New cards

In Interval Search Tree, what is considered key and what information is stored?

The left endpoint is the BST key, and nodes store the max endpoint in the subtree

17
New cards

What's the first step in inserting into Interval Search Tree?

Insert the new node using low as the BST key

18
New cards

What's the goal of intersectionSingle?

If interval in node intersects (low,high)-interval, return that interval

19
New cards

What is the time complexity for the intersectionSingle operation?

O(log n)

20
New cards

What is the time complexity for the intersection operation?

O(log n)

21
New cards

What is the problem for Orthogonal Rectangle Insertion?

Find all intersections among a set of orthogonal rectangles.

22
New cards

What technique is used to solve Orthogonal Rectangle Insertion effectively?

Sweep-line algorithm, which transforms/reduces the orthogonal rectangle (2D) insertion to 1D interval search problem instances.

23
New cards

What is the worst-case time complexity for Orthogonal Rectangle Insertion?

O((n + R) log n) when there are R intersections.

24
New cards

Why is Orthogonal Rectangle Insertion has extra complexity compared to orthogonal line segment intersection?

due to the interval search tree implementation.

25
New cards

What were the main topics covered?

1-D range search and 1-D interval search, Orthogonal line segment intersection and orthogonal rectangle intersection, Sweep line technique, for reducing n-D problems to (n-1)-D problems