Deterministic Complexity Classes
DTIME, DSPACE, P, and hierarchy ideas for deterministic computation.
Goals
- Define , , and .
- Prove basic containments from resource bounds.
- Understand why constructibility matters in hierarchy theorems.
Intuition
A class groups languages by an asymptotic resource budget. Unions over polynomial bounds avoid committing to a particular exponent and remain stable under polynomial simulation.
Formal definitions
and contain languages decidable by deterministic machines within those bounds. Define
The other standard deterministic unions are
Some books write for . The union absorbs fixed polynomial exponents but not a change from polynomial to exponential growth. All definitions concern worst-case bounds on halting deciders.
Complexity class containments
Read solid arrows as proved containments, not equalities. The basic chain is
Claim. .
Proof walkthrough
Fix and prove . Let , and let be a deterministic decider that halts within steps on every input of length .
Each step moves a work head by at most one cell. Therefore a run of at most steps visits at most work cells (up to a constant for bookkeeping absorbed in ). Hence .
Since this holds for every ,
The union closes the claim: no single exponent is required for all of .
What this does not show. It does not prove , nor any separation. It also does not yield a tight space bound for a specific problem beyond the simulation.
The deterministic time hierarchy theorem says, under suitable time-constructibility and gap conditions, that more time decides strictly more languages. Its diagonal simulation needs enough extra time to interpret and simulate encoded machines.
Configuration counting and containments
Let a fixed deterministic machine use work space. A configuration records its constant-size state, work symbols, work-head positions, and an input-head position among locations. Therefore there are at most
configurations. A halting deterministic run cannot repeat one: repetition would force an infinite loop. Hence, after adding a configuration counter (or detecting repeats), a space- decider halts within steps, so
Claim. .
Proof. Let . Then for some , . By the inclusion above,
There is a constant with time at most . For a large enough exponent (e.g. ), for all large , hence .
The elementary fact that time bounds space gives . Together with this yields
These inclusions do not establish whether adjacent classes are equal. Hierarchy theorems do imply and , but they do not resolve versus .
Constructibility
A function is time-constructible if a deterministic TM, on an input of length , can produce or count exactly steps within time. A function is space-constructible if a machine can mark exactly work cells using space. Standard bounds such as , , and satisfy appropriate constructibility conditions.
Constructibility lets the diagonal machine enforce its budget. Without it, a pathological numerical function may be large but not efficiently recognizable as a resource limit. The condition is therefore operational, not cosmetic.
Deterministic time hierarchy
One standard formulation says: if are time-constructible and
then
for a standard multitape model. Exact logarithmic factors depend on simulation conventions.
Proof walkthrough
- Enumerate encoded deterministic machines and arrange that descriptions occur at infinitely many padded lengths.
- Define a diagonal decider on input of length . Interpret part of as a machine description; malformed descriptions get a fixed answer.
- Use time constructibility to start a -step clock.
- Universally simulate the encoded on for enough steps to cover its claimed computation, including the simulator's logarithmic overhead.
- If the simulation accepts in budget, reject; otherwise accept.
- The gap condition ensures that interpretation, clocking, and simulation fit in , so .
- Suppose some -time machine decides . Choose a sufficiently long padded input encoding . The simulation completes, and returns the opposite of on that same input, a contradiction.
The proof does not flip an answer after an unbounded simulation. The timeout and gap are exactly what make a decider in the larger class.
Application. For every fixed ,
under a suitable constructible formulation, because . To derive , diagonalize against all polynomial exponents within an exponential budget, or use a standard corollary of the hierarchy theorem.
Deterministic space hierarchy
A standard space hierarchy theorem says that if are space-constructible, at least logarithmic, and , then
Proof walkthrough
- Enumerate machines and use padded descriptions as diagonal inputs.
- The diagonal machine reserves cells and simulates the encoded machine without crossing that boundary.
- A simulation that attempts too much space is cut off.
- A machine might loop while staying inside the boundary, so a simple timer of bits is insufficient. Instead count the at most bounded configurations using counter bits.
- If the simulated machine halts, reverse its answer; if it exceeds the configuration count, it has repeated and can be treated as nonhalting.
- Space constructibility supplies the boundary, and the gap allows bookkeeping and self-interpretation.
- On a padded encoding of any purported -space decider for the diagonal language, the output disagrees with itself.
Taking the union over polynomial versus exponential constructible bounds yields
Padding
Padding changes the relation between the meaningful instance size and total input length. For language and increasing padding function , define
If , an algorithm costing on may become polynomial in padded length when . The padded language is a different language; padding does not magically speed up the original problem.
Example. If , then on an input promised to have the form , simulate the original decider in time after checking the format. Thus the padded version lies in . Parsing and validating the padding must be included.
Padding arguments can transfer hypothetical containments or equalities between scales. Their proof obligations are: define a uniquely parseable format, relate and , verify membership, and translate the resource bound in the correct direction.
Worked example
Graph reachability is in : breadth-first search marks each vertex once and scans edges in polynomial time. The marks and queue also use polynomial space, illustrating the containment above.
Common mistakes
- Reading as “fast in practice.”
- Assuming without checking hierarchy hypotheses.
- Using a runtime bound that excludes non-halting branches.
- Treating a containment diagram as proof of strictness.
- Omitting constructibility or the hierarchy gap.
- Forgetting loop detection in a space-bounded diagonal simulation.
- Claiming padding places the original, unpadded language in a smaller class.
Visualization prompt
Draw nested regions ; annotate known containments separately from unknown equalities.
Exercises
Exercise 1 —
Prove explicitly that for every , , and deduce .
Solution
Let with decider halting in steps. Each step reaches at most one new work cell, so the number of work cells is at most . Hence .
Union over yields .
Exercise 2 — Placing a language in the chain
Language has a decider using work cells. Prove and . What cannot be concluded about membership in ?
Solution
Immediately . By configuration counting there are configurations, so there is a decider in time , hence .
This does not give : the simulation is exponential. It also does not prove : a large upper bound is not a lower bound. If later an -time algorithm appears, then — membership is existential.
Exercise 3 — Time-hierarchy audit
Does the standard time-hierarchy theorem (with ) directly prove
Explain. Show how to separate from under the same hypotheses.
Solution
Not directly: the lower-class simulation overhead is already on the order of , so there is no strict gap. This does not refute the claim; it shows the cited theorem is insufficient.
However , so (subject to constructibility and model) the theorem yields .
Exercise 4 — Padding algebra
Suppose original time and padded length . Prove the time as a function of is not polynomial. Which padding would make the simulation linear in ?
Solution
From we get , hence
which is not polynomial in . Padding by is too short.
If , then , and the simulation is linear in (plus polynomial-in- format checks).
Exercise 5 — Polynomial versus quasipolynomial
Prove that is polynomial in , but need not be.
Solution
We have — a polynomial power.
By contrast , which is not bounded by any fixed for all . Hence it need not be polynomial.
Summary
Deterministic classes formalize scalable resource budgets. Elementary simulation gives containments, while diagonalization—under constructibility conditions—gives separations.
Guided theorem audit
Task 1 — Is the proof valid?
A student claims: “ because there is more time.” List the missing steps in the hierarchy proof template, and what can be salvaged.
Solution
Full template: (1) state theorem version and model; (2) constructibility and minimum bound; (3) compute the gap including overhead; (4) show the diagonalizer halts in budget; (5) choose a sufficiently padded self-input; (6) derive contradiction only against a smaller-class machine.
“More time” skips (2)–(3). For versus the usual gap fails. A separation versus can be salvaged when .
Failing a step does not necessarily refute the separation; it identifies a hole in the argument.
Task 2 — Space-bound audit
A decider uses cells. Bound the number of configurations and the halting time. When may one replace by ?
Solution
There are configurations, so halting time is at most . One may not automatically replace this by with coefficient without computing constants.
For the constant in the exponent is absorbed by a larger polynomial exponent. For a pointwise bound the constant matters.
Task 3 — Capstone: chain, hierarchy, and padding
- Explain why proving cannot pick a single polynomial exponent.
- With padding , translate times and to the new length.
- What distinguishes an existential class separation from classifying a natural problem in ?
Solution
-
is the union of all polynomial powers. Diagonalization must handle a machine enumeration together with exponents, or use a standard corollary of the hierarchy theorem.
-
If then . Time remains polynomial; time is not. Shrinking an exponential to a polynomial usually needs exponential padding.
-
The hierarchy theorem builds a diagonal language in the difference; a natural problem needs a separate hardness argument. An exponential algorithm alone does not prove non-membership in .
Sources
- Student-summary evidence: merged course summary, pp. 6-24, 30, 36-39, 68-71, 107, and 129-135; used for course emphasis, not verification.
- Course evidence: Semester A 2026 transcripts 2-4, deterministic classes, constructibility, and hierarchy arguments.
- Verification: Sipser, 3e, pp. 275-279 and 321-335.
- Verification: Arora-Barak draft, pp. 65-88.
- Verification: Papadimitriou, pp. 139-154.
The pages this was written from
3 pages
These pages were chosen by word overlap between the text here and the page's transcription — nobody has verified them. Treat them as a lead to check, not a citation.
Lecture 1 · page 4מחלקות סיבוכיותShared wordsאיחוד · נכון · עוצרת · מחלקות · מכונת
Lecture 2 · page 2משפט ההיררכיה במקוםShared wordsהפונקציות · גדולה · התוספת · לחשב · ליניארית · להכריע
Lecture 3 · page 2תרגילים+חישוב אי דטרמיניסטיShared wordsההכלות · ממש · ליניארית · חישוב · הקשר · הכלה