The D_4 root system is not universally optimal

Abstract: We prove that the D_4 root system (equivalently, the set of vertices of the regular 24-cell) is not a universally optimal spherical code. We further conjecture that there is no universally optimal spherical code of 24 points in S^3, based on numerical computations suggesting that every 5-design consisting of 24 points in S^3 is in a 3-parameter family (which we describe explicitly, based on a construction due to Sali) of deformations of the D_4 root system.

\section{Introduction}\label{sec1}

In \cite{CK} the authors (building on work by Yudin, Kolushov,
and Andreev in \cite{Y,KY1,KY2,A1,A2}) introduce the notion of a
{\em universally optimal code} in $S^{n-1}$, the unit sphere in
$\mathbb{R}^n$. For a function $f\colon [-1,1) \rightarrow \mathbb{R}$ and a finite set $C
\subset S^{n-1}$, define the {\em energy} $E_f(C)$ by
$$
E_f(C) = \sum_{\genfrac{}{}{0pt}{}{c,c'\in C}{c\neq c'}}
f\big(\langle c, c'\rangle\big),
$$
where $\langle c, c'\rangle$ is the usual inner product.  We think
of $f$\/ as a potential function, and $E_f(C)$ as the potential
energy of the configuration $C$\/ of particles on $S^{n-1}$.  Note
that because each pair of points in $C$ is counted in both orders,
$E_f(C)$ is twice the potential energy from physics, but of course
this constant factor is unimportant.

A function $f \colon [-1,1) \to \mathbb{R}$ is said to be {\em absolutely
monotonic} if it is smooth and it and all its derivatives are
nonnegative on $[-1,1)$.  A finite subset $C_0 \subset S^{n-1}$ is
said to be {\em universally optimal}\/ if $E_f(C_0) \leq E_f(C)$
for all $C\subset S^{n-1}$ with $\# C=\# C_0$ and all absolutely
monotonic $f$.  We say that $C_0$ is an {\em optimal spherical
code\/} if $t_{\max}(C_0) \leq t_{\max}(C)$ for all such $C$,
where
$$
t_{\max}(C) := \max_{\genfrac{}{}{0pt}{}{c,c'\in C}{c\neq c'}}
\langle c, c'\rangle
$$
is the cosine of the minimal distance of $C$. A universally
optimal code is automatically optimal (let $f(t)=(1-t)^{-N}$ or
$(1+t)^N$ for large $N$\/).

In \cite{CK}, linear programming bounds are applied to show that
many optimal codes are in fact universally optimal.  Notably
absent from this list is the $D_4$ root system $C_{D_4}$, which is
expected but not yet proved to be the unique optimal code of
size $24$ in $S^3$.  This root system can also be described as the
vertices of the regular \hbox{$24$-cell}.

It is shown in \cite{CK}
that the vertices of any regular polytope whose faces are
simplices form a universally optimal spherical code. The
dodecahedron, \hbox{$120$-cell}, and cubes in $\mathbb{R}^n$ with $n \ge
3$ are not even optimal spherical codes (see \cite{S}) and hence
cannot be universally optimal. Thus the \hbox{$24$-cell} was the
only remaining regular polytope.
Cohn and Kumar conjectured in an early draft of \cite{CK} that
$C_{D_4}$ was universally optimal, but reported the numerical
result that for the natural potential function $f(t) = (1-t)^{-1}$
there was another code $C\subset S^3$ with $\# C=24$ at which
$E_f$ has a local minimum only slightly larger than $E_f(C_{D_4})$
($668.1902+$, compared with $668$).

What makes this code
noteworthy is that in simulations of particle dynamics on $S^3$
under the potential function $f$ (along with a viscosity force to
remove kinetic energy and cause convergence to a local minimum for
$E_f$), $24$ particles converge more than 90\% of the time to $C$,
rather than to $C_{D_4}$. Similar effects appear to occur for
$f(t) = (1-t)^{-s}$ for other values of $s$.  In other words,
these codes have a much larger basin of attraction than $C_{D_4}$,
despite being suboptimal.

In this paper we give a simple description of a one-parameter
family of configurations $C_\theta$ that includes these codes, and
exhibit choices of $f$\/ (such as $f(t)=(1+t)^8$) and $\theta$ for
which $E_f(C_\theta) < E_f(C_{D_4})$. We thus disprove the
conjectured universal optimality of $C_{D_4}$.

We further conjecture that there is no universally optimal
spherical code of $24$ points in $S^3$.  Any such code would have
to be a \hbox{$5$-design}, because $C_{D_4}$ is.  Numerical
computations led us to a \hbox{$3$-parameter} family of such
designs that can be constructed using an approach introduced by
Sali in \cite{Sa}. The family contains $C_{D_4}$ as a special
case, and consists of deformations of $C_{D_4}$.

We exhibit these
designs and prove that, within the family, $C_{D_4}$ minimizes the
energy for every absolutely monotonic potential function, and is
the unique minimizer unless that function is a polynomial of
degree at most $5$. Our computations suggest that every
\hbox{$5$-design} of $24$ points in $S^3$ is in the new family. If
true, this would imply the nonexistence of a universally optimal
design of this size in $S^3$ because we already know that
$C_{D_4}$ is not universally optimal.

One way to think about the $D_4$ root system's lack of universal
optimality is that it explains how $D_4$ is worse than $E_8$.  The
$D_4$ and $E_8$ root systems are similar in many ways: they are
both beautiful, highly symmetrical configurations that seem to be
the unique optimal spherical codes of their sizes and dimensions.
However, one striking difference is that linear programming bounds
prove this optimality and uniqueness for $E_8$ but not for $D_4$
(see \cite{AB,BS,L,OS}).  This leads one to wonder what causes
that difference.  Is $D_4$ in some way worse than $E_8$?  Our
results in this paper show that the answer is yes: for $E_8$,
linear programming bounds prove universal optimality
(see \cite{CK}), while for $D_4$ universal optimality is not merely
unproved but in fact false.

\section{The codes $C_\theta$}\label{sec2}

We computed the $24 \times 24$ Gram matrix of inner products
between the points of the suboptimal but locally optimal
configuration mentioned above for the potential function
$f(t)=(1-t)^{-1}$. Each inner product occurred more than once,
suggesting that the configuration had some symmetry.  By studying
this pattern we eventually identified the configuration with a
code in the following family of $24$-point codes $C_\theta \subset
S^3$. (We are of course not the first to use this approach of
computing a code numerically and using its Gram matrix to detect
symmetries and then find good coordinates.  One recent case ---
also, as it happens, for codes in $S^3$ --- is \cite{SHC}, where
the method is called ``beautification.'')

We identify $\mathbb{R}^4$ with the complex vector space $\mathbb{C}^2$ so that
$$
S^3 = \{ (w_1,w_2) \in \mathbb{C}^2 : |w_1|^2 + |w_2|^2 = 1 \}.
$$
For $\theta \in \mathbb{R} / 2\pi\mathbb{Z}$ such that $\sin 2\theta \neq 0$ and
$\sin\theta \neq \cos\theta$ we set
$$
C_\theta := \{ (z,0), (0,w), (z\sin\theta, w\cos\theta),
(z\cos\theta, w\sin\theta) : z^3 = w^3 = 1 \}.
$$
Thus $C_\theta$ consists of $24$ unit vectors, namely $3+3$ of the
form $(z,0)$ or $(0,w)$ and $3^2+3^2$ of the form $(z\sin\theta,
w\cos\theta)$ or $(z\cos\theta, w\sin\theta)$.  Each of these
codes has $72$ symmetries (each complex coordinate can be
independently conjugated or multiplied by cube roots of unity, and
the two coordinates may be switched), forming a group $G$\/
isomorphic to the wreath product of the symmetric group $S_3$ with
$S_2$. This group does not act transitively: there are two orbits,
one consisting of the six points $(z,0)$ and $(0,w)$ and the other
consisting of the remaining $18$ points.

Listing all possible pairs $c,c' \in C_\theta$ with $c\neq c'$, we
find that there are in general $11$ possible inner products, with
multiplicities ranging from $18$ to $84$.  We thus compute that
\begin{align*}
E_f(C_\theta)  = {} &  18\bigl( f(0)+f(\sin 2\theta) \bigr)
+ 36 \bigl( f(\sin\theta) + f(\cos\theta) \bigr)
\\
& \phantom{} + 36\left( f\!\left(\sin^2\theta - \frac12
\cos^2\theta\right) + f\!\left(\cos^2\theta - \frac12
\sin^2\theta\right) \right)
\\
& \phantom{} + 72 \left( f\!\left(-\,\frac{\sin\theta}{2}\right)
+ f\!\left(-\,\frac{\cos\theta}{2}\right) + f\!\left(\frac{\sin
2\theta}{4}\right) + f\!\left(-\,\frac{\sin 2\theta}{2}\right)
\right)
\\
& \phantom{} + 84 f\!\left(-\frac12\right).
\end{align*}
For $C_{D_4}$ we have the simpler formula
$$
E_f(C_{D_4}) = 24 f(-1) + 192 \left(f\left(\frac12\right)+f\left(-\frac12\right)\right) + 144 f(0).
$$

\section{Failure of Universal Optimality}\label{sec3}

By  Theorem 9b in \cite[p.\ 154]{Wi}, an absolutely monotonic
function on $[-1,1)$ can be approximated, uniformly on compact
subsets, by nonnegative linear combinations of the absolutely
monotonic functions $f(t)=(1+t)^k$ with $k\in\{0,1,2,\dots\}$. To
test universal optimality of some spherical code $C_0$ it is thus
enough to test whether $E_f(C_0) \leq E_f(C)$ holds for all
$C\subset S^{n-1}$ with $\# C=\# C_0$ and each $f(t)=(1+t)^k$. We
wrote a computer program to compute $E_f(C_{D_4})$ and
$E_f(C_\theta)$, and plotted the difference $E_f(C_{D_4}) -
E_f(C_\theta)$ as a function of~$\theta$.

For $k \leq 2$ the plots suggested that $E_f(C_{D_4}) =
E_f(C_\theta)$ for all $\theta$.  This is easy to prove, either
directly from the formulas or more nicely by observing that
$C_{D_4}$ and $C_\theta$ are both spherical \hbox{$2$-designs}
(the latter because $G$\/ acts irreducibly on $\mathbb{R}^4$), so
$E_f(C_{D_4}) + 24 f(1)$ and $E_f(C_\theta) + 24 f(1)$ both equal
$24$ times the average of $c \mapsto f\big(\langle c,
c_0\rangle\big)$ over $S^3$ for any $c_0 \in S^3$.

For $k=3$, the plot suggested that $E_f(C_{D_4}) \leq
E_f(C_\theta)$, with equality at a unique value of $\theta$ in
$[0,\pi]$, numerically $\theta = 2.51674+$. We verified this
by using the rational parametrization
$$
\sin\theta = \frac{2u}{1+u^2}, \quad \cos\theta =
\frac{1-u^2}{1+u^2}
$$
of the unit circle, computing $E_f(C_{D_4}) - E_f(C_\theta)$
symbolically as a rational function of $u$, and factoring this
function. We found that
$$
E_f(C_{D_4}) - E_f(C_\theta) = -18 \frac{(u^6 - 6u^4 - 12u^3 +
3u^2 - 2)^2}{(u^2+1)^6},
$$
and thus that $E_f(C_{D_4}) \leq E_f(C_\theta)$, with equality if
and only if $u$ is a root of the sextic $u^6 - 6u^4 - 12u^3 + 3u^2
- 2$. This sextic has two real roots,
$$
u = -(0.51171+), \quad u=3.09594-,
$$
which yield the two permutations of $\{\sin\theta,\cos\theta\} =
\{ 0.58498-, -(0.81105+) \}$ and thus give rise to a unique code
$C_\theta$ with $E_f(C_{D_4}) = E_f(C_\theta)$. This code is
characterized more simply by the condition that $\sin\theta +
\cos\theta$ is a root of the cubic $3y^3-9y-2=0$, or better yet
that $\sin^3\theta+\cos^3\theta=-\frac13$. The latter formulation also
lets us show that this is the unique $C_\theta$ that is a
spherical \hbox{$3$-design}: the cubics on $\mathbb{R}^4$ invariant
under $G$\/ are the multiples of $\Re(w_1^3) + \Re(w_2^3)$, and
the sum of this cubic over $C_\theta$ is
$6+18(\sin^3\theta+\cos^3\theta)$. Since $C_{D_4}$ and this
particular $C_\theta$ are both \hbox{$3$-designs}, they
automatically minimize the energy for any potential function that
is a polynomial of degree at most $3$.  We must thus try $k>3$ if
we are to show that $C_{D_4}$ is not universally optimal.

For $k=4$ through $k=7$ the plot indicated that $E_f(C_\theta)$
comes near $E_f(C_{D_4})$ for $\theta \approx 2.52$ but stays
safely above $E_f(C_{D_4})$ for all $\theta$, which is easily
proved using the rational parametrization. (For $k=4$ and $k=5$ we
could also have seen that $C_{D_4}$ minimizes $E_f$ by noting that
$C_{D_4}$ is a \hbox{$5$-design}.) However, for $k=8$ the minimum
value of $E_f(C_\theta)$, occurring at $\theta = 2.529367746+$, is
$5064.9533+$, slightly but clearly smaller than $E_f(C_{D_4}) =
5065.5$. That is, this $C_\theta$ is a better code than $C_{D_4}$
for the potential function $(1+t)^8$, so $C_{D_4}$ is not optimal
for this potential function and hence not universally optimal.

The maximum value of $E_f(C_{D_4}) - E_f(C_\theta)$ for
$f(t)=(1+t)^k$ remains positive for $k=9,10,11,12,13$, attained at
values of $\theta$ that slowly increase from $\theta = 2.52937-$
for $k=8$ to $\theta = 2.54122-$ for $k=13$. Each of these is
itself enough to disprove the conjecture that $C_{D_4}$ is
universally optimal.  (Another natural counterexample is
$f(t)=e^{6t}$ with $\theta = 2.53719+$.)

We found no further solutions of $E_f(C_{D_4}) > E_f(C_\theta)$
with $k > 13$.  It is clear that $E_f(C_{D_4}) < E_f(C_\theta)$
must hold for all $\theta$ if $k$\/ is large enough, because
$t_{\max}(C_\theta) > t_{\max}(C_{D_4}) = \frac12$: the smallest value
$t_0$ of $t_{\max}(C_\theta)$ is $(\sqrt{7}-1)/3 = 0.54858+$,
occurring when either
$$
t_0 = \sin\theta = \cos^2\theta - \frac12\sin^2\theta
$$ with
$\theta = 2.56092+$ or
$$
t_0 = \cos\theta = \sin^2\theta - \frac12\cos^2\theta
$$
with $\theta = 5.29305+$. Quantifying what ``large enough'' means,
and combining the resulting bound with our computations for
smaller $k$, we obtained the following result:

\begin{proposition} \label{prop:summary}
For $8 \le k \le 13$, there exists a choice of $\theta$ for which
$$
E_f(C_\theta) < E_f(C_{D_4})
$$
when $f(t) = (1+t)^k$.  For other nonnegative integers $k$, no such
$\theta$ exists.
\end{proposition}

\begin{proof}
If $k$ is large enough that
$$
18 f\!\left(\frac{\sqrt{7}-1}{3}\right) > 24 f(-1) + 192
\left(f\!\left(\frac12\right)+f\!\left(-\frac12\right)\right) + 144 f(0),
$$
then $E_f(C_{D_4}) < E_f(C_\theta)$. This criterion is wasteful,
but we have no need of sharper inequalities.  Calculation shows
that this criterion holds for all $k \ge 75$. This leaves only
finitely many values of $k$. For each of them, we use the rational
parametrization of the unit circle to translate the statement of
Proposition \ref{prop:summary} into the assertion of existence or
nonexistence of a real solution of a polynomial in $\mathbb{Z}[u]$, which
can be confirmed algorithmically using Sturm's theorem. Doing so
in each case completes the proof.
\end{proof}

We cannot rule out the possibility that there exists a universally
optimal \hbox{$24$-point} code in $S^3$, but it seems exceedingly
unlikely.  If $C_{D_4}$ is the unique optimal spherical code, as
is widely believed, then no universally optimal code can exist.
The same conclusion follows from the conjecture in the next
section.

It is still natural to ask which configuration minimizes each
absolutely monotonic potential function.  We are unaware of any
case in which another code beats $C_{D_4}$ and all the codes
$C_\theta$ for some absolutely monotonic potential function, but
given the subtlety of this area we are not in a position to make
conjectures confidently.

\section{New Spherical 5-Designs}\label{sec4}

Spherical designs are an important source of minimal-energy
configurations: a spherical $\tau$-design automatically minimizes
the potential energy for $f(t) = (1+t)^k$ with $k \le \tau$.
Conversely, if an $N$-point spherical $\tau$-design exists in
$S^{n-1}$, then every $N$-point configuration in $S^{n-1}$ that
minimizes the potential function $f(t) = (1+t)^\tau$ must be a
$\tau$-design.  Thus, when searching for universally optimal
configurations, it is important to study $\tau$-designs with $\tau$
as large as possible.

For $24$ points in $S^3$, the $D_4$ root system forms a
$5$-design. By Theorem 5.11 in \cite{DGS}, every $6$-design must
have at least $30$ points, so $24$ points cannot form a
\hbox{$6$-design}. Counting degrees of freedom suggests that
$24$-point $4$-designs are plentiful, but $5$-designs exist only
for subtler reasons.  One can search for them by having a computer
minimize potential energy for $f(t) = (1+t)^5$.  Here, we report
on a three-dimensional family of \hbox{$5$-designs} found by this
method. The $D_4$ root system is contained in this family, and all
the designs in the family can be viewed as deformations of
$C_{D_4}$. We conjecture that there are no other \hbox{$24$-point}
spherical \hbox{$5$-designs} in $S^3$. We shall show that this
conjecture implies the nonexistence of a universally optimal
\hbox{$24$-point} code in $S^3$.

Our construction of \hbox{$5$-designs} slightly generalizes a
construction of Sloane, Hardin, and Cara for the \hbox{$24$-cell}
(Construction 1 and Theorem 1 in \cite{SHC}). The
Sloane--Hardin--Cara construction also works for certain other
dimensions and numbers of points, and can be further generalized
using our more abstract approach. For example, one can construct a
family of designs in $S^{2n-1}$ from a design in $\mathbb{C}\mathbb{P}^{n-1}$.
We plan to treat further applications in a future paper.  See also
the final paragraph of this section.

Fix an ``Eisenstein structure'' on the $D_4$ root lattice, that
is, an action of $\mathbb{Z}[r]$, where $r=e^{2\pi i/3}$ is a cube root of
unity. (It is enough to specify the action of $r$, which can be
any element of order $3$ in ${\mathop{\rm Aut}\nolimits}(D_4)$ that acts on $\mathbb{R}^4$ with
no nonzero fixed points; such elements constitute a single
conjugacy class in ${\mathop{\rm Aut}\nolimits}(D_4)$.) Then $\mathbb{R}^4$ is identified with
$\mathbb{C}^2$, with the inner product given by
$$
\big\langle(z_1,z_2),(\zeta_1,\zeta_2) \big\rangle =
\Re\big(z_1\overline{\zeta}_1 + z_2 \overline{\zeta}_2\big).
$$
The group $\bm{\mu}_6$ of sixth roots of unity (generated by $-1$ and
$r$) acts on $C_{D_4}$ and partitions its $24$ points into four
hexagons centered at the origin; call them $H_0, H_1, H_2, H_3$.
In coordinates, we may take
\begin{align*}
H_0 & = \{(w,0) : w \in \bm{\mu}_6\}, \\
H_1 & =  \{(uiw,tiw) : w \in \bm{\mu}_6\}, \\
H_2 & =  \{(uiw,rtiw) : w \in \bm{\mu}_6\},  \\
H_3 & =  \{(uiw, \overline{r}tiw) : w \in \bm{\mu}_6\},
\end{align*}
where $u = \sqrt{1/3}$ and $t = \sqrt{2/3}$. For any complex
numbers $a_0,a_1,a_2,a_3$ with $|a_0|=|a_1|=|a_2|=|a_3|=1$, we
define
$$
D(a_0,a_1,a_2,a_3) = a_0 H_0 \cup a_1 H_1 \cup a_2 H_2 \cup a_3
H_3.
$$
We claim that $D(a_0,a_1,a_2,a_3)$ is a $5$-design.  That is, we
claim that for every polynomial $P$\/ of degree at most $5$
on $\mathbb{R}^4$, the average of $P(c)$ over $c \in D(a_0,a_1,a_2,a_3)$
equals the average of $P(c)$ over $c \in S^3$. It is sufficient to
prove that the average is independent of the choice of
$a_0,a_1,a_2,a_3$, because $D(1,1,1,1) = C_{D_4}$ is already known
to be a \hbox{$5$-design}.  But this is easy: for each $m \in \{
0,1,2,3\}$, the restriction of $P$\/ to the plane spanned by $H_m$
is again a polynomial of degree at most $5$, and $a_m H_m$ is a
{$5$-design} in the unit circle of this plane, so the average of
$P$\/ over $a_m H_m$ is the average of $P$\/ over this unit
circle, independent of the choice of $a_m$.

This construction via rotating hexagons is a special case of
Lemma 2.3 in \cite{Sa}, where that idea is applied to prove that
many spherical designs are not rigid.  Sali rotates a single
hexagon to prove that $C_{D_4}$ is not rigid, but he does not
attempt a complete classification of the $24$-point $5$-designs.

It is far from obvious that there is no other way to perturb the
$D_4$ root system to form a $5$-design. For example, if there were
two disjoint hexagons in $D_4$ that did not come from the same
choice of Eisenstein structure as above, then rotating them
independently would produce $5$-designs not in our family.
However, one can check via a counting argument that every pair of
disjoint hexagons does indeed come from some common Eisenstein
structure. This supports our conjecture that there are no other
$24$-point spherical $5$-designs in $S^3$.

The family of \hbox{$5$-designs} of the form $D(a_0,a_1,a_2,a_3)$
is three-dimensional, for the following reason. One of the four
parameters $a_0,a_1,a_2,a_3$ is redundant, because for every
$\alpha \in \mathbb{C}^*$ with $|\alpha|=1$ we have $D(\alpha a_0, \alpha
a_1, \alpha a_2, \alpha a_3) \cong D(a_0,a_1,a_2,a_3)$. We may
thus assume $\alpha_0=1$. We claim that for each $(a_1,a_2,a_3)$
there are only finitely many $(a'_1,a'_2,a'_3)$ such that
$D(1,a_1,a_2,a_3) \cong D(1,a'_1,a'_2,a'_3)$.  If this were not
true, there would be an infinite set of designs $D(1,b_1,b_2,b_3)$
equivalent under automorphisms of $S^3$ that stabilize $H_0$
pointwise. But this is impossible, because such an automorphism
must act trivially on the first coordinate $z_1$.  Hence our
\hbox{$5$-designs} constitute a three-dimensional family, as
claimed.

Some other known spherical designs can be similarly generalized.
For instance, the $7$-design of $48$ points in $S^3$, obtained
in \cite{SHC} from two copies of $C_{D_4}$, has a decomposition
into six regular octagons, which can be rotated independently to
yield a five-dimensional family of $7$-designs.

It is also fruitful to take a more abstract approach.  A
$24$-point design with a $\bm{\mu}_6$ action is specified by four
points, one in each orbit.  Our new designs are characterized by
the condition that under the natural map $\mathbb{C}^2 \setminus \{(0,0)\}
\to \mathbb{C}\mathbb{P}^1$ given by $(z_1,z_2) \mapsto z_1/z_2$, the four
points must map to the vertices of a regular tetrahedron (if we
identify $\mathbb{C}\mathbb{P}^1$ with $S^2$ via stereographic projection, with
$\mathbb{C}\mathbb{P}^1 = \mathbb{C} \cup \{\infty\}$ and $S^2$ a unit sphere centered
at the origin).  In slightly different language, we have specified
the image of the design under the Hopf map $S^3 \to S^2$.  The
fact that the regular tetrahedron is a spherical $2$-design in
$S^2$ plays a crucial role, and can be used to prove that this
construction yields $5$-designs.  Likewise, the six octagons that
make up each of our \hbox{$7$-designs} map to the vertices of a
regular octahedron, which is a spherical {$3$-design}. Again, we
intend to discuss this approach in more detail in a future paper.

\section{Optimality of $C_{D_4}$ among new $5$-designs}\label{sec5}

In this section we prove that among all these new $5$-designs, the
$24$-cell minimizes potential energy for each absolutely monotonic
potential function. As before, it is sufficient to do this for
$f(t)=(1+t)^k$. For $k \le 5$ this follows immediately from the
spherical design property, and for $k>5$ we will show directly
that $C_{D_4}$ is the unique minimizer.

Within each hexagon $H_m$, the six points are in the same relative
position in each design, and thus make the same contribution to
the potential energy.  Hence it suffices to show that the
potential energy between each pair of hexagons is separately
minimized for the $D_4$ configuration.

Let $a_0=1$, $a_1 = ie^{i\theta}$, $a_2 = ie^{i\phi}$, and
$a_3=ie^{i\psi}$. Because of the sixfold rotational symmetry of
each $H_m$, the angles $\theta$, $\phi$, and $\psi$ are determined
only modulo $\pi/3$. In particular, $\theta=\phi=\psi=\pi/6$
yields the $24$-cell (because $\pi/2 \equiv \pi/6 \pmod{\pi/3}$).

First, consider the pair $(H_0,H_1)$. We find that the inner
products between the points of $H_0$ and $a_1H_1$ are $(1/\sqrt{3})
\cos(\theta + j\pi/3)$ with $0 \leq j \leq 5$, each repeated
six times. By Lemma \ref{lemma:min} below, the sum is minimized
exactly when $\theta \equiv \pi/6  \pmod{\pi/3}$.  Similarly,
considering $(H_0,H_2)$ and $(H_0,H_3)$ shows that the
corresponding contributions to potential energy are minimized when
$\phi \equiv \pi/6 \pmod{\pi/3}$ or $\psi \equiv \pi/6
\pmod{\pi/3}$, respectively.

Next, consider the pair $(H_1,H_2)$. The dot products possible are
of the form
$$
\Re\big((u^2+\overline{r}t^2)a_1\overline{a}_2w^j\big) =
\frac{1}{\sqrt{3}}\cos\left(\frac{3\pi}{2}+\theta-\phi + \frac{j\pi}{3}\right)
$$
with $0 \le j \le 5$, each repeated six times. Once again we
conclude from Lemma \ref{lemma:min} that the potential energy is
minimized when $\theta \equiv \phi \pmod{\pi/3}$.  Similarly,
considering the remaining pairs $(H_1,H_3)$ and $(H_2,H_3)$ shows
that $\theta \equiv \phi \equiv \psi \pmod{\pi/3}$. Thus, it will
follow from the lemma below that for each $k \ge 6$, the $D_4$
configuration with $\theta=\phi=\psi=\pi/6$ is the unique code in
this family that minimizes the potential energy under the
potential function $f(t)=(1+t)^k$.

\begin{lemma} \label{lemma:min}
Let $k$ be a nonnegative integer. When $k \ge 6$, the function
$$
\theta \mapsto \sum_{j=0}^5
\left(1+\frac{\cos(\theta+j\pi/3)}{\sqrt{3}}\right)^k
$$
has a unique global minimum within $[0,\pi/3]$, which occurs at
$\theta= \pi/6$.  When $k \le 5$, the function is constant.
\end{lemma}

\begin{proof}
We must show that the coefficient of $y^k$ in the generating
function
$$
\sum_{j=0}^5\sum_{k=0}^\infty
\left(\left(1+\frac{\cos(\theta+j\pi/3)}{\sqrt{3}}\right)^k -
\left(1+\frac{\cos(\pi/6+j\pi/3)}{\sqrt{3}}\right)^k \right)y^k
$$
is zero if $k \le 5$ or $\theta \equiv \pi/6 \pmod{\pi/3}$ and
strictly positive otherwise.  Explicit computation using the sum
of a geometric series shows that the generating function equals
$$
\frac{y^6\big(\!\cos^2\theta\big)\big(4\cos^2\theta-3\big)^2}{216}
\left(\frac{1}{1-y} + \frac{2}{2-y} +
\frac{2}{2-3y}\right)\prod_{j=0}^5
\frac{1}{1-y\left(1+\frac{\cos(\theta+j\pi/3)}{\sqrt{3}}\right)}.
$$
The factor of
$\big(\!\cos^2\theta\big)\big(4\cos^2\theta-3\big)^2$ vanishes iff
$\theta \equiv \pi/6 \pmod{\pi/3}$ and is positive otherwise.
Clearly the factor
$$
\frac{1}{1-y} + \frac{2}{2-y} + \frac{2}{2-3y}
$$
has positive coefficients, as does
$$
\prod_{j=0}^5
\frac{1}{1-y\left(1+\frac{\cos(\theta+j\pi/3)}{\sqrt{3}}\right)},
$$
because $1+\cos(\theta+j\pi/3)/\sqrt{3} >0$ for all $j$.  It
follows that their product has positive coefficients, and taking
the factor of $y^6$ into account completes the proof.
\end{proof}

\section{Local Optimality}\label{sec6}

So far, we have not addressed the question of whether our new codes
are actually local minima for energy.  Of course that is not
needed for our main result, because they improve on the $24$-cell
regardless of whether they are locally optimal, but it is an
interesting question in its own right.

For the codes $C_\theta$ this question appears subtle, and we do
not resolve it completely.  To see the issues involved, consider
the case of $f(t)=(1-t)^{-1}$.  As $\theta$ varies, the lowest
energy obtained is $668.1920+$ when $\theta = 2.5371+$.  That code
appears to be locally minimal among all codes, based on
diagonalizing the Hessian matrix numerically, but we have not
proved it. By contrast, the other two local minima within the
family $C_\theta$ (with energy $721.7796+$ at $\theta =
-(2.0231+)$ and energy $926.3218+$ at $\theta = 0.5320+$) are
critical points but definitely not local minima among all codes;
the Hessians have $22$ and $36$ negative eigenvalues,
respectively.

We do not know a simple criterion that predicts whether a local
minimum among the codes $C_\theta$ as $\theta$ varies will prove
to be a local minimum among all codes, but it is not hard to prove
that every critical point in the restricted setting is also an
unrestricted critical point.  Specifically, a short calculation
shows that for every code $C_\theta$ and every smooth potential
function, the gradient of potential energy on the space of all
configurations lies in the tangent space of the subspace
consisting of all the codes $C_\theta$.  It follows immediately
that if the derivative with respect to $\theta$ of potential
energy vanishes, then the gradient vanishes as well.  Furthermore,
such critical points always exist: starting at an arbitrary code
$C_\theta$ and performing gradient descent will never leave the
space of such codes and will always end at a critical point.

At this point one may wonder whether it is even clear that the
regular $24$-cell is a local minimum for all absolutely monotonic
potential functions.  It is straightforward to show that it is a
critical point, but we know of no simple proof that it is actually
a local minimum.  The best proof we have found is the following
calculation.

For each of the $24$ points, choose an orthonormal basis of the
tangent space to $S^3$ at that point, and compute the Hessian
matrix of potential energy with respect to these coordinates. Its
eigenvalues depend on the potential function, but the
corresponding eigenspaces do not.  There is a simple reason for
that, although we will not require this machinery. Consider the
space ${\mathop{\rm Sym}\nolimits}^{24}(S^3)$ of all unordered sets of $24$ points in
$S^3$. The symmetry group of the $24$-cell acts on the tangent
space to ${\mathop{\rm Sym}\nolimits}^{24}(S^3)$ at the point corresponding to the
$24$-cell, and this representation breaks up as a direct sum of
irreducible representations.  On each nontrivial irreducible
representation the Hessian has a single eigenvalue, and these
subspaces do not depend on the potential function. In practice,
the simplest way to calculate the eigenspaces is not to use
representation theory, but rather to find them for one potential
function and then verify that they are always eigenspaces.

If the potential function is $f \colon [-1,1) \to \mathbb{R}$, then the
eigenvalues of the Hessian are
\begin{align*}
&0,\\
&2f''\!\left(\frac{1}{2}\right)+8f''(0)+2f''\!\left(-\frac{1}{2}\right)-12f'\!\left(\frac{1}{2}\right)+12f'\!\left(-\frac{1}{2}\right),\\
&2f''\!\left(\frac{1}{2}\right)+4f''(0)+6f''\!\left(-\frac{1}{2}\right)-8f'\!\left(\frac{1}{2}\right)-4f'(0)+8f'\!\left(-\frac{1}{2}\right)+4f'(-1),\\
&5f''\!\left(\frac{1}{2}\right)+4f''(0)+3f''\!\left(-\frac{1}{2}\right)-14f'\!\left(\frac{1}{2}\right)+8f'(0)+2f'\!\left(-\frac{1}{2}\right)+4f'(-1),\\
&6f''\!\left(\frac{1}{2}\right)+6f''\!\left(-\frac{1}{2}\right)-12f'\!\left(\frac{1}{2}\right)+12f'\!\left(-\frac{1}{2}\right),\\
&2f''\!\left(\frac{1}{2}\right)+4f''(0)+6f''\!\left(-\frac{1}{2}\right)+4f'\!\left(\frac{1}{2}\right)+8f'(0)+20f'\!\left(-\frac{1}{2}\right)+4f'(-1),\\
&6f''\!\left(\frac{1}{2}\right)+8f''(0)+6f''\!\left(-\frac{1}{2}\right)-4f'\!\left(\frac{1}{2}\right)+4f'\!\left(-\frac{1}{2}\right), \\
&8f''\!\left(\frac{1}{2}\right)+4f''(0)-8f'(1/2)-4f'(0)+8f'\!\left(-\frac{1}{2}\right)+4f'(-1),
\end{align*}
with multiplicities $6$, $9$, $16$, $8$, $12$, $4$, $9$, and $8$,
respectively.

One mild subtlety is that $0$ is always an eigenvalue, so one
might worry that the second derivative test is inconclusive.
However, note that the potential energy is invariant under the
action of the $6$-dimensional Lie group $\operatorname{O}(4)$, which yields the
$6$ eigenvalues of $0$.  In such a case, if all other eigenvalues
are positive, then local minimality still holds, for the following
reason. Notice that $\operatorname{O}(4)$ acts freely on the space of ordered
$24$-tuples of points in $S^3$ that span $\mathbb{R}^4$, and it acts
properly since $\operatorname{O}(4)$ is compact. The quotient space is therefore
a smooth manifold, and the positivity of the remaining eigenvalues
suffices for the potential energy to have a strict local minimum
on the quotient space.

To complete the proof, we need only consider $f(t) = (1+t)^k$ with
$k \in \{0,1,2,\dotsc\}$. For $k \le 5$ the other eigenvalues are
not all positive (some vanish), but because the $24$-cell is a
spherical $5$-design it is automatically a global minimum for
these energies.  For $k \ge 6$ one can check that all the other
eigenvalues are positive. That is obvious asymptotically, because
they grow exponentially as functions of $k$; to prove it for all
$k \ge 6$ one reduces the problem to a finite number of cases and
checks each of them.  It follows that the regular $24$-cell
locally minimizes potential energy for each absolutely monotonic
potential function, and it is furthermore a strict local minimum
(modulo orthogonal transformations) unless the potential function
is a polynomial of degree at most $5$.

\section*{Acknowledgments}

This work was begun during a workshop at the American Institute of
Mathematics. The numerical and symbolic computations reported here
were carried out with PARI/GP (see \cite{PARI}) and Maple.

We are grateful to Eiichi Bannai for providing helpful feedback
and suggestions.

NDE was supported in part by the National Science Foundation
and AK was supported by a summer internship in the theory group at
Microsoft Research and a Putnam fellowship at Harvard University.


Counting Blanks in Polygonal Arrangements

Abstract: Inside a two dimensional region ("cake"), there are $m$ non-overlapping tiles of a certain kind ("toppings"). We want to expand the toppings while keeping them non-overlapping, and possibly add some blank pieces of the same "certain kind", such that the entire cake is covered. How many blanks must we add?We study this question in several cases: (1) The cake and toppings are general polygons. (2) The cake and toppings are convex figures. (3) The cake and toppings are axes-parallel rectangles. (4) The cake is an axes-parallel rectilinear polygon and the toppings are axes-parallel rectangles. In all four cases, we provide tight bounds on the number of blanks.

\section*{Introduction}
Consider a two-dimensional cake $C$ with $m$ pairwise-interior-disjoint
toppings $Z_1,Z_2,\ldots,Z_m$. We
would like to partition the entire cake to pairwise-interior-disjoint pieces $Z_1',Z_2',\ldots,$ such that each topping is contained in a piece and each piece contains at most a single topping.
There are some geometric constraints on the pieces, e.g, they should be polygonal or convex or rectangular.
This might require us to add some ``blanks'' --- pieces with no topping. For example, in the rectangular cake at the left of Figure \ref{fig:intro} there are $m=4$ rectangular toppings. If the pieces must be axes-parallel rectangles, then we will need to add at least one blank, denoted at the right by $Z_5'$.
\begin{figure}
\begin{center}
\includegraphics[width=0.3\textwidth]{graphics/rect-13.mps}
\hskip .15\textwidth
\includegraphics[width=0.3\textwidth]{graphics/rect-14.mps}
\end{center}
\caption{
\label{fig:intro}
\textbf{Left:} a rectangular cake with 4 rectangular toppings.
\\
\textbf{Right:} an expansion of the toppings to 4 larger pieces and a fifth blank piece.
}
\end{figure}
Given $m$ and the geometric constraint on the pieces, how many blanks must we add in the worst case (for the worst initial arrangement of toppings)?

Besides cutting cakes, an additional application of this question is for re-division of land \cite{segal2016re}.
There are some small lots on a piece of land. The owners have built on their initial lots and need to keep them. They would like to expand their lots and then fill the land with additional lots --- but not too many additional lots. All lots are required to have a ``nice'' geometric shape. How may additional lots do they need to add in the worst case?

This paper answers this question under three different geometric constraints on the toppings and pieces: polygonality, convexity and rectangularity.
In all these cases, we prove that for any initial arrangement of toppings there exists a \emph{maximal expansion} --- where the toppings expand inside the cake until they cannot expand any further while keeping the geometric constraints.
Since we are interested in a worst-case upper bound, it is sufficient to consider such maximal arrangements, since the initial arrangement might already be maximal. So our question becomes: how many blanks can there be in a maximal arrangement of pieces? We provide the following answers.

\textbf{1.} The cake and toppings are polygons.
Then in any maximal arrangement, the entire cake is covered --- there are no blanks.

\textbf{2.} The cake and toppings are convex figures.
Then in any maximal arrangement, the uncovered spaces (holes) are all convex, and there are at most $2m-5$ of them.

\textbf{3.} The cake and toppings are  axes-parallel rectangles, as in Figure \ref{fig:intro}.
Then in any maximal arrangement,
all holes are axes-parallel rectangles, and there are at most $m-\doubleroot{m}$.

\textbf{4.} The toppings are still axes-parallel rectangles, but the cake may be an arbitrary simply-connected axes-parallel polygon. Let $T$ be the number of reflex vertices (270-degree interior angles) in the cake.
Then in any maximal arrangement, the remaining holes can be partitioned to $b$ axes-parallel rectangles, where $b\leq m-\doubleroot{m}+T$.

All the results are tight in the following sense: In each case, for every $m$ (and $T$), there is an explicit construction where the number of blanks equals the bound.

\iffalse
The results are summarized in the table below.
\vskip .1cm
\noindent
\begin{center}
\begin{tabular}{c|c|c|c|c|}
\hline & Cake $C$ & Toppings and Pieces & Blanks $b$  in worst-case \\
\hline
\hline (1) & Polygon & Polygons & $0$ \\
\hline (2) & Convex figure & Convex figure                 & $2 m-5$ \\
\hline (3) & Axes-parallel rectangle & Axes-parallel rectangles & $m-\doubleroot{m}$ \\
\hline (4) & Simply-connected rectilinear polygon  & Axes-parallel rectangles & $T+m-\doubleroot{m}$  \\
\hline
\end{tabular}
\end{center}
It is easy to find such kind of expansion for large $b$. The subject of the paper is to answer the question, what is the smallest $b$ that can be guaranteed, in the worst case, as a function of $m$?

Without further restrictions on the pieces, the answer is trivial: it is always possible to get $b=0$ by setting e.g. $Z_1'=Z_1 \cup C\setminus(Z_2\cup\cdots\cup Z_m)$ (arbitrarily attach all the cake outside of the toppings to one of the toppings). The question becomes more interesting when there are geometric constraints on the pieces. A geometric constraint is represented by a family $\mathcal{S}$ of subsets of the plane. It is given that all $Z_i$ belong to the family $\mathcal{S}$ and it is required that for all new parts $Z_i'$ also belong to $\mathcal{S}$.
\fi

In addition, for cases 2 and 3 we consider a related question. Suppose the toppings lie in the unbounded plane $\mathbb{R}^2$, and we do not expand them.
We define a \emph{hole} as a connected component of the plane that remains outside of toppings (a hole can be unbounded). How many holes can there be?
 We prove the following answers.

\textbf{2'} In any arrangement of $m$ pairwise-disjoint convex figures in the plane, the number of holes is at most $2m-4$.

\textbf{3'} In any arrangement of $m$ pairwise-disjoint axes-parallel rectangles in the plane, the number of holes is at most $m-2$.

Both these bounds are tight in the same sense as above. It is interesting that the numbers are equal up to one in case 2, but quite different in case 3.

For each $k\in\{1,2,3,4\}$, case $k$ is handled in Section $k$.

In each case, the proof consists of two steps. First, we show that any initial arrangement of toppings has a maximal expansion. Then, we prove that in any maximal arrangement, the number of blanks is bounded as claimed.
This method works in cases 1--4, but it may not work in other cases; some counter-examples are discussed in Section \ref{sec:conclusion}.

\section{Polygonal Cake and Polygonal Pieces}
In this warm-up section, the cake and each of the $m$ toppings is a polygon. Initially, we allow polygons to be not simply-connected, in contrast to the classic definition.
We prove that in this case it is possible to expand the toppings such that there will be no blanks.
\begin{theorem}
\label{thm:conn}
Let $C$ (``cake'') be a polygon and $Z_1, \dots,Z_m$ (``toppings'') be pairwise-disjoint polygons contained in $C$. Then there exists a partition of $C$ into polygons, $C=Z'_1 \sqcup \cdots \sqcup Z'_{m}$,\footnote{The symbol $\sqcup$ denotes union of pairwise-interior-disjoint sets.}
where $Z_i\subseteq Z'_i$ for all $i\leq m$.
\end{theorem}
\begin{proof}
The new partition can be created by the following procedure.

Let $C^*$ be the cake outside the toppings, $C^* := C\setminus \bigcup_{i = 1}^m Z_i$. Since $C$ and the $Z_i$ are all polygons, $C^*$ is a union of a finite number of polygons, say: $C^* = H_1\sqcup \cdots \sqcup H_n$, where the sides of each $H_j$ are made of subsets of the sides of $C$ and the sides of the toppings. Moreover, every $H_j$ must have at least one side that overlaps with a side of some topping $Z_i$ (since the cake itself is connected). So $Z_i\cup H_j$ is a polygon. Replace $Z_i$ with $Z_i \cup H_j$ and repeat the procedure for the remaining components of $C^*$.
\end{proof}
Note: Theorem \ref{thm:conn} implies that, if the initial arrangement of toppings is \emph{any} maximal arrangement, then it has no blanks.

While Theorem \ref{thm:conn} is easy to prove, it is not so easy to extend to toppings that are connected but not polygonal. A counter-example is given in Section \ref{sec:conclusion}.

On the other hand, Theorem \ref{thm:conn} can be extended to the case where the cake and the toppings are \emph{simply-connected polygons}. Initially,
add to each topping thin polygonal tubes that connect it to the cake boundary and to each of the other toppings, as long is it is possible to do so without overlapping other toppings (see Figure \ref{fig:tubes}).
Then proceed as in Theorem \ref{thm:conn}: add each component of $C^*$ to an adjacent topping. The tubes guarantee that the toppings remain simply-connected.

\iffalse
add to each topping that has a path to the cake-border, a thin polygonal tube that connects it to the cake-border (see Figure \ref{fig:tubes}). Then, attach each component $H_j\subseteq C^*$ that is adjacent to the cake-border, to a topping $Z_i$ with an adjacent side. The tubes attached to the other toppings guarantee that $Z_i$ will remain simply-connected. If there remain components of $C^*$ that are not adjacent to the cake-border, treat each of them as a separate cake and do the same procedure.
\fi
\begin{figure}
\begin{center}
\includegraphics[angle=90]{graphics/rect-15.mps}
\hskip .1\textwidth
\includegraphics[angle=90]{graphics/rect-16.mps}
\end{center}
\caption{
\label{fig:tubes}
\textbf{Left:} a cake with three simply-connected topping.
\\
\textbf{Right:} Tubes connecting the toppings to each other and to the cake boundary.
}
\end{figure}

\section{Convex Cake and Convex Pieces}
In this section, the cake and each of the $m$ toppings is a \emph{convex figure}.

\begin{theorem}
\label{thm:convex case}
Let $C$ (``cake'') be a convex figure and $Z_1, \dots,Z_m$ (``toppings'') be pairwise-disjoint convex figures in $C$, where $m\geq 3$.
There exists a partition of $C$ into $m+b$ convex figures, $C=Z'_1 \sqcup \cdots \sqcup Z'_{m+b}$,
where $Z_i\subseteq Z'_i$ for all $i\leq m$, and $b\leq 2 m - 5$.
Moreover, for every $m$ there exists an arrangement of $m$ toppings where in every such partition, $b = 2 m - 5$.
\end{theorem}

The techniques and example in the proof are very similar to \cite{Edelsbrunner1990Covering}.
We first prove the second part of the theorem by showing an arrangement for which $b = 2m-5$.

\subsection{Lower bound}
\begin{figure}
	\begin{center}
		\includegraphics{graphics/fig-top-1.mps}
		\hskip 2cm
		\includegraphics{graphics/fig-top-2.mps}
	\end{center}
	\caption{\label{fig:holes-convex-hexagons}
		\textbf{Left:} a tiling of the plane by hexagons.
		\\
		\textbf{Right:} a modification of the tiling where near each vertex there is a blank.
	}
\end{figure}
To get intuition for the lower bound construction, consider the tiling of the plane with hexagons, shown in Figure \ref{fig:holes-convex-hexagons}/Left.
Each point in which $3$ hexagons meet is called a \emph{vertex}.
By slightly moving the hexagons, it is possible to create, near each vertex, a triangular blank, as is shown in Figure \ref{fig:holes-convex-hexagons}/Right.
No hexagon can be expanded towards an adjacent blank while remaining convex and disjoint from the other hexagons (i.e, the arrangement is maximal). Each blank touches three hexagons and each hexagon touches six blanks. Hence, the number of blanks is asymptotically twice the number of hexagons, which gives an initial approximation $b\approx 2 m$.
In a finite tiling, there are boundary conditions. For example, when the tiling is contained in a square cake, there are $\Theta(\sqrt{m})$ triangles near the boundary of $C$. These can be discarded or joined with nearby toppings, so the total number of blanks is only $2m-\Theta(\sqrt{m})$.

Figure \ref{fig:holes-convex-triangles} shows a more sophisticated arrangement of toppings that has only a constant number of blanks in the boundary. The arrangement is based on a construction of Edelsbrunner, Robison and Shen \cite{Edelsbrunner1990Covering}. For every integer $k\geq 0$, the toppings are:
\begin{itemize}
\item $3$ large external hexagons;
\item $3k$ medium intermediate hexagons;
\item $3$ or $4$ or $5$ or small inner polygons, depending on whether $m ~\mathrm{mod}~ 3$ is $0$ or $1$ or $2$.
\end{itemize}
Near the vertices of the toppings, there are triangular blanks. Note that the arrangement is \emph{maximal} --- there is no way to expand any topping into any blank.
Therefore the final partition consists exactly of the $m$ toppings and $b$ blanks shown in the figure.
We now calculate $b$. Each blank is triangular so it is adjacent to $3$ toppings, so below each blank is counted three times:
\begin{itemize}
\item Each external hexagon is adjacent to $3$ blanks, for a total of $9$;
\item Each intermediate hexagon is adjacent to $6$ blanks, for a total of $18k$;
\item Regarding the inner polygons:
\begin{itemize}
\item  When $m ~\mathrm{mod}~ 3=0$ --- there are three inner quadrangles, which are adjacent to $3\cdot 4=12$ blanks;
\item  When $m ~\mathrm{mod}~ 3=1$ --- there are one triangle and three pentagons, which are adjacent to $3+3\cdot 5=18$ blanks;
\item  When $m ~\mathrm{mod}~ 3=2$ --- there are a triangle, a quadrangle, a pentagon and 2 hexagons, which are adjacent to $3+4+5+2\cdot 6=24$ blanks.
\end{itemize}
\end{itemize}
All in all, the number of toppings and blanks is one of the following $\forall k\geq 0$  (see Figure \ref{fig:holes-convex-triangles}/Top):
\begin{itemize}
\item $m=6+3k$ and $b=(9+18k+12)/3=7+6k=2m-5$;
\item $m=7+3k$ and $b=(9+18k+18)/3=9+6k=2m-5$;
\item $m=8+3k$ and $b=(9+18k+24)/3=11+6k=2m-5$.
\end{itemize}
or one of the following (see Figure \ref{fig:holes-convex-triangles}/Bottom):
\begin{itemize}
	\item $m=3$ and $b=1=2m-5$
	\item $m=4$ and $b=3=2m-5$
	\item $m=5$ and $b=5=2m-5$
\end{itemize}
In all cases the number of blanks is $2m-5$, as claimed.\qed

\begin{figure}
	\begin{center}
		\includegraphics{graphics/alteredel-1.mps}
		\vskip 1cm
		\includegraphics{graphics/alteredel-2.mps}
		\includegraphics{graphics/alteredel-3.mps}
		\includegraphics{graphics/alteredel-4.mps}
	\end{center}
	\caption{\label{fig:holes-convex-triangles}
		\small
		\textbf{Top:} Hexagonal toppings in a triangle cake.
		\\
		\textbf{Bottom:} 3 or 4 or 5 toppings in the inner part of the cake, depending on $m ~\mathrm{mod}~ 3$.
	}
\end{figure}

\subsection{Upper bound}
For the upper bound we first prove a theorem for an unbounded cake.
\begin{theorem}
\label{thm:nonconvex holes}
Let $Z_1,\ldots,Z_m$, with $m\geq 3$, be pairwise-interior-disjoint convex figures in the plane. Define a \emph{hole} as a component of $\mathbb{R}^2\setminus \cup_{i=1}^m Z_i$. Then there are at most $2m-4$ holes. This bound is tight.
\end{theorem}
\begin{proof}
Define a graph $G(V,E)$ where the
vertices are the $m$ toppings and
there is an edge between each two toppings whose boundaries meet. Since the toppings are convex, every two toppings meet at most once (in a single point or segment), so $G$ is planar and simple.
Each hole is a face of $G$. Therefore, it is sufficient to prove that $|F|\leq 2|V|-4$, where $F$ is the set of faces of the graph.

We can assume w.l.o.g. that $G$ is connected; otherwise we can just add edges between connected components of $G$, since this does not change $V$ or $F$.
Therefore, by Euler's formula:  $|V|-|E|+|F|=2$.
Every edge touches at most 2 faces. Every interior face touches at least 3 edges. In a connected planar graph with at least 3 vertices, the exterior face too touches at least 3 edges. Therefore: $2 |E| \geq 3|F|$. Substituting in Euler's formula gives the result.

Tightness is proved by the same example of the previous subsection, adding 1 for the unbounded region outside the cake.
 \end{proof}
We now return to proving the upper bound in Theorem \ref{thm:convex case}. First, we expand the toppings inside the cake $C$ by the following procedure. Pick an arbitrary topping, say $Z_1$.
Among all convex figures in $C$ containing $Z_1$ and not overlapping any other topping, choose one that is inclusion-maximal.\footnote{The existence of such maximal element can be proved based on the Kuratowski--Zorn lemma. The proof is straightforward and we omit it. See Lemma 3.3 in \cite{Mohammadi2017Reconstruction}.} Replace $Z_1$ with this maximal element. Repeat the procedure for the remaining toppings.
\iffalse
\begin{proof}[Proof of part (a)]
A maximal arrangement can be found by the following procedure.

Pick an arbitrary topping, say $Z_1$.
Let $C_1$ be the cake outside the other toppings, $C_1 := C\setminus \operatorname{int}(\bigcup_{i > 1} Z_i)$. Let $Y_1$ be the set of potential expansions of $Z_1$, i.e:
\begin{align*}
Y_1 := \{
X|
X \text{~is convex and~}
Z_1 \subseteq X \subseteq C_1
\}
\end{align*}
$Y_1$ is partially ordered by inclusion. We now prove that it has a maximal element.\footnote{The following proof is an adaptation of the proof of Lemma 3.3 in \cite{Mohammadi2017Reconstruction}.} The proof is based on the Kuratowski--Zorn lemma.  To use this lemma we have to prove that every chain in $Y_1$ has an upper bound in $Y_1$. Indeed, let $Y'_1 \subseteq Y_1$ be a chain. Let $\widehat{Y'_1}$ be the union of all sets in $Y'_1$.  Then $\widehat{Y'_1}$ is an upper bound on $Y'_1$. It is contained in $Y_1$ because:
\begin{itemize}
\item $Z_1 \subseteq \widehat{Y'_1} \subseteq C_1$ --- since all sets in $Y_1$ contain $Z_1$ and are contained in $C_1$.
\item $\widehat{Y'_1}$ is convex --- since for every two points in $\widehat{Y'_1}$, there exists a set in the chain $Y'_1$ that contains both of them. This set also contains the segment between them, so $\widehat{Y'_1}$ also contains this segment.
\end{itemize}
Replace $Z_1$ with a maximal element in $Y_1$ and repeat for the remaining toppings.
\end{proof}
\fi

This procedure results in a \emph{maximal arrangement} --- an arrangement where no topping can be expanded further while remaining convex and disjoint from the others. Pinchasi \cite[Claim 2]{Pinchasi2015Perimeter} proved that, in an maximal arrangement, every hole inside the cake is a convex polygon and does not have a common boundary with the cake.\footnote{
This fact can also be proved by the arguments we use in Subsection \ref{sub:rect-upper-a}.
}

By Theorem \ref{thm:nonconvex holes}, the total number of holes inside the cake, plus the
entire unbounded region outside the cake, is at most $2m-4$. Therefore, the total number of bounded holes inside the cake is at most $2m-5$. Since each hole is convex, we can make each hole a single blank piece in the final partition, and get  $b\leq 2m-5$ as claimed.  \qed

\section{Rectangular Cake and Rectangular Pieces}
\label{sec:rect}
In this section, the cake and each of the $m$ toppings is an axes-parallel rectangle.
\begin{theorem}
\label{thm:boxes}
Let $C$ (``cake'') be an axes-parallel rectangle and $Z_1, \dots,Z_m$ (``toppings'') be pairwise-disjoint axes-parallel rectangles in $C$.
There exists a partition of $C$ into $m+b$ axes-parallel rectangles, $C=Z'_1 \sqcup \cdots \sqcup Z'_{m+b}$,
where $Z_i\subseteq Z'_i$ for all $i\leq m$, and $b\leq m-\doubleroot{m}$.
Moreover, for every $m$ there exists an arrangement where in all partitions $b = m-\doubleroot{m}$.
\end{theorem}

In the proofs below we will use the following property of the function $\lceil{2\sqrt{m}-1}\rceil$:
\footnote{We are grateful to an anonymous referee for suggesting the form $\lceil{2\sqrt{m}-1}\rceil$ for this function.}
\[
\lceil{2\sqrt{m}-1}\rceil=
\begin{cases}
	2k & 	k^2<m\leq k^2+k\\
	2k+1& 	k^2+k<m\leq (k+1)^2
\end{cases}.
\]

\subsection{Lower bound}\label{sub:rect-lower}
\begin{figure}
\begin{center}
\includegraphics{graphics/fig-top-3.mps} \hskip 1cm
\includegraphics{graphics/fig-top-4.mps} \hskip 1cm
\includegraphics[width=4cm]{graphics/rect-11.mps}
\end{center}
\caption{\label{fig:holes-rect-worst}
\textbf{Left:} a tiling of the plane by squares.
\\
\textbf{Middle:} a modification of the tiling where near each vertex there is a blank.
\\
\textbf{Right:} an arrangement contained in a rectangular cake. There are $m=16$ toppings and $m-\doubleroot{m}=9$ blanks.
}
\end{figure}
Consider the tiling in Figure \ref{fig:holes-rect-worst}/Left. Here, four squares meet near each vertex. By moving them slightly, we get the arrangement in Figure \ref{fig:holes-rect-worst}/Middle, where near each vertex there is a square blank. Each blank touches four squares and each square touches four blanks. Hence, the number of squares and blanks is asymptotically the same.

When the tiling is finite, there are boundary conditions. Suppose the cake is a square and it is tiled by $m=(k+1)^2$ smaller squares in a grid of $k+1$ times $k+1$. Then, the number of inner vertices, that can be converted to blanks, is $k^2 = m - (2k + 1) = m-\doubleroot{m}$. See Figure \ref{fig:holes-rect-worst}/Right.

When $m$ is not a square number, e.g. $m=k^2+t$ for some $t>0$, the lower bound can be constructed by gluing $k$ squares at the right and then $k+1$ squares at the top of a $k\times k$ tiling. Every glued square adds a $4$-vertex that can be converted to a blank, except the first one at the right and the first one at the top. These are exactly the points where the function $\doubleroot{m}$ increases by 1. Therefore the number of blanks always remains $m-\doubleroot{m}$. \qed

\subsection{Upper bound part A: All holes are internal axes-parallel rectangles}\label{sub:rect-upper-a}
We first expand the toppings as follows. For the topping $Z_1$ consider a rectangle $Z_1'$ with maximal area among all axis-parallel rectangles contained in $C$, containing $Z_1$ and avoiding all other toppings. Substitute $Z_1$ by $Z_1'$. Repeat for the remaining toppings.
\begin{figure}
\begin{center}
	\includegraphics{graphics/rect-7.mps}
\caption{\label{fig:holes-rect}A rectangular cake $C$, rectangular toppings $Z_j$, and a hole $H$. Note the configuration is not maximal.}
\end{center}
\end{figure}

We now have a maximal arrangement of toppings.
Again we define a \emph{hole} as a connected component of $C\setminus \cup_{i=1}^m Z_i$.
It is clear that in a maximal arrangement every hole is simply-connected, since a hole that is not simply-connected contains a topping which can be expanded. We will now prove that in any maximal arrangement, every hole is an axes-parallel rectangle and is not adjacent to the cake boundary.
We need several definitions regarding a hole $H$ (the examples refer to Figure \ref{fig:holes-rect}):
\begin{definition}
\label{def:vertex}
A \emph{hole-vertex} of $H$ is a point on the boundary of $H$ that is a vertex of a topping or of the cake. A hole-vertex is called:
\begin{itemize}
\item \emph{convex} --- if the internal angle adjacent to it is less than $180^\circ$ (i.e, $90^\circ$; like $A_2,A_3, B_1,B_2$);
\item \emph{nonconvex} --- if the internal angle adjacent to it is at least $180^\circ$ (like. $A_4, A_1$).
\end{itemize}
\end{definition}

\begin{definition}
\label{def:edge}
An \emph{hole-edge} of $H$ is a line-segment between adjacent hole-vertices of $H$. A hole-edge is called:
\begin{itemize}
\item \emph{inner-edge} --- if it is contained in the interior of $C$;
\item \emph{boundary-edge} --- if it is contained in the boundary of $C$.
\end{itemize}
\end{definition}

\begin{definition}
A hole-vertex is called:
\begin{itemize}
\item \emph{inner-vertex} --- if it is contained in the interior of $C$ (links two inner-edges; like $A_i$);
\item \emph{boundary-vertex} --- if it is
on the boundary of $C$ (touches a boundary-edge; like $B_i$).
\end{itemize}
\end{definition}
\begin{definition}
A hole is called:
\begin{itemize}
\item \emph{inner-hole} --- if it is contained in the interior of $C$ (so it has only inner-edges);
\item \emph{boundary-hole} --- if it has a common boundary with $C$ (so it has some boundary-edges).
\end{itemize}
\end{definition}

Any inner-edge $e$ of a hole $H$ represents an opportunity to expand some topping into $H$. Such opportunity can only be blocked by an adjacent topping with an edge $e'$ perpendicular to $e$. Let $v$ be the vertex that connects $e$ and $e'$. We call $v$ a \textbf{blocking-vertex} of $e$. For example, $A_3$ is a blocking-vertex of the edge $A_3 A_4$. It is easy to see that, if $v$ is a blocking-vertex of $e$:
\begin{itemize}
\item $v$ is a convex vertex --- it connects two perpendicular edges of different toppings.
\item $v$ is an inner vertex --- it connects  two edges of toppings.
\item $v$ blocks only $e$ --- it cannot simultaneously block $e'$.
\end{itemize}
In a maximal arrangement, each inner-edge must have at least one blocking-vertex. Therefore:
\begin{align}
\label{eq:every-hole}
\text{
For every hole $H$:
\#inner-convex-vertices$(H)$ $\geq$ \#inner-edges$(H)$
}
\end{align}
We now consider inner-holes and boundary-holes separately.

An \emph{inner hole} has only inner-vertices and inner-edges, and their number must be equal, so:
\begin{align}
\label{eq:inner-hole}
\text{
  For every inner-hole $H$:~~~
 \#inner-edges$(H)$ $=$ \#inner-vertices$(H)$
}
\end{align}
Combining (\ref{eq:every-hole}) and (\ref{eq:inner-hole}) implies that, in an inner-hole, all vertices are convex, so:
\begin{align}
\label{eq:inner-hole-rectangle}
\text{
Every inner-hole is a rectangle.
}
\end{align}

A \emph{boundary-hole}'s boundary contains sequences of adjacent boundary-edges and  sequences of adjacent inner-edges. Each boundary sequence contains an alternating sequence of boundary-vertex --- boundary-edge --- boundary-vertex --- boundary-edge --- ... boundary-vertex.  So:
\begin{align}
\label{eq:boundary-hole}
\text{
For every boundary-hole $H$:~~~
\#boundary-vertices$(H)$ $\geq$
\#boundary-edges$(H) + 1$
}
\end{align}
Summing (\ref{eq:every-hole}) and (\ref{eq:boundary-hole}) gives:
\begin{align*}
\text{
For every boundary-hole $H$:~~~
\#vertices$(H)$ $\geq$ \#edges$(H) + 1$
}
\end{align*}
But this is impossible, since in every hole the total number of vertices and edges must be equal. Therefore:
\begin{align}
\label{eq:no-boundary-hole}
\text{
There are no boundary holes.
}
\end{align}
(\ref{eq:inner-hole-rectangle}) and  (\ref{eq:no-boundary-hole}) imply that, in a maximal arrangement, all holes look like Figure \ref{fig:holes-rect-worst}: each hole is a rectangle adjacent to four toppings.

\subsection{Upper bound part B: Counting the holes} \label{sub:rect-upper-b}
Our upper bound matches the lower bound of Subsection \ref{sub:rect-lower}: $m-\doubleroot{m}$.
The bound relies on the following lemmas:

\begin{lemma}
\label{lem:k1k2}
For all positive integers $k_1$, $k_2$, $t$:
\begin{equation*}
	(k_1-1)(k_2-1) - t
	\leq
	k_1 k_2 - t - \doubleroot{k_1 k_2 - t}.
\end{equation*}
\end{lemma}
\begin{proof}
First, we prove the inequality for $t=0$.
It is sufficient to show that $\doubleroot{k_1 k_2}\leq k_1+k_2-1$.
Indeed, for a fixed sum $k_1+k_2$, the product $k_1 k_2$ is maximized when $k_1=k_2$ or when $k_1+1=k_2$.
In the former case  $\doubleroot{k_1 k_2}=2k_1-1$, in the latter case $\doubleroot{k_1 k_2}=\lceil 2 \sqrt{k_1^2+k_1}\rceil - 1 = (2 k_1+1)-1 = 2k_1$. In both cases
the inequality holds with equality.

For $t>0$, the difference (RHS minus LHS) is even larger, so the inequality remains true.
\end{proof}

Suppose a rectangle is partitioned into $m$ smaller rectangles (with no holes). Define a \emph{$3$-vertex} as a point in which three rectangles meet and a \emph{$4$-vertex} as a point in which four rectangles meet.
\begin{lemma}
\label{lem:toy model}
Suppose a rectangular cake $C$ is partitioned into $m$ rectangles. Then, the number of $4$-vertices is at most $m-\doubleroot{m}$.
\end{lemma}
\begin{figure}
	\begin{center}
		\includegraphics{graphics/rect-5.mps}
	\end{center}
	\caption{\label{fig:toy-rect}
		Bounding the number of $4$-vertices in a rectangle tiling.
	}
\end{figure}
\begin{proof}
First, suppose that there are only $4$-vertices (no $3$-vertices). Then $C$ is partitioned, by the lines containing all sides of all rectangles, to a grid of $k_1$ by $k_2$ smaller rectangles. So the total number of $4$-vertices is $(k_1-1)(k_2-1)$ and the total number of rectangles is $m=k_1 k_2$. Then the lemma follows from Lemma \ref{lem:k1k2} setting $t=0$.

Next, suppose that there are 3-vertices (refer to Figure \ref{fig:toy-rect} for the examples).
Choose one $3$-vertex (e.g. $A_1$).
Add a segment that separates the rectangle that does not have vertex at $v$ to two parts (e.g. the segment $A_1 A_2$).
This converts the $3$-vertex to $4$-vertex.
Additionally, there are several cases depending on where the other end of the additional segment lands:

(a) If it lands on the boundary of $C$ (like with $D_1 D_2$ and $C_2 C_1$), then no further action is required; the number of rectangles grows by $1$ and the number of $4$-vertices grows by $1$.

(b) If it lands on the boundary of another rectangle (like with $A_1 A_2$), then a new $3$-vertex is created, and can be handled in the same way by continuing the segment. This must stop because eventually the line hits the boundary of $C$.

(c) If it lands on a $3$-vertex (like with $B_1 B_2$), then an additional $4$-vertex is created; the number of rectangles grows by $1$ and the number of $4$-vertices grows by $2$.

In all cases, the number of $4$-vertices grows at least as much as the number of rectangles.

Continue this procedure until all $3$-vertices disappear. Then, the partition is a grid formed by the lines containing the sides of the all original rectangles. Suppose the grid has $k_1\times k_2$ rectangles (e.g. in Figure \ref{fig:toy-rect}, $k_1=3$ and $k_2=4$). So, the total number of rectangles is $k_1 k_2$ and the total number of $4$-vertices is $(k_1-1)(k_2-1)$.
Suppose we had $t$ removal steps. So, the original number of $4$-vertices was at most $(k_1-1)(k_2-1)-t$ and the original number of rectangles $m$ was exactly $k_1 k_2-t$. From Lemma \ref{lem:k1k2} it follows that the number of original $4$-vertices is at most $m- \doubleroot{m}$.
\end{proof}

\begin{figure}
	\begin{center}
\includegraphics		{graphics/rect-1.mps}\\
\includegraphics		{graphics/rect-2.mps}
	\end{center}
	\caption{\label{fig:contracting_holes}
\textbf{Top:} An arrangement with $5$ holes.
\textbf{Bottom:} One of the holes is contracted vertically. The other rectangles and holes change their size but remain in the picture.
}
\end{figure}
We now return to the proof of Theorem \ref{thm:boxes}.
Recall from Subsection \ref{sub:rect-upper-a} that we have a maximal arrangement of toppings, where each hole is a rectangle bounded by four toppings. Each of these toppings is blocked from expanding into the hole, either by the next topping counter-clockwise
(as in Figure \ref{fig:holes-rect-worst}) or by the next topping clockwise.
Our goal is to show that the total number of such holes is at most $m-\doubleroot{m}$.
We will remove the holes one by one, by contracting each hole to a 4-vertex without changing the number of toppings.

Each hole is contracted in two steps: \emph{vertical} and \emph{horizontal}.
The vertical contraction is illustrated in Figure \ref{fig:contracting_holes}. Consider the hole $[x_1,x_2]\times[y_1,y_2]$. There are two cases regarding the toppings surrounding the hole: either the top has a side at $x=x_1$ and the bottom has a side at $x=x_2$ (in the clockwise case), or vice versa (in the counter-clockwise case). These cases are entirely analogous. We assume the former case, as in Figure \ref{fig:contracting_holes}/Top.

Let $y_0$ be the bottom coordinate of the topping below the hole. Transform the arrangement of rectangles in the following way. Every point $(x,y)$, where $x>x_2$ and $y\in[y_0,y_2]$, is transformed to $(x,y')$, where:
\begin{align*}
y' := y_0 + \frac{y_1-y_0}{y_2-y_0}\cdot (y-y_0),
\end{align*}
so the ray $(x>x_2, y=y_2)$ goes to $(x>x_2, y=y_1)$ and the ray $(x>x_2, y=y_0)$ remains in its place.
Now, the rectangle on top of the hole can be extended down, so that it covers the hole (see \ref{fig:contracting_holes}/Bottom).

The horizontal contraction is very similar. Let $x_0$ be the left coordinate of the rectangle to the left of the hole. Every point $(x,y)$, where $y<y_1$ and $x\in[x_0,x_2]$, is transformed to $(x',y)$, where:
\begin{align*}
x' := x_0 + \frac{x_1-x_0}{x_2-x_0}\cdot (x-x_0),
\end{align*}
so the ray $(y<y_1, x=x_2)$ goes to $(y<y_1, x=x_1)$ and the ray $(y<y_1, x=x_0)$ remains in its place. Now, instead of the hole, there is a single $4$-vertex at the point $(x_1,y_1)$.

The shrinking does not change the combinatorics of the arrangement: the number of toppings does not change, and no new holes are created.

After all holes are contracted, the situation is as in Lemma \ref{lem:toy model}, where the number of $4$-vertices is upper-bounded. Therefore, the number of holes in the original configuration is upper-bounded by the same expression. \qed

\subsection{Number of holes without expanding}
For completeness, we formulate the analogue of Theorem~\ref{thm:nonconvex holes} for axis-parallel rectangles.

\begin{theorem}
	\label{thm:nonrectangular holes}
Let $Z_1,\ldots,Z_m$, with $m\geq 3$, be pairwise-interior-disjoint axes-parallel rectangles in the plane. Define a \emph{hole} as a connected component of $\mathbb{R}^2\setminus \cup_{i=1}^m Z_i$. Then there are at most $m-2$ holes. This bound is tight.
\end{theorem}

\begin{proof}
The proof of the upper bound is similar to Theorem~\ref{thm:nonconvex holes}; the only difference is that here, every face of the planar graph touches at least \emph{four} edges (instead of three). Therefore, we have $2|E|\geq 4|F|$ (instead of $2|E|\geq 3|F|$). Substituting this in Euler's formula $|V|-|E|+|F|=2$ gives that $|F|\leq |V|-2$, so the number of holes is at most  $m-2$ as claimed.

An example giving the lower bound is shown on Figure~\ref{fig:many holes}.
Four of the rectangles form a long box and all others are placed between them forming holes.
\end{proof}

\begin{figure}
	\begin{center}
\includegraphics		{graphics/rect-12.mps}\\
	\end{center}
	\caption{\label{fig:many holes}
	The example of arrangement of $m=9$ rectangles with $m-2=7$ holes (including the outer hole).
}
\end{figure}

\section{Rectilinear-polygonal cake and rectangular pieces}
In this section, the toppings are still axes-parallel rectangles, but now the cake $C$ can be any simply-connected axes-parallel rectilinear polygon. The ``complexity'' of a rectilinear polygon is characterized by the number of its \emph{reflex vertices} --- vertices with internal angle $270^\circ$. It is known that a rectilinear polygon with $T$ reflex vertices can always be partitioned to at most $T+1$ rectangles \cite{Keil2000Polygon,Eppstein2010GraphTheoretic}, and this bound is tight when the vertices of $C$ are in general position. Since our goal is to bound the number of blank rectangles --- it is  expected that the bound should depend on $T$, in addition to $m$ (the number of toppings).

\begin{theorem}
	\label{thm:boxes and polygonal cake}
Let $C$ (``cake'') be a simply-connected axes-parallel polygon with $T$ reflex vertices,
and $Z_1, \dots,Z_m$ (``toppings'') be pairwise-disjoint axes-parallel rectangles in $C$.
There exists a partition of $C$ into $m+b$ axes-parallel rectangles, $C=Z'_1 \sqcup \cdots \sqcup Z'_{m+b}$,
where $Z_i\subseteq Z'_i$ for all $i\leq m$, and $b\leq m+T-\doubleroot{m}$.
Moreover, for every $m$ and $T$ there exists an arrangement where in every such partition, $b = m+T-\doubleroot{m}$.
\end{theorem}

\subsection{Lower bound}
\begin{figure}
\includegraphics{graphics/rect-10.mps}
\caption{\label{fig:holes-rectilinear-worst}
A rectilinear cake made of a union of a rectangle and a rectilinear ``staircase'' with $T=4$ steps. The rectangle part contains a maximal arrangement of $m=16$ toppings and $m-\doubleroot{m}=9$ blanks. The rectilinear part adds $T$ reflex vertices (circled) and $T$ rectangular blanks.
}
\end{figure}
Take a worst-case arrangement of rectangular toppings in a rectangular cake, such as the one shown in Figure \ref{fig:holes-rect-worst}/Right.
For any $T\geq 1$, it is possible to convert the rectangular cake to a rectilinear polygon with $T$ reflex vertices by adding a narrow rectilinear ``staircase'' with $T$ ``steps'', as shown in Figure \ref{fig:holes-rectilinear-worst}.

The number of blanks in the rectangle is $m-\doubleroot{m}$.
The additional rectilinear part is a single \emph{hole}, but it contains $T$ \emph{blanks} (its rectangular components). All in all, we need $m+T-\doubleroot{m}$ blanks.
\subsection{Upper bound}
\begin{figure}
\begin{center}
\includegraphics{graphics/rect-6.mps}
\end{center}
\caption{\label{fig:holes-rectilinear}A rectilinear cake with six rectangular topping $Z_1, \dots, Z_6$, and three rectilinear holes $H_1$, $\dots$, $H_3$.
Note the configuration is not maximal since $Z_6$ can be extended upwards into $H_3$.
The dashed lines inside the holes indicate a possible partitioning of the holes to eight rectangular blanks.}
\end{figure}
We first expand the arrangement to a maximal arrangement of toppings as in Subsection \ref{sub:rect-upper-a}.

In the case of a rectangle cake, we proved that all holes are inner-holes and rectangular. This is no longer true here: Figure \ref{fig:holes-rectilinear} shows that we can have boundary-holes that are not rectangular.
\iffalse
\footnote{
\label{ftn:terms}
\textbf{Note on terminology}: we distinguish between ``blanks'' and ``holes''. Both are connected parts of $C$ that are not contained in any topping (i.e, they are subsets of $C\setminus\cup_{i=1}^m Z_i$). A \emph{blank} satisfies the relevant geometric constraint (convexity or rectangularity) while a \emph{hole} does not necessarily satisfy it. It is easy to imagine arrangements of convex/rectangular toppings where the holes are not convex/rectangular. However, our results for cases 2 and 3 prove that, when the arrangement toppings is \emph{maximal} (i.e, when the toppings are expanded until they can expand no further), all remaining holes satisfy the geometric constraint, i.e, each hole is a single blank. This is not so in case 4: there, the holes may be non-rectangular, so each hole might have to be partitioned to several rectangular blanks.
}
\fi
It \emph{is} still true that in a maximal arrangement every hole is simply-connected, since a hole that is not simply-connected contains a topping which can be expanded.

Moreover, it is still true that every inner-edge must be blocked by a hole-edge perpendicular to it, and the blocking vertex must be a convex-vertex. However, now the blocking-vertex can be either an inner-convex-vertex, or a boundary-vertex that is a reflex-vertex of $C$ (like $B_1$ in Figure \ref{fig:holes-rectilinear}). We call such vertex \emph{connection-reflex-$C$-vertex} since it connects an inner-edge and a boundary-edge.
So now, for every hole $H$:

\begin{align}
\label{eq:every-hole-2}
\text{
\#connection-reflex-$C$-vertices$(H)$
+
\#inner-convex-vertices$(H)$
 $\geq$
  \#inner-edges$(H)$
}
\end{align}
In an inner-hole there are only inner-vertices. Therefore, conclusion (\ref{eq:inner-hole-rectangle}) is still true --- every inner-hole is a rectangle.

In a boundary-hole, inequality (\ref{eq:boundary-hole}) is still true, since in each sequence of adjacent boundary-edges, there is a vertex for each edge plus one additional vertex:
\begin{align}
\tag{\ref{eq:boundary-hole}}
\text{
For every boundary-hole $H$:
\#boundary-vertices$(H)$ $\geq$
\#boundary-edges$(H) + 1$
}
\end{align}

Summing (\ref{eq:every-hole-2}) and (\ref{eq:boundary-hole}) gives:
\begin{align}
\label{eq:boundary-hole-3}
\text{
\#connection-reflex-$C$-vertices$(H)$
$+$
\#vertices$(H)$
$-$
\#inner-nonconvex-vertices$(H)$
}
\\
\notag
\text{
 $\geq$ \#edges$(H)+1$
}
\end{align}

Now, in every hole, \#edges$(H)=$\#vertices$(H)$. Combining this with (\ref{eq:boundary-hole-3}) gives:
\begin{align}
\label{eq:reflex-vertices}
\text{
\#inner-nonconvex-vertices$(H)$
$+1$
$\leq$
\#connection-reflex-$C$-vertices$(H)$
}
\end{align}
In addition, the boundary of $H$ contains some boundary-reflex-vertices, all of which are reflex-vertices of $C$ that are not connection-vertices:
\begin{align}
\text{
\#boundary-reflex-hole-vertices$(H)$
$=$
\#boundary-reflex-$C$-vertices$(H)$
}
\end{align}
Adding the latter two inequalities gives, for every boundary-hole $H$:
\begin{align}
\label{eq:reflex-vertices-total}
\text{
\#reflex-hole-vertices$(H)$
$+1$
$\leq$
\#reflex-$C$-vertices$(H)$
}
\end{align}

A rectilinear polygon with $x$ reflex vertices can always be partitioned to at most $x+1$ rectangles \cite{Keil2000Polygon,Eppstein2010GraphTheoretic}. Therefore, each boundary-hole $H$ can be partitioned into rectangles whose number is at most the number of reflex-cake-vertices in the boundary of $H$.
Moreover, every reflex-cake-vertex is a vertex of at most one boundary-hole. Therefore, summing over all boundary-holes gives that all boundary-holes can be partitioned into rectangles whose total number is at most $T$ --- the number of reflex-vertices of $C$.

Adding the (at most) $m-\doubleroot{m}$ rectangular inner-holes gives that the total number of rectangular blanks is at most: $T+m-\doubleroot{m}$. \qed

\section{Counter-examples and Open Questions}
\label{sec:conclusion}
We considered three families of pieces: polygons, convex figures, and axes-parallel rectangles. For each of these families, we proved that: (a) any arrangement of toppings in the family can be expanded to a maximal arrangement, and (b) the number of blanks in any maximal arrangement is bounded.
These two facts are not necessarily true for other families. We provide several examples below.\footnote{These examples are based on suggestions by anonymous referees.}

\iffalse
We studied partition problems with geometric constraints on the pieces. The geometric constraints are represented by some set-family $\mathcal{S}$ such that all toppings in the initial arrangement are in $\mathcal{S}$ and all pieces in the final partition must be in $\mathcal{S}$. We studied the three cases where $\mathcal{S}$ is
\fi

\subsection{Rectangles with constrained lengths}
Suppose that all pieces must be axes-parallel rectangles whose lengths are irrational numbers, while the cake is the unit square. Then, even a single topping cannot be expanded to a maximal arrangement. However, it may still be possible to find a partition with a bounded number of blanks. For example, with a single topping it is sufficient to add 3 blanks. We did not calculate how many blanks may be needed in general.
\iffalse
Suppose that all pieces must be axes-parallel rectangles whose lengths have a finite decimal representation that ends with $1$. The cake is the unit square. Then, even a single topping cannot be expanded to a maximal arrangement --- any expansion can be expanded further. However, it may still be possible to find a partition with a bounded number of blanks. For example, with a single topping it is sufficient to add 18 blanks --- e.g, 9 on the right and 9 on the top. We do not know how many blanks may be needed in general.
\fi
\subsection{Path-connected sets}

\begin{figure}
	\begin{center}
		\includegraphics{graphics/spiral-2.mps}
	\end{center}

	\caption{
		\label{fig:spirals}
A rectangular cake with
two simply-connected toppings. The circular blanks cannot be attached to any topping without crossing the other one. Therefore there is an unbounded number of blanks (4 of them are shown).
}
\end{figure}

Suppose that all pieces must be path-connected. This very natural constraint is not as simple as it seems: the number of blanks in a maximal arrangement might be unbounded.
An example is shown in Figure~\ref{fig:spirals}. The cake is a rectangle. There are two toppings; they are not only path-connected but also simply-connected.  There are four circular blanks which cannot be attached to any topping, since any path from a blank to a topping must cross the other topping. Therefore the arrangement is maximal.
It is straightforward to extend this example to contain any number of blanks.

If the pieces are required to be connected but not path-connected, then the discs \emph{can} be attached to any of the toppings, so in a maximal expansion of this example there are no blanks. We do not know if this is always the case when the cake and pieces are connected.

\subsection{Closed path-connected sets}
\iffalse
\begin{figure}
\begin{center}
		\includegraphics[height=5cm]{graphics.old/topologists-sine.png}
\end{center}
	\caption{
		\label{fig:topologists-sine}
A closed path-connected cake with two closed path-connected toppings (two halves of the dashed interval at the top-left).
There is no maximal expansion where the pieces are both path-connected and closed.
}
\end{figure}
\fi
One way to overcome the problem in the previous section is to require that the toppings and pieces be topologically closed, in addition to being path-connected. However, in this case a maximal arrangement might not exist.

For example, suppose the cake is a union of:
\begin{enumerate}
\item the curve $(x,\sin(1/x))$ for $x\in(0,1]$,
\item the segment $[(0,-1),(0,1)]$, and --
\item an additional curve connecting the origin and the point $(1, \sin(1))$.
\end{enumerate}
This cake is closed and path-connected.
The two toppings are any two points on curve (3). They too are closed and path-connected.
But there is no maximal expansion to pieces that are closed and path-connected: if an expanded piece intersects both curve (1) and segment (2) then it is not path-connected, and if a piece contains only curve (1) then it is not closed.

\subsection{Optimality of the greedy algorithm}

\begin{figure}
	\begin{center}
\includegraphics{graphics/rect-8.mps}
	\end{center}
\caption{
\label{fig:not_optimal}
	A configuration of toppings that can be extended in two ways: optimal ($Z_4$ leftwards) and sub-optimal ($Z_4$ downwards).
}
\end{figure}

Suppose we are given a cake with $m$ toppings and we want to expand the toppings such that the number of blanks is as small as possible. Suppose we use the following greedy algorithm:
\begin{framed}
Find a maximal expansion of each topping in turn, in an arbitrary order.
\end{framed}
The results in this paper imply that, in the four cases studied, the number of blanks attained by this greedy algorithm is upper-bounded by some function of $m$. However, our results do \emph{not} imply that the number of blanks is minimal:
in specific cases it may possible to extend the toppings in a way that attains a smaller number of blanks --- less than the worst-case minimum. For example, in Figure \ref{fig:not_optimal}, if~$Z_4$ is extended downwards, then we get one blank, which is the worst-case minimum for $m=4$ toppings. However, if $Z_4$ is extended leftwards, then we can get zero blanks.

This opens an interesting algorithmic question: given a specific arrangement of toppings, how can we find an expansion with a minimum number of blanks?
A related natural question is how to minimize, instead of the number of blanks, their total perimeter or area.

\subsection{Restricted toppings}
This paper only considered cases where the geometric constraint on the initial toppings is the same as on the final pieces. But when the geometric constraints on the toppings are stricter, the upper bound might be lower.

For example, suppose the toppings must be points. Then, in both the convex case and the rectangular case the upper bound is $b=0$. In the  convex case we can take the Voronoi tesseletion (it works for disks as well; in this case we get weighted Voronoi). In the rectangular case, we can just separate the points by vertical lines, and if two points have same x-coordinate, separate them by horizontal lines.

\section*{Acknowledgements}
This paper started as a question in the Math Overflow website \cite{mathoverflow2016partition}.
Also participated in the discussion:  Steven Stadnicki,  Fedor Petrov and  Mikhail Ostrovskii.
We are grateful to Reuven Cohen, David Peleg, Herbert Edelsbrunner, Rom Pinchasi, Ashkan Mohammadi, Jorge Fernandez and N. Bach for discussions about the problem studied in this paper.

We would like to thank three anonymous referees for careful reading of the paper and several useful suggestions which significantly improved the readability and correctness of the paper.

A. A. is supported by People Programme (Marie Curie Actions) of the European Union's Seventh Framework Programme (FP7/2007-2013) under REA grant agreement n$^\circ$[291734].

E. S.-H. was supported by the Doctoral Fellowships of Excellence at Bar-Ilan University, the Mordecai and Monique Katz Graduate Fellowship Program at Bar-Ilan University, and ISF grant 1083/13.

\bibliographystyle{abbrv}

Computational Geometry (cs.CG); Metric Geometry (math.MG)