Fact-checked by Grok 2 weeks ago

Petrick's method

Petrick's method is a technique in for determining all minimum sum-of-products (SOP) solutions from a prime implicant chart, enabling the identification of irredundant covers for minimizing functions. Developed by Stanley R. Petrick in 1956 as part of a for the Research Center, the method provides a systematic way to resolve the selection of prime implicants in cases where the Quine-McCluskey algorithm encounters cyclic dependencies or non-essential implicants that do not uniquely cover minterms. It is particularly useful for synthesizing efficient digital circuits by reducing the number of gates and literals required in the implementation of Boolean expressions. The core of Petrick's method involves constructing a product-of-sums (POS) expression from the prime implicant table, where each sum term represents the options for covering a specific minterm column after removing essentials. This POS form is then algebraically simplified into its minimal SOP equivalent, with each product term in the SOP corresponding to a potential minimal cover of implicants; the solutions with the fewest literals are selected as optimal. While computationally intensive for large functions—exponential in the number of variables—it remains a foundational exact method for logic minimization, often implemented in software tools for functions up to 15 variables or more.

Background

Development and History

Petrick's method was developed by Stanley R. Petrick in 1956 while working at the U.S. Air Force Cambridge Research Center. In a technical report titled A Direct Determination of the Irredundant Forms of a Boolean Function from the Set of Prime Implicants, Petrick presented the technique as part of broader research in switching theory. This report, designated AFCRC-TR-56-110 and dated April 10, 1956, addressed challenges in synthesizing efficient logic circuits by minimizing Boolean expressions. The method was specifically introduced to solve the covering problem in Boolean minimization, where the goal is to select a minimal set of prime implicants that collectively all necessary minterms without . Petrick's approach transformed the selection process into a systematic algebraic expansion, allowing for the identification of all irredundant sum-of-products forms from a given set of prime implicants. This built upon prior work in prime implicant generation, providing a direct path to minimal s essential for practical . In 1962, Insley B. Pyne and Edward J. McCluskey introduced significant improvements to Petrick's method, focusing on reducing computational redundancy in prime implicant tables. Their paper, "The Reduction of Redundancy in Solving Prime Implicant Tables," published in the IRE Transactions on Electronic Computers (vol. EC-11, no. 4, pp. 473–482), proposed algorithmic refinements that eliminated unnecessary terms during the expansion process, enhancing efficiency for functions with larger numbers of variables. These enhancements made the method more feasible for implementation in early computational environments, addressing limitations in Petrick's original formulation. Petrick's method and its refinements played a pivotal role in the early stages of (CAD) for digital logic circuits, facilitating automated tools for minimization during the 1950s and 1960s. By enabling systematic determination of minimal logic expressions, it contributed to the development of more compact and reliable switching networks, influencing foundational software for .

Mathematical Foundations

Petrick's method operates within the framework of , specifically addressing the minimization of sum-of-products () expressions for s. An SOP expression represents a as a disjunction (logical OR) of conjunctions (logical AND) of literals, where each literal is a variable or its complement. The primary goal of minimization is to reduce the number of literals and product terms while preserving the function's logical behavior, thereby simplifying circuit implementations and lowering costs. Central to this process are minterms, which are the canonical product terms corresponding to the rows of a where the evaluates to 1 (the ON-set). Each minterm includes every exactly once, either complemented or uncomplemented, fully specifying a single input combination; for a of n variables, there are up to $2^n possible minterms, denoted collectively as \sum m(i) for indices i where the is true. An is any product term that covers one or more minterms without including any from the OFF-set (where the is 0). Prime implicants are the maximal such terms: they are implicants that cannot be expanded further by removing literals or combining with adjacent implicants to cover more minterms, ensuring no redundancy in coverage. The prime implicant chart, also known as the covering table, organizes this information as a with rows representing prime implicants and columns representing minterms of the ON-set. A 1 (or 'X') is placed at the intersection if the prime implicant covers that minterm, visually depicting the coverage relationships essential for minimization. This setup frames the minimization problem as an instance of the set covering problem: identify the smallest subset of prime implicants whose union covers every minterm in the ON-set at least once, with don't care conditions (minterms where the function value is unspecified) allowing optional coverage to further optimize. The method provides an exact solution to this covering challenge for irredundant forms.

