Sie sind auf Seite 1von 12

P Problems In computational complexity theory, P, also known as PTIME or DTIME (nO(1)), is one of the most fundamental complexity classes.

It contains all decision problems which can be solved by a deterministic Turing machine using a polynomial amount of computation time, or polynomial time.. Cobham s thesis holds that P is the class of computational problems which are efficiently solvable or tractable ; in practice, some problems not known to be in P have practical solutions, and some that are in P do not, but this is a useful rule of thumb.
Theory Of computation By Sumit Sir 9977303113

A language L is in P if and only if there exists a deterministic Turing machine M, such that M runs for polynomial time on all inputs For all Strings W in L, M Gives output 1 For all Strings W not in L, M Gives output

Theory Of computation By Sumit Sir 9977303113

P is known to contain many natural problems, including the decision versions of linear programming, calculating the greatest common divisor, and finding a maximum matching. In 2002, it was shown that the problem of determining if a number is prime is in P. The related class of function problems is FP. The article on P-complete problems lists further relevant problems in P. A generalization of P is NP, which is the class of languages decidable in polynomial time on a non-deterministic Turing machine. We then trivially have P is a subset of NP. Though unproven, most experts believe this is a strict subset.
Theory Of computation By Sumit Sir 9977303113

NP problems In computational complexity theory, NP is one of the most fundamental complexity classes. The abbreviation NP refers to nondeterministic polynomial time . Intuitively, NP is the set of all decision problems for which the yes -answers have simple proofs of the fact that the answer is indeed yes. More precisely, these proofs have to be verifiable in polynomial time by a deterministic Turing machine. In an equivalent formal definition, NP is the set of decision problems solvable in polynomial time by a non-deterministic Turing machine.
Theory Of computation By Sumit Sir 9977303113

The complexity class NP can be defined in terms of NTIME as follows: Alternatively, NP can be defined using only deterministic Turing machines using the verifier-based definition.
A language L is in NP if and only if there exists a polynomial p and deterministic Turing machine M, such that M runs for polynomial time on all inputs For all x in L, there exists a string y of length |x|, such that M(x,y) = 1 For all x in not in L, for all strings y of length |x|, M(x,y) = 0 Theory Of computation By Sumit Sir 9977303113

NP Complete In computational complexity theory, the complexity class NP-complete (abbreviated NP-C or NPC), is a class of problems having two properties:
1-:Any given solution to the problem can be verified quickly (in polynomial time); the set of problems with this property is called NP (nondeterministic polynomial time). 2-:If the problem can be solved quickly (in polynomial time), then so can every problem in NP.
Theory Of computation By Sumit Sir 9977303113

A decision problem C is NP-complete if: C is in NP, and Every problem in NP is reducible to C in polynomial time.

Boolean satisfiability problem (Sat.) N-puzzle Knapsack problem Hamiltonian path problem Travelling salesman problem Subgraph isomorphism problem Subset sum problem Clique problem Vertex cover problem Independent set problem Dominating set problem Graph coloring problem
Theory Of computation By Sumit Sir 9977303113

The following techniques can be applied to solve computational problems in general, and they often give rise to substantially faster algorithms: Approximation: Instead of searching for an optimal solution, search for an almost optimal one. Randomization: Use randomness to get a faster average running time, and allow the algorithm to fail with some small probability. Restriction: By restricting the structure of the input (e.g., to planar graphs), faster algorithms are usually possible. Parameterization: Often there are fast algorithms if certain parameters of the input are fixed. Heuristic: An algorithm that works reasonably well in many cases, but for which there is no proof that it is both always fast and always produces a good result. Metaheuristic approaches are often used.
Theory Of computation By Sumit Sir 9977303113

NP Hard NP-hard (non-deterministic polynomial-time hard), in computational complexity theory, is a class of problems that are, informally, at least as hard as the hardest problems in NP . A problem H is NP-hard if and only if there is an NPcomplete problem L that is polynomial time Turingreducible to H. It is super set of NP complete. NP-hard problems may be of any type: decision problems, search problems, or optimization problems
Theory Of computation By Sumit Sir 9977303113

NP naming confusions NP-complete means problems that are complete in NP (i.e., any problem reduces to any other problem in polynomial time) NP-hard -:stands for at least as hard as NP (but not necessarily in NP) NP-easy -:stands for at most as hard as NP (but not necessarily in NP) NP-equivalent -:means equally difficult as NP, (but not necessarily in NP)

Theory Of computation By Sumit Sir 9977303113

Theory Of computation And Compiler Design By Sumit Sir 9977303113

Das könnte Ihnen auch gefallen