# Algorithm for Ham Sandwich with Points

I just recently learned the Ham Sandwich Theorem in my algebraic topology class. If we take the measure to be the counting measure and let $n=2$, then the theorem tells us that given a set of black and white points in the plane, we can draw a line that'll divide the plane so that there is an equal number of black and white points on either side of the line. But this theorem is existential only. Is there an algorithm for actually computing the line for this discrete case? If so, what's the complexity?

-

The paper by Lo, Matoušek, and Steiger entitled "Algorithms for Ham-Sandwich Cuts" gives an $O(n)$ algorithm, where $n$ is the number of points. That's the best you can do, since you need to consider all such points.
The 1994 paper is available here dominik.eigendynamik.ch/ethz/focus_ti/cgsem/… and as Boris Bukh points out only gives linear for $d=2$. In fact a linear time algorithm in $d=2$ was given by Lo and Steigler in 1990 (ref. 17 in this paper). For higher $d$, their algorithms are $O(n^{d-1-a(d)})$ with $a(d)$ tending to zero. – j.c. Nov 16 '10 at 6:39
Not related to the original question, but there is a brand-spanking-new paper which proves that no $O(n^{o(d)})$-time algorithm exists, unless NP has subexponential-time algorithms. – Dave Pritchard Nov 17 '10 at 19:09