Algorithm Description

Core Steps

Petrick's method provides a systematic procedure to derive the minimal sum-of-products (SOP) expression from a prime implicant chart after essential prime implicants have been identified. The process begins by reducing the chart to focus on non-essential implicants that cover the remaining minterms, ensuring computational efficiency before proceeding to the core minimization phase. The first step involves reducing the prime implicant chart by selecting all prime implicants—those that uniquely cover at least one minterm—and eliminating the corresponding rows (minterms) and columns (implicants) from the chart. This reduction simplifies the problem by fixing parts of the cover that must be included, leaving only a cyclic or unresolved subchart for further . Essential implicants are identified by scanning each minterm column for implicants that appear only once across all rows. In the second step, the remaining prime in the reduced chart are labeled as variables, such as P_1, P_2, \dots, P_k, where each P_i represents the inclusion of the corresponding in the final . A product-of- expression P is then formed, where for each remaining minterm j, a sum term includes all P_i that j: P = \prod_{j} \left( \sum_{i \in \text{covering } j} P_i \right) This expression P encodes all possible combinations of that every minterm in the reduced chart, with P = 1 indicating a valid . While the full expansion can be computationally intensive, the method proceeds by algebraically expanding P to its SOP form. In practice, implementations may use heuristics for larger functions. Finally, in the fourth step, P is expanded into its sum-of-products form using , yielding terms where each product corresponds to a selection of prime implicants that collectively cover all minterms. Among these terms, the minimal SOP is selected based on criteria such as the fewest number of implicants or the total number of literals, ensuring the irredundant cover with the lowest cost. For instance, in a with cyclic dependencies, multiple minimal covers may exist, and the method identifies all such options before choosing the optimal one.

Logical Expansion Process

The logical expansion process in Petrick's method centers on constructing a that encodes the covering constraints from the prime implicant chart and algebraically deriving the minimal selections of implicants. The initial product P is formed as a product-of-sums expression, where for each minterm in the , a sum term is created from the variables representing the prime implicants that cover that minterm. Specifically, P = \prod_{m} \left( \sum_{p_i \covering m} p_i \right), with each p_i denoting the selection of prime implicant i. This ensures P = 1 exactly when the selected implicants collectively cover all required minterms, capturing all valid combinations without redundancy at this stage. The form of P is expanded to using the distributive and Boolean simplification rules, such as , to obtain all product terms representing valid covers. For instance, expanding (p_1 + p_2)(p_1 + p_3) yields p_1 + p_2 p_3, and further factors produce the complete set of conjunctions representing potential covers. This expansion systematically generates every valid product term, though it can result in a large number of terms for functions with many minterms. The expanded sum-of-products is then minimized by applying the , which eliminates subsumed terms via identities like X + X Y = X, removing any product that is covered by a broader term. These algebraic reductions prune the expression to its irredundant form, ensuring only essential combinations remain without altering the logical coverage. In the minimized expansion, the prime terms are identified as those product terms with the fewest literals, each corresponding to a minimal set of prime implicants that fully covers the function. Optimality is assessed by counting literals in these terms, as fewer literals indicate selections requiring fewer gates or lower overall cost in the resulting sum-of-products ; for example, a term like p_1 p_4 may represent a two-implicant cover superior to longer alternatives. This identification completes the process, yielding all minimal sum-of-products forms directly from the algebraic structure.

Implementation

Pseudocode Representation

