Writing circuits chunk by chunk in logarithmic space #
A writer (Cslib.Complexity.CircuitValue.WriterSpec) is a read machine on a framed input frame w that counts the length n of w, emitting a fixed word for each bit and another at the end,
then emits the chunks chunk n 0, …, chunk n (N n - 1) and a trailer, keeping only the number of
the current chunk, and finally emits a word for each bit of w
(Cslib.Complexity.CircuitValue.WriterSpec.run_machine). When the number of chunks is
polynomially bounded and the chunks and the trailer are computed within work space linear in the
binary lengths of n and of the number of the chunk, the writer runs in logarithmic space
(Cslib.Complexity.CircuitValue.WriterSpec.computableInLogSpace). This is how encoded instances of
circuit value problems built from uniform circuits, such as the tableau of a machine, are written
in logarithmic space.
Main definitions #
Cslib.Complexity.CircuitValue.WriterSpec: what a writer emits.Cslib.Complexity.CircuitValue.WriterSpec.machine: the writer, as a read machine.Cslib.Complexity.CircuitValue.WriterSpec.output: the word it writes.
Main results #
Cslib.Complexity.CircuitValue.WriterSpec.run_machine: the writer halts with its output.Cslib.Complexity.CircuitValue.WriterSpec.computableInLogSpace: a writer with chunks computed in linear space runs in logarithmic space.
What a writer emits: a word for each bit of the input and a word at the end while it
counts the input, then numChunks n chunks and a trailer, then a word for each bit of the input
while it copies the input.
The word emitted for each bit of the input while counting.
The word emitted at the end of the count.
The number of chunks, for an input of length
n.Chunk
i, for an input of lengthn.The word emitted after the chunks, for an input of length
n.The word emitted for each bit of the input while copying.
The step of the writer. Its state is a phase, the length n of the input and a counter:
phase 0 counts the input, phase 1 writes the chunks, phase 2 copies the input, phase 3
halts.
The writer, as a read machine on the framed input.
The word written on the input w.
The number of steps of the writer on an input of length n.
Logarithmic space #
A writer runs in logarithmic space when it has polynomially many chunks and its chunks and trailer are computed within the budget of its states.