Presentation is loading. Please wait.

Presentation is loading. Please wait.

Normal or Canonical Forms Rosen 1.2 (exercises). Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive.

Similar presentations


Presentation on theme: "Normal or Canonical Forms Rosen 1.2 (exercises). Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive."— Presentation transcript:

1 Normal or Canonical Forms Rosen 1.2 (exercises)

2 Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive or (p   q)  (  p  q)  - Biconditional p  q  (p  q)  (q  p)  (  p  q)  (  q  p) Do we need all these?

3 Functionally Complete A set of logical operators is called functionally complete if every compound proposition is logically equivalent to a compound proposition involving only this set of logical operators. , , and  form a functionally complete set of operators.

4 Are  (p  (  p  q)) and (  p   q) equivalent?  (p  (  p  q))   p   (  p  q)DeMorgan  p  (  p  q)DeMorgan  p  (p  q)Double Negation  (  p  p)  (  p  q)Distribution  (p  p)  (  p  q)Commutative  F  (  p  q)And Contradiction  (  p  q)  F Commutative  (  p  q) Identity

5 Are  (p  (  p  q)) and (  p   q) equivalent? Even though both are expressed with only , , and , it is still hard to tell without doing a proof. What we need is a unique representation of a compound proposition that uses , , and . This unique representation is called the Disjunctive Normal Form.

6 Disjunctive Normal Form A disjunction of conjunctions where every variable or its negation is represented once in each conjunction (a minterm) –each minterm appears only once Example: DNF of p  q is (p  q)  (  p  q).

7 pqp  q (p  q)  (  p  q) TTFF TFTT FTTT FFFF Truth Table

8 Method to construct DNF Construct a truth table for the proposition. Use the rows of the truth table where the proposition is True to construct minterms –If the variable is true, use the propositional variable in the minterm –If a variable is false, use the negation of the variable in the minterm Connect the minterms with  ’s.

9 How to find the DNF of (p  q)  r pqr (p  q)  r(p  q)  r TTTTFF TTFTTT TFTTFF TFFTTT FTTTFF FTFTTT F FTFFT FFFFTT There are five sets of input that make the statement true. Therefore there are five minterms.

10 pqr (p  q)  r(p  q)  r TTTTFF TTFTTT TFTTFF TFFTTT FTTTFF FTFTTT FFTFFT FFFFTT From the truth table we can set up the DNF (p  q)  r  (p  q  r)  (p  q  r)  (  p  q  r)  (  p  q  r)  (  p  q  r)

11 Can we show that just  and  form a set of functionally complete operands ? It is sufficient to show that p  q can be written in terms of  and . Then using DNF, we can write every compound proposition in terms of  and . (p  q)  (  p   q)Double negation (2)   (  p  q )DeMorgan

12 pqp  q TTT TFF FTT FFT The DNF of p  q is (p  q)  (  p  q)  (  p   q). Then, applying DeMorgan’s Law, we get that this is equivalent to  [  (p  q)   (  p  q)   (  p   q)]. Find an expression equivalent to p  q that uses only conjunctions and negations. How many minterms in the DNF?

13 Now can we write an equivalent statement to p  q that uses only disjunctions and negations? pqpq  [  (p  q)   (  p  q)   (  p   q)]From Before  [(  p  q)  (  p  q)  (  p   q)]DeMorgan  [(  p  q)  (p  q)  (p  q)]Doub. Neg.  [  (  p  q)   (p  q)   (p  q)]DeMorgan


Download ppt "Normal or Canonical Forms Rosen 1.2 (exercises). Logical Operators  - Disjunction  - Conjunction  - Negation  - Implication p  q   p  q  - Exclusive."

Similar presentations


Ads by Google