1

this is my first question on this site.

I‌ recently, study on NP. I have some confusion about this Topic, and want to propose my inference and some one verify me.

I) each NP problem can be solved in Exponential Time.

II) if P=NP then NP=NP-Complete.

III) Problem of factorization into 2-prime factor, is NP.

IV) if problem X can reduce to a known NP-Hard problem, then X must be NP-HARD.

anyone can verify my inference and learn me?‌

  • 3
    Welcome to StackOverflow! Unfortunately, your question [seems off-topic](http://stackoverflow.com/help/on-topic), There's a specific [computer science SE](http://cs.stackexchange.com/), where [models of computation are on-topic](http://cs.stackexchange.com/help/on-topic). – Zeta Mar 15 '15 at 08:05
  • @Zeta, please be kind with people –  Mar 15 '15 at 08:15
  • @MinoJende The comment about "welcome to SOF" was gently phrased and intended to be helpful/informative . – WestCoastProjects Mar 15 '15 at 09:31

1 Answers1

0

I) each NP problem can be solved in Exponential Time.

Yes, this because it can be solved in polynomial time on Non Determinisitc Machine (definition of NP), and thus can be solved on a Deterministic Machine in exponential time.

II) if P=NP then NP=NP-Complete.

Yes, because if P=NP, "yes" and "no" answers for all NP problems are equivalently easy to achieve, run the polynomial time algorithm for the "yes" problem, and answer like it. Result is always correct and runs in polynomial time, assuming such a polynomial time machine exists.

III) Problem of factorization into 2-prime factor, is NP.

Yes. Given an number and its prime factorization - it is easy to verify if this is the correct answer (this is equivalent definition of problem being in NP).

IV) if problem X can reduce to a known NP-Hard problem, then X must be NP-HARD.

No, it should be the other way around. You need to reduce a known NP-Hard Problem to X, and then you can tag X as NP-Hard.
Rememeber that every problem in NP has a reduction to SAT (Cook Levin theorem), and yet P != NP-Complete (or so we think at least)

amit
  • 175,853
  • 27
  • 231
  • 333
  • Please explain further the last one why not reduce a problem to known NP hard one? – WestCoastProjects Mar 15 '15 at 16:29
  • @javadba In order to determine X is NP-Hard, you need to show reduction from an NP-Hard problem to X, not the other way around. – amit Mar 15 '15 at 16:47
  • I asked for an explanation pls (not repetition of previously stated info). thx – WestCoastProjects Mar 15 '15 at 16:51
  • The definition you copied from wikipedia seems to have the relation reversed: "from X to some NP-Hard". – WestCoastProjects Mar 15 '15 at 17:00
  • @javadba Intuitively, you solve problem A by reducing it to B, and then solving B. You can solve any problem (in NP) by reducing it to SAT, this is the cook-levin theorem. However, as far as we know NP and NP-Hard are not the same classes of complexity. Wikipedia has a lot of mistakes, but is good for getting intuition. Sick the references and read a book (or take class) in complexity theory, this is covered in it. (I have no idea where you said the wikipedia said the reverse, but if it does - it's a typo/mistake and you should edit it) – amit Mar 15 '15 at 17:08
  • Hi Amit, I just copied directly from your prior post - which you had said were coming from wiki. So - simply basing on your post - how did I misread the directionality of the reduction? Here it is again - from YOUR comment: "from X to some NP-Hard" – WestCoastProjects Mar 15 '15 at 17:14
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/73028/discussion-between-amit-and-javadba). – amit Mar 15 '15 at 17:42