State reduction is the optimization of a Sequential circuit by removing redundant states. Fewer states means fewer flip-flops needed to encode the state, which means smaller, cheaper, faster circuits.

States are redundant if they are equivalent to another state: they produce the same output for every input and transition to the same next state (or a pair of equivalent states). Equivalent states can be merged without changing the FSM’s input-output behavior.

Why redundancy happens

When you design an FSM from a verbal specification or via a state-table-by-cases approach, it’s easy to introduce redundant states:

  • Two states that “feel” different but actually behave identically.
  • Multiple paths through the design that converge at functionally equivalent points.
  • Symmetric situations encoded with separate states.

Reducing them shrinks the state register: states need flip-flops. Going from 9 states to 5 saves a flip-flop.

Equivalence definition

Two states and are equivalent if, for every input sequence applied starting from versus from , the FSM produces the same output sequence. Equivalently (and more usefully for the algorithm): iff for every input ,

  1. The output produced by the pair equals the output produced by , and
  2. The next state from on is equivalent to the next state from on .

The two FSM styles attach the output to different things:

  • Moore machine. Output depends only on the current state. Condition (1) reduces to ” and have the same state output.” If the outputs disagree, regardless of inputs.
  • Mealy machine. Output depends on the (state, input) pair. Condition (1) must hold for each input: if and produce different outputs on even a single input, they are not equivalent. This is a strictly stronger requirement than the Moore version.

Always check the right condition for the machine style. Applying the Moore-style “same state output” check to a Mealy FSM will incorrectly merge states whose transition outputs differ.

Implication table method

The standard algorithm: build an implication table, a triangular table with one cell per unordered pair of distinct states. Fill each cell with either “definitely non-equivalent” (×) or a list of next-state pairs the equivalence depends on.

Algorithm

  1. Initial cull. For each pair :
    • Moore: mark × if and have different state outputs.
    • Mealy: mark × if there exists any input for which and produce different transition outputs.
  2. List dependencies. For each surviving pair, write the next-state pair for every input . The equivalence of implies the equivalence of every listed pair.
  3. Propagate. If any listed dependency is marked ×, mark the current pair × too. Repeat until no change.
  4. Read off equivalences. Cells that survive are equivalent pairs. Combine them into equivalence classes (transitively: if and then ).

Worked example (Moore machine)

State table (input alphabet , single-bit state output):

statenext on 0next on 1output
abc0
bad0
cad0
dbc1

Step 1, initial cull by output. State has output 1; all others have output 0. Mark every pair containing as ×: , , all eliminated.

Surviving pairs: , , .

Step 2, list dependencies for each:

  • on input 0: → same as , trivial. On input 1: → already ×. So depends on a × pair → mark ×.
  • on input 0: → same as . On input 1: → already ×. Mark ×.
  • on input 0: → trivial (same state). On input 1: → trivial. No × dependencies → equivalent.

Step 3, propagate. After marking and , no other pairs depend on them, so we’re stable.

Result: , all other distinct pairs non-equivalent. Merge into , replace every “next state ” with “next state “:

statenext on 0next on 1output
abb0
bad0
dbb1

3 states instead of 4 — saves a flip-flop (, same as for 4, so this particular machine doesn’t shrink the register, but the logic gets simpler and a 4→3 reduction does help when starting from, say, 5→4 or 9→8).

The Mealy-machine procedure is identical in shape; only Step 1 changes (compare per-input transition outputs instead of per-state outputs).

After reduction

Once you’ve identified equivalent states, merge them in the state table:

  • Pick one representative per equivalence class.
  • Replace every reference to a redundant state with its representative.
  • Remove the redundant state’s row from the table.

The reduced state table can then be encoded with fewer flip-flops. See State Assignment for the next step.

Limits

State reduction is a polynomial-time algorithm. For very large FSMs, more sophisticated minimization algorithms exist. Hopcroft’s algorithm runs in for DFA minimization, where is the number of states and is the alphabet size. Texts often quote "" by treating as a constant; for typical hardware FSMs with a fixed input alphabet that’s fine, but the alphabet factor matters when grows.

Reduction is helpful but not always dramatic. A well-designed state table from the start has few or no redundant states. Reduction is most useful when the FSM was generated automatically or by composition of multiple sub-machines.