Petrick's method can be implemented algorithmically by processing a prime implicant chart, which serves as the input representing the coverage of minterms by prime implicants after essential implicants have been identified and removed. The output is a set of minimal sum-of-products (SOP) terms that cover all minterms with the fewest literals. Key functions include mapping minterms to their covering implicants, constructing the product-of-sums expression P, expanding P via the distributive law to generate all possible product terms, and minimizing by applying absorption laws to eliminate redundant terms. Suitable data structures facilitate efficient manipulation: an or of prime s, each indexed and associated with the minterms it covers; and for the sum terms in P, a structure (e.g., a or ) tracking the implicant indices and literal counts involved in each sum. These allow tracking coverage without explicit variable assignment, focusing on combinatorial expansion. The overall flow begins with reducing the by essentials, builds P as a product of sums (one per remaining minterm, summing its covering implicants), expands to all combinations representing potential covers, and selects those with the minimal total literal count via simplification. The following pseudocode outlines a generalized implementation, assuming the input chart is a matrix chart where rows are prime implicants (0 to m-1) and columns are minterms (0 to n-1), with 1 indicating coverage. It uses lists for implicants and terms, and basic set operations for absorption.
function petricksMethod(chart):
    // Assume essentials already reduced; chart is post-essential
    m = number of prime implicants  // rows
    n = number of minterms          // columns
    
    // Step 1: For each minterm, collect list of covering implicants (indices)
    coveringSums = empty list of size n
    for j from 0 to n-1:
        sum_j = empty list
        for i from 0 to m-1:
            if chart[i][j] == 1:
                sum_j.append(i)
        coveringSums[j] = sum_j
    
    // Step 2: Build product-of-sums P as list of sums (each sum is list of implicant indices)
    P = product of all coveringSums  // Initially, P = [coveringSums[0], coveringSums[1], ..., coveringSums[n-1]]
    
    // Step 3: Expand P using distributive law to generate all product terms
    // Each product term is a set of unique implicant indices (combination covering all minterms)
    allProducts = expandProduct(P)  // Recursive distribution: multiply sums into products
    
    // Helper: Expand product of sums
    function expandProduct(sumsList):
        if sumsList is empty:
            return [empty set]
        firstSum = sumsList[0]
        rest = sumsList[1:]
        subProducts = expandProduct(rest)
        result = empty list
        for term in firstSum:
            for sub in subProducts:
                newSet = sub union {term}
                result.append(newSet)
        return result
    
    // Step 4: For each product, compute literal count and simplify via absorption
    minimalCovers = empty list
    minLiterals = infinity
    for productSet in allProducts:
        // Compute total literals: sum literal counts of implicants in set
        totalLiterals = 0
        for implicantIdx in productSet:
            totalLiterals += literalCount(implicantIdx)  // Precomputed per implicant
        // Absorption: remove subsumed terms if one product covers another's minterms
        if totalLiterals < minLiterals:
            minLiterals = totalLiterals
            minimalCovers = [productSet]
        elif totalLiterals == minLiterals:
            minimalCovers.append(productSet)
    
    // Step 5: Output minimal SOP terms (map sets back to implicant expressions)
    return minimalCovers  // List of sets, each convertible to SOP term
This generates all valid covers exhaustively but can be optimized for small n by during expansion; literal counts are assumed precomputed from implicant representations.

Computational Aspects

Petrick's method lends itself well to computer , as its manual application becomes exceedingly tedious for prime implicant charts with more than a modest number of terms due to the in the expansion of product-of-sums expressions. The algorithmic nature of forming covering clauses and multiplying them out into sum-of-products allows for straightforward encoding in software, enabling exact minimization for functions up to approximately 15 variables, depending on the function's structure and efficiency. In handling don't care conditions, the method incorporates them directly into the prime implicant chart by excluding don't care minterms from the required coverage columns, thereby permitting optional selection of implicants that these positions to broaden options for achieving a minimal without altering the function's specified . This flexibility often leads to more compact expressions by leveraging don't cares to consolidate terms across the on-set and off-set. Petrick's method is commonly integrated with prime implicant generation tools, such as the Quine-McCluskey algorithm, serving as a post-processing step to resolve the set covering problem and identify all minimal solutions from the generated implicants. This modular approach facilitates its use in broader logic minimization pipelines. In modern logic synthesis, adaptations of Petrick's method appear in and industrial tools for exact two-level optimization, particularly in the Berkeley ABC system for handling small to medium combinational circuits where precise minimization is needed despite computational cost. These implementations often limit its application to subsystems or initial stages before heuristic refinement. For optimization, strategies during the phase, including pre-reduction of the table via row and column dominance to eliminate redundant choices and selective branching to avoid exhaustive of clauses, significantly mitigate the risk of full exploding in size for larger charts. Such techniques maintain exactness while improving runtime efficiency.

