What is the class P the class NP the class NPhard and the cl
What is the class P, the class NP, the class NP-hard, and the class NP-complete?
Solution
Decision Problem: A problem with a yes or no answer
P class:
The decision problems which can be solve in polynomial time come under class P.
NP class:
Given a set of all decision problems for which the instances where the answer is \"yes\" have proofs that can be verified in polynomial time.
Given an instance of a problem and a certificate of it being yes, it can be verified in polynomial time
NP-complete class:
Given a set of x in NP,If it is possible to reduce any NP probelm Y to X in polynomial time then it is NP-Complete
NP-hard class:
A problem Y is NP-hard, if there is an NP-complete probelm X, s.t. X is reducible to Y in polynomial time
