Let be a set of points in the plane. We say that point dominates point if and . A point in that is dominated by no other points in is said to be maximal. Note that may contain many maximal points, which can be organized into maximal layers as follows. The first maximal layer is the set of maximal points of . For , the th maximal layer is the set of maximal points in .
Suppose that has nonempty maximal layers, and let be the -coordinate of the leftmost point in for . For now, assume that no two points in have the same - or -coordinate.
a. Show that .
Consider a point that is to the left of any point in and for which is distinct from the -coordinate of any point in . Let .
b. Let be the minimum index such that , unless , in which case we let . Show that the maximal layers of are as follows:
If , then the maximal layers of are the same as the maximal layers of , except that also includes as its new leftmost point.
If , then the first maximal layers of are the same as for , but in addition, has a nonempty st maximal layer: .
c. Describe an -time algorithm to compute the maximal layers of a set of points. ( Move a sweep line from right to left.)
d. Do any difficulties arise if we now allow input points to have the same - or -coordinate? Suggest a way to resolve such problems.
(Omit!)