The cost of cutting, pasting and stepping windows #
Cutting windows (Turing.MultiTapeTM.Universal.Windowed.extract) and pasting them back
(Turing.MultiTapeTM.Universal.Windowed.restore) take time linear in the encoded windows for each
window, so time O((K + 1) * N) for K windows of total encoded length N; every operation on
the cells of a window is linear in their encoded length. A windowed step
(Turing.MultiTapeTM.Universal.Windowed.wstep) takes time cubic in the encoded description and
windows. Halving a number of steps in unary takes linear time.
Main results #
Turing.MultiTapeTM.Universal.Windowed.extract_inO,.restore_inO: cutting and pasting.Turing.MultiTapeTM.Universal.Windowed.wstep_inO: a windowed step.Turing.MultiTapeTM.Universal.Windowed.firstHalf_inO,.half_inO: halving in unary.
Sizes #
Cutting and pasting a window #
Cutting and pasting all windows #
Cutting windows of radius r, in time linear in the encoded windows for each window.
theorem Turing.MultiTapeTM.Universal.Windowed.restore_inO :
ComputableInO (fun (p : ℕ × Win × Win) => restore p.1 p.2.1 p.2.2) (encPair encUnary (encPair eWin eWin)) eWin
(fun (p : ℕ × Win × Win) => (p.2.1.2.length + 1) * (((encPair encUnary (encPair eWin eWin)) p).length + 1))
fun (p : ℕ × Win × Win) => (p.2.1.2.length + 1) * (((encPair encUnary (encPair eWin eWin)) p).length + 1)
Pasting windows back, in time linear in the encoded windows for each window.
Halving in unary #
A windowed step #
Coded input cells #
The step #
Sizes #
A windowed step, in time cubic in the encoded description and windows.