Questions: Convex Hull Algorithms: Graham Scan and Gift Wrapping

4 questions to test your understanding

Score: 0 / 4
Question 1 Multiple Choice

Using the cross product (b - a) x (c - a) = (bx - ax)(cy - ay) - (by - ay)(cx - ax), classify the turn from a = (0, 0) to b = (4, 0) to c = (2, 3).

ACounterclockwise (left) turn, because the value is positive
BClockwise (right) turn, because the value is negative
CThe points are collinear, because the value is zero
DThe test cannot be applied, because c lies between a and b in x
Question 2 Multiple Choice

For which input is Jarvis's march (gift wrapping) expected to be faster than Graham scan?

AA million points placed on a circle, all of them on the hull
BA million points: three that form a large triangle, and all the rest strictly inside it, so the hull has exactly 3 vertices
CAny input, because gift wrapping is always faster
DNo input, because gift wrapping is always slower
Question 3 True / False

In the algebraic decision tree model, a convex hull algorithm that outputs the hull vertices in order can run in O(n) worst-case time on arbitrary unsorted input.

TTrue
FFalse
Question 4 Short Answer

During Graham scan, the stack holds hull candidates. Explain what the algorithm does when the next point p makes a right turn with the top two points on the stack, and why.

Think about your answer, then reveal below.