Difference between NP hard and NP complete problem
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. |
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
Recommended Posts:
- Difference between Hard Disk Drive (HDD) and Solid State Drive (SSD)
- Difference between Hard Disk and Floppy Disk
- Difference between Soft Computing and Hard Computing
- Difference between Hard link and Soft link
- Difference between Hard real time and Soft real time system
- Algorithms | NP Complete | Question 4
- Algorithms | NP Complete | Question 5
- Algorithms | NP Complete | Question 6
- Algorithms | NP Complete | Question 3
- Algorithms | NP Complete | Question 1
- Algorithms | NP Complete | Question 2
- Proof that vertex cover is NP complete
- Sideways traversal of a Complete Binary Tree
- Find weight of MST in a complete graph with edge-weights either 0 or 1
- Print path from root to all nodes in a Complete Binary Tree
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

