Related Articles

Related Articles

Difference between NP hard and NP complete problem
  • Difficulty Level : Hard
  • Last Updated : 08 May, 2020

Prerequiste: NP-Completeness

NP Problem:
The NP problems set of problems whose solutions are hard to find but easy to verify and are solved by Non-Deterministic Machine in polynomial time.

NP-Hard Problem:
Any decision problem Pi is called NP-Hard if and only if every problem of NP(say P<subj) is reducible to Pi in polynomial time.

NP-Complete Problem: Any problem is NP-Complete if it is a part of both NP and NP-Hard Problem.

Difference between NP-Hard and NP-Complete:

NP-hard NP-Complete
NP-Hard problems(say X) can be solved if and only if there is a NP-Complete problem(say Y) can be reducible into X in polynomial time. NP-Complete problems can be solved by deterministic algorithm in polynomial time.
To solve this problem, it must be a NP problem. To solve this problem, it must be both NP and NP-hard problem.
It is not a Decision problem. It is exclusively Decision problem .
Example: Halting problem, Vertex cover problem, Circuit-satisfiability problem, etc. Example: Determine whether a graph has a Hamiltonian cycle, Determine whether a Boolean formula is satisfiable or not, etc.

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :