Commit 001b6d80 by Michael Keller

### working on NP proof

parent df48ae5f
 \chapter{Computational Hardness} We show that the problem of finding a perfect solution to a pixel farming problem is NP complete. To do this we will first formulate the problem as a decision problem. In a second step we will show that the problem is in NP. Lastly we will prove that pixel farming can be used to find hamiltonian paths, which will imply that finding perfect solutions for pixel farming is NP complete. \section{The decision version of pixel farming} The decision version of the pixel farming problem we define very similarly to the regular version. However, instead of asking for a field with the maximum score, we ask for a field with a score at least $s$. Formally: Does a field $F$ for relation function $R$ exist such that the score $S(F, R)$ is at least $s$: \begin{displaymath} s \leq S(F, R) \end{displaymath} \section{Pixel Farming is in NP} Assume we are given a field $F$ and a relation function $R$. By computing $S(F, R)$, which can be done in Polynomial time in relation to the field size $X \cdot Y$, we can easily test is the score is at least a certain value. Further, testing whether our field $F$ meets the requirements specified by $D$, our probability distribution specifying how much of the field should consist of a certain crop, can also be done in polynomial time in relation to the field size $X \cdot Y$ and number of crops $C$. \section{Pixel Farming finds Hamiltonian Paths} It is known that finding Hamiltonian Paths is NP complete. Thus, reducing the decision version of hamiltonian paths (explained below) to the decision version of pixel farming demonstrates that pixel farming is NP complete. \paragraph{Hamiltonian Paths} Let $G = (V, E)$ be an undirected graph. We formulate the decision version of the hamiltonian path problem as follows: Does there exists a path in $G$ of length at least $l$ where every vertex in the path is visited only once? \paragraph{Reduction} We assume we are given a graph $G$, a length $l$ and a polynomial time algorithm in $X \cdot Y$ and $C$ for the pixel farming decision problem. We are asked to solve the hamiltonian path decision problem in polynomial time in relation to the size of $G$. In polynomial time we build the following pixel farming decision problem. Our crops are as follows: \begin{displaymath} \Cps = V \cup \{ \abs{V} + 1, \dots, \abs{V} + 1 + l + \} \end{displaymath} \ No newline at end of file
 ... ... @@ -13,7 +13,24 @@ We assume that we are given four inputs: $R(c_a, c_b)$, the more crop $c_a$ likes $c_b$. \item A probability distribution $D$ over our crops $\Cps$ that tells us how many pixels of the field should contain a certain crop. contain a certain crop. $D$ should satisfy $D(c) \cdot X \cdot Y \in \N \quad \forall c \in \Cps$. \end{enumerate} Further let us define a neighborhood function that gives us all neighboring pixels of a given pixel: \begin{displaymath} N(x, y) = \{(a, b) \in \N^2 \ | \ a < X \land b < Y \land \abs{a - x} \leq 1 \land \abs{b - y} \leq 1 \land (a, b) \neq (x, y) \} \end{displaymath} and we are looking for a matrix $F \in \Cps^{X \times Y}$ that maximizes the following score function: \begin{displaymath} S(F, R) = \sum_{i = 0}^{X-1} \sum_{j = 0}^{Y-1} \sum_{n \in N(i, j)} R(F_{(i, j)}, F_n) \end{displaymath} where we also fulfill the distribution constraint: \begin{align*} I((i, j), c) &= \begin{cases} 1 & F((i, j)) = c\\ 0 & otherwise. \end{cases}\\ \forall c \in \Cps : D(c) \cdot X \cdot Y &= \sum_{i = 0}^{X-1} \sum_{j = 0}^{Y-1} I((i, j), c) \end{align*} \ No newline at end of file
 ... ... @@ -4,3 +4,13 @@ year={1996}, publisher={Hartley \& Marks} } @book{alma991170823569005501, author = {Cormen, Thomas H.}, edition = {Third edition}, isbn = {978-0-262-03384-8}, keywords = {Computer programming}, language = {eng}, publisher = {The MIT Press}, title = {Introduction to algorithms}, year = {2009}, }
 ... ... @@ -2,6 +2,10 @@ \BOOKMARK [0][-]{chapter.1}{\376\377\000I\000n\000t\000r\000o\000d\000u\000c\000t\000i\000o\000n}{}% 2 \BOOKMARK [0][-]{chapter.2}{\376\377\000R\000e\000l\000a\000t\000e\000d\000\040\000W\000o\000r\000k}{}% 3 \BOOKMARK [0][-]{chapter.3}{\376\377\000P\000r\000o\000b\000l\000e\000m\000\040\000S\000t\000a\000t\000e\000m\000e\000n\000t}{}% 4 \BOOKMARK [0][-]{chapter.4}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 5 \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}{}% 6 \BOOKMARK [0][-]{appendix*.2}{\376\377\000B\000i\000b\000l\000i\000o\000g\000r\000a\000p\000h\000y}{}% 7 \BOOKMARK [0][-]{chapter.4}{\376\377\000C\000o\000m\000p\000u\000t\000a\000t\000i\000o\000n\000a\000l\000\040\000H\000a\000r\000d\000n\000e\000s\000s}{}% 5 \BOOKMARK [1][-]{section.4.1}{\376\377\000T\000h\000e\000\040\000d\000e\000c\000i\000s\000i\000o\000n\000\040\000v\000e\000r\000s\000i\000o\000n\000\040\000o\000f\000\040\000p\000i\000x\000e\000l\000\040\000f\000a\000r\000m\000i\000n\000g}{chapter.4}% 6 \BOOKMARK [1][-]{section.4.2}{\376\377\000P\000i\000x\000e\000l\000\040\000F\000a\000r\000m\000i\000n\000g\000\040\000i\000s\000\040\000i\000n\000\040\000N\000P}{chapter.4}% 7 \BOOKMARK [1][-]{section.4.3}{\376\377\000P\000i\000x\000e\000l\000\040\000F\000a\000r\000m\000i\000n\000g\000\040\000f\000i\000n\000d\000s\000\040\000H\000a\000m\000i\000l\000t\000o\000n\000i\000a\000n\000\040\000P\000a\000t\000h\000s}{chapter.4}% 8 \BOOKMARK [0][-]{chapter.5}{\376\377\000C\000o\000n\000c\000l\000u\000s\000i\000o\000n}{}% 9 \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}{}% 10 \BOOKMARK [0][-]{appendix*.4}{\376\377\000B\000i\000b\000l\000i\000o\000g\000r\000a\000p\000h\000y}{}% 11
