Generator

karnaugh

A generator in the logic library, called 7 times across 2 essays. Below: what it draws at its defaults and at each mode an essay asks for, what it checks while drawing, and everywhere it is used.

karnaugh is one function. Everything below came out of it during this build, at parameters taken from the essays rather than invented for this page — so a figure here is the same figure a reader meets in an essay, and if the generator changes, this page changes with it.

At its defaults

(p ∧ q) ∨ (¬p ∧ r) on the 2-by-4 mapA grid of the assignments arranged so that neighbouring squares differ in one variable.qrp000111100101100011(p ∧ q) ∨ (¬p ∧ r) on the map — 4 of 8 squares truesquares that touch, edges included, differ in exactly onevariable

show: "gray"

The Gray code the map is laid out in, for 3 variablesA grid of the assignments arranged so that neighbouring squares differ in one variable.qrp0001111001000001011010100101111110the 4-step code across the top and the 2-step code down thesideeach step changes one variable, and the last step wraps roundto the first

show: "cover"

(p ∧ q) ∨ (¬p ∧ r), covered by 2 rectanglesA grid of the assignments arranged so that neighbouring squares differ in one variable.qrp000111100101100011(p ∧ q) ∨ (¬p ∧ r) covered by 2 of its 3 prime implicants¬p∧r ∨ p∧q — checked against the formula on all 8assignments

What it checks while it draws

Collected by running the family and recording what it asserted, not written here. The count is how many separate times the claim was put to the test while these drawings were made.

Where it is called

Changing this generator changes every figure on this list. That is what makes the list worth publishing rather than keeping in a check script.

The whole library · What the figures prove