I need to know the real life or real time examples of above mentioned problems thanks!!
closed as not constructive by Yannis Rizos♦ Apr 19 '12 at 11:18
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or specific expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, see the FAQ for guidance.
Take a look at the answers and comments here on this SO question ...
There's some interesting book and website links there.
P: testing whether a number is prime. (See: http://www.jstor.org/stable/10.2307/3597229)
NP: integer factoring because it is easy to check whether two numbers multiply to a desired number. (Actually any P problem is also in NP.)
NP-hard: traveling salesman (See: http://en.wikipedia.org/wiki/Traveling_salesman_problem)
NP-complete: decision version of traveling salesman