No preview for this file type
 ... ... @@ -115,6 +115,7 @@ \input{indroduction.tex} \input{related-work.tex} \input{problem-statement.tex} \input{hardness.tex} \input{conclusion.tex} \appendix ... ...
 ... ... @@ -4,6 +4,12 @@ \contentsline {chapter}{\chapternumberline {1}Introduction}{1}{chapter.1}% \contentsline {chapter}{\chapternumberline {2}Related Work}{3}{chapter.2}% \contentsline {chapter}{\chapternumberline {3}Problem Statement}{5}{chapter.3}% \contentsline {chapter}{\chapternumberline {4}Conclusion}{7}{chapter.4}% \contentsline {appendix}{\chapternumberline {A}Calculations Appendix}{9}{appendix.A}% \contentsline {chapter}{Bibliography}{11}{appendix*.2}% \contentsline {chapter}{\chapternumberline {4}Computational Hardness}{7}{chapter.4}% \contentsline {section}{\numberline {4.1}The decision version of pixel farming}{7}{section.4.1}% \contentsline {section}{\numberline {4.2}Pixel Farming is in NP}{7}{section.4.2}% \contentsline {section}{\numberline {4.3}Pixel Farming finds Hamiltonian Paths}{8}{section.4.3}% \contentsline {paragraph}{Hamiltonian Paths}{8}{section*.2}% \contentsline {paragraph}{Reduction}{8}{section*.3}% \contentsline {chapter}{\chapternumberline {5}Conclusion}{9}{chapter.5}% \contentsline {appendix}{\chapternumberline {A}Calculations Appendix}{11}{appendix.A}% \contentsline {chapter}{Bibliography}{13}{appendix*.4}%
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!