Commit 24563cc0 by Michael Keller

### thesis: add LP in LP Method

parent 6f378044
 ... ... @@ -37,7 +37,7 @@ on large fields and requires no conditions of $R$. \FloatBarrier \begin{figure}[h] \centering \begin{tikzpicture}[->,>=stealth',auto,node distance=3cm,thick,main node/.style={rectangle,draw,font=\sffamily\Large\bfseries}] \begin{tikzpicture}[->,>=stealth',auto,node distance=3cm,thick,main node/.style={rectangle,draw,font=\sffamily\Large}] \node[main node] (1) {U}; \node[main node] (2) [right of=1] {V}; ... ...
 \chapter{The Linear Programming Method} \section{Problem Setup} The core idea with this method is to replace the simple swap between two pixels in the simulated annealing approach with a multi-way swap. Picture the following scenario of three non-neighboring pixels: \FloatBarrier \begin{figure}[h] \centering \begin{tabular}{@{}cccc@{}} \toprule Pixel & Currently Contains & Preferred & Strongly Disliked\\ \midrule W & $a$ & $c$ & $b$ \\ U & $b$ & $a$ & $c$ \\ V & $c$ & $b$ & $a$ \\ \bottomrule \end{tabular} \end{figure} \FloatBarrier Using only swaps involving two pixels will always lead to a pixel containing a crop it strongly dislikes based on it's neighborhood. Instead, swapping between three pixels as seen below leads to every pixel containing their preferred crop: \FloatBarrier \begin{figure}[h] \centering \begin{tikzpicture}[->,>=stealth',auto,node distance=2cm,thick,main node/.style={rectangle,draw,font=\sffamily\Large}] \node[main node] at (-3, 0) (1) {U}; \node (hidden) [right of=1] {}; \node[main node] (2) [right of=hidden] {V}; \node[main node] (3) [above of=hidden] {W}; \path[every node/.style={font=\sffamily\small}] (1) edge[left] node [above] {$b$} (2) (2) edge[left] node [above] {$c$} (3) (3) edge[right] node [above] {$a$} (1); \end{tikzpicture} \end{figure} \FloatBarrier However, the question is how we find such a multi-way swap. 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. Concretely, we setup the following linear program. Let $P$ be a set on non-neighboring pixels. Every pixel gets $C$ variables that denote how much of each crop is planted within the pixel: \begin{align*} x &= \begin{bmatrix} x_{1, 1} \\ \vdots \\ x_{1, C} \\ \vdots \\ x_{n, C} \end{bmatrix} & & x_{i, j} = \text{Pixel } p_i \text{'s amount of crop } j \end{align*} And the function we are trying to maximize shows for every variable in $x$ how good it would be based on the pixels neighborhood to plant that crop there: \begin{align*} c &= \begin{bmatrix} c_{1, 1} \\ \vdots \\ c_{1, C} \\ \vdots \\ c_{n, C} \end{bmatrix} & & 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} 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 \end{enumerate} or formally, a solution $x^*$ must satisfy: \begin{align*} 0 \leq x^*_{i, j} &\leq 1\\ \forall p \in P:\quad \sum_{c \in \Cps} x^*_{p, c} &= 1\\ \forall c \in \Cps:\quad \sum_{p \in P} x^*_{p, c} &= \sum_{p \in P} x_{p, c} \end{align*} \section{Method} Now that we have an understanding of the \ No newline at end of file
 ... ... @@ -15,7 +15,9 @@ \BOOKMARK [2][-]{subsection.7.2.1}{\376\377\000T\000h\000e\000\040\000s\000t\000a\000n\000d\000a\000r\000d\000\040\000m\000e\000t\000h\000o\000d}{section.7.2}% 15 \BOOKMARK [2][-]{subsection.7.2.2}{\376\377\000T\000h\000e\000\040\000a\000d\000v\000a\000n\000c\000e\000d\000\040\000m\000e\000t\000h\000o\000d}{section.7.2}% 16 \BOOKMARK [0][-]{chapter.8}{\376\377\000T\000h\000e\000\040\000L\000i\000n\000e\000a\000r\000\040\000P\000r\000o\000g\000r\000a\000m\000m\000i\000n\000g\000\040\000M\000e\000t\000h\000o\000d}{}% 17 \BOOKMARK [0][-]{chapter.9}{\376\377\000G\000r\000a\000d\000i\000e\000n\000t\000\040\000D\000e\000s\000c\000e\000n\000t}{}% 18 \BOOKMARK [0][-]{chapter.10}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 19 \BOOKMARK [0][-]{appendix.A}{\376\377\000C\000a\000l\000c\000u\000l\000a\000t\000i\000o\000n\000s\000\040\000A\000p\000p\000e\000n\000d\000i\000x}{}% 20 \BOOKMARK [0][-]{appendix*.4}{\376\377\000B\000i\000b\000l\000i\000o\000g\000r\000a\000p\000h\000y}{}% 21 \BOOKMARK [1][-]{section.8.1}{\376\377\000P\000r\000o\000b\000l\000e\000m\000\040\000S\000e\000t\000u\000p}{chapter.8}% 18 \BOOKMARK [1][-]{section.8.2}{\376\377\000M\000e\000t\000h\000o\000d}{chapter.8}% 19 \BOOKMARK [0][-]{chapter.9}{\376\377\000G\000r\000a\000d\000i\000e\000n\000t\000\040\000D\000e\000s\000c\000e\000n\000t}{}% 20 \BOOKMARK [0][-]{chapter.10}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 21 \BOOKMARK [0][-]{appendix.A}{\376\377\000C\000a\000l\000c\000u\000l\000a\000t\000i\000o\000n\000s\000\040\000A\000p\000p\000e\000n\000d\000i\000x}{}% 22 \BOOKMARK [0][-]{appendix*.4}{\376\377\000B\000i\000b\000l\000i\000o\000g\000r\000a\000p\000h\000y}{}% 23
No preview for this file type
 ... ... @@ -19,6 +19,8 @@ \contentsline {subsection}{\numberline {7.2.1}The standard method}{17}{subsection.7.2.1}% \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}{22}{section.8.2}% \contentsline {chapter}{\chapternumberline {9}Gradient Descent}{23}{chapter.9}% \contentsline {chapter}{\chapternumberline {10}Conclusion}{25}{chapter.10}% \contentsline {appendix}{\chapternumberline {A}Calculations Appendix}{27}{appendix.A}% ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!