0
$\begingroup$

I have read somewhere (I cannot find the source now unfortunately) that an NP-complete problem can only have exponentially many solutions.

But this does not make sense to me..

For instance, even a polynomial problem can have an infinite number of solutions:

P: Is there an integer x that is greater than integer 1?

Problem P has infinitely many solutions (the set of solutions being $\{2,3,4,\ldots\}$), but of course we can have a polynomial algorithm that calculates 1+1=2 and answers yes.

I do not see why NP-complete problems can not have infinitely many solutions. After all, a non-deterministic machine has an infinite # of processors running infinite # of threads, so it should not be a problem to go through the infinite set of solutions if it is necessary. (Actually, I prefer the definition based on efficiently verifiable proofs.)

Could someone enlighten me please?

Thank you.

  • 0
    When we speak of "an NP-complete" problem, it is not a single fixed problem but a family of problems parameterized by input data. How the data is represented needs to be well-defined (at least up to polynomial time transformations) so that "size" of the input can be used to bound the time needed to verify a solution. However the term "NP-complete" describes decision problems, so answers are restricted to "yes" or "no".2017-02-28
  • 0
    There are formal definitions of what a 'problem' is, and what an instance is; you should probably read up on those first, since you're very confused - your 'P' problem isn't formally a problem in P as it's currently stated! In particular, you should look up the notion of instance _size_.2017-02-28

1 Answers 1

2

As stated, it does not make sense. In an effort to make some sense of it, we might try this. A decision problem $L$ is in NP if there is a "verifier" algorithm such that, for any instance $w$ for which the answer is "yes", there is a "certificate" $c$ whose length is polynomial in the length of $w$, and the algorithm applied to $w$ and $c$ returns "yes" in polynomial time, but for an instance for which the answer is "no" there is no such certificate. This certificate is what we might call the "solution".

Since the certificate's length is bounded by a polynomial $p(|w|)$ in the length of $w$, if we're working over an alphabet of size $b$ the number of possible certificates for an instance $w$ is at most $b^{p(|w|)}$.