NP
Builds on Complexity classNondeterministic Turing machineTime complexityFormal languageP
Definition
Let be a finite alphabet. Let be a function. The class is the set of languages decided by some nondeterministic Turing machine with the following property. On every input of length , every computation branch of halts within steps. The complexity class NP is Here a nondeterministic machine decides when an input lies in exactly when at least one branch accepts .
Remarks
Equivalent form with certificates: exactly when there are a polynomial and a language P of pairs such that The string is a certificate for , and a machine deciding is a verifier.
Example: the set of composite numbers, written in binary, is in NP. A certificate for is a factor with , which has at most as many digits as . The verifier checks that divides by one division, in polynomial time.
Non-example: a certificate whose length grows like is not allowed, because the definition bounds by a polynomial in .
Every language in P is in NP, with the empty certificate, so . The name stands for "nondeterministic polynomial time".
Reading path
To understand this page from the ground up, read these 6 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Complexity class concept
- Formal language concept
- Nondeterministic Turing machine concept
- P concept
- Time complexity concept
- NP definition
Further reading
About this page
| Tag | SBDQH0TJ5X |
|---|---|
| URI | m2://SBDQH0TJ5X |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68Q15 |
| Defines | NP |
| Uses | Complexity class, Nondeterministic Turing machine, Time complexity, Formal language, P |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.