Learn · The Concrete Discrete Math of Real Systems
growing
Every Machine Is Built from Shuffles and Resets
Every finite machine can be assembled from reversible permutations and irreversible resets, exposing where information is preserved and where it is destroyed.
Every finite semigroup is a homomorphic image of a subsemigroup of a suitable wreath product of simple groups and aperiodic semigroups.
— Kenneth Krohn and John Rhodes, “Algebraic Theory of Machines I,” 1965
The previous chapter decomposed work into antichain layers. This chapter decomposes finite behavior. You will view each input symbol as a transformation of state, distinguish reversible permutation groups from information-losing resets, understand cascade composition, and read the Krohn–Rhodes theorem as a structure theorem rather than a construction recipe.
Each input rearranges the state set
Take a finite machine with states . Fix an input symbol . Its transition rule sends every current state to one next state, so defines a function . A word composes transformations: apply , then .
All transformations generated by input words form a semigroup under composition. Associativity comes free because function composition is associative. The machine's operational behavior has become algebra.
Transformation semigroup — a set of functions from a set to itself, closed under composition. A finite automaton's input words generate one on its state set.
Two species of motion
If a transformation is a bijection, it permutes the states. It has an inverse and loses no information. Rotating a three-position dial is the cyclic group of order three.
If two states map to one, the transformation is irreversible. A reset maps every state to start. A threshold may collapse many counter values into over-limit. Such maps are aperiodic: repeating them eventually stops creating new reversible cycles.
Permutation moves information around. Reset collapses distinctions. Every finite machine combines these two acts.
This lens improves design reviews. “What state changes?” is weaker than “Which distinctions survive this transition?” Logging before an irreversible collapse is not an implementation detail; after the reset, the missing distinction cannot be reconstructed.
Cascades wire simple machines
In a direct product, components receive the same input independently. A cascade is richer: an upstream component receives the external input, and downstream components receive both that input and selected upstream state. Information flows one way through the stages.
The algebraic form is a wreath product. The term is forbidding; the picture is not. A carry bit from the low digit controls whether the high digit advances. A protocol phase controls how a lower parser interprets the next byte. Small machines coordinate through a one-way dependency.
The prime-decomposition theorem
The Krohn–Rhodes theorem says, roughly, that every finite transformation semigroup divides a finite cascade built from simple groups and elementary reset-like components. “Divides” permits taking a submachine and then identifying behaviorally equivalent states—the same closure and quotient moves used earlier in the book.
Note
The people behind the theorem. Kenneth Krohn and John Rhodes developed the prime decomposition theory of finite machines in the 1960s. Their 1965 paper established the foundational theorem. The result builds on semigroup theory and automata work by a broad community; “Krohn–Rhodes” names the decomposition theorem, not the invention of state-machine composition.
The theorem is analogous to factoring an integer, but not identical. Decompositions need not be unique or small, and finding a useful cascade is an engineering art. Its value here is conceptual completeness: no third kind of finite behavioral atom is hiding.
Where decomposition runs out
- The theorem concerns finite machines; unbounded stacks and tapes lie outside its scope.
- Existence does not promise a compact, unique, or efficient decomposition.
- “Reset” need not be one literal reset input; aperiodic components can have richer irreversible behavior.
- Algebraic factors explain behavior, not automatically the best module boundaries for code ownership or deployment.
Lessons
- Input words generate transformations of the state set.
- Bijective transformations form reversible groups; noninjective ones erase distinctions.
- Cascades compose small machines with one-way control.
- Krohn–Rhodes says finite behavior decomposes into group-like and reset-like components.
Practice
- Classify the transformations
toggle,set-zero, andincrement-mod-4as reversible or collapsing. - Explain why no later transformation can undo a noninjective map on its own.
- Sketch a two-digit decimal counter as a cascade.
- One month later, retrieve the sentence “permutations preserve; resets erase.”
The next machine grows knowledge
The components above process a stream one input at a time. Another important machine starts with facts and repeatedly derives consequences. Its state grows monotonically until an entire pass adds nothing. The next chapter explains why “nothing changed” is a proof of completion.
References
- Krohn and Rhodes. “Algebraic Theory of Machines I: Prime Decomposition Theorem for Finite Semigroups and Machines.” Transactions of the AMS, 1965. — the primary decomposition theorem
- Eilenberg. “Automata, Languages, and Machines, Volume B.” Academic Press, 1976. — classical algebraic automata theory
- Rhodes and Steinberg. “The q-Theory of Finite Semigroups.” Springer, 2009. — modern deep treatment and historical context