Question: Required Reading: Devadoss-O'Rourke, Chapter 2 (sections 2.1-2.6), and the Appendix (on com- putational complexity); O'Rourke, Chapter 3 (sections 3.1-3.8). In all of the exercises, be

Required Reading: Devadoss-O'Rourke, Chapter 2 (sections 2.1-2.6), and the Appendix (on com- putational complexity); O'Rourke, Chapter 3 (sections 3.1-3.8). In all of the exercises, be sure to give at least a brief explanation or justification for each claim that you make. PROBLEMS TO TURN IN: (1). [5 points] (a). Let S be the set of points {(3.1), (4,4), (5-1), (2.-1), (2,2), (2,1), (4.-1), (6,1), (8,1), (8,5), (7,4), (3,3)}. (Specifically, consider the points in S to be py = (3,1), p1 = (4,4), p2 = (5,=1),...,pi1 = (3,3), so the 12 points are indexed 0-11, in the order given.) When the Graham Scan code of Section 3.5 is run on this data, what is the sorting (as in Table 3.1 of [O'Rourke]) and what is the history of the stack (as in the example on page 86 of [O'Rourke])? Plot the points and the resulting convex hull. (b). The Graham algorithm begins by sorting the points S (in the code in O'Rourke they are sorted by angle, but we saw that they could be sorted by z-coordinate instead). Suppose we were to skip this step and just treat the points of S in the order the points were given (pg, p1,p2,-..), but go ahead with the \"Graham scan\
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
