Professional Documents
Culture Documents
As a first step go to the third page and read the section: Advice on how to do
the home work.
1. Let S be a set of n points in the plane sorted with respect to their ycoordinate from bottom to top. Give an algorithm that computes the
convex hull of S in O(n) time. Argue its time complexity. [10 points]
2. You are given two x-monotone polygonal chains P and Q. Prove that
the number of times P and Q can intersect is O(n), where n is the total
number of vertices of P and Q, see Figure 1(a). [10 points]
3. Let ` be a line in the plane and let p be a point. The orthogonal projection
of p onto ` is the point q on ` such that the line segment (p, q) is orthogonal
to `, as shown in Fig. 1(b).
(a) Given a convex polygon P and a point q within P prove that q has
an orthogonal projection onto the perimeter of P . [6 points]
(b) What if P is not convex? Prove or disprove the statement. [4 points]
Q
`
(a)
(b)
Figure 1: (a) Two x-monotone paths P and Q. (b) Illustrating the orthogonal
projection q of p onto `.