I have a large set $\mathbf{V}$ of vectors in $\mathbb{R}^d\setminus\{\mathbf{0}\}$ and need to find a vector $\mathbf{u}$ that maximizes $\sum_{\mathbf{v}\in\mathbf{V}}\mathbf{1}_{\mathbf{u}\cdot\mathbf{v}>0}$, which is to say the count of vectors in $\mathbf{V}$ that have a positive dot product with $\mathbf{u}$. Alternatively, one could also phrase this problem as finding a maximum subset of the half-spaces defined by the elements of $\mathbf{V}$ such that the intersection of those half-spaces is nonempty. I am wondering if an efficient algorithm for this problem is known.
Just to rule out an obvious idea, normalizing the vectors in $\mathbf{V}$ and taking their average does not solve the problem. In particular, even in two dimensions a normalized set like $\mathbf{V}=\left\{\left(1, 0\vphantom{\frac{0}{0}}\right)\!, \left(-\frac{5}{13}, \frac{12}{13}\right)\!, \left(-\frac{5}{13}, -\frac{12}{13}\right)\right\}$ would have average $\left(\frac{1}{13},0\right)$, which only has a positive dot product with $\left(1, 0\vphantom{\frac{0}{0}}\right)$, whereas an alternative like $\left(-1, 0\vphantom{\frac{0}{0}}\right)$ has a positive dot product with both $\left(-\frac{5}{13}, \frac{12}{13}\right)$ and $\left(-\frac{5}{13}, -\frac{12}{13}\right)$.
A correct but slow algorithm would be to consider all size-$(d-1)$ subsets of $\mathbf{V}$, use each subset to construct a candidate vector orthogonal to everything in the subset, and then keep whichever of these candidates maximizes the count. But the run time of that design has $d$ in an exponent, so it scales poorly. Is there something better?
Context that I don't think affects the answer, but I will include anyway in case I am wrong, and it is relevant:
- In this particular case, I actually have $\mathbf{V}\in\mathbb{Z}^d\setminus\{\mathbf{0}\}$, so the components are in fact integers.
- For the particular application, I would be very surprised if the answer $\mathbf{u}$ did not have all positive components, though I still expect vectors in $\mathbf{V}$ to have components with mixed signs.
- I also suspect that the subspace of solutions will be connected, and it would be nice to compute a $\mathbf{u}$ that is in the middle of this space so that its quality isn't super sensitive to issues with precision, rounding, etc. later on.