Compressing the past into a state

A finite-state machine summarizes the information needed at a particular moment as one of finitely many states. Inputs trigger changes, and transition rules specify how the current state and input determine the next step. A deterministic finite automaton also specifies a finite input alphabet, one initial state and a set of accepting states.

A state diagram depicts states as nodes and transitions as labeled arrows; a transition table can represent the same information. A self-loop means that processing its input leaves the state unchanged, not that the input was ignored. Because states can be revisited, a finite state set does not impose a fixed bound on the number of processing steps.

References: [1]

Checking parity with two states

Consider a machine that checks whether a binary string contains an even number of ones. Let E mean that an even number has been seen and O that an odd number has been seen. Start in E. Reading zero leaves the state unchanged; reading one switches between E and O. Only E accepts.

For input 101, the successive states are E, O, O, E, so the machine accepts. Input 10 ends in O and is rejected. The empty string leaves the machine in E and is accepted because it contains zero ones. The machine never stores the exact count: parity is sufficient for every later decision. Inputs 11 and 1111 therefore leave identical memories despite having different lengths and counts.

References: [1]

Acceptance and equivalent descriptions

The set of all accepted strings is the machine's language. Acceptance is checked after the entire input, so passing through an accepting state midway does not guarantee eventual acceptance. Changing which states accept can change the recognized language even if all transitions remain unchanged.

A nondeterministic automaton permits alternative transitions, including moves that consume no input. It accepts if a complete accepting path exists. A deterministic automaton can simulate it by using a state to record the set of possible nondeterministic states. Both models recognize exactly the regular languages, also describable by formal regular expressions. Equal recognition power does not require equal representation size.

References: [2] [3]

What finite memory cannot retain

Finitely many states can distinguish only finitely many stored situations. Remembering parity is possible, but retaining a different state for every unbounded earlier count is not. The language consisting of any number of zeros followed by exactly as many ones is not regular. Establishing that limitation requires proof, rather than merely failing to draw a suitable machine.

A Turing machine has finite control too, but also a tape that can be read, rewritten and used over an expanding region. Its additional memory comes from this workspace, not from infinitely many control states. Long inputs, long computations and increasing stored information are different properties: allowing the first two alone does not remove the finite-state memory restriction.

References: [3] [4]