# 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 P_{i} is called NP-Hard if and only if every problem of NP(say P<subj) is reducible to P_{i} 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. |

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: DSA Self Paced. Become industry ready at a student-friendly price.

## Recommended Posts:

- Proof that traveling salesman problem is NP Hard
- Proof that Clique Decision problem is NP-Complete
- Proof that Clique Decision problem is NP-Complete | Set 2
- Proof that Subgraph Isomorphism problem is NP-Complete
- Difference between Hard Disk Drive (HDD) and Solid State Drive (SSD)
- Difference between Hard link and Soft link
- Difference between Hard Disk and Floppy Disk
- Difference between Soft Computing and Hard Computing
- Difference between Hard Copy and Soft Copy
- Difference between Hard real time and Soft real time system
- Algorithms | NP Complete | Question 6
- Algorithms | NP Complete | Question 5
- Algorithms | NP Complete | Question 4
- Algorithms | NP Complete | Question 3
- Algorithms | NP Complete | Question 2
- Algorithms | NP Complete | Question 1
- Proof that Dominant Set of a Graph is NP-Complete
- Proof that Hamiltonian Cycle is NP-Complete
- Proof that vertex cover is NP complete
- Proof that Independent Set in Graph theory is NP Complete

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.