Documentation

Complexitylib.Languages.LastBit

lastBitOne and lastBitZero: final-symbol languages #

Strings whose last bit is 1 (resp. 0); the empty string is not in either language. Decided by a 3-state scannerTM instance: the scan state is the last bit seen so far, or none if no bit has been read.

Main definitions #

Main results #

def Complexity.TM.lastBitTM (target : Bool) :
TM 0

Scanner for "last input bit equals target". Scan state: the last bit seen so far as an Option Bool (none initially).

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Strings whose last bit is 0 (empty string excluded).

    Equations
    Instances For

      Strings whose last bit is 1 (empty string excluded).

      Equations
      Instances For