# Is integer factorization an NP-complete problem? [duplicate]

Possible Duplicate:
What are the consequences of factoring being NP-complete?

What notable reference works have covered this?

• en.wikipedia.org/wiki/Integer_factorization Commented Aug 17, 2010 at 15:50
• I think this may be a more suitable question if rephrased as: "What are the consequences of factoring being NP-complete?" But as stated, it's all answered on the wikipedia page (btw, first hit on google for "integer factorization"). Commented Aug 17, 2010 at 16:12
• I believe Moritz's comment here is insightful, txwikinger. Questions that, as asked, can be answered by a quick Wikipedia or Google search are outside the scope of this site (Disclaimer: This is my opinion, and appears to be the opinion of some others as well.). Variations on the theme that explicitly dig deeper into what is less readily available on the Internet already can be very useful however. Commented Aug 17, 2010 at 16:18
• @Daniel Apon: Well, I take the advise, however, it does not make sense to make a proposal in which this exact question is voted as on-topic without any counter votes, and then say it is off-topic. Somewhere there has to be some sanity, that people know what this site is about! Commented Aug 17, 2010 at 16:31
• Yes, I agree that it is a problem. Hopefully kinks like this will be ironed out as time passes. In general, though, I think the fear is that the site could degenerate to a place for students to ask homework questions if "less interesting" questions are allowed (for an appropriate interpretation of "less interesting"). One of the important goals is to promote advanced Q&A, since there has been a noticeable lack of this elsewhere for CS theory. Commented Aug 17, 2010 at 16:47

No, its not known to be NP-complete, and it would be very surprising if it were. This is because its decision version is known to be in $\text{NP} \cap \text{co-NP}$. (Decision version: Does $n$ have a prime factor $\lt k$?)
It is in NP, because a factor $p \lt k$ such that $p \mid n$ serves as a witness of a yes instance.
It is in co-NP because a prime factorization of $n$ with no factors $\lt k$ serves as a witness of a no instance. Prime factorizations are unique, and can be verified in polynomial time because testing for primality is in P.
• Can you explain why it will be "surprising" if $\text{NP}\subseteq \text{NP}\cap \text{co-NP}$? Commented Sep 26, 2016 at 17:10