Tiny descriptions #
The space hierarchy below linear space diagonalizes only over inputs whose framed description is
tiny: 2 ^ |unframe x| ≤ Nat.size |x|, that is, at most log₂ |x| + 1
(Cslib.Complexity.Diagonal.tinyDesc). Decoding a description of L bits takes space polynomial
in L, of a degree fixed by the decoder, hence O(2 ^ L), which is O(log |x|). So a diagonal
reading its input in place decodes its description in logarithmic space
(Cslib.Complexity.Diagonal.computableInLogSpace_decodeDesc_tinyCut). Padded descriptions are tiny
once the padding is doubly exponential in the description.
Main definitions #
Cslib.Complexity.Diagonal.tinyDesc: whether the framed description at the start of a word is tiny.Cslib.Complexity.Diagonal.tinyCut: the framed description at the start of a word when it is tiny, and the empty word otherwise.
Main results #
Cslib.Complexity.Diagonal.tinyDesc_frame_append: a description padded to doubly exponential length is tiny.Cslib.Complexity.Diagonal.computableInLogSpace_tinyDesc,Cslib.Complexity.Diagonal.computableInLogSpace_tinyCut: tininess is decided, and tiny descriptions are cut out, in logarithmic space.Cslib.Complexity.Diagonal.computableInLogSpace_decodeDesc_tinyCut: tiny descriptions are decoded in logarithmic space.Cslib.Complexity.Diagonal.exists_length_eDesc_decodeDesc_tinyCut_le: the decoded tiny description hasO(log |x|)bits.
References #
- M. Sipser, Introduction to the Theory of Computation, Theorem 9.3: the padded descriptions in the proof of the space hierarchy theorem.
Tiny descriptions in logarithmic space #
Tininess is decided in logarithmic space, by comparing unary numbers.
Tiny descriptions are cut out in logarithmic space.
Tiny descriptions are decoded in logarithmic space. Decoding takes space polynomial in the
length L of the description, which is O(2 ^ L) = O(log n) on a tiny description, and the
cut description is recomputed whenever the decoder reads it
(Turing.MultiTapeTM.ComputableInTimeAndSpace.comp_space).
Tiny descriptions decode to short descriptions: the decoded cut description has encoded
length O(log n), since decoding L bits gives a description of length polynomial in L.