Algorithm Search⌘K

Definitionadvanced

Partition pair

Also called Hartmanis-Stearns partition pair, substitution property partition.

A pair of state partitions (pi, tau) such that the block of the next state under tau depends only on the input and the block of the present state under pi, the basis of FSM decomposition.

A partition pair of a finite state machine is a pair of partitions (π,τ)(\pi, \tau) of its states such that knowing the block of the present state in π\pi, and the input, is enough to know the block of the next state in τ\tau. A partition π\pi with the substitution property is one for which (π,π)(\pi, \pi) is a pair: the machine then maps blocks of π\pi to blocks of π\pi, and so contains a smaller machine whose states are the blocks. Hartmanis and Stearns built their structure theory of sequential machines on these two ideas in the 1960s. Partition pairs say which parts of the state a component machine must see to compute its own part of the next state, which makes them the basis of FSM decomposition and of the early methods of state assignment.

Definition

Machine. M=(S,I,O,δ,λ)M = (S, I, O, \delta, \lambda) is a deterministic, completely specified Mealy machine with a finite set of states SS, inputs II, outputs OO, next-state function δ:S×I→S\delta : S \times I \to S and output function λ:S×I→O\lambda : S \times I \to O. Partitions of SS are ordered by refinement, as in the partition lattice: π≤τ\pi \le \tau when each block of π\pi lies inside a block of τ\tau. We write s≡πts \equiv_\pi t when ss and tt share a block of π\pi, 00 for the partition into single states, and 11 for the partition with one block.

Partition pair. (π,τ)(\pi, \tau) is a partition pair of MM if for all states s,ts, t and every input xx,

s≡πt  ⟹  δ(s,x)≡τδ(t,x).s \equiv_\pi t \implies \delta(s, x) \equiv_\tau \delta(t, x).

Equivalently, there is a function δπτ\delta_{\pi\tau} from blocks of π\pi and inputs to blocks of τ\tau with δπτ(Bπ(s),x)=Bτ(δ(s,x))\delta_{\pi\tau}(B_\pi(s), x) = B_\tau(\delta(s, x)), where Bπ(s)B_\pi(s) is the block of π\pi that holds ss.

Substitution property. π\pi has the substitution property, or is an SP partition, if (π,π)(\pi, \pi) is a partition pair. Then the blocks of π\pi with the map δππ\delta_{\pi\pi} form a machine M/πM/\pi, the quotient of MM by π\pi. In algebraic terms, an SP partition is a congruence of the machine.

Output consistency. π\pi is output consistent if s≡πts \equiv_\pi t implies λ(s,x)=λ(t,x)\lambda(s, x) = \lambda(t, x) for every input xx.

The operators m and M. For a partition π\pi, let m(π)m(\pi) be the finest τ\tau such that (π,τ)(\pi, \tau) is a pair, and for a partition τ\tau let M(τ)M(\tau) be the coarsest π\pi such that (π,τ)(\pi, \tau) is a pair. Both exist:

  • M(τ)M(\tau) is the relation "s∼ts \sim t when δ(s,x)≡τδ(t,x)\delta(s, x) \equiv_\tau \delta(t, x) for every xx". It is an equivalence relation, so a partition, and by the definition every π\pi with (π,τ)(\pi, \tau) a pair satisfies π≤M(τ)\pi \le M(\tau).
  • m(π)m(\pi) is the partition generated by the pairs {δ(s,x),δ(t,x)}\{\delta(s, x), \delta(t, x)\} for s≡πts \equiv_\pi t and x∈Ix \in I, that is, the finest partition in which each such pair shares a block. A partition τ\tau makes (π,τ)(\pi, \tau) a pair exactly when it puts each such pair in one block, so exactly when m(π)≤τm(\pi) \le \tau.

Properties. All of the following follow from the definition.

  1. Galois connection. (π,τ)(\pi, \tau) is a pair if and only if m(π)≤τm(\pi) \le \tau, if and only if π≤M(τ)\pi \le M(\tau). Hence mm and MM are monotone.
  2. Monotonicity. If (π,τ)(\pi, \tau) is a pair, π′≤π\pi' \le \pi and τ≤τ′\tau \le \tau', then (π′,τ′)(\pi', \tau') is a pair. The pairs (0,τ)(0, \tau) and (π,1)(\pi, 1) are always pairs.
  3. Meets and joins. If (π1,τ1)(\pi_1, \tau_1) and (π2,τ2)(\pi_2, \tau_2) are pairs, so are (π1∧π2,τ1∧τ2)(\pi_1 \wedge \pi_2, \tau_1 \wedge \tau_2) and (π1∨π2,τ1∨τ2)(\pi_1 \vee \pi_2, \tau_1 \vee \tau_2). For the meet, s≡ts \equiv t in both πi\pi_i gives δ(s,x)≡δ(t,x)\delta(s, x) \equiv \delta(t, x) in both τi\tau_i. For the join, s≡π1∨π2ts \equiv_{\pi_1 \vee \pi_2} t means a chain s=s0,s1,…,sk=ts = s_0, s_1, \ldots, s_k = t in which each step stays in a block of π1\pi_1 or of π2\pi_2; each step of the image chain δ(si,x)\delta(s_i, x) then stays in a block of τ1\tau_1 or τ2\tau_2, so the ends share a block of τ1∨τ2\tau_1 \vee \tau_2.
  4. The SP lattice. By property 3 with πi=τi\pi_i = \tau_i, the SP partitions are closed under meet and join, so they form a sublattice of the partition lattice that holds 00 and 11. π\pi is SP if and only if m(π)≤πm(\pi) \le \pi.
  5. Generators. For two states s≠ts \ne t, let ρst\rho_{st} be the finest SP partition in which ss and tt share a block. It is found by starting from the partition that merges only ss and tt and replacing π\pi by π∨m(π)\pi \vee m(\pi) until nothing changes, which ends after at most ∣S∣−1|S| - 1 merges. Every SP partition π\pi is the join of the ρst\rho_{st} over the pairs s≡πts \equiv_\pi t: each such ρst\rho_{st} is at most π\pi, since π\pi is SP and merges ss and tt, and their join merges every pair that π\pi merges. So the at most (∣S∣2)\binom{|S|}{2} partitions ρst\rho_{st} generate the whole SP lattice, which is how programs list the SP partitions of a machine.
  6. State equivalence. The partition of SS into classes of equivalent states, the one that DFA minimization and Moore's algorithm compute, is the coarsest partition that is both SP and output consistent. It is SP and output consistent because equivalent states give equal outputs now and move to equivalent states. Conversely, if π\pi is SP and output consistent and s≡πts \equiv_\pi t, then by induction on the length of an input word the two runs from ss and from tt stay in one block of π\pi and so give equal outputs at every step; hence ss and tt are equivalent. This is the machine form of the Myhill-Nerode theorem.

Examples and non-examples

A counter with enable. Let S={0,1,2,3}S = \{0, 1, 2, 3\}, I={0,1}I = \{0, 1\} and δ(s,e)=s+e mod 4\delta(s, e) = s + e \bmod 4.

  • The parity partition π2={0,2}{1,3}\pi_2 = \{0, 2\}\{1, 3\} is SP: if s≡t(mod2)s \equiv t \pmod 2 then s+e≡t+e(mod2)s + e \equiv t + e \pmod 2. The quotient M/π2M/\pi_2 is a counter modulo 2.
  • τ={0,1}{2,3}\tau = \{0, 1\}\{2, 3\} is not SP: the states 0 and 1 share a block, but with e=1e = 1 they go to 1 and 2, which do not. Here m(τ)=1m(\tau) = 1, since the pairs {1,2}\{1, 2\} and {3,0}\{3, 0\} together with the blocks of τ\tau join everything, and M(τ)=0M(\tau) = 0, since every two distinct states are told apart by some input. So the only pairs with τ\tau in them are the trivial ones (0,τ)(0, \tau) and (τ,1)(\tau, 1).
  • More generally, for the counter modulo nn with enable, the SP partitions are exactly the partitions into cosets of a subgroup of the cyclic group Zn\mathbb{Z}_n. If π\pi is SP, then s≡πts \equiv_\pi t implies s+1≡πt+1s + 1 \equiv_\pi t + 1, so π\pi is invariant under translation; the block HH of 0 is then closed under addition (from a≡0a \equiv 0, translating by bb gives a+b≡ba + b \equiv b, and b≡0b \equiv 0), so it is a subgroup, and s≡πts \equiv_\pi t holds exactly when t−s∈Ht - s \in H. Conversely, a coset partition is invariant under translation. Modulo 4 there are three SP partitions, 00, π2\pi_2 and 11; modulo 6 there are four, from the subgroups {0}\{0\}, {0,3}\{0, 3\}, {0,2,4}\{0, 2, 4\} and Z6\mathbb{Z}_6.

A shift register. Let the states be the bit pairs (a,b)(a, b), the input a bit xx, and δ((a,b),x)=(x,a)\delta((a, b), x) = (x, a). Let πa\pi_a group the states by aa and πb\pi_b by bb.

  • (1,πa)(1, \pi_a) is a pair: the new first bit is the input, whatever the state.
  • (πa,0)(\pi_a, 0) is a pair: the next state (x,a)(x, a) depends only on aa and the input. So πa\pi_a is SP, and m(πa)=0m(\pi_a) = 0.
  • πb\pi_b is not SP: (0,0)(0, 0) and (1,0)(1, 0) share a block of πb\pi_b but go to (x,0)(x, 0) and (x,1)(x, 1), which do not. Here m(πb)=πa=m(1)m(\pi_b) = \pi_a = m(1): knowing bb tells nothing more about the next state than the input alone does.

The chain 1→πa→01 \to \pi_a \to 0 of pairs says that the register can be built from a first component that needs only the input and a second that needs only the first. This is the serial decomposition of FSM decomposition.

The order matters. (τ,1)(\tau, 1) is a pair for every τ\tau, but (1,τ)(1, \tau) need not be. In the counter, (1,π2)(1, \pi_2) is not a pair: with e=0e = 0 the states 0 and 1 stay at 0 and 1, which are in different blocks of π2\pi_2.

  • Partition lattice and equivalence relation. A partition of SS is an equivalence relation on SS, and refinement is inclusion of relations; meet and join are as in the partition lattice.
  • FSM decomposition. An SP partition π\pi and a partition τ\tau with π∧τ=0\pi \wedge \tau = 0 give a serial decomposition, and two SP partitions with meet 00 give a parallel decomposition; see FSM decomposition, which proves both.
  • State assignment. Hartmanis used SP partitions and partition pairs to choose state codes in which each bit depends on few others: a state variable that encodes the blocks of an SP partition has next-state functions that do not depend on the other variables. The later encoders KISS, NOVA and MUSTANG aim at two-level or multilevel logic instead; see state assignment.
  • Minimization. The coarsest output-consistent SP partition is state equivalence (property 6), computed by partition refinement as in Hopcroft's algorithm. For machines with unspecified entries, the classes of compatible states may overlap, so covers take the place of partitions; see incompletely specified FSM minimization.
  • Krohn-Rhodes theory. The quotient by an SP partition is a homomorphic image of the machine and the front part of a serial decomposition. The Krohn-Rhodes theorem states that every finite machine is covered by a cascade of components that are simple groups or two-state reset machines; partitions alone are not enough to reach that result, and its proofs use covers whose blocks may overlap.

References

  1. Juris Hartmanis and Richard E. Stearns, Pair algebra and its application to automata theory, Information and Control 7(4), 485 to 507, 1964, partition pairs, the operators m and M, and their lattice properties
  2. Juris Hartmanis and Richard E. Stearns, Algebraic Structure Theory of Sequential Machines, Prentice-Hall, 1966, the chapters on partitions with the substitution property, partition pairs, and serial and parallel decomposition
  3. Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 9 (sequential logic optimization, state encoding and decomposition of finite state machines)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/9YR4W3/text.yaml