A Maple Package implementing minimization of boolean expressions
Jay Pedersen University of Nebraska at Omaha Student E-mail: jayped007@gmail.com Version 1.0, 2007-07-09, Project: Finds the mimimal sum of boolean expressions in sum of products form (eg: XY + X'Y + XY').
The "consensus" routine finds prime-implicants. The "minbool" routine finds minimal boolean sum.
References
The consensus method for determining prime implicants, is defined in:
Schaum's Outlines
Essential Computer Mathematics by Seymour Lipschutz Phd, Professor of Math, Temple University
(c) 1987, ISBN 0-07-037990-4 Chapter 8 - Simplification of Logic Circuits, problems 8.3 : 8.6, pages 201-202.
After prime implicants are determined; a second algorithm is applied to the prime implicants;
to remove any terms not needed for minimal form. This is also defined by Lipschutz;
in the same pages. The algorithm is as follows:
Multiply the prime implicant terms by the conjugate of each variable in
the expression which is not involved in the term.
For example, if the boolean expression involves XYZ; and a prime implicant is X;
then the following would be calculated for prime implicant X:
X(Y+Y')(Z+Z') --> XYZ + XYZ' + XY'Z + XY'Z'
Perform this operation for each prime implicant. Compare the results.
For any given prime implicant; if each term generated by the multiplication
can be found in the multiplied terms of the other prime-implicants, then that
prime implicant is superfluous and is removed from the minimal sum form.
Input Format (boolean expressions)
The input is a character-string containing a boolean expression; whose minimal boolean sum form
is to be determined.
The format of this string is to specify boolean variables as one-letter names;
optionally followed by a single-quote to specify "negated" or "NOT". Variables are concatenated to specify AND conditions;
eg: "XY'Z" means "X AND NOT-Y AND Z". The "+" operator can be used to "OR" expressions together; eg: "XY + Z'"
is read "(X AND Y) OR (not Z)".
The variable T is reserved to mean TRUE, and T' means FALSE.
So TT' = T', T + T' = T.
Lowercase letters are converted to uppercase. Eg: xy means "X AND Y". Whitespace is ignored (spaces and tabs).
Algorithm Code (Module)
Example Usage
Legal Notice: The copyright for this application is owned by the author(s). Neither Maplesoft nor the author are responsible for any errors contained within and are not liable for any damages resulting from the use of this material. This application is intended for non-commercial, non-profit use only. Contact the author for permission if you wish to use this application in for-profit activities.