I am trying to solve the following problem. So far with no success.
Let $S$ be a set of $n$ points in the plane. Preprocess $S$ so that, given a (non-vertical) line $l$, one can determine whether there is any point of $S$ above $l$ in time $O(\log n)$. Few details: preprocess $S$ without knowing line $l$ in advance. Preprocessing doesn't have any special requirements.
According to big-$O$ requirement $O(\log n)$ the determination should be implemented similarly to binary search.
I have considered few options, $y$ - coordinate, slopes, but in any case it seems not relevant.
If you have any idea, I will appreciate sharing it with us.
Thanks!
Find those among the given points that are the on the the upper boundary of the convex hull of $S$, and sort them by they $x$ coordinate. (Any point that is not on this upper boundary can be ignored). Then you should be able to do a binary search along these lines:
Given $l$, check it against the middle point. If the middle point is above $l$, you're done. Otherwise compare the slope of $l$ with the average of the slopes of the two segments of the upper boundary that adjoin the point you just compared to. If the slope of $l$ is greater, then any point of $S$ above $l$ must be somewhere to the left of the middle point; if the slope if $l$ is smaller, then any point above $l$ must be to the right of the middle point.
Now you have reduced the number of points to consider to half of the original size. Proceed by induction.