Views and their codes in polynomial time #
The step relation of the views of a machine with finitely many states
(Turing.MultiTapeNTM.ViewStep) is decided by Turing.MultiTapeNTM.viewStepB: a halted view
steps only to itself, and a running view to the summarized result of one of the finitely many
actions its transition relation permits for its control and read symbols. The test is
polynomial-time in the encoded pair of views: it branches on the finite key of the first view,
and each branch compares the second view with the results of a fixed finite list of fixed actions.
For Savitch's theorem the views are written as words of one width: the code of a view is a zero
tag followed by its encoding padded by Cslib.BitString.padWord, and the accepting code is the
word of all ones. The edge test Turing.MultiTapeNTM.codeEdge decodes both words by
Turing.MultiTapeTM.decodeFiniteCfg and links the code of a view to the code of each view it
steps to, and the code of a halted view with output [true] to every word with tag one. Malformed
words with tag zero decode to some view, which is harmless: every word with tag zero reachable
from the code of the initial view decodes to a view reachable from the initial view. Acceptance
is then reachability of the accepting code
(Turing.MultiTapeNTM.accepts_iff_reflTransGen_codeStep), and the edge test, the initial code and
the accepting code are polynomial-time.
Main definitions #
Turing.MultiTapeNTM.viewStepB: the Boolean step test of views.Turing.MultiTapeNTM.viewCode,Turing.MultiTapeNTM.acceptCode: codes of views and the accepting code.Turing.MultiTapeNTM.codeEdge,Turing.MultiTapeNTM.CodeStep: the edges between codes.
Main results #
Turing.MultiTapeNTM.viewStepB_iff: the test decidesTuring.MultiTapeNTM.ViewStep.Turing.MultiTapeNTM.computableInPolyTime_viewStepB: the test is polynomial-time.Turing.MultiTapeNTM.computableInPolyTime_decodeView: reading the view of a computed code is polynomial-time.Turing.MultiTapeNTM.accepts_iff_reflTransGen_codeStep: acceptance is reachability of the accepting code.Turing.MultiTapeNTM.computableInPolyTime_codeEdge,Turing.MultiTapeNTM.computableInPolyTime_viewCode_initView,Turing.MultiTapeNTM.computableInPolyTime_acceptCode: the edge test, the initial code and the accepting code are polynomial-time.
References #
The output summary is polynomial-time on raw words.
Summarizing the output of a configuration is polynomial-time.
The step test is polynomial-time in the encoded pair of views.
Codes of views #
The code of a view for encodings of length at most width: a zero tag, then its encoding
padded to 2 * width + 1 bits (Cslib.BitString.padWord).
Instances For
The accepting code for width width: all ones. Its tag is one, so it is no view's code.
Instances For
The edge test of codes. A code of a view finite has an edge to every code with tag one
if finite has halted with output [true], and to the code of every view finite steps to.
Instances For
The code of a view with an encoding of length at most width has 2 * width + 2 bits.
Between codes of views, the edges are the steps of the views.
The code of a view has an edge to the accepting code exactly when the view has halted with
output [true].
Acceptance is reachability of the accepting code, along the edges between codes of a width at least the length of the encoding of every reachable view.
The edge test in polynomial time #
Reading the view of a computed code is polynomial-time.
The edge test of codes is polynomial-time.
The code of the initial view of a computed input is polynomial-time, for a polynomial-time width.
The accepting code of a polynomial-time width is polynomial-time.