## P vs NP (subset sum problem) - some thoughts

Discussions on everything related to the software, electronic, and mechanical components of information systems and instruments.

### P vs NP (subset sum problem) - some thoughts

Problem statement
List of $n$ integers $A={\left[{a}_{i}\right]}$ and integer $S$ are given. We need to find integers from list which sum to $S$ or answer that such integers don't exist - in polynomial time (from length of input). Original formulation is different, but we can easily convert it.

Strategy is to prove that ${\text{P}}={\text{NP}}$ or find where we stumble. I haven't proved anything serious, but I believe that my searchlight beams in right direction.

First, sort our list. We have ${a_0}{\leq}{a_1}{\leq}{\ldots}{\leq}{{a}_{n-1}}$. Then add $\frac{1}{4}$ to ${a}_{n-1}$, $\frac{1}{8}$ to ${a}_{n-2}$, $\frac{1}{16}$ to ${a}_{n-3}$ and so on. Now we have strict ordering: $a_0. Consider all possible orderings of sums of some elements in all possible lists $A$ of length $n$. Here is example of ordering for $n=3$:
$0.
For short I will write it in this way: _ 0 1 01 2 02 12 012 and denote SS (sum sequence).

Main idea
Find some ordering of all SS (there are about ${3}^{\left(n^2\right)}$ of them) and by binary search (or similar) find our SS. Then by another binary search in this SS find sum which is closest to given sum $S$. Relevant paper:

Choose independent inequalities from SS. In our example they are: $0, $a_0, $a_0+a_1. Translate to geometric language: we have hyperplanes which bound chamber. In $n$-dimensional space all SS are correspond to chambers and formed by intersection of $\frac{3^n-1}{2}$ hyperplanes. Each hyperplane have 2 normal vectors, which have coordinates lying in set $\left{-1, 0, 1\right}$. All of such vectors are used except $\left(0, 0, {\dots}, 0\right)$. We will divide this full arrangement (FA) in subarrangements, which differ in number of zeros in their normal vectors. Each chamber in full arrangement uniquely characterized by chambers in subarrangements in which it is contained. I come to conclusion that for simplyfication of solution we should at first consider only "binary" arrangement (BA) - which doesn't contain zeros in normal vectors (it have relation to threshold logical functions, but "threshold arrangement" name is already used). This subarrangement have such advantage that it have much smaller number of vectors and chambers and conclusions to which we came as we study it usually can be generalized to full arrangement.

For $n=3$ BA consists of 14 chambers - 8 with 3 faces and 6 with 4 faces. If we cannot fully impose (make identical) 2 chambers by reflections and changes of coordinate axes, we say that they belong to different classes. There are (OEIS A109456):
• 2 classes for $n=3$;
• 3 for $n=4$;
• 7 for $n=5$;
• 21 for $n=6$;
• 135 for $n=7$.
Unfortunately count of classes also grows too fast: $\text{O}\left({{2}^{{n}^{2}}}\right)$. Number of faces of dimension $n-1$ in dimension $n$ varies from $n$ to $2^n$. But number of faces doesn't correspond to chamber "complexity". For example, to check, if point lies in chamber with maximal number of faces $2^n$, which defined with these normal vectors:
+++ ... ++
+++ ... +-
...
+-- ... --
we can easily: we should check that ${a_0}>\left|{a_1}\right|+\left|{a_2}\right|+{\dots}+\left|{{a}_{n-1}}\right|$.

There is different property of chamber which mirrors its complexity: number of different classes of chambers which are adjacent to it. Experimentally i have found that this number grows as F+ (first as Fibonacci numbers, then faster). In ["On the Number of Facets of Polytopes Representing Comparative Probability Orders"] analogous fact is proven for full arrangement, but now I suspect that conjecture about growth of complexity of MCC (most complex chamber) as exact Fibonacci numbers is false. Couple of years ago I state these questions as most important:
• How to describe chambers in n dimensions if we have descriptions for smaller dimensions (how to describe them recursively)?
• Can we polynomially describe positions in SS where $a_i$ is present (for given $i$)?
• Which operations in algorithm we should consider, can we use only summation and comparison operations?
Each chamber in FA and BA have invariant - sum of vectors which "looks" in direction of chamber. For example, for point $\left(0.1, -3.2, 1.7\right)$ in BA we should sum vectors
+ - +
+ - -
- - +
- - -
and invariant is $\left(0, -4, 0\right)$. Invariant for points lying in simple chambers we can find easily, but for MCC i failed to obtain invariant in polynomial time.

