KonkurStudy
همه کارت‌ها

Disjunctive and Conjunctive Normal Forms

DNF is an OR of ANDs of literals and CNF is an AND of ORs of literals; every propositional formula is logically equivalent to one of each.

کارت مفهوم کنکور ارشد علوم کامپیوتر

اهمیت
۰/۵

A literal is an atom pp or its negation ¬p\neg p. The two standard normal forms package any propositional formula into a fixed, layered shape built only from literals.

Definitions

  • Disjunctive Normal Form (DNF): a disjunction of conjunctions of literals, ⋁i(⋀jℓij).\bigvee_{i}\Big(\bigwedge_{j}\ell_{ij}\Big). Each inner conjunction (a term / minterm-style clause) is an AND of literals; the whole formula ORs them together. Think "OR of ANDs."

  • Conjunctive Normal Form (CNF): a conjunction of disjunctions of literals, ⋀i(⋁jℓij).\bigwedge_{i}\Big(\bigvee_{j}\ell_{ij}\Big). Each inner disjunction (a clause) is an OR of literals; the whole formula ANDs them together. Think "AND of ORs."

The defining rule for both forms: negations sit directly on atoms only, and the connectives are layered — in DNF no ∧\wedge may stand above a ∨\vee, in CNF no ∨\vee may stand above a ∧\wedge.

Existence theorem

Every propositional formula is logically equivalent to a formula in DNF and to one in CNF. Read a formula's truth table to build them directly:

  • DNF: OR together one term per row where the formula is true (each term ANDs the literals making that row, using ¬p\neg p where pp is false).
  • CNF: AND together one clause per row where the formula is false (each clause ORs the complemented literals of that row).

Degenerate cases count

This is the exam's favorite trap. A single literal, a single term, or a single clause still qualifies:

Formula In DNF? In CNF? Why
pp yes yes one literal = one term = one clause
p∧¬qp \wedge \neg q yes yes one AND-term (DNF); each literal is a 1-literal clause (CNF)
p∨¬q∨rp \vee \neg q \vee r yes yes each literal is a 1-literal term (DNF); one OR-clause (CNF)
(p∧q)∨¬r(p \wedge q) \vee \neg r yes no OR over ANDs; a ∧\wedge sits under the ∨\vee
¬(p∨q)\neg(p \vee q) no no negation is not on an atom — push it in first

Mini-example

Convert p→qp \to q to both forms. Its truth table is false only when p=T,q=Fp=\text{T}, q=\text{F}.

  • DNF (OR of true rows ¬p¬q, ¬p q, p q\neg p\neg q,\ \neg p\,q,\ p\,q): (¬p∧¬q)∨(¬p∧q)∨(p∧q)(\neg p \wedge \neg q) \vee (\neg p \wedge q) \vee (p \wedge q), which simplifies to ¬p∨q\neg p \vee q.
  • CNF (one clause for the single false row): ¬p∨q\neg p \vee q — already an AND of one clause.

Here ¬p∨q\neg p \vee q is simultaneously a valid DNF (two 1-literal terms) and a valid CNF (one clause), illustrating that the same formula can satisfy both templates.

Exam trick: A formula can be in DNF and CNF at once. Never reject a formula just because it lacks a top-level ∨\vee (for DNF) or top-level ∧\wedge (for CNF) — flatten with associativity, treat single literals/clauses as degenerate, and only disqualify it if some connective is layered the wrong way or a negation does not sit directly on an atom.

فرمول‌های کلیدی

DNF template
⋁i(⋀jℓij)\bigvee_{i}\Big(\bigwedge_{j}\ell_{ij}\Big)

Disjunction of conjunctions of literals (OR of ANDs).

CNF template
⋀i(⋁jℓij)\bigwedge_{i}\Big(\bigvee_{j}\ell_{ij}\Big)

Conjunction of disjunctions of literals (AND of ORs).

#dnf#cnf#normal-form#propositional-logic#literals#clauses

سوالات تمرینی