Binary-counter exponential iteration on fair-coin multitape machines #
Cslib.Probability.IsPPTOn.iterate_spec clocks bounded adaptive loops in polynomial time when the
iteration count is computed in unary (encUnary). Exponential-time randomized algorithms such as
Schöning's k-SAT walk instead repeat a polynomial-time step an exponential number of times while
reusing polynomial workspace across restarts.
When the iteration count count : α → ℕ is computable in polynomial time in binary (encNat),
(encNat (count a)).length is polynomial in (input a).length even when count a itself is
exponential. Pairing a binary countdown counter with a polynomially bounded state and running clean
phases inside Turing.MultiTapePTM.repeatUntilBlank produces one finite-control MultiTapePTM
whose runs:
- halt on every branch within
C * ((count a + 1) * ((input a).length + 1) ^ E)steps, - realize
(ProbComp.eval (OracleComp.iterate (count a) (step a) (initial a))).map stateEncoding, - visit at most
C * ((input a).length + 1) ^ Ework-tape cells (toNTM.RunsInSpace), independent ofcount a.
Main results #
Cslib.Probability.IsPPTOn.exists_multiTapePTM_iterateWith_binary: captured-input closed binary-counter iteration with(count a + 1) * poly(|input a|)halting time and polynomial workspace.Cslib.Probability.IsPPTOn.exists_multiTapePTM_iterate_binary: non-capturing specialization.
Closed bridges and opaque two-phase composition #
Binary-counter exponential iteration #
Captured-input binary-counter iteration in polynomial workspace. The loop step may capture
the original input a : α.
Closed binary-counter iteration in polynomial workspace. If count : α → ℕ is computable in
polynomial time in binary (encNat), initial is computable in polynomial time, step is
strict PPT, and an invariant bounds the encoded size of every reachable state by a polynomial in
|input a|, then one finite-control fair-coin MultiTapePTM halts on every branch within
C * ((count a + 1) * ((input a).length + 1) ^ E) steps, realizes OracleComp.iterate (count a) step (initial a) under stateEncoding, and runs in polynomial workspace
C * ((input a).length + 1) ^ E independent of count a.