3. P & NP
P
P is a set of all decision
problems which can be solved
in polynomial time by a
deterministic turning machine.
since it can be solve in
polynomial time, it can also be
verified In polynomial time.
Therefore P is a subset of NP.
NP
NP is a set of all decision
problems(questions with
YES/NO answer).These
Algorithms are non-
deterministic but take
polynomial time.
4. Deterministic & non-deterministic
Each and every statement how it works we know it clearly. we
write the statements we are sure how they work.
We don’t know how they are working.
So how we can write. Produced an
answer by a series of “correct guesses.
5. Polynomial Time:
The time required for a computer to solve a problem, where this
time is a simple polynomial function of the size of the input.
Expontial Time:
Exponential time. An algorithm is said to be exponential time, if
T(n) is upper bounded by 2, where poly(n) is some polynomial in n.
... Sometimes, exponential time is used to refer to algorithms that
have T(n) = 2, where the exponent is at most a linear function of n.
7. P is shown as subset of NP
The deterministic algorithms
(we know today) is the part
of non-deterministic
algorithms.
8. Satisfiability
A Boolean expression is in conjunctive normal form if it is the
conjunction of a set of clauses, each of which is the disjunction of a set
of literals, each of these being either a variable or the negation of a
variable. ... However, CNF-SAT, the collection of satisfiable
CNF expressions, is NP-complete.
9. Reduction
A reduction is an algorithm for transforming one
problem into another problem. A reduction from one
problem to another may be used to show that the
second problem is at least as difficult as the first.
10. NP-hard & NP-Completeness
A problem is NP-complete if any
problem in NP can be reduced to it in
polynomial time AND it is also in NP(and
thus solutions can be verified in
polynomial time). In other words, the set
of NP-complete problems is the set
formed by the intersection
of NP and NP-hard. ... However, not
all NP-Hard problems are NP-Complete.