Counting and unambiguous logarithmic space #
SharpL counts first-halting accepting occurrence traces of one finite native counting
machine. The work-tape space bound applies to every computation prefix. On each encoded
input an all-branches clock guarantees that the count includes every accepting occurrence.
Identical transitions at one configuration can still contribute distinct occurrences.
UL consists of the languages whose membership bit is represented by such an accepting
count. Forgetting transition multiplicities retains acceptance and the same space bound,
giving the inclusion in NL.
Main definitions #
Turing.MultiTapeCTM.CountsInLogSpace: a logspace accepting-count witness for a fixed machine.Cslib.Complexity.SharpL: accepting occurrence counts of native logspace machines.Cslib.Complexity.UL: languages decided by such counts bounded by one.
Main results #
Cslib.Complexity.UL_subset_NL: forgetting accepting branch multiplicity gives an NL decider.Cslib.Complexity.UL_eq_USPACE:ULis unambiguous spaceUSPACE(log₂ n).
def Turing.MultiTapeCTM.CountsInLogSpace {α : Type} {k : ℕ} {State : Type} (M : MultiTapeCTM k Bool State) (enc : α ↪ List Bool) (f : α → ℕ) :
A given counting machine realizes the accepting count in logarithmic workspace:
Turing.MultiTapeCTM.CountsInSpace at a bound c * (Nat.log2 n + 1) in the encoded length n.