0

I'm sure that in my following question my reasoning is extremely simplistic and flawed, but I think if someone answered this it would help me understand what the P vs NP conundrum is. So here is my question: why is the following not a proof that NP does not equal P?

Scenario: A computer is given an n digit number that it must guess. The digits of this number were randomly chosen. Since the digits are randomly chosen, there is no pattern for a computer to spot and therefore simplify the problem. It must try all solutions, of which there are 9^n.

Does the problem with my reasoning lie with the assumption that the numbers are truly random? Is randomness impossible and there will always be an underlying pattern to how seemingly "random" numbers were chosen

  • 4
    The problem with your reasoning is that you don't understand what NP is. Take a look at our reference question on the matter. – Yuval Filmus Oct 15 '19 at 08:01
  • If I understand correctly, NP are questions that are hard to solve but quick to verify. So why wouldn't the scenario I posed fit into that category. It's hard to solve since it takes 9^n operations in the worst case, but it's also easy to verify a solution because if someone gives you a solution it takes just one step to see if it's correct (namely, it just uses that solution to guess it and if the "lock" opens then it's verified it's correct) – graphtheory123 Oct 15 '19 at 11:49
  • 2
    I’m afraid your intuitive understanding just doesn’t match the formal definition. It’s hard to explain without a thorough understanding of the actual definition of NP. – Yuval Filmus Oct 15 '19 at 11:58
  • Your problem isn’t a decision problem. As such it doesn’t belong to NP, which is a class of decision problems. – Yuval Filmus Oct 15 '19 at 12:00
  • What if you had the following change: All the digits are covered up and you start off with the ability to only guess what the first digit is, and then once you have that you can only guess what the second digit is and so on. So only single digit guesses are allowed and the next digit is only revealed if you guess it correctly. Then the decision problem could be "Is the last digit a 7?" for instance. That would be a decision problem then right? – graphtheory123 Oct 15 '19 at 12:06
  • 1
    A decision problem is an assignment of a truth value for each input. Your problems are not of this form, since the truth value doesn’t depend only on the input. I suggest familiarizing yourself with the relevant definitions. Intuition only comes later. – Yuval Filmus Oct 15 '19 at 12:31
  • Oh, so the fact that there is the covering up thing is the problem? – graphtheory123 Oct 15 '19 at 12:38
  • It’s just not a decision problem. – Yuval Filmus Oct 15 '19 at 12:39
  • The answer to a decision problem must be only dependent on its input, not on some other external assumptions. So if you ask "Is $x$ the hidden number $y$?", then $y$ must be the same number all the time. But this would reduce the problem to "Is $x=y$?" which is trivially solvable. If you incorporate (pseudo)randomness in some way, it must be part of the decision problem, e.g. "Is $x$ the hidden number $y$, where $s$ is the seed for the used random number generator?" In your case, this would reduce the decision problem to the way random numbers are generated. – siracusa Oct 16 '19 at 04:07
  • Your problem is closer to a cryptographic game, like breaking OneTimePad encryption. The big issue there is that even if you guess correctly, you wouldn't know because it is not verifiable. You mention a "lock that opens when you guess correctly", such a lock would have to be a cryptographic function, and then the problem would change to breaking that piece of crypto, which is not provably NOT in P anymore. – Simon Weber Oct 16 '19 at 08:15

0 Answers0