Geometric algorithms Flashcards

1
Q

Describe algorithm for two closest pair of points in R2 (divide and conquer)

A

Similar to quicksort - we chose a median m, then set P1 contains elements that are less than or equal to m, set P2 that are greater then m. Then we recursively call this function onto P1, P2.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define runtime of closest pair of points in R2(divide and conquer)

A

O(nlogn)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Write a recurrence to closest pair of points in R2 (divide and conquer)

A

T(n) = 2*T(n/2) + O(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Write two assumptions needed to perform a sweep-line technique

A
  • no segments are vertical

- no three segments intersect in the same point

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Describe what means that two segment lines are comparable w.r.t. sweep line

A

If they both intersect L (sweep line) but not in the potential intersection of s1, s2. We define s1 < s2 if s1 lies below s2 on L

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define runtime of sweep-line algorithm

A

O(nlogn)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How much space we need to store a connected planar graph?

A

O(n + m + f), but recalling Euler’s theorem gives us: m <= 3n-6 and f<=2n-4, so we need just O(n) space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you construct Voronoi diagram?

A

Let p be a point in a plane. Connect p to its closest neighbour p’ - let s be the line segment. Construct a paralel line to s such that distance between p and the line is equal to the distance of p’ and the line. We will do this till we get a Voronoi cell around the point p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In which time can Voronoi diagram P of n points be computed?

A

O(nlogn)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Delaunay-graph DG(P) ?

A

It is just a straight-line drawing of G

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How fast can we compute a Delaunay-graph if we have Vor(P)?

A

O(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

For what can be Delaunay triangulation used?

A

Finding the closest pair of points in O(nlogn) time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly