boolean-minimization-le.le · output · proof · check · playground
The question
Five rows of a four-bit truth table must be true. Three other rows are don’t cares and the rest must be false. What is the smallest number of product terms needed to cover the required true rows?
Historical background
Quine studied simplification through prime implicants. McCluskey presented a systematic procedure for finding a minimum sum of products. This small example uses the same distinction between prime implicants and minimum covers. Quine, The Problem of Simplifying Truth Functions · McCluskey, Minimization of Boolean Functions
What we tell eyemind
A mask fixes each bit to 0 or 1 or allows either. A safe mask matches no
false row. A prime mask is safe, and dropping any of its fixed bits would
match a false row. The rules enumerate subsets of prime masks and retain
those that cover every required row. The minimum uses term count.
Ties are ordered lexicographically with 0 before 1 before either.
What eyemind concludes
There are three prime masks and two minimum covers. Both need
[either, either, 1, 1]. The other mask can be [0, 0, either, either]
or [0, either, either, 1]. The first pair corresponds to
“both high bits are 0, or both low bits are 1.”
struct('le:answer', 'first cover', 'four inputs', [[0, 0, 'either', 'either'], ['either', 'either', 1, 1]])
What the proof establishes
The proof is checked. It verifies that the masks avoid false rows, that the covers include all required rows, and that no smaller subset of prime masks covers them.
Try it
node bin/eyemind.js examples/boolean-minimization-le.le
node bin/eyemind.js --check-proof examples/proof/boolean-minimization-le.js examples/boolean-minimization-le.le
Remove the don’t-care declaration for row 5. That row becomes false,
so the cover using [0, either, either, 1] disappears.
