Data Structures & Algorithms Multiple Choice Questions on “Chan’s Algorithm”.
1. Chan’s algorithm is used for computing _________ Answer: b 2. What is the running time of Chan’s algorithm? Answer: c 3. Who formulated Chan’s algorithm? 4. The running time of Chan’s algorithm is obtained from combining two algorithms. 5. Which of the following is called the “ultimate planar convex hull algorithm”? Answer: b 6. Which of the following algorithms is the simplest? Answer: a 7. What is the running time of Hershberger algorithm? Answer: b 8. Which of the following statements is not a part of Chan’s algorithm? Answer: b 9. Which of the following factors account more to the cost of Chan’s algorithm? 10. Chan’s algorithm can be used to compute the lower envelope of a trapezoid.
a) Closest distance between two points
b) Convex hull
c) Area of a polygon
d) Shortest path between two points
Clarification: Chan’s algorithm is an output-sensitive algorithm used to compute the convex hull set of n points in a 2D or 3D space. Closest pair algorithm is used to compute the closest distance between two points.
a) O(log n)
b) O(n log n)
c) O(n log h)
d) O(log h)
Clarification: The running time of Chan’s algorithm is calculated to be O(n log h) where h is the number of vertices of the convex hull.
a) Timothy
b) Kirkpatrick
c) Frank Nielsen
d) Seidel
Answer: a
Clarification: Chan’s algorithm was formulated by Timothy Chan. Kirkpatrick and Seidel formulated the Kirkpatrick-Seidel algorithm. Frank Nielsen developed a paradigm relating to Chan’s algorithm.
a) True
b) False
Answer: a
Clarification: The O(n log h) running time of Chan’s algorithm is obtained by combining the running time of Graham’s scan [O(n log n)] and Jarvis match [O(nh)].
a) Chan’s algorithm
b) Kirkpatrick-Seidel algorithm
c) Gift wrapping algorithm
d) Jarvis algorithm
Clarification: Kirkpatrick-Seidel algorithm is called as the ultimate planar convex hull algorithm. Its running time is the same as that of Chan’s algorithm (i.e.) O(n log h).
a) Chan’s algorithm
b) Kirkpatrick-Seidel algorithm
c) Gift wrapping algorithm
d) Jarvis algorithm
Clarification: Chan’s algorithm is very practical for moderate sized problems whereas Kirkpatrick-Seidel algorithm is not. Although, they both have the same running time. Gift wrapping algorithm is a non-output sensitive algorithm and has a longer running time.
a) O(log n)
b) O(n log n)
c) O(n log h)
d) O(log h)
Clarification: Hershberger’s algorithm is an output sensitive algorithm whose running time was originally O(n log n). He used Chan’s algorithm to speed up to O(n log h) where h is the number of edges.
a) eliminate points not in the hull
b) recompute convex hull from scratch
c) merge previously calculated convex hull
d) reuse convex hull from the previous iteration
Clarification: Chan’s algorithm implies that the convex hulls of larger points can be arrived at by merging previously calculated convex hulls. It makes the algorithm simpler instead of recomputing every time from scratch.
a) computing a single convex hull
b) locating points that constitute a hull
c) computing convex hull in groups
d) merging convex hulls
Answer: c
Clarification: The majority of the cost of the algorithm lies in the pre-processing (i.e.) computing convex hull in groups. To reduce cost, we reuse convex hulls from previous iterations.
a) true
b) false
Answer: a
Clarification: An extension of Chan’s algorithm can be used for proving solutions to complex problems like computing the lower envelope L(S) where S is a set of ‘n’ line segments in a trapezoid.