Worked Example

Setup and Prime Implicant Chart

To illustrate the setup for Petrick's method, consider the 3-variable f(A, B, C) = \sum m(0, 1, 2, 5, 6, 7), which includes the minterms corresponding to binary inputs 000, 001, 010, 101, 110, and 111. The minterms are explicitly: m_0 = A'B'C', m_1 = A'B'C, m_2 = A'BC', m_5 = AB'C, m_6 = ABC', and m_7 = ABC. A is a product term that covers one or more minterms and cannot be further simplified by combining with adjacent terms without including 0s of the function. Using the Quine-McCluskey algorithm or a , the for this function are identified as A'B' (covering m_0, m_1), A'C' (covering m_0, m_2), B'C (covering m_1, m_5), BC' (covering m_2, m_6), AC (covering m_5, m_7), and AB (covering m_6, m_7). The prime implicant chart is constructed with rows representing these prime implicants and columns representing the minterms. An X is placed in each cell where a prime implicant covers the corresponding minterm, as shown below:
Prime Implicantm_0m_1m_2m_5m_6m_7
A'B'XX
A'C'XX
B'CXX
BC'XX
ACXX
ABXX
In this chart, no essential prime implicants exist, as each minterm is covered by exactly two prime implicants, requiring the full application of to find minimal covers.

Step-by-Step Application

In the absence of essential prime implicants in the prime implicant chart for the example function f(A, B, C) = \sum m(0,1,2,5,6,7), the full chart is retained for coverage analysis. The prime implicants are labeled as follows: K = A'B' covering minterms 0 and 1, N = A'C' covering minterms 0 and 2, Q = B'C covering minterms 1 and 5, L = BC' covering minterms 2 and 6, M = AC covering minterms 5 and 7, P = AB covering minterms 6 and 7. To find the minimal covering sets, form the function P as the product of sums corresponding to each minterm's options: P = (K + N)(K + Q)(N + L)(Q + M)(L + P)(M + P) This expression ensures every minterm is covered by at least one selected prime implicant. Next, expand P into a sum-of-products form by successively applying the distributive law, eliminating redundant terms through (e.g., XY + XYZ = XY). The expansion yields: P = KLM + KNMP + NQLM + KQLP + NQP + \dots (Additional longer terms are present but omitted for brevity.) Each term in this expansion represents a potential covering set of prime implicants. To identify the minimal expressions, evaluate the terms by the total number of implicants (and literals), prioritizing those with the fewest for cost efficiency in implementation. The minimal terms are KLM and NQP, each with 3 implicants and 6 literals. Substituting the prime implicants yields two equivalent minimal sum-of-products expressions: f = A'B' + BC' + AC or f = A'C' + B'C + AB Verification confirms both expressions cover all required minterms without including don't-cares or zeros: A'B' + BC' + AC covers 0 (A'B'), 1 (A'B'), 2 (BC'), 5 (AC), 6 (BC'), and 7 (AC); similarly for the alternative. This completes the application, yielding irredundant covers of equal cost.

Limitations and Comparisons

Challenges and Complexity

Petrick's method encounters significant challenges due to its inherent computational demands, particularly in the logical phase where a product-of-sums expression is converted to sum-of-products form. This process can generate an exponential number of terms, as each clause in the product contributes multiplicatively to the total output size. In the worst case, for a with k minterms where the i-th minterm is covered by n_i prime implicants, the may produce up to \prod_{i=1}^k n_i terms, reflecting the inherent to the covering problem. This growth renders the method highly sensitive to the size of the prime implicant chart, with time and reaching O(\prod n_i). For functions with more than 7 or 8 variables, the running time increases dramatically, often making exhaustive application unrealistic without computational aids or approximations. Manual application of Petrick's method is particularly tedious for charts involving more than a modest number of minterms, as the combinatorial proliferation demands meticulous algebraic manipulation that quickly becomes error-prone and time-consuming. The method's scalability is further limited for functions with a large number of variables, where the sheer volume of prime implicants and potential terms overwhelms practical computation absent specialized heuristics. Additionally, the approach is sensitive to the handling of don't care conditions during prime implicant generation; if don't cares are not correctly incorporated to expand implicants without requiring coverage, the resulting chart may yield suboptimal minimal covers despite the method's exact nature.

Relation to Other Minimization Techniques

Petrick's method serves as a complementary technique to the Quine-McCluskey algorithm in minimization. The Quine-McCluskey algorithm systematically generates all prime s through a tabular comparison process, but it leaves the selection of a minimum cover from these implicants unresolved, particularly in cases involving cyclic dependencies among minterms. Petrick's method addresses this by constructing a from the prime implicant chart and expanding it to identify the minimal sum-of-products cover, ensuring an exact solution to the covering problem. In contrast to heuristic-based approaches like the algorithm, Petrick's method provides an exact minimization but at the cost of exhaustive computation. employs iterative heuristics—such as , reduction, and irredundancy checks—to approximate optimal covers for large-scale functions, making it more practical for (EDA) tools handling complex circuits. Petrick's method, while guaranteeing the global minimum, becomes computationally prohibitive for functions with many variables due to the in the expansion of product-of-sums terms. Petrick's expansion technique forms the foundational algebraic basis for branch-and-bound methods in exact logic minimization solvers. These modern variants are integrated into EDA tools like those from and and apply pruning and bounding to mitigate the exhaustive nature of the original method while preserving optimality. As of 2025, Petrick's method continues to influence practical implementations, such as in MongoDB's query optimization using modified Quine-McCluskey and Petrick's techniques for simplifying Boolean expressions. A key advantage of Petrick's method is its guarantee of finding all minimal solutions, providing verifiable optimality that heuristic methods like cannot always ensure. However, it is less scalable than visual aids such as Karnaugh maps for functions with fewer than six variables, where the latter's intuitive grouping avoids algebraic expansion altogether, and it lags behind heuristics for larger problems due to its tedious manual application and high computational demands.

References

  1. [1]
    Prime Implicant Simplification Using Petrick's Method
    Feb 17, 2016 · This article follows the Quine McCluskey method article. We will now finding essential prime implicants using Petrick's method, ...
  2. [2]
    [PDF] Quantum Algorithms for Unate and Binate Covering Problems with ...
    Petrick's method [33]. If the covering problems are expressed in the form of ... [33] Stanley R Petrick. A direct determination of the irredundant ...
  3. [3]
    [PDF] CSE 140: Logic Minimization Lecture
    Use Petrick's Method! ○ List the implicants in product of sums form. ○ What does this mean? Page 43. Logic Minimization Algorithm. 0. 1. 2. 3. 4. 5. 6. 7. P0 1.
  4. [4]
    Covering Problems: Duality Relations and a New Method of Solution
    Some conventions adopted in this paper are as follows. With the ex- ception of cost vectors, all vectors and matrices are assumed to be com-.
  5. [5]
    [PDF] Use of a List-Processing Language in Programming Simplification ...
    A list-processing computer programming language is valuable for the coding of such logical algorithms as arise in truth function simplification because of ease ...<|control11|><|separator|>
  6. [6]
    A method of determination of all the minimal forms of Boolean ...
    Petrick S.R. A Direct Determination of the Irredundant Forms of a Boolean Function from the Set of Prime Implicants Air Force Cambridge Research Center ...
  7. [7]
    Some properties of irreducible coverings by cliques of complete ...
    2. S.R Petrick. A direct determination of the irredundant forms of a Boolean function from the set of prime implicants.
  8. [8]
  9. [9]
    Irredundant Normal Forms and Minimal Dependence Sets of a ...
    S. R. Petrick, "A direct determination of the irredundant forms of a Boolean function from the set of prime implicants," Air Force Cambridge Res. Cen., ...
  10. [10]
    Minimization algorithms for weakly defined boolean functions ...
    I. B. Pyne and E. J. McCluskey, Jr., “The reduction of redundancy in solving prime implicant tables,” IRE Trans., EC-11, no. 4, 473–482, 1962. Google Scholar.
  11. [11]
    [PDF] The Quine-McCluskey Method
    Jan 19, 2006 · Consider the following Karnaugh map of a 4-input Boolean function: There are 5 prime implicants, each of which covers 2 ON-set minterms.Missing: minimization | Show results with:minimization
  12. [12]
    [PDF] Simplification of Boolean Expressions
    For example, if a function is expressed in sum of products, then any product term therein is an implicant. If f(x, y) = x'y + xy' then x'y is an implicant.Missing: set | Show results with:set
  13. [13]
    NECTAR - ACM Digital Library
    Stanley R. Petrick. 1956. Direct Determination Irredundant Forms of Boolean Function from Set of Prime Implicants. https://books.google.co.uk/books?id ...Missing: normal | Show results with:normal
  14. [14]
    [PDF] quine-mccluskey-handout.pdf - CS@Columbia
    The Quine-McCluskey method is an exact algorithm which finds a minimum-cost sum-of-products im- plementation of a Boolean function. This handout introduces the ...Missing: Pyne improvements 1962
  15. [15]
    [PDF] ECE 3060 VLSI and Advanced Digital Design
    • Petrick's method. 1. compute prime implicants. 2. determine minimum ... • View implicant table of some function as Boolean matrix: • the ith minterm ...Missing: mathematical foundations<|control11|><|separator|>
  16. [16]
    [PDF] Homework 1 - Columbia CS
    Apply Petrick's method to solve the matrix, as follows: (a) write the constraint equation for the matrix (i.e., product of sums equation); (b) multiply out and ...
  17. [17]
    G. De Micheli Synthesis And Optimization Of Digital Circuits (Text ...
    Apr 20, 2005 · The overall product of sums expression to be satisfied is: It is ... Petrick's method 1151, consists of writing down the covering ...
  18. [18]
    [PDF] quine-mccluskey-handout.pdf - Columbia CS
    This handout introduces the method and applies it to several examples. There are 4 main steps in the Quine-McCluskey algorithm: 1. Generate Prime Implicants. 2.
  19. [19]
    Logic Synthesis and Verification Algorithms - SpringerLink
    In stock Free deliveryAvailable as PDF; Read on any device; Instant download; Own it forever. Buy eBook ... Hachtel, Fabio Somenzi. DOI: https://doi.org/10.1007/b117060. Publisher ...
  20. [20]
    ABC: A System for Sequential Synthesis and Verification
    This will allow the user to customize ABC for their needs as if it were a tool-box rather than a complete tool. The latest ABC code can be found at https:// ...
  21. [21]
    [PDF] Two-Level Logic Synthesis - KFUPM
    Use row and column dominance. ▫ Petrick's method. • Write covering clauses in POS form. • Multiply out POS form into SOP form.
  22. [22]
    [PDF] Implementation of the Quine-McCluskey Boolean simplification ...
    Petrick's method, but such a solution is unrealistic when the prime implicant chart is too large. In this case, the running time increases so rapidly that ...Missing: original | Show results with:original
  23. [23]
    [PDF] KarNet: An Efficient Boolean Function Simplifier - arXiv
    Jun 4, 2019 · K-maps with don't care: Here, we show that KarNet is applicable to cases of K-maps with don't care cells. We extracted all possible 4 variable ...
  24. [24]
    [PDF] Unit 6
    Petrick's Method (1/6). ․A technique for determining all minimum sum-of-products solutions from a prime implicant table. ․Before applying Petrick's method ...
  25. [25]
    [PDF] Espresso Explained
    Giovanni De Micheli, Synthesis and Optimization of Digital Circuits. McGraw-Hill. Page 2. D e p a r t m e n t. o f. C o m p u t e r. S y s t e m s cad ...<|control11|><|separator|>