Remix.run Logo
▲ articulatepang a day ago

factorization is obviously in NP because prime factors are a certificate and PRIMES is in P

▲Sesse__ a day ago | parent | next [-]

You don't even need PRIMES to be in P (even though it is), factorization of an RSA key doesn't need to verify that the two factors are prime.

▲articulatepang a day ago | parent [-]

I agree, I was just responding to the narrow question of whether factorization is in NP. To talk about that you have to phrase it as a decision problem, eg, “Does N have a prime factor between 2 and k?” To be in NP, a “yes” response should come with a certificate that’s checkable in polynomial time. So the certificate here would a prime factor. We can check in polynomial time that it’s a divisor, and that it’s prime. But also yes I agree that simply exhibiting ANY factor under shows that N has a prime factor under k, so PRIMES being in P isn’t required for factorization to be in NP.

▲knorker 17 hours ago | parent | prev [-]

By "isn't even in NP" I meant lower complexity than NP, not higher complexity.

But yes, pedantically also PRIMES is in NP, because P is in NP.