BUT... MCC in some way is very simple chamber: point $\left(1, 2, 3, {\dots}, k-2, k-1, k+0.5\right)$ always lies in it and we can use Ramanujan-Hardy-Rademacher formula for finding invariant in polynomial time. If we somehow managed to find last digits of $p\left(k\right)$ in polynomial time even if $k$ is exponential (say, ${2}^{300}$), this would be a strong hint that $\text{P}$ and $\text{NP}$ are equal ant hint as to where we should go next. We should not try to tie all vectors of chamber in polynomial bunch, but consider all numbers in invariant independently - this is main conclusion to which i came. And different exponential barriers ($2^n$ or $F$) to which I inevitably hit, when trying to collect all vectors together can be used to prove that we cannot prove that $\text{P}=\text{NP}$ in some certain way. But I won't prove it myself.

BTW, there are 2 sets of chamber vectors which we should consider - first is faces of chamber and second is all vectors which "look" at chamber. First set is smaller, but second is conceptually simpler.
DSblizzard
Forum Neophyte

Posts: 1
Joined: 19 May 2016

### Re: P vs NP (subset sum problem) - some thoughts

DSblizzard,

Welcome to the forums!

I moved your thread from Mathematics to Computers, since $\begin{array}{rB c l} &{\fs{-2}{?}}&\\{\text{P}}&=&{\text{NP}}\\&{\vspace{10}}& \end{array}$ is traditionally considered a Computer Science problem, in the subfield of classifying algorithms by time complexity.

The subset sum problem seems like a good way to approach the problem since it's a pretty straightforward $\text{NP}$-problem to try to do in $\text{P}$-time.

I'm going to edit your OP a tad to make it more legible, then probably post more on here later. It's a fun problem to play with!
Natural ChemE
Forum Moderator

Posts: 2754
Joined: 28 Dec 2009

### Re: P vs NP (subset sum problem) - some thoughts

DSblizzard,

After skimming the post, my impression's that you're basically providing a geometric interpretation of an ${\text{NP}}$-time problem, then attempting to move toward a solution in ${\text{P}}$-time.

It's standard practice for people trying to solve a problem like this to first interpret it into their analytical domain of choice, yours apparently being geometry. Had the problem statement been in French, you'd have first translated it to English too.

So while the interpretation is neat, I'm not picking up on any advancement toward solving the underlying problem. If you were to try to publish work like this, I'd characterize the paper as providing a geometric interpretation of the sum subset problem.

I'd note that reinterpretations can be neat. For example, a few years back someone reinterpreted the problem into the analytical domain of Minesweeper, which made headline news in academia:It's been a while since I've read that paper, so take this with a grain of salt, but I think that your problem can be mapped to Minesweeper like this:
2. Map it back to the original sum subset problem.
3. Through the collective net of ${\text{NP}}$-time mappings, map the sum subset problem to whatever ${\text{NP}}$-time problem the Minesweeper guy worked off of, which I think was something about circuit diagrams.
4. Follow the Minesweeper guy's mapping to Minesweeper.
Finally, as a general note, I think that $\begin{array}{rB c l} &{\fs{-2}{?}}&\\{\text{P}}&=&{\text{NP}}\\&{\vspace{10}}& \end{array}$ is more of an ontological question; that merely attempting to provide a ${\text{P}}$-time algorithm, while of extreme interest, is short-selling the actual question. I'd think that it'd be more fruitful to address why we can't map the collection of ${\text{NP}}$-time problems to ${\text{P}}$-time, which would require a consideration of the underlying rule set (physics, axioms, or whatever your field calls them). Ideally ${\text{P}}={\text{NP}}$ would be proven by someone's failed attempt to disprove it, rather than vice-versa.
Natural ChemE
Forum Moderator

Posts: 2754
Joined: 28 Dec 2009