# P = NP: Doesn't a search generate more information than a check?

I feel like I am understanding P ≠ NP fairly well, but there is one issue I feel like I am missing. It seems like a search for an answer generates information that a check does not.

Is this a correct way of looking at it, and if so, how does that not already imply that P ≠ NP?

Example for Clarification Let's take the wedding table example problem. We have a very large table for our wedding and a large number of guests. Each guest has a list of preferences about all the other guests. For any guest, there are some other guests they are willing to sit beside and others they will not.

In this case, it is easy to check that a solution works, but very hard to find a solution.

Here is where my understanding breaks down. It seems like, unless we can prove that the problem has only one outcome, a successful check of a solution provided to us merely tells us that the proffered outcome succeeds. By contrast, a search tells us that every outcome that was checked and rejected does not succeed. That is, the search gives us extra information.

Another example I have seen is a search that finds the first number that violates the Goldbach Conjecture (provided one exists). A solution offered to us could be checked far quicker than said solution could be located via an algorithm, and yet the fact that this number violates the conjecture does not tell us it is the first such number that does so. The search, however, can determine if this is true.

In terms of information theory, this also suggests to me that there might be an issue with Kolmogorov Complexity in some respects. If a shorter description of an object tells us everything we need to know to identify it, and yet the identity of that object remains indiscernible to us from many other candidates until we generate a boatload of new information using the search, it seems to me that the shorter description is not equivalent with the object (that it has less information). Rather, for them to be equivalent, we'd have to include the information generated by all the checks, which would then make the search algorithm longer than a code that simply types the number out.

Or: if you can have a description of an object, but you can still be surprised by said object's identity, then the two (description and identity) are not equivalent. However, I fear I may be missing something essential here, hence the question.

What you describe is one of the reason some people tend to think that $$\mathsf{P}$$ indeed is different than $$\mathsf{NP}$$. However, you suppose here that checking all possibilities is the only way to solve a problem, which it is not necessarily.

As an example, consider primality testing. One of the naive way to find if an integer $$n$$ is a prime or not is to test all number lesser or equals than $$\sqrt{n}$$ and to see if one of them is a divisor of $$n$$. That would result in a $$\Theta(\sqrt{n})$$ algorithm in the worst case (when $$n$$ is prime), which is exponential in the memory size of $$n$$.

The AKS algorithm however, can decide if a number is a prime without testing all divisors, in time $$\mathcal{O}((\log n)^6)$$. That was the proof that primality testing is in $$\mathsf{P}$$.

I can give other examples:

• the example you gave looks like a matching problem. It is well-known that 3D matching is $$\mathsf{NP}$$-complete, however 2D matching is solvable in polynomial time, without checking all possible matchings ;
• 3SAT is $$\mathsf{NP}$$-complete, but 2SAT is in $$\mathsf{P}$$, and can be solved in polynomial time without checking all truth assignments.

The important thing, here, is that in the general case, we don't know if checking all possibilities is the only way to deterministically solve a problem. That's why the $$\mathsf{P}\neq \mathsf{NP}$$ conjecture is so hard to crack.

• Thank you for the response. That all makes sense to me. I believe I may have been getting tripped up by the examples sources gave to explain the problem. They appeared to conflate "checking that X meets Y" conditions questions with "X is the first/only solution that meets Y conditions." But I see now they require different algorithms. The Kolmogorov Complexity question still bothers me though, but that is ancillary. Nov 12, 2022 at 3:46
• @TimBrown If you are satisfied with my answer, consider accepting it. Nov 12, 2022 at 13:36