Knowing if the finite intersection of half spaces forms a closed polytope?

169 Views Asked by At

Say you have $N$ half-spaces $P$ in some dimension. We want to know if the intersection of all such half spaces results in a closed or open polytope, and if open, we want to introduce the minimum number of half spaces that close it.

I have been trying to find a solution to this problem for a while. Many resources such as this one, do mention the fact that the polytope may be open. But none that I find tell you how to tell from the get go if it is open or not given the half spaces that make up the polytope.

I need to solve this at least in 3D but ideally in arbitrary dimensions.

1

There are 1 best solutions below

5
On BEST ANSWER

Let's say your halfspaces have normal vectors $a_1,...,a_n\in\Bbb R^d$.

The idea is as follows:

  1. check whether all normal vectors lie in some subspace. If so, then your polytope is a sort of infinite cylinder, hence open.
  2. check whether all normal vectors lie in a common halfspace. If so then your polytope is open, otherwise closed.

To 1. Check whether the matrix $A:=(a_1,...,a_n)\in\Bbb R^{n\times d}$ has rank $d$. If it has rank $r < d$, then $P$ is open. You can fix it by adding at least $d-r+1$ hyperplanes with affinely idenpendent normal vectors in $\ker(A)$.

To 2. If 1. checks out then we know that the $a_i$ span $\Bbb R^d$, and so if they were to lie in a common halfspace, then $\mathbf a:=a_1+\cdots + a_n$ lies in the interior of the halfspace, and $-\mathbf a$ strictly outside of it. To reject this hypothesis, you try to find $\alpha_1,...,\alpha_n\ge 0$ so that $\alpha_1 a_1+\cdots+\alpha_n a_n=-\mathbf a$. This comes down to solving a linear program with some standard procedures. If there is a solution, then $P$ is closed, otherwise open. In the latter case you can add $-\mathbf a$ as a normal vector to close your polytope.


Addendum

The linear program that I am talking about might look something like this, and a solver will need to tell you whether there is a feasible solution in the first place.

\begin{align} \text{max}\;& 0 \\\text{s.t.}\; & \alpha_1 a_1+\cdots+\alpha_n a_n=-\mathbf a \\& \alpha_1,...,\alpha_n\ge 0 \end{align}