Breadth-first search through the views of a nondeterministic machine #
A nondeterministic machine accepts exactly when an accepting view
(Turing.MultiTapeNTM.acceptingView: halted, with output [true]) is reachable from its initial
view (Turing.MultiTapeNTM.accepts_iff_reflTransGen_viewStep). Breadth-first search through the
views (Cslib.Reachability.search, along Turing.MultiTapeNTM.viewSucc) finds exactly the
reachable views once it has run for as many rounds as there are
(Turing.MultiTapeNTM.mem_search_iff). Under a logarithmic space bound there are polynomially
many (Turing.MultiTapeNTM.length_le_of_nodup_reachable), so a polynomial number of rounds
suffices, each round is polynomial-time in the views found so far, and these are polynomially
many views of linear size. The search is therefore polynomial-time
(Turing.MultiTapeNTM.exists_computableInPolyTime_search): reachability in the configuration
graph, which has polynomially many vertices Sipser, Section 8.4. The search run
until no new view appears, under any space bound, is
Turing.MultiTapeNTM.reachableViews.
Main definitions #
Turing.MultiTapeNTM.viewSucc: the views a running view steps to.Turing.MultiTapeNTM.acceptingView: the test for a halted view with output[true].
Main results #
Turing.MultiTapeNTM.reflTransGen_viewSucc_iff: the successor lists give the reachable views.Turing.MultiTapeNTM.mem_search_iff: enough rounds find exactly the reachable views.Turing.MultiTapeNTM.computableInPolyTime_viewSucc,Turing.MultiTapeNTM.computableInPolyTime_acceptingView,Turing.MultiTapeNTM.computableInPolyTime_initView: the successors, the accepting test and the initial view in polynomial time.Turing.MultiTapeTM.ComputableInPolyTime.expand: a round in polynomial time.Turing.MultiTapeNTM.length_encList_search_le: under any space bound, the views found by any number of rounds are few and short.Turing.MultiTapeNTM.exists_computableInPolyTime_search: under a logarithmic space bound, enough rounds of breadth-first search find their views in polynomial time.
References #
The views a view steps to, other than itself: none for a halted view, and for a running view the summarized results of the actions its transition relation permits.
Instances For
The successor lists give the reachable views: a halted view steps only to itself, which adds nothing to reachability.
Enough rounds find every reachable view: under a space bound s, breadth-first search
for at least 2 ^ (2 * coreLengthBound k State n s + 1) rounds finds exactly the views reachable
from the initial view.
Breadth-first search in polynomial time #
Appending an element unless it is already in the list is polynomial-time.
A round of breadth-first search is polynomial-time when the successors are: the found elements and their successors are at most polynomially many and long.
The successors of a view are polynomial-time.
The accepting test is polynomial-time.
The initial view of an encoded instance is polynomial-time.
Breadth-first search finds few short views: under a space bound s, any number of rounds
of the search from the initial view finds at most 2 ^ (2 * coreLengthBound + 1) views, each
encoded within 2 * viewLengthBound + 1 bits.
Breadth-first search within logarithmic space is polynomial-time. If every computation
prefix of ntm on every encoded instance enc a stays within space c * (Nat.log2 n + 1), then
for some polynomial number of rounds, at least the bound of Turing.MultiTapeNTM.mem_search_iff,
the list of views found by breadth-first search from the initial view is polynomial-time in the
encoded instance.