Heuristic Based Minimization of Boolean Functions
Overview of Two-Level Minimization
Minimum Cover: This refers to the cover of a Boolean function consisting of the minimum possible number of implicants. Finding a minimum cover is a global optimum problem.
Minimal Cover (Irredundant Cover): This is a cover of a function that is not a proper superset of any other cover. In a minimal cover, no single implicant can be removed while still maintaining the coverage of the function's original minterms. This represents a local optimum.
Minimal w.r.t. 1-Implicant Containment Cover: A weaker local optimum where no single implicant is contained within another single implicant in the cover.
Function Examples and Implementations
Example Function 1:
Example Function 2:
Visual Mappings: The transcript references cube representations (Karnaugh-map-like structures) to visualize covers:
Vertices are indexed by binary strings (e.g., , , , , , , , ).
The covers are identified by Greek letters , , , , and .
Fundamental Definitions and Prime Implicants
Prime Implicant: An implicant that is not contained by any other implicant of the function. Removing any literal from a prime implicant would result in it covering minterms that are not part of the original function.
Prime Cover: A cover consisting entirely of prime implicants.
Essential Prime Implicant: A prime implicant that covers at least one minterm which is not covered by any other prime implicant. Essential prime implicants must be included in any minimum cover of the function.
Exact and Heuristic Minimization Methods
Exact Methods:
Goal: Compute the absolute minimum cover.
Characteristics: These methods are often computationally difficult or impossible to perform on extremely large functions due to exponential complexity.
Fundamental Approach: Most are based on the Quine-McCluskey method.
Heuristic Methods:
Goal: Compute minimal covers, with the hope that they might be the minimum cover.
Characteristics: Designed for large-scale practical applications where exact methods fail.
Notable Programs: MINI, PRESTO, and ESPRESSO.
Quine's Theorem: States that there is a minimum cover that consists solely of prime implicants.
Consequence: The search space for a minimum cover can be restricted exclusively to the set of prime implicants.
Quine-McCluskey Method: Involves two main steps: computing all prime implicants and subsequently determining the minimum cover through a covering table.
Shannon's Decomposition (Boole’s Expansion Theorem)
Boole's Expansion Theorem: A function can be expanded relative to a variable as:
This theorem is also widely credited to Claude Shannon.
Cofactors:
Cofactor w.r.t. : Represented as .
Cofactor w.r.t. : Represented as .
Example Calculation: Given :
Litmus Test: The original function should be reconstructible using the cofactors: .
Unateness in Boolean Functions
Definition: Given a function .
Positive Unate: A function is positive unate in if .
Negative Unate: A function is negative unate in if .
Unate Function: A function is considered positive/negative unate if it is positive/negative unate in all its variables, respectively.
Boolean Operators and Functional Derivatives
Boolean Difference (Boolean Derivative): The change of function with respect to variable :
Consensus: The product of the cofactors:
Smoothing: The sum of the cofactors:
Example Application ():
Boolean Difference w.r.t. :
Consensus w.r.t. :
Smoothing w.r.t. :
Generalized Expansion Theorem
Generalized Expansion: A function can be represented using an orthonormal set of functions (where ).
Here, is the generalized cofactor. Note that generalized cofactors are not unique.
Complex Operator Expansion: For two functions and and a Boolean operator :
Matrix Representation and Positional Cube Notation
Logic Minimizer Formats: Minimizers generally use matrix-based formats, typically with one row per implicant.
Symbols: Standard symbols used are , , and (don't care).
Encoding Scheme:
: Void (Empty set)
: Logic
: Logic
: Don't Care ()
Positional Cube Notation (PCN):
Uses two bits per symbol.
This is more efficient than using standard character types (like bytes).
Enables fast, parallelized binary operations:
Intersection: Performed using bitwise AND.
Supercube: Performed using bitwise OR.
Example PCN Mapping ():
Variables labeled :
Computing Cofactors in PCN
Recursive Paradigm: Logic cover operations often involve expanding about a variable, applying operations to cofactors, and merging results.
Step-by-Step Cofactor Computation (Example w.r.t. variable ):
Represent variable in binary notation for bits : .
Represent implicant as .
Intersection: Perform bitwise AND between implicant segment and constraint segment.
AND .
Since the first field () results in , this is Void. This implicant does not contribute to the cofactor.
Successful Intersection: For implicant () and constraint ():
AND .
Inversion and OR: To finalize the cofactor and remove the variable dependency being cofactored, invert the variable bitmask and OR it.
The constraint was ( in the first field). Inverting this field gives .
Perform OR on the first field: OR (Don't care/Remove variable).
Resulting cofactor row: , which represents variable .
Recursive Tautology Determination
Objective: To determine if a Boolean function (logic cover) is always TRUE.
Recursive Paradigm:
Expand about a variable.
If all resulting cofactors evaluate to TRUE, then the overall function is a tautology.
Criteria for Recursive Tautology:
Tautology Found: If the cover matrix contains a row consisting entirely of s (a Tautology Cube).
No Tautology: If the cover has any column consisting entirely of s (meaning a specific variable value can never be reached).
Single Variable Dependency: If the cover depends on only one variable and there is no column of s in that variable's field, it is a tautology.
Unate Heuristics: Operations on unate functions are more efficient. Variables are often selected specifically to drive cofactors toward unate functions.
Decomposition Rule: If a cover can be split into two sub-covers that rely on disjoint sets of variables, check tautology in both sub-covers independently.