Papers
Papers
No one has been able to develop a polynomial time algorithm for any
problem in the 2nd group (i.e., group 2)
So, it is compulsory and finding algorithms whose computing times are
greater than polynomial very quickly because such vast amounts of time to
execute that even moderate size problems cannot be solved.
Theory of NP-Completeness:
Show that may of the problems with no polynomial time algorithms are computational
time algorithms are computationally related.
1. NP-Hard
2. NP-Complete
NP-Hard: Problem can be solved in polynomial time then all NP-Complete problems can be
solved in polynomial time.
All NP-Complete problems are NP-Hard but some NP-Hard problems are not know to be NP-
Complete.
Class P
The P in the P class stands for Polynomial Time. It is the collection of decision
problems(problems with a “yes” or “no” answer) that can be solved by a deterministic machine
in polynomial time.
Features:
1. The solution to P problems is easy to find.
2. P is often a class of computational problems that are solvable and tractable. Tractable
means that the problems can be solved in theory as well as in practice. But the problems
that can be solved in theory but not in practice are known as intractable.
This class contains many natural problems like:
1. Calculating the greatest common divisor.
2. Finding a maximum matching.
3. Decision versions of linear programming.
Class of NP
Features:
1. The solutions of the NP class are hard to find since they are being solved by a non-
deterministic machine but the solutions are easy to verify.
2. Problems of NP can be verified by a Turing machine in polynomial time.
Example:
Let us consider an example to better understand the NP class. Suppose there is a company
having a total of 1000 employees having unique employee IDs. Assume that there are 200
rooms available for them. A selection of 200 employees must be paired together, but the CEO
of the company has the data of some employees who can’t work in the same room due to
some personal reasons.
This is an example of an NP problem. Since it is easy to check if the given choice of 200
employees proposed by a coworker is satisfactory or not i.e. no pair taken from the coworker
list appears on the list given by the CEO. But generating such a list from scratch seems to be
so hard as to be completely impractical.
It indicates that if someone can provide us with the solution to the problem, we can find the
correct and incorrect pair in polynomial time. Thus for the NP class problem, the answer is
possible, which can be calculated in polynomial time.
This class contains many problems that one would like to be able to solve effectively:
1. Boolean Satisfiability Problem (SAT).
2. Hamiltonian Path Problem.
3. Graph coloring.
For measuring the complexity of an algorithm, we use the input length as the parameter.
For example, An algorithm A is of polynomial complexity p() such that the computing
time of A is O(p(n)) for every input of size n.
Decision problem/ Decision algorithm: Any problem for which the answer is either zero or
one is decision problem. Any algorithm for a decision problem is termed a decision
algorithm.
polynomial time.
NP is the set of all decision problems solvable by nondeterministic algorithms in
-)
polynomial time.
If there any single problem in NP, such that if we showed it to be in ‘P’ then that would
imply that P=NP.
-)Notation of Reducibility
Let L1 and L2 be problems, Problem L1 reduces to L2 (written L1 α L2) iff there is a way
to solve L1 by a deterministic polynomial time algorithm using a deterministic algorithm
that solves L2 in polynomial time
This implies that, if we have a polynomial time algorithm for L2, Then we can solve
L1 in polynomial time.
Nondeterministic Algorithms:
Algorithms with the property that the result of every operation is uniquely defined are
termed as deterministic algorithms. Such algorithms agree with the way programs are executed
on a computer.
Algorithms which contain operations whose outcomes are not uniquely defined but are
limited to specified set of possibilities. Such algorithms are called nondeterministic
algorithms.
The machine executing such operations is allowed to choose any one of these
outcomes subject to a termination condition to be defined later.
}
Nondeterministic Knapsack algorithm
}
if( (W>m) or (P<r) ) then Failure();
else Success();
}
Cook‘s theorem
The Cook-Levin theorem, also known as Cook’s theorem, states that the Boolean
satisfiability problem is NP-complete. That is, any problem in NP can be
reduced in polynomial time by a deterministic Turing machine to the problem
whether a Boolean formula is satisfiable.
The theorem is named after Stephen Cook and Leonid Levin.
An important consequence of this theorem is that if there exists a deterministic
polynomial time algorithm for solving Boolean satisfiability, then every NP
problem can be solved by a deterministic polynomial time algorithm.
The work shows that Cook’s theorem is the origin of the loss of non-determinism in
terms of the equivalence of the two definitions of NP, the one defining NP as the
class of problems solvable by a nondeterministic Turing machine in polynomial time,
and the other defining N P as the class of problems verifiable by a deterministic
Turing machine in polynomial time. Therefore, we argue that fundamental difficulties
in understanding P versus NP lie firstly at cognitionlevel, then logic level.
Cook’s Theorem: States that satisfiability is in P if and only if P=NP If
P=NP then satisfiability is in P
If satisfiability is in P, then P=NP To
do this
> A-) Any polynomial time nondeterministic decision algorithm.
I-)Input of that algorithm
Then formula Q(A, I), Such that Q is satisfiable iff ‘A’ has a successful
termination with Input I.
> If the length of ‘I’ is ‘n’ and the time complexity of A is p(n) for some
polynomial
p() then length of Q is O(p3(n) log n)=O(p4(n))