I am unable to understand the difference between NP, NP complete and NP-hard Problem. How to decided a problem that it belongs to which kind of problem and what is the probable solution for that. Please suggest .
Let me try to explain let's assume you have two computers one is super powerful , let's call it a solver and the other with limited capacity let's call it verifier. The verifier can not solve a hard problem in polynomial time , but given a solution it can verify , whether it is an optimal solution or not. Any problem which verifier can verify the solution in polynomial time is an NP Problem.
Decision and Search Problems
Generally the problems can be classified as either a decision problem or a search problem. Decision problems are simpler and you expect to get yes, no solution from them. It can be shown , that with some intelligent techniques you can convert this problems. This is useful for reducing the problem.
Cooks Theorem:
This talks about reducibility that we can convert one hard problem to another hard problem. The basic problem is that of Satisfiability problem and it can be shown that maximal clique , vertex cover and independent set are reducible to the satisfiability problem. The argument is if we can solve any one of them then we can solve all of the problem. Now this set of problems are np-hard.
Any problem which is 1) np and 2) np-hard are np-complete.