A Finite State Remembers Parity Without a Count

A machine can retain just enough information about earlier symbols to decide later behavior. For parity, two states summarize all possible counts.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace a bit string
  2. Choose which property the machine represents
  3. Collect prefixes with identical information for any suffix
  4. Show the two states are distinguishable

Trace a bit string

For 1101, the remembered parity goes odd, even, even, odd if ones toggle it. Counts one and three end in the same state. See a DFA by hand.

Choose which property the machine represents

If the task later needs the exact count, these states are insufficient for arbitrarily long input. Stored state and input history explain the difference.[1]

Collect prefixes with identical information for any suffix

Prefixes containing one and three ones both have odd parity. Appending another one flips each to even. Appending zero preserves odd parity. Future acceptance can use parity alone when the language asks whether count is even. See finite machines by hand.

001 → odd
1011 → odd
Add suffix 10 → both even
The exact previous counts were different

Show the two states are distinguishable

An even and an odd prefix give opposite answers on the empty suffix for an even-parity language. Therefore one shared state could not represent both correctly.

References

  1. Michael Sipser, Introduction to the Theory of Computation ↩