← Student tools · Problem 33 · Lecture 13 · Round 3 (40 pts)

Space vs Time · TIME(f) ⊆ SPACE(f) ⊆ TIME(2O(f))

Visualise the time/space tradeoff for typical algorithms.

CLO-5R3·40 ptsL13
🔊 Listen

Time and space measure two different resources of a Turing machine: how many steps it takes vs how many distinct tape cells it uses. The two are related but not identical, captured by Sipser's fundamental sandwich theorem.

Inclusion theorem (Sipser §8.1)

For any space-constructible function f(n) ≥ log n:

TIME(f(n)) ⊆ SPACE(f(n)) ⊆ TIME(2O(f(n)))

Both inclusions have one-line proofs:

Consequences for classes

P ⊆ PSPACE ⊆ EXPTIME. Each containment is via the sandwich theorem at a specific scale.

🔊 Listen
Bar chart for 5 algorithms Auto-plays
🔊 Listen
🔊 Listen
🔊 Listen

Sipser: §8.1 (space complexity). Lecture notes: Module 6 slide 1. Companion problems: P34 (Savitch tree), P35 (PSPACE vs NPSPACE), P63 (NP ⊆ EXPTIME).