# 3.4 Propositional logic: normal forms

 Page 1 / 1
Representing Boolean functions in CNF and DNF.

In high school algebra, you saw that while $x^{3}-4x$ and $x(x-2)(x+2)$ are equivalent, the second form is particularly useful in letting you quickly know the roots of the equation.Similarly, in Boolean algebra there are certain canonicalnormalforms which have nice properties.

A formula in Conjunctive Normal Form , or CNF , is the conjunction of CNF clauses . Each clause is a formula of a simple form:a disjunction of possibly-negated propositions.

$c\implies (a\land b)$ is equivalent to $a\lor \neg c\land b\lor \neg c$ . This latter formula is in CNF, since it is the conjunction ofdisjunctions, and each disjunction consists only of propositions and negated propositions.

The conjunctions and disjunctions need not be binary. The following formula is also is CNF.

$\neg a\land a\lor b\lor \neg c\land b\lor \neg d\lor e\lor f$

Note that its first clause is just one negated proposition. It is still appropriate to think of this as a disjunction, since $\equiv \lor$ .

Another format, Disjunctive Normal Form , or DNF is the dual of conjunctive normal form. A DNF formula is the disjunction of DNF clauses , each a conjunction of possibly-negated propositions.

$(a\land b)\implies c$ is equivalent to $\neg a\lor \neg b\lor c$ which is in DNF: three disjunctions, each being a clause with only one term.(It also happens to be in CNFa single clause with three terms!) It is also equivalent to the more fleshed out DNF formulawhere we insist that each clause include all three variables. We end up with a formula that includes each possibleclause except $a\land b\land \neg c$ : That is, the formula $\left(a\land b\land c\right)\lor \left(a\land \neg b\land c\right)\lor \left(a\land \neg b\land \neg c\right)\lor \left(\neg a\land b\land c\right)\lor \left(\neg a\land b\land \neg c\right)\lor \left(\neg a\land \neg b\land c\right)\lor \left(\neg a\land \neg b\land \neg c\right)$ .

Electrical Engineering courses, coming from more of a circuit perspective, sometimes callCNF product-of-sums , and call DNF sum-of-products , based on  ,  being analogous to +,*.

Any Boolean function can be represented in CNF and in DNF. One way to obtain CNF and DNF formulasis based upon the truth table for the function.

• A DNF formula results from looking at a truth table, and focusing on the rows where the function is true:As if sayingI'm in this row, or in this row, or: For each row where the function is true,form a conjunction of the propositions. ( E.g. , for the row where $a$ is $\mbox{false}$ , and $b$ is $\mbox{true}$ , form $\neg a\land b$ .) Now, form the disjunction of all those conjunctions.
• A CNF formula is the pessimistic approach, focusing on the rows where the function is false:I'm not in this row, and not in this row, and. For each row where the function is false,create a formula fornot in this row: ( E.g. , if in this row $a$ is $\mbox{false}$ and $b$ is $\mbox{true}$ form $\neg (\neg a\land b)$ ; then notice that by DeMorgan's law, this is $a\lor \neg b$ a disjunct. Now, form the conjunction of all those disjunctions.

Truth table example
$a$ $b$ $c$ Unknown function
$\mbox{false}$ $\mbox{false}$ $\mbox{false}$ $\mbox{false}$
$\mbox{false}$ $\mbox{false}$ $\mbox{true}$ $\mbox{false}$
$\mbox{false}$ $\mbox{true}$ $\mbox{false}$ $\mbox{true}$
$\mbox{false}$ $\mbox{true}$ $\mbox{true}$ $\mbox{true}$
$\mbox{true}$ $\mbox{false}$ $\mbox{false}$ $\mbox{false}$
$\mbox{true}$ $\mbox{false}$ $\mbox{true}$ $\mbox{true}$
$\mbox{true}$ $\mbox{true}$ $\mbox{false}$ $\mbox{false}$
$\mbox{true}$ $\mbox{true}$ $\mbox{true}$ $\mbox{false}$

For CNF, the false rows give us the following five clauses:

• $a\lor b\lor c$
• $a\lor b\lor \neg c$
• $\neg a\lor b\lor c$
• $\neg a\lor \neg b\lor c$
• $\neg a\lor \neg b\lor \neg c$
and the full formula is the conjunction of these. Essentially, each clause rules out one row as being true.

For DNF, the true rows give us the following three clauses:

• $\neg a\land b\land \neg c$
• $\neg a\land b\land c$
• $a\land \neg b\land c$
and the full formula is the disjunction of these. Essentially, each clause allows one row to be true.

This shows that, for any arbitrarily complicated WFF, we can find an equivalent WFF in CNF or DNF. These provide uswith two very regular and relatively uncomplicated forms to use.

The above example produced CNF and DNF formulas for a Boolean function, but they are not the simplest such formulas. For fun, can you find simpler ones?

• CNF: $a\lor b\land \neg a\lor b\lor c\land \neg a\lor \neg b$
• DNF: $\left(\neg a\land b\right)\lor \left(a\land \neg b\land c\right)$

Karnaugh maps are a general technique for finding minimal CNF and DNF formulas. They are most easily usedwhen only a small number of variables are involved. We won't worry about minimizing formulas ourselves, though.

## Notation for dnf, cnf

Sometimes you'll see the form of CNF and DNF expressed in a notation with subscripts.

• DNF is ${}_{i}{}_{i}$ ,where each clause ${}_{i}$ is ${}_{j}_{j}$ , where each  is a propositional variable ( $\mathrm{Prop}$ ), or a negation of one ( $\neg \mathrm{Prop}$ ).
• CNF is ${}_{i}_{i}$ , where each clause $_{i}$ is ${}_{j}_{j}$ , where each  is again a propositional variable ( $\mathrm{Prop}$ ), or a negation of one ( $\neg \mathrm{Prop}$ ).
For example, in the CNF formula $a\lor b\land \neg a\lor b\lor c\land \neg a\lor \neg b$ we have $_{2}=\neg a\lor b\lor c$ within that clause we have $_{1}=\neg a$ .

One question this notation brings up:

• What is the disjunction of a single clause? Well, it's reasonable to say that $\equiv$ . Note that this is also equivalent to $\lor \mbox{false}$ .
• What is the disjunction of zero clauses? Well, if we start with $\equiv \lor \mbox{false}$ and remove the  , that leaves us with $\mbox{false}$ ! Alternately, imagine writing a function which takes a list of booleans,and returns the  of all of themthe natural base case for this recursive list-processing program turns out to be $\mbox{false}$ . Indeed, this is the accepted definition of the empty disjunction.It follows from $\mbox{false}$ being the identity element for  . Correspondingly, a conjunction of zero clauses is true.
Actually, that subscript notation above isn't quite correct: it forces each clause to be the same length, which isn't actually required for CNF or DNF.For fun, you can think about how to patch it up. (Hint: double-subscripting.)

Note that often one of these forms might be more concise than the other.Here are two equivalently verbose ways of encoding $\mbox{true}$ , in CNF and DNF respectively: $a\lor \neg a\land b\lor \neg b\land \text{}\land z\lor \neg z$ is equivalent to $\left(a\land b\land c\land \text{}\land y\land z\right)\lor \left(a\land b\land c\land \text{}\land y\land \neg z\right)\lor \left(a\land b\land c\land \text{}\land \neg y\land z\right)\lor \text{}\lor \left(\neg a\land \neg b\land \text{}\land \neg y\land \neg z\right)$ . The first version corresponds to enumerating the choices for each locationof a WaterWorld board; it has 26 two-variable clauses. This may seem like a lot, but compare it to the second version, whichcorresponds to enumerating all possible WaterWorld boards explicitly: it has all possible 26-variable clauses;there are $2^{26}$ 64 billion of them!

Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
Got questions? Join the online conversation and get instant answers!