Counting the configurations inside a space bound #
⚠️ Unreviewed by Bolton
Cfg.WithinDecisionSpace bounds head positions, but counting configurations also needs to know
the tape contents are pinned down. A head that never leaves its window can never write outside
it, so every cell beyond still holds what it started with — that is Windowed, and it is what
makes the configuration space finite.
Nothing here mentions a machine: the counting is the same for deterministic and nondeterministic
configurations, and both PSPACE ⊆ EXP and the log-space graph arguments use it.
Main definitions #
Windowed— the tapes agree with their initial contents outside the windowcfgCode— a total code for configurations, injective inside the space boundinstDecidableEqCode— codes have decidable equality
Main results #
Windowed.mono,Cfg.WithinDecisionSpace.mono— enlarging the window is harmlesscfgCode_inj— two windowed configurations inside the bound with the same code are equalcard_Code— the number of codescard_Code_le_two_pow— the count is at most2to a linear-in-Sexponent
Outside the space window every tape still holds what it started with: the input tape is read-only, and the work and output tapes are blank beyond the reach of their heads.
The input tape is never written.
Work cells beyond the window are blank.
Output cells beyond the window are blank.
Instances For
Enlarging the space budget preserves a decision-space bound.
A finite code for configurations inside the space window: the state, the three head positions clamped into range, and the tape contents restricted to the window.
Equations
Instances For
Codes have decidable equality: the search of
Complexitylib.Classes.Containments.Internal.CodeSearch stores them in a Finset. The instance
is spelled out because the default synthesis size limit stops short of this nesting depth.
Equations
- Complexity.instDecidableEqCode Q k nn S = inferInstance
Two windowed configurations inside the space bound with the same code are equal.
The configuration count is at most exponential in the space bound. Both PSPACE ⊆ EXP
and Savitch's theorem read the count this way: as 2 to something linear in the space bound.