Encoding the start of a nondeterministic path #
NTM.choiceTM runs one path of a nondeterministic machine deterministically,
reading its choice bits from the last work tape. To simulate such a run inside
Cobham's algebra, the starting configuration must be encoded with the choice
string already on that tape and its head parked on the first bit.
This file supplies that encoder — Cobham.initChoiceFn, the counterpart of
Cobham.initFn — together with its algebra membership and the identification
with Cobham.cfgCode of the intended configuration.
Main definitions #
Cobham.choiceTape— the choice string on a tape, head at cell 1Cobham.choiceCfg— the starting configuration ofNTM.choiceTMCobham.initChoiceFn— its encoding, as a function of the two strings
Main results #
Cobham.initChoiceFn_mem— the encoder is in the algebraCobham.initChoiceFn_eq— the encoder computescfgCodeofchoiceCfgCobham.dropChoice_choiceCfg— forgetting the choice tape gives the nondeterministic machine's own initial configuration
The choice string on a tape, with the head parked on the first bit.
Equations
- Complexity.Cobham.choiceTape c = { head := 1, cells := (Complexity.Tape.init (List.map Complexity.Γ.ofBool c)).cells }
Instances For
The starting configuration of NTM.choiceTM tm: the input on the input
tape, the choice string on the appended choice tape.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Forgetting the choice tape gives the nondeterministic machine's own initial configuration.
The encoded starting configuration of a nondeterministic path. Everything but the input tape's and the choice tape's right half-blocks is a constant of the machine.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Iterating the encoded step from a choice configuration #
The encoded iteration tracks a choice run.
Running the path inside the algebra #
Reading the verdict #
The run is the nondeterministic trace #
The deterministic run from a choice configuration is the trace.
The verdict is the path's verdict #
The predicate the verdict computes: after |c| steps along the choice bits
of c, the machine has halted with 1 on the first output cell.
Equations
- One or more equations did not get rendered due to their size.