This is a conceptually easier version of a box packing problem I stated [earlier](https://mathoverflow.net/questions/330023/box-stacking-problem).


Let $n$ be a positive integer and let $r\_1, \ldots, r\_n$ be positive integers. We take $r\_i$ to be the radius of a sphere in $\mathbb{R}^3$ for each $i\in \{1,\ldots, n\}$.


Let $R$ be the minimum positive integer such that we can pack all the small spheres into one big sphere of radius $R$.


Is the problem of finding $R$ given $n$ and the radii $\{r\_i:i\in\{1,\ldots, n\}\}$ of the small spheres, computable?



Computabillity of packing of spheres with different radii
Yes, it is computable. Use the decidability of the theory of the real numbers $(\mathbb{R}, 0, 1, \times, +, <)$. With a very little standard work, you can define $\mathbb{R}^3$, vector addition, and the norm function $|x|$. Then using the decidability of real-closed fields search for the minimum $R \in \mathbb{N}$ such that the following is true:
$$ \exists x\_0, ..., x\_n \in \mathbb{R}^3 \left(\bigwedge\_{i \neq j} |x\_i - x\_j| \geq r\_i + r\_j \quad \land\quad \bigwedge\_{i}|x\_i| + r\_i \leq R\right) $$
This search will terminate before $R > r\_1 + ... + r\_n$.




---


If you relax it to reals, then it is also computable. First, we can fit the balls within a large sphere of center the origin and radius $R' = r\_1 + ... + r\_n$ by lining the balls in a line. 


Then you can use compactness. The function $R(x\_1, ..., x\_n) = \min\_i (|x\_i| + r\_i)$ is computable and it describes the minimal radius $R$ which fits all the balls if they have center $x\_i \in \mathbb{R}^3$. Now the desired value $R$ is equal to $\inf\_{x\_1, ..., x\_n} R(x\_1, ..., x\_n)$ where the minimum is over all $x\_i, x\_j$ such that $|x\_i| \leq R'$ and $|x\_i - x\_j| \geq r\_i + r\_j$. Classically, this this is an infimum over a continuous function on a compact domain so it is realized. Computably, this minimum is also computable since it is the minimum of a computable function whose domain is what is called a "computable subset of $\mathbb{R}^3$" in the computable analysis literature.


