TITLE: $\mathbf{P} = \mathbf{NP}$, what's the problem?
QUESTION [22 upvotes]: Let's take the problem of the backpack: $A_1,\ldots ,A_n$ the weights that are integers, and we want to know if we can achieve a total weight of $V$.
We take $$I=\dfrac{1}{2\pi}\int_0^{2\pi} \exp(-iVt)\times (1+\exp(iA_1t))\times\cdots\times(1+\exp(iA_nt)) \, dt.$$
The question then becomes what $I=0$ or $I\geq 1$.
Can we not approach the value of $I$ with the method of Monte Carlo, or others?

Why are these approaches not succeeding?

Remark : it's not difficult to find a good approximation of $B\times t \bmod 2\pi$, where $B$ is a big integer and $t\in [0,2\pi]$, because we know excellent approximation of $\pi$.

REPLY [19 votes]: So you managed to reduce an NP complete problem to calculating a single integral. Actually, in the original Garey / Johnson book, one of their 320 NP complete problems is exactly what we have here (verifying whether some integral has a value of 0; their integral can actually be solved in closed form, but to do that you have to do a lot of steps where each step makes the problem simpler but increases its size - so you end up with something that is just too big to handle in less than exponential time. And numerical calculation also fails).
The problem is that your integral cannot be solved in closed form as far as I can tell, but it is also the integral of a function that changes incredibly much. Numerical integration has no chance to solve the integral with the required precision in any reasonable amount of time, and Monte Carlo approximations have no chance - they can give reasonable approximations to some class of integrals, but their precision is even lower than numerical integration.