Counting an input's length modulo four #
A single polynomial-time language, built because the analysis of the PCP
statement needs one concrete verdict that depends on the length of its input:
the strings whose length is divisible by four.
The construction is the obvious one, assembled from the existing toolkit rather
than from a machine. A counter with four states is a finite function, so
ite_mem_finset_mem_FP puts one step of it in FP; unaryLength_mem_FP
supplies one tick per input bit; and iterate_mem_FP runs the ticks.
Main definitions #
Complexity.ctrStep— one step of a counter modulo fourComplexity.lenMod4— the language of lengths divisible by four
Main results #
Complexity.lenMod4_mem_P— it is polynomial-time decidable
One step of a counter modulo four. Outside the four states it resets, which keeps the function total without leaving the finite table.
Equations
Instances For
The counter, run once per input bit.