[Math] Linear Programming constraints for biggest sphere inside region

linear algebralinear programmingoptimization

Let $v_0, …, v_n \in \mathbb{R}^3$ be vectors and let $k_0, …,k_n$ be positive numbers.

There is a region $\Pi$ defined as $\Pi = \{x \in \mathbb{R}^3\;|\;v_i^tx \le k_i \}$

The problem is to find the center and radius of the biggest sphere inside this region.

How can I write this problem as a LP problem? How to identify the decision variables, the objective function to be optimized and the constraints?


The decision variables should be the center and the radius of the sphere.

The objective function should be to maximize $\frac{4}{3}\pi r^3$.

I'm not being able to visualize $\Pi$, so I'm stuck at defining the contraints for the center and the radius.

Best Answer

For each point in a circle with center $c$ and radius $r$ to satisfy $v_i^T x \leq k_i$, you need (1) that $c$ satisfies $v_i^T c \leq k_i$, and (2) the distance between the circle and the line $v_i^Tx = k_i$ to be at least $r$. The first condition is obviously linear. The second condition we can express using a well known result: $$\frac{|v_i^Tc-k_i|}{||v_i||} \geq r,$$ from which we can remove the absolute values due to the first condition: $$\frac{k_i-v_i^Tc}{||v_i||} \geq r.$$ This is also a linear constraint.

The objective you can replace with $\max r$, since a monotone transformation of the objective function does not change the location of the optimum (merely its value).