Minimization of Boolean function by the
1Why Boolean function minimization?
Here we will not go into the theory of Boolean functions, automata or finite state machines. The reader is
expected to have some background knowledge in them or at the very least understanding what logical
conjunction (and), disjunction (or) and negation (not) are.
The following short notations will be used throughout this document:
x and y ↔ xy
x or y ↔ x + y
not(x) ↔ ¯ x
Let us start with a motivating example. Assume you have a logical function f depending on 4 logical
variables a, b, c and d, as follows:
f =¯b + ¯ acd + b¯ cd + c¯d + a¯d + a¯b
This could be an activation function f for some automata, that depends on state of the 4 signals. This
could also be some logical expression in a programming language, that depends on the combination of
4 logical conditions. For example in C this could be
if (!b || (!a && c && d) || (b && c && d) || (c && !d) || (a && !d) || (a && !b))
The question that we want to answer not is Can we simplify this expression?
This can be motivated by the fact that we want to reduce the number of logical elements involved in
out activation function (respectively the size and cost of the final product) or that we want to make our
program faster and hopefully understandable. In the rest we will abstract ourselves from the underlying
problem and will deal only with the problem posed above.
2How to solve Boolean minimization problems?
There are 2 main algorithms: Karnaugh map (also known as Veitch diagram) and Quine-McCluskey
method. While the former is an relative easy and intuitive it becomes difficult to use with more than
5 Boolean variables and is difficult to implement in a program. On other hand the Quine-McCluskey
method is more complicated, but easier for computer implementation. Therefore minBool.m is an
implementation of this method