Documentation

Complexitylib.Languages.LengthDivBy

lengthDivBy k: length-divisibility language family #

Strings whose length is divisible by k (for k ≥ 1). Decided by a (k + 2)-state scannerTM instance: the scan state is the current length taken mod k, incremented by 1 on each bit.

This generalizes evenLength (which is lengthDivBy 2).

Main definitions #

Main results #

Scanner for "input length is divisible by k". Scan state: the current length mod k (a ZMod k).

Equations
Instances For

    Strings whose length is divisible by k.

    Equations
    Instances For

      lengthDivBy k ∈ DTIME(n + 2).