Karnaugh-Map: Graphical method for very small cases (up to 5 variables)
Quine-McCluskey: tabular method, used to compute exact solution of minimization problem (also efficient for small number of variables but can be used for more)
Karnaugh Map
Is a special graphical representation of the truth table for an n-variable function
2n cells, each of which correspond to a row of the truth table
Each literal is associated with a row or a column
A cell ha a unique address (numbering)
Defined through cell-column/cell-row or through a binary number, which is defined by literals in the column and row
Neighbor cells differ by only 1 bit
Build by entering the value 1 in the address defined by the corresponding minterm from the truth table
Steps
Construct a K-map
Identify all prime implicants
Prime implicants are rectangular blocks of 2n−k cells. 0≤k≤n not contained in other blocks
Prime implicants can overlap
Select a minimal number of prime implicants that covers all K-Map 1‘s
In case there are many alternatives, select the one with the minimum number of literals
Essential prime implicant: A prime implicant that covers a minterm that no other implicant can cover (must be in the solution)
Nonessential: Covers something already covered (but might be included because it includes something it only covers)
Absolute nonessential: Everything that it covers must already be covered by other prime implicants
Quine-McCluskey
Steps
Identification of Prime Implicants
Make a list L1 of all minterms, sorted in groups Gh,0≤h≤n, where Gh consists of all minterms with h 1s in their code-word
Using list Li, compare all elements E′ in Gh with E′′ in Gh+1 if E′=Ex and E′′=Ex. Apply the minimization theorem. Mark E′ and E′′. Insert E in the group Gh of a new list Li+1 if not included
If Li+1 is not empty, set i=i+1 and go to step 2. If empty, then the non-market inputs L1,…,Li are prime implicants
Compute the minimum sum of all prime implicants
Make a coverage table T in which rows represent prime implicants and columns minterms. Mark all cells Tij in the table with an X if the prime implicant in row i covers minterm column j
Identify all essential rows of T and insert the corresponding prime implicants to the solution. Reduce T by erasing the essential row. Reduce T further by erasing dominant column and dominated rows (see below).
Apply step 2 until T cannot be further reduced. If T is empty, then solution is S. If not, go to step 4
Apply distributive law to compute a minimal SOP-form for the remaining rows of T
Dominance Rules
Row dominance: Row Pi dominates row Pj if Pi has X in any column in which Pj also has X
A dominated row can be removed from the coverage table if it contains more literals than the dominant row
Random choice if they have the same number of literals
Column dominance: Column mi dominates mj, if mi has X in any row in which mj also has X
A dominant column can be erased since every coverage of mj is also a coverage of mi