Petrick's method
Template:Short description Template:Redirect-distinguish Template:Use dmy dates Template:Use list-defined references In Boolean algebra, Petrick's method[1] (also known as Petrick function[2] or branch-and-bound method) is a technique described by Stanley R. Petrick (1931–2006)[3][4] in 1956[5][6] for determining all minimum sum-of-products solutions from a prime implicant chart.[7] Petrick's method is very tedious for large charts, but it is easy to implement on a computer.[7] The method was improved by Insley B. Pyne and Edward Joseph McCluskey in 1962.[8][9]
Algorithm
- Reduce the prime implicant chart by eliminating the essential prime implicant rows and the corresponding columns.[7]
- Label the rows of the reduced prime implicant chart , , , , etc.[7]
- Form a logical function which is true when all the columns are covered. P consists of a product of sums where each sum term has the form , where each represents a row covering column .[7]
- Apply De Morgan's Laws to expand into a sum of products[nb 1] and minimize by applying the absorption law .[7]
- Each term in the result represents a solution, that is, a set of rows which covers all of the minterms in the table. To determine the minimum solutions, first find those terms which contain a minimum number of prime implicants.[7]
- Next, for each of the terms found in step five, count the number of literals in each prime implicant and find the total number of literals.[7]
- Choose the term or terms composed of the minimum total number of literals, and write out the corresponding sums of prime implicants.[7]
Example of Petrick's method
Following is the function we want to reduce:[10]
The prime implicant chart from the Quine-McCluskey algorithm is as follows:
0 1 2 5 6 7 ⇒ A B C K = m(0,1) Template:Ya Template:Ya ⇒ 0 0 Template:Sdash L = m(0,2) Template:Ya Template:Ya ⇒ 0 Template:Sdash 0 M = m(1,5) Template:Ya Template:Ya ⇒ Template:Sdash 0 1 N = m(2,6) Template:Ya Template:Ya ⇒ Template:Sdash 1 0 P = m(5,7) Template:Ya Template:Ya ⇒ 1 Template:Sdash 1 Q = m(6,7) Template:Ya Template:Ya ⇒ 1 1 Template:Sdash
Based on the ✓ marks in the table above, build a product of sums of the rows. Each column of the table makes a product term which adds together the rows having a ✓ mark in that column:
(K+L)(K+M)(L+N)(M+P)(N+Q)(P+Q)
Use the distributive law to turn that expression into a sum of products. Also use the following equivalences to simplify the final expression: X + XY = X and XX = X and X + X = X
= (K+L)(K+M)(L+N)(M+P)(N+Q)(P+Q) = (K+LM)(N+LQ)(P+MQ) = (KN+KLQ+LMN+LMQ)(P+MQ) = KNP + KLPQ + LMNP + LMPQ + KMNQ + KLMQ + LMNQ + LMQ
Now use again the following equivalence to further reduce the equation: X + XY = X
= KNP + KLPQ + LMNP + LMQ + KMNQ
Choose products with fewest terms, in this example, there are two products with three terms:
KNP LMQ
Referring to the prime implicant table, transform each product by replacing prime implicants with their expression as boolean variables, and substitute a sum for the product. Then choose the result which contains the fewest total literals (boolean variables and their complements). Referring to our example:
KNP expands to A'B' + BC' + AC where K converts to A'B', N converts to BC', etc. LMQ expands to A'C' + B'C + AB
Both products expand to six literals each, so either one can be used. In general, application of Petrick's method is tedious for large charts, but it is easy to implement on a computer.[7]
Notes
References
Further reading
- Template:Cite web
- Template:Cite book
- Template:Cite book (xiv+379+1 pages)
External links
- Tutorial on Quine-McCluskey and Petrick's method
- Petrick C++ implementation based on the tutorial above
- ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedLind_1977 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedSvoboda_1979_Petrick - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPetrick_Bio - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPetrick_Obit - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPetrick_1956 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedLewin_1974 - ↑ 7.00 7.01 7.02 7.03 7.04 7.05 7.06 7.07 7.08 7.09 Cite error: Invalid
<ref>tag; no text was provided for refs namedRoth_1992 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedPyne_1962 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedChoudhury_1968 - ↑ Cite error: Invalid
<ref>tag; no text was provided for refs namedFrenzel_2007
Cite error: <ref> tags exist for a group named "nb", but no corresponding <references group="nb"/> tag was found