The cost of the initial windows #
From the input of the universal function — a description d, an input x and a number of steps
t in binary — the first problem of the windowed simulation is the description, t in unary and
the windows of radius t of the initial configuration. It is computable in time
O(N + (D + 1) ^ 3 + (t + 1) * (L + 1)) for the encoded input length N, the length D of the
description and the length L of t in binary: t is converted to unary by doubling, the input
symbols are recoded by a finite-state rewrite in linear time, and the input window is cut with a
linear-time take.
The computation goes through the intermediate value (d, t, x') with t in unary and the coded
input cells x' = x.map fun a => some (a + 1):
tis converted by a left fold ofu ↦ 2 * u + bover the binary digits oft, most significant first; each round is linear in the unary state, which is at mostt.- In
encList encUnary x, the elementais(true true)^a false; in the encoding ofx'it is(true true)^(a + 2) false. The rewritetrue ↦ true,false ↦ true false, applied four times, maps the one to the other, and every application is a finite-state transducer. - The input window keeps the first
t + 1coded cells; the blank work windows are built byComputableTidilyInDegree.replicate, within time cubic in the number of work tapes.
Main results #
Turing.MultiTapeTM.Universal.Windowed.initProb_inO: the first problem.
The initial windows #
From binary to unary by doubling #
Recoding the input symbols #
The intermediate value #
The first problem of the windowed simulation, in time linear in the encoded input, cubic in
the length of the description and O((t + 1) * (L + 1)) for t steps written with L binary
digits.