P
Builds on Complexity classMultitape Turing machineTime complexityFormal language
Definition
Let be a finite alphabet. Let be a function. The class is the set of languages decided by some deterministic multitape Turing machine as follows. On every input of length , the machine halts within steps. The complexity class P is So when some deterministic Turing machine decides with time complexity for some .
Remarks
Example: the language of binary palindromes belongs to the class P, as follows. A two-tape machine copies the input to its work tape, moves the input head back to the start, and compares the input read forward with the copy read backward. This takes steps.
Non-example: a machine that solves a problem by testing all subsets of an -element set uses about steps, and is not for any . Such a machine does not show that its problem is in P, though a faster algorithm might exist.
The class is the same for one-tape and multitape machines, since a one-tape machine simulates steps of a multitape machine in steps. P is closed under union, intersection, complement and concatenation of languages.
Reading path
To understand this page from the ground up, read these 5 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Complexity class concept
- Formal language concept
- Multitape Turing machine concept
- Time complexity concept
- P definition
Further reading
About this page
| Tag | XV9VDFVK6Y |
|---|---|
| URI | m2://XV9VDFVK6Y |
| Kind | definition |
| Writing | W0 stub |
| MSC | 68Q15 |
| Defines | P |
| Uses | Complexity class, Multitape Turing machine, Time complexity, Formal language |
| 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.