{
  "id": "disjunctive-normal-form",
  "title": "Disjunctive Normal Form",
  "lang": "en",
  "source_lang": "en",
  "summary": "Disjunctive normal form expresses a Boolean formula as a disjunction of conjunctions of literals, providing a standard representation for logical analysis and digital circuit design.",
  "category": "mathematics",
  "subcategory": "discrete-logic",
  "type": "concept",
  "aliases": [
    "DNF",
    "disjunctive normal form",
    "sum-of-products form"
  ],
  "generated_at": "2026-11-05",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/disjunctive-normal-form/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/disjunctive-normal-form/",
      "json": "https://aiwiki.page/zh/disjunctive-normal-form.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "In propositional logic, disjunctive normal form (DNF) is a way of writing a formula as a disjunction (“OR”) of one or more conjunctions (“ANDs”) of literals, where a literal is a propositional variable or its negation. For example, \\((p\\land\\neg q)\\lor(q\\land r)\\) is in DNF. Every Boolean function of finitely many variables can be represented in this form, although the representation need not be unique or compact. DNF is used in logical reasoning, Boolean algebra, and digital circuit design."
    },
    {
      "heading": "Definition and notation",
      "text": "A DNF formula has the general form\n\n\\[F=\\bigvee_{i=1}^{m}\\left(\\bigwedge_{j=1}^{k_i}\\ell_{ij}\\right),\\]\n\nwhere each \\(\\ell_{ij}\\) is a literal. The symbols \\(\\lor\\), \\(\\land\\), and \\(\\neg\\) denote disjunction, conjunction, and negation, respectively. Each conjunction is called a term or product term.\n\nFor instance,\n\n\\[(p\\land q)\\lor(\\neg p\\land r)\\lor\\neg q\\]\n\nis in DNF. A single literal counts as a term, so the final disjunct need not contain an explicit conjunction. A single conjunction, such as \\(p\\land\\neg q\\), also qualifies as DNF.\n\nBy contrast,\n\n\\[p\\land(q\\lor r)\\]\n\nis not syntactically in DNF because a disjunction occurs inside a conjunction. It is logically equivalent to the DNF formula\n\n\\[(p\\land q)\\lor(p\\land r).\\]\n\nNegation in DNF applies only to individual variables. Thus, \\(\\neg(p\\land q)\\) is not itself in DNF, even though it can be converted to \\(\\neg p\\lor\\neg q\\).\n\nIn switching algebra, conjunction is often written as multiplication, disjunction as addition, and negation with an overbar. Under this notation,\n\n\\[pq+\\overline{p}r\\]\n\nis a sum of products. Here “addition” means Boolean OR, not ordinary arithmetic addition and not exclusive OR.\n\nConstants and empty expressions\n\nIt is useful to allow an empty disjunction to denote false and an empty conjunction to denote true:\n\n\\[\\bigvee\\varnothing=\\bot, \\qquad \\bigwedge\\varnothing=\\top.\\]\n\nWith these conventions, constant Boolean functions have DNF representations without special exceptions. If empty expressions are excluded, equivalent representations include \\(p\\land\\neg p\\) for false and \\(p\\lor\\neg p\\) for true."
    },
    {
      "heading": "Logical meaning",
      "text": "A DNF formula is true precisely when at least one of its terms is true. Each term specifies a sufficient condition for the whole formula.\n\nFor example,\n\n\\[F=(p\\land\\neg q)\\lor r\\]\n\nis true whenever \\(p\\) is true and \\(q\\) is false, or whenever \\(r\\) is true. Its terms can overlap: an assignment may satisfy both simultaneously.\n\nA conjunction of literals fixes the values of the variables it mentions and leaves other variables unrestricted. For a fixed collection of \\(n\\) variables, a consistent term mentioning \\(k\\) distinct variables therefore describes \\(2^{n-k}\\) assignments. A DNF formula represents the union of the assignment sets described by its terms.\n\nThis gives a geometric interpretation on the Boolean cube \\(\\{0,1\\}^n\\): each consistent term describes a subcube, and a DNF representation covers exactly those vertices where the function is true."
    },
    {
      "heading": "Canonical disjunctive normal form",
      "text": "A minterm over a specified set of variables is a conjunction in which every variable appears exactly once, either positively or negatively. Each minterm is true on exactly one assignment.\n\nFor variables \\(p,q,r\\), the minterm\n\n\\[p\\land\\neg q\\land r\\]\n\ncorresponds to the assignment \\((p,q,r)=(1,0,1)\\).\n\nThe canonical DNF, also called full DNF or principal DNF, of a Boolean function is the disjunction of the minterms corresponding to all assignments on which the function is true. It can be constructed directly from a truth table:\n\n- Select every row whose output is true.\n- For each selected row, form a conjunction containing a variable positively if its value is true and negatively if its value is false.\n- Take the disjunction of those conjunctions.\n\nFor example, the exclusive OR of two variables is true on \\((1,0)\\) and \\((0,1)\\), giving\n\n\\[p\\oplus q \\equiv (p\\land\\neg q)\\lor(\\neg p\\land q).\\]\n\nFor a fixed variable set, canonical DNF is unique apart from the ordering of terms and literals. General DNF is not unique. For example,\n\n\\[p \\equiv (p\\land q)\\lor(p\\land\\neg q).\\]\n\nThe right-hand side is canonical over the variable set \\(\\{p,q\\}\\); the left-hand side is a shorter DNF for the same function.\n\nCanonical DNF is not generally a minimal representation. For example, the constant true function has \\(2^n\\) minterms over \\(n\\) variables, although it can be represented simply by \\(\\top\\)."
    },
    {
      "heading": "Conversion to DNF",
      "text": "Every formula of classical propositional logic has an equivalent DNF. One construction proceeds through standard logical equivalences.\n\nEliminate derived connectives\n\nImplication and biconditional can first be rewritten using negation, conjunction, and disjunction:\n\n\\[p\\to q\\equiv\\neg p\\lor q,\\]\n\n\\[p\\leftrightarrow q \\equiv (p\\land q)\\lor(\\neg p\\land\\neg q).\\]\n\nMove negations inward\n\nDe Morgan’s laws transform negated conjunctions and disjunctions:\n\n\\[\\neg(A\\land B)\\equiv\\neg A\\lor\\neg B,\\]\n\n\\[\\neg(A\\lor B)\\equiv\\neg A\\land\\neg B.\\]\n\nTogether with double-negation elimination, these produce a formula in which negations apply only to variables.\n\nDistribute conjunction over disjunction\n\nRepeatedly apply\n\n\\[A\\land(B\\lor C) \\equiv (A\\land B)\\lor(A\\land C).\\]\n\nFor example,\n\n\\[\\begin{aligned} (p\\lor q)\\land(\\neg p\\lor r) &\\equiv (p\\land\\neg p) \\lor(p\\land r)\\\\ &\\quad\\lor(q\\land\\neg p) \\lor(q\\land r)\\\\ &\\equiv (p\\land r)\\lor(\\neg p\\land q)\\lor(q\\land r). \\end{aligned}\\]\n\nThe contradictory term \\(p\\land\\neg p\\) has been removed. The remaining expression is in DNF, but it is not minimal: the term \\(q\\land r\\) is redundant, leaving\n\n\\[(p\\land r)\\lor(\\neg p\\land q).\\]\n\nTruth-table construction provides an alternative conversion method and directly produces canonical DNF."
    },
    {
      "heading": "Simplification and minimization",
      "text": "A DNF expression can often be shortened using Boolean identities:\n\n- Contradiction: a term containing both \\(p\\) and \\(\\neg p\\) is always false and can be removed.\n- Idempotence: repeated literals or repeated terms can be deleted.\n- Absorption: \\(A\\lor(A\\land B)\\equiv A\\).\n- Combination: \\((A\\land p)\\lor(A\\land\\neg p)\\equiv A\\).\n\nAn implicant of a function \\(F\\) is a consistent product term \\(T\\) such that every assignment satisfying \\(T\\) also satisfies \\(F\\). A prime implicant is an implicant from which no literal can be deleted while preserving this property.\n\nAn irredundant DNF contains no term that can be removed without changing the represented function. Irredundancy does not imply global minimality: another collection of terms may represent the same function more economically.\n\nMinimization requires a cost criterion. Minimizing the number of terms, minimizing the total number of literal occurrences, and minimizing physical circuit cost are different optimization problems and need not yield the same preferred representation.\n\nKarnaugh maps provide a visual method for simplifying functions with a small number of variables. The Quine–McCluskey algorithm systematically generates prime implicants and selects a covering collection. Larger practical problems commonly use heuristic methods because exact minimization can be computationally expensive."
    },
    {
      "heading": "Representation size and computational properties",
      "text": "Conversion to DNF can cause an exponential increase in formula size. Consider\n\n\\[F_n=\\bigwedge_{i=1}^{n}(x_i\\lor y_i).\\]\n\nDistributing conjunction over disjunction produces \\(2^n\\) terms, one for each choice of \\(x_i\\) or \\(y_i\\) from every pair.\n\nFor this family, the increase is unavoidable for equivalent DNF formulas over the same variables. Consider the \\(2^n\\) satisfying assignments that set exactly one variable in each pair to true. Any consistent term implying \\(F_n\\) must contain at least one positive literal from each pair; otherwise, some pair could be set entirely false while satisfying the term. Consequently, such a term can cover at most one of these assignments. At least \\(2^n\\) terms are therefore necessary.\n\nSeveral reasoning tasks have markedly different behavior on DNF:\n\n- Satisfiability is easy to test: a DNF is satisfiable if at least one term contains no complementary pair of literals.\n- Falsity is easy to test: a DNF is identically false if every term is contradictory.\n- Tautology testing is harder: determining whether an arbitrary DNF is true on every assignment is coNP-complete.\n- Exact model counting can be difficult: terms may overlap, so adding the numbers of assignments satisfying individual terms generally overcounts.\n\nCanonical DNF avoids overlap because distinct minterms describe distinct assignments, but its explicit size may already be exponential in the number of variables."
    },
    {
      "heading": "Relationship to other normal forms",
      "text": "Conjunctive normal form (CNF) reverses the arrangement: it is a conjunction of disjunctions of literals. DNF emphasizes alternative sufficient conditions; CNF emphasizes conditions that must all hold.\n\nNegation exchanges the two forms. Negating a DNF and applying De Morgan’s laws produces a CNF for the negated function:\n\n\\[\\neg\\bigl((p\\land q)\\lor(\\neg p\\land r)\\bigr) \\equiv (\\neg p\\lor\\neg q)\\land(p\\lor\\neg r).\\]\n\nNeither form is uniformly more compact. Some functions have short CNFs but require large DNFs; others have short DNFs but require large CNFs.\n\nDNF also differs from algebraic normal form, which uses exclusive OR of products rather than ordinary OR. Since exclusive OR permits cancellation, algebraic normal form has different identities and representation properties.\n\nThe universal conversion result is a result of classical Boolean logic. It does not transfer unchanged to intuitionistic logic, where principles such as \\(p\\lor\\neg p\\) are not generally valid."
    },
    {
      "heading": "Development and applications",
      "text": "DNF belongs to the algebraic study of logic associated with George Boole. Its interpretation as a sum of products became central to switching theory and digital circuit design, in which Boolean operations describe networks of switches and logic gates.\n\nA DNF naturally specifies a two-level AND–OR circuit: one layer computes product terms, and another combines their outputs. Negated inputs may require additional inverters. Equivalent representations can nevertheless differ in gate count, wiring, delay, and susceptibility to transient hazards, so minimum symbolic size is not the only design consideration.\n\nIn rule-based systems, each term can represent a sufficient rule condition, while the disjunction collects alternative ways for a conclusion to hold. In database filtering, DNF can organize alternative combinations of selection conditions. Such applications require attention to semantics: database null values, for example, can introduce behavior beyond ordinary two-valued Boolean logic.\n\nIn formal verification, DNF can explicitly describe sets of satisfying states or input conditions. This is useful when the set has a small cover by product terms, but exponential growth can make explicit DNF unsuitable for large problems."
    }
  ],
  "links": [
    "propositional-logic",
    "boolean-algebra",
    "exclusive-or",
    "truth-table",
    "de-morgans-laws",
    "double-negation-elimination",
    "idempotence",
    "mathematical-optimization",
    "conjunctive-normal-form",
    "intuitionistic-logic",
    "george-boole",
    "formal-verification"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}