Commit c7a62181 authored by Michael Keller's avatar Michael Keller
Browse files

LP opt sol int proof

parent ed10936c
......@@ -45,7 +45,8 @@ If we allowed swapping between neighboring pixels this would
indeed be tricky. If instead we restrict ourselves to only
swapping between non-neighboring pixels however, then the score
function changes only linearly and we can use linear programming
to find the optimal swap.
to find the optimal swap. Let the following linear program
be defined as the swap LP.
Concretely, we setup the following linear program. Let $P$
be a set of $n$ non-neighboring pixels. Every pixel
......@@ -77,16 +78,14 @@ there:
& &
c_{i, j} = \text{Score change for planting } 1 \text{ of crop } j \text{ in pixel } i
\end{align*}
Then we are trying to maximize the function:
\begin{displaymath}
\text{maximize } c^T x
\end{displaymath}
Then we are trying to maximize the function $c^T x$
subject to the constraints that:
\begin{enumerate}
\item We don't allow less than $0$ or more than $1$ of each crop to
be planted in a pixel
\item Every Pixel must contain a total amount of crops equaling $1$
\item The amount of each crop we are redistributing must stay the same
\item The amount of each crop in $x$ before the swap and
in $x^*$ after the swap must be the same
\end{enumerate}
or formally, a solution $x^*$ must satisfy:
\begin{align*}
......@@ -97,22 +96,32 @@ or formally, a solution $x^*$ must satisfy:
In theory an optimal solution to this linear program
could result in fractional amounts of crop being
planted in a pixel. However, the following theorem
planted in a pixel. However, the following theorems
demonstrates that there is always an optimal integer solution.
First we will show the specific case of swapping
$k$ different crops among $k$ non-neighboring pixels,
then we will generalize the statement to $m$ different
crops amount $k$ different pixels.
Let $\F$ denote all valid integer solutions to the
LP above, or formally:
\begin{displaymath}
\F := \{f \ | \ f \in \Z^{n \cdot C} \land f \text{ denotes a valid field}\}
\end{displaymath}
\begin{theorem}
The linear program for finding the optimal swap
between non neighboring pixels (described above)
always has an optimal integer solution.
\label{kByKOptSwap}
If $x \in \F$, then the solution $x^*$
to the swap LP for $k$ pixels swapping $k$
different crops is also in $\F$.
\end{theorem}
\begin{proof}
The essence of our proof is that we first show
that when we remap $k$ crops between $k$ pixels
there must exist an integer solution, because
then we are in a Birkhoff polytope. Then we will
generalize the $k$ crop to $k$ pixels remapping
to a $m$ crop to $k$ pixels remapping.
there must exist an optimal integer solution, because
then we are in a Birkhoff polytope.
Consider the case where we select $k$ non-neighboring
pixels that all contain a different crop. Then we ask
......@@ -141,13 +150,76 @@ demonstrates that there is always an optimal integer solution.
solution will be at a vertex. Because there is an
optimal solution at a vertex we know to be integer,
we know there must be an optimal integer solution.
\end{proof}
Next we use this theorem to prove that the LP
for swapping any number of crops types among
non-neighboring pixels must result in an integer
solution.
\begin{theorem}
If $x \in \F$, then the solution $x^*$
to the swap LP is also in $\F$.
\end{theorem}
\begin{proof}
We will formulate a swap LP' that must have
an optimal integer solution $x^* \in \F$ and demonstrate
that $x^*$ can also be translated into an optimal
integer solution for our swap LP.
We want to use theorem \ref{kByKOptSwap} to show
that the swap LP' we are going to construct
has an optimal integer solution. Therefore we need
to have the same number of crops as pixels.
Consider again a set $P$ of non-neighboring pixels.
For any two pixels $p_1, p_2 \in P$ that contain
the same crop $c$ in $x$ we introduce a new crop
$c'$ that behaves exactly the same with all other crops
as $c$ does and replace one of the occurrences
of $c$ with $c'$. We iterate this procedure until
there are no more of the same two crops.
By theorem \ref{kByKOptSwap} it now follows, as we
have $k$ distinct crops among $k$ pixels, that
there must exist an optimal integer solution
$x^* \in F$ for the swap LP'.
We now show that 1) this solution
can be translated into an integer solution
for the swap LP and 2) that this solution
is optimal.
The first part is trivial. Simply replace the
`cloned' crops with their originals and we
obtain a valid solution for the swap LP.
Next we show that an optimal solution $x^*$ for
the swap LP must be $\leq$ an optimal solution
for the swap LP'. For this simply iterate through
all duplicate crops in $x^*$ and replace them
with cloned versions. Now again we have the exact
same score, as the cloned crop version behave the
same as the originals, but have a valid solution
for the swap LP'. Obviously the optimal
solution for the swap LP' is bounded from below
by this solution $x^*$ for the swap LP.
What when the number of crop types is smaller
then the number of involved pixels? Even then
the linear program must have an optimal integer
solution.
Finally we show that an optimal solution $x^*$ for
the swap LP' must be $\leq$ an optimal solution
for the swap LP. Again, we replace all of the cloned
crop versions with their original crop. The score
must remain the same. Thus we have bounded the optimal
solution for the swap LP from below with the score
of $x^*$ for the solution to the swap LP'.
TODO: finish proof
As we have shown both that the optimal solution
for swap LP $\leq$ the optimal solution for swap LP'
and the optimal solution for swap LP'
$\leq$ the optimal solution for swap LP it
must follow that the optimal
score for both linear programs is the same.
Therefore, using the swap LP' we can generate
an optimal integer solution for the swap LP.
\end{proof}
\section{Method}
......
......@@ -4,6 +4,7 @@
%% Special characters for number sets, e.g. real or complex numbers.
\newcommand{\C}{\mathbb{C}}
\newcommand{\Cps}{\mathcal{C}}
\newcommand{\F}{\mathcal{F}}
\newcommand{\K}{\mathbb{K}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
......
No preview for this file type
......@@ -4,5 +4,7 @@
\contentsline {proof}{{Proof}{2}{}}{17}{proof.2}%
\contentsline {theorem}{{Theorem}{7.{2}}{}}{18}{theorem.7.2.2}%
\contentsline {proof}{{Proof}{3}{}}{19}{proof.3}%
\contentsline {theorem}{{Theorem}{8.{1}}{}}{22}{theorem.8.1.1}%
\contentsline {theorem}{{Theorem}{8.{1}}{}}{23}{theorem.8.1.1}%
\contentsline {proof}{{Proof}{4}{}}{23}{proof.4}%
\contentsline {theorem}{{Theorem}{8.{2}}{}}{23}{theorem.8.1.2}%
\contentsline {proof}{{Proof}{5}{}}{23}{proof.5}%
......@@ -20,7 +20,7 @@
\contentsline {subsection}{\numberline {7.2.2}The advanced method}{18}{subsection.7.2.2}%
\contentsline {chapter}{\chapternumberline {8}The Linear Programming Method}{21}{chapter.8}%
\contentsline {section}{\numberline {8.1}Problem Setup}{21}{section.8.1}%
\contentsline {section}{\numberline {8.2}Method}{23}{section.8.2}%
\contentsline {section}{\numberline {8.2}Method}{24}{section.8.2}%
\contentsline {chapter}{\chapternumberline {9}Gradient Descent}{25}{chapter.9}%
\contentsline {chapter}{\chapternumberline {10}Conclusion}{27}{chapter.10}%
\contentsline {appendix}{\chapternumberline {A}Calculations Appendix}{29}{appendix.A}%
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment