Exercise

Separate Deterministic Time Classes

Apply the deterministic time hierarchy theorem with constructibility and logarithmic overhead.

Assignment sources

Semester A 2026 assignmentsOfficial assignmentexercise1.pdfQ2Authoritative course artifact
Semester B 2026 assignmentsOfficial assignmentassignment1.pdfQ2Authoritative course artifact
Noy 2025 high-quality exam preparation and community solutionsCommunity solutionפתרון מטלה 1 - סיבוכיות .pdfQ2High-quality preparation and community solution — not official
Noy 2025 high-quality exam preparation and community solutionsCommunity solutionפתרון מטלה 2 - סיבוכיות.pdfAssignment 2High-quality preparation and community solution — not official

Problem

Use the deterministic time hierarchy theorem to prove

DTIME(n2)⊊DTIME(n3).\mathrm{DTIME}(n^2)\subsetneq \mathrm{DTIME}(n^3).

State the theorem precisely enough to justify the logarithmic simulation overhead, verify time constructibility, and explain why a direct diagonal language still yields a decider.

Prerequisites

Know the unit definitions and how resources are measured against encoded input length. Distinguish a conditional theorem, a reduction, and an algorithm.

Hint 1

Use the form t1(n)log⁡t1(n)=o(t2(n))t_1(n)\log t_1(n)=o(t_2(n)).

Hint 2

Polynomials with integer exponent at least one are time constructible in standard models.

Hint 3

A clock prevents the simulated machine from running forever.

Guided construction

Time hierarchy diagonalization

Step 1 of 6
simulated bound t₁(n) = n²diagonal machine bound t₂(n) = n³
Padding makes every machine recur

the same machine owns arbitrarily long inputs, so the clock eventually has room

⟨M₃⟩10⁰⟨M₃⟩10¹⟨M₃⟩10²⟨M₃⟩10³…
Time hierarchy diagonalization tableRows M₁ to M₅ against padded self-referential inputs w₁ to w₅, a clock budget of n² steps per column, the diagonal cells flipped into the row of D, and a disagreement marker under every column.machine ╲ inputw₁⟨M₁⟩10ᵏw₂⟨M₂⟩10ᵏw₃⟨M₃⟩10ᵏw₄⟨M₄⟩10ᵏw₅⟨M₅⟩10ᵏM₁·not run yet·not run yet·not run yet·not run yet·not run yetM₂·not run yet·not run yet·not run yet·not run yet·not run yetM₃·not run yet·not run yet·not run yet·not run yet·not run yetM₄·not run yet·not run yet·not run yet·not run yet·not run yetM₅·not run yet·not run yet·not run yet·not run yet·not run yet
not run yet

Full solution

A standard multitape formulation says: if t1,t2t_1,t_2 are time-constructible, t2(n)≥nt_2(n)\ge n, and

t1(n)log⁡t1(n)=o(t2(n)),t_1(n)\log t_1(n)=o(t_2(n)),

then DTIME(t1)⊊DTIME(t2)\mathrm{DTIME}(t_1)\subsetneq\mathrm{DTIME}(t_2). The logarithm pays for efficient universal simulation and bookkeeping; formulations for other models may state a different but equivalent gap condition.

Take t1(n)=n2t_1(n)=n^2 and t2(n)=n3t_2(n)=n^3. Both are time constructible: a machine can maintain counters and deliberately execute exactly the required polynomial number of steps, with harmless model-dependent constants. Moreover,

t1(n)log⁡t1(n)t2(n)=n2log⁡(n2)n3=2log⁡nn⟶0.\frac{t_1(n)\log t_1(n)}{t_2(n)} =\frac{n^2\log(n^2)}{n^3} =\frac{2\log n}{n}\longrightarrow0.

The theorem therefore gives the strict containment directly.

For completeness, here is the diagonal mechanism behind that conclusion. Enumerate clocked deterministic machines so every machine occurs with its polynomial clock. On input encoding a machine together with padding, a universal machine simulates the encoded machine on that same input for at most t1(n)t_1(n) steps and reverses its answer; malformed encodings are handled by a fixed decision. A counter bounded by t1(n)t_1(n) makes the diagonal machine halt even if the encoded machine does not. Universal simulation and decoding fit within O(t1(n)log⁡t1(n))O(t_1(n)\log t_1(n)), which is eventually below a constant multiple of t2(n)t_2(n); finitely many short input lengths can be hard-wired.

Suppose the resulting language LDL_D were in DTIME(t1)\mathrm{DTIME}(t_1). Some clocked machine MjM_j in the enumeration would decide it within that bound. Choose a sufficiently long self-referential padded encoding associated with MjM_j. On that input the diagonal decider accepts exactly when MjM_j rejects, while MjM_j is assumed to decide the same language. This contradiction proves LD∉DTIME(t1)L_D\notin\mathrm{DTIME}(t_1), while the construction establishes LD∈DTIME(t2)L_D\in\mathrm{DTIME}(t_2).

Finally, the non-strict inclusion is also elementary: an O(n2)O(n^2)-time machine is an O(n3)O(n^3)-time machine. The theorem supplies a language witnessing that the reverse inclusion fails; it does not identify a familiar natural problem.

Checkpoints

Check both logical directions, halting of every relevant branch, and that output length and construction time are polynomial in the encoded input length.

Common mistakes

  • Checking only t1=o(t2)t_1=o(t_2) and ignoring universal-simulation overhead.
  • Diagonalizing against unclocked machines without ensuring halting.
  • Claiming the theorem separates a particular natural language.

Sources and verification

  • Merged summary, pp. 12-17 and p. 23
  • 2026 transcripts 3-4
  • Sipser 3e, sec. 9.1
  • Arora-Barak draft, sec. 3.1
  • Catalog mapping: data/exercises.json; statements and solutions are independently written; personal submissions are non-authoritative.

Provenance and confidence

The exercise is an original synthesis. Confidence reflects verification of the mathematical claim against the textbook sources listed above; course sources are used only where direct coverage is identified.