Shannon’s expansion theorem says any Boolean function can be decomposed around a single variable into two simpler functions. For variable :
Or, writing and for the two cofactors:
The cofactor is what collapses to when ; is what it collapses to when . The expansion is just “split the function based on the value of .”
Why this matters
Two practical uses:
-
MUX-based synthesis. Shannon expansion maps directly onto a Multiplexer: becomes the select line, and the two cofactors become the data inputs. So any function can be implemented as a MUX network where the leaves are simpler functions.
-
Recursive decomposition. Apply expansion repeatedly — first around , then around inside each cofactor, and so on. This is how LUT-based synthesis decomposes a wide function into a tree of small LUTs.
Worked example
Decompose around different variables and compare:
Around :
Around :
Around :
The third decomposition is the cheapest — both cofactors collapsed to single literals. Choosing the right variable to expand around is a real optimization decision; a useful first heuristic is to pick the one that appears in the most product terms, since it’s likely to simplify both cofactors. The heuristic is not always optimal — finding the variable whose expansion gives the smallest combined cofactor cost is itself a search problem, and synthesis tools (Espresso, ABC) explore it systematically.
Procedure for finding cofactors
To compute from a Boolean expression in product form:
- Take terms containing : drop the literal (it’s now ) and keep the rest.
- Take terms containing : drop them entirely (they’re now ).
- Take terms with neither: keep them as-is.
To compute , swap the rules: drop -containing terms, drop the literal but keep the rest.
Applied recursively (4-to-1 MUX style)
For two control variables over four cases, you get a 4-to-1 MUX decomposition. Take :
| Selected case | with values substituted | ||
|---|---|---|---|
| 0 | 0 | ||
| 0 | 1 | ||
| 1 | 0 | ||
| 1 | 1 |
Implementing as a 4-to-1 MUX: are select lines; the data inputs are . Three cases need just or its complement; the fourth is a constant. No complex AND/OR gates needed before the MUX — just inverters.
This is the route to “LUT-friendly” decomposition: the function reduces to simple expressions parameterized by the select variables.