134
Discrete Mathematics and Applications COT3100 Dr. Ungor Sources: Slides are based on Dr. G. Bebis’ material. Tuesday, January 7, 2014

Discrete Mathematics and Applications COT3100

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Discrete Mathematics and Applications COT3100

Discrete Mathematics and Applications

COT3100

Dr. Ungor

Sources: Slides are based on Dr. G. Bebis’ material.

Tuesday, January 7, 2014

Page 2: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 2

Foundations of Logic: Overview

• Propositional logic: (Sections 1.1-1.3)

• Basic definitions.

• Equivalence rules & derivations.

• Predicate logic (Section 1.4)

• Predicates.

• Quantified predicate expressions.

• Equivalences & derivations.

Tuesday, January 7, 2014

Page 3: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 3

Propositional Logic

Applications:

• Design of digital electronic circuits.

• Expressing conditions in computer programs.

• Queries to databases & search engines.

Propositional Logic is the logic of compound statements built from simpler statements using Boolean connectives.

Tuesday, January 7, 2014

Page 4: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor

Propositional Logic

• What are Propositions?

• What are Boolean connectors?

Propositional Logic is the logic of compound statements built from simpler statements using Boolean connectives.

Tuesday, January 7, 2014

Page 5: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 5

Definition of a Proposition

Tuesday, January 7, 2014

Page 6: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 5

Definition of a Proposition

• A proposition (p, q, r, …) is simply a statement (i.e., a declarative sentence) with a definite meaning, having a truth value thatʼs either true (T) or false (F) (never both, neither, or somewhere in between).

Tuesday, January 7, 2014

Page 7: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 5

Definition of a Proposition

• A proposition (p, q, r, …) is simply a statement (i.e., a declarative sentence) with a definite meaning, having a truth value thatʼs either true (T) or false (F) (never both, neither, or somewhere in between).

• In probability theory, we assign degrees of certainty to propositions. For now: True/False only!

Tuesday, January 7, 2014

Page 8: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

Tuesday, January 7, 2014

Page 9: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

Tuesday, January 7, 2014

Page 10: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

Tuesday, January 7, 2014

Page 11: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

Tuesday, January 7, 2014

Page 12: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

The following are NOT propositions:

Tuesday, January 7, 2014

Page 13: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

The following are NOT propositions:

• “Whoʼs there?” (interrogative, question)

Tuesday, January 7, 2014

Page 14: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

The following are NOT propositions:

• “Whoʼs there?” (interrogative, question)

• “La la la la la.” (meaningless interjection)

Tuesday, January 7, 2014

Page 15: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

The following are NOT propositions:

• “Whoʼs there?” (interrogative, question)

• “La la la la la.” (meaningless interjection)

• “Just do it!” (imperative, command)

Tuesday, January 7, 2014

Page 16: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

The following are NOT propositions:

• “Whoʼs there?” (interrogative, question)

• “La la la la la.” (meaningless interjection)

• “Just do it!” (imperative, command)

• “Yeah, I sorta dunno, whatever...” (vague)

Tuesday, January 7, 2014

Page 17: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 6

Examples of Propositions

• “It is raining.” (Given a situation.)

• “Beijing is the capital of China.”

• “1 + 2 = 5”

The following are NOT propositions:

• “Whoʼs there?” (interrogative, question)

• “La la la la la.” (meaningless interjection)

• “Just do it!” (imperative, command)

• “Yeah, I sorta dunno, whatever...” (vague)

• “1 + 2” (expression with a non-true/false value)Tuesday, January 7, 2014

Page 18: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor

Boolean operators

• Negation (NOT)

• Conjunction (AND)

• Disjunction (OR)

• Exclusive-Or (XOR)

• Implication (IF)

• Bi-conditional (IFF)

Tuesday, January 7, 2014

Page 19: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 8

• An operator or connective combines one or more operand expressions into a larger expression. (e.g., “+” in numeric exprs.)

• Unary operators take 1 operand (e.g., -3); binary operators take 2 operands (e.g., 3 × 4).

• Propositional or Boolean operators operate on propositions or truth values instead of on numbers.

Operators / Connectives

Tuesday, January 7, 2014

Page 20: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 9

The Negation Operator

• The unary negation operator “¬” (NOT) transforms a prop. into its logical negation.

• Example: If p = “I have brown hair.”, then ¬p = “I do not have brown hair.”

• Truth table for NOT:

Tuesday, January 7, 2014

Page 21: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 10

The Conjunction Operator

• The binary conjunction operator “∧” (AND) combines two propositions to form their logical conjunction.

•E.g., If p=“I will have salad for lunch.” and q=“I will have steak for dinner.”, then p∧q=“I will have salad for lunch and I will have steak for dinner.”

Tuesday, January 7, 2014

Page 22: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 11

Conjunction Truth Table

Tuesday, January 7, 2014

Page 23: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 11

• Note that aconjunctionp1 ∧ p2 ∧ … ∧ pn

of n propositionswill have 2n rowsin its truth table.

• ¬ and ∧ operations together are universal, i.e., sufficient to express any truth table!

Conjunction Truth Table

Tuesday, January 7, 2014

Page 24: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 12

The Disjunction Operator

• The binary disjunction operator “∨” (OR) combines two propositions to form their logical disjunction.

p=“That car has a bad engine.”

q=“That car has a bad carburetor.”

p∨q=“Either that car has a bad engine, or that car has a bad carburetor.”

Tuesday, January 7, 2014

Page 25: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 13

Disjunction Truth Table

Tuesday, January 7, 2014

Page 26: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 13

• Note that p∨q meansthat p is true, or q istrue, or both are true!

• So this operation isalso called inclusive or,because it includes thepossibility that both p and q are true.

• “¬” and “∨” together are also universal.

Disjunction Truth Table

Tuesday, January 7, 2014

Page 27: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 14

A Simple ExerciseLet p=“It rained last night”,

q=“The sprinklers came on last night,” r=“The lawn was wet this morning.”

Translate each of the following into English:

¬p =

r ∧ ¬p =

¬ r ∨ p ∨ q =

Tuesday, January 7, 2014

Page 28: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 14

A Simple ExerciseLet p=“It rained last night”,

q=“The sprinklers came on last night,” r=“The lawn was wet this morning.”

Translate each of the following into English:

¬p =

r ∧ ¬p =

¬ r ∨ p ∨ q =

“It didn’t rain last night.”

Tuesday, January 7, 2014

Page 29: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 14

A Simple ExerciseLet p=“It rained last night”,

q=“The sprinklers came on last night,” r=“The lawn was wet this morning.”

Translate each of the following into English:

¬p =

r ∧ ¬p =

¬ r ∨ p ∨ q =

Tuesday, January 7, 2014

Page 30: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 14

A Simple ExerciseLet p=“It rained last night”,

q=“The sprinklers came on last night,” r=“The lawn was wet this morning.”

Translate each of the following into English:

¬p =

r ∧ ¬p =

¬ r ∨ p ∨ q =

“The lawn was wet this morning, andit didn’t rain last night.”

Tuesday, January 7, 2014

Page 31: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 14

A Simple ExerciseLet p=“It rained last night”,

q=“The sprinklers came on last night,” r=“The lawn was wet this morning.”

Translate each of the following into English:

¬p =

r ∧ ¬p =

¬ r ∨ p ∨ q =

Tuesday, January 7, 2014

Page 32: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 14

A Simple ExerciseLet p=“It rained last night”,

q=“The sprinklers came on last night,” r=“The lawn was wet this morning.”

Translate each of the following into English:

¬p =

r ∧ ¬p =

¬ r ∨ p ∨ q = “Either the lawn wasn’t wet this morning, or it rained last night, or the

sprinklers came on last night.”

Tuesday, January 7, 2014

Page 33: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 15

The Exclusive Or Operator

• The binary exclusive-or operator “⊕” (XOR) combines two propositions to form their logical “exclusive or” (exjunction?).

p = “I will earn an A in this course,”

q = “I will drop this course,”

p ⊕ q = “I will either earn an A for this course, or I will drop it (but not both!)”

Tuesday, January 7, 2014

Page 34: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 16

• Note that p⊕q meansthat p is true, or q istrue, but not both!

• This operation iscalled exclusive or,because it excludes thepossibility that both p and q are true.

• “¬” and “⊕” together are not universal.

Exclusive-Or Truth Table

Tuesday, January 7, 2014

Page 35: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 17

Note that in English “or” is by itself ambiguous regarding the “both” case!

“Pat is a singer orPat is a writer.” -

“Pat is rich orPat is poor.” -

Need context to disambiguate the meaning!

For this class, assume “or” means inclusive.

Natural Language is Ambiguous

Tuesday, January 7, 2014

Page 36: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 17

Note that in English “or” is by itself ambiguous regarding the “both” case!

“Pat is a singer orPat is a writer.” -

“Pat is rich orPat is poor.” -

Need context to disambiguate the meaning!

For this class, assume “or” means inclusive.

Natural Language is Ambiguous

Tuesday, January 7, 2014

Page 37: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 17

Note that in English “or” is by itself ambiguous regarding the “both” case!

“Pat is a singer orPat is a writer.” -

“Pat is rich orPat is poor.” -

Need context to disambiguate the meaning!

For this class, assume “or” means inclusive.

Natural Language is Ambiguous

Tuesday, January 7, 2014

Page 38: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 18

The Implication Operator

• The implication p → q states that p implies q.

• It is FALSE only in the case that p is TRUE but q is FALSE.

e.g., p=“I am elected.”q=“Taxes will be lowered.”

p → q = “If I am elected, then taxes will be lowered” (else it could go either way)

Tuesday, January 7, 2014

Page 39: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 19

The Implication Operator

• Terminology for the structure of implication p → q

• p: Hypothesis (antecedent or premise)

• q: Conclusion (consequence)

Tuesday, January 7, 2014

Page 40: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 20

Implication Truth Table

Tuesday, January 7, 2014

Page 41: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 20

Implication Truth Table

• p → q is false only whenp is true but q is not true.

Tuesday, January 7, 2014

Page 42: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 20

Implication Truth Table

• p → q is false only whenp is true but q is not true.

• p → q does not implythat p causes q!

Tuesday, January 7, 2014

Page 43: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 20

Implication Truth Table

• p → q is false only whenp is true but q is not true.

• p → q does not implythat p causes q!

• p → q does not implythat p or q are ever true!

Tuesday, January 7, 2014

Page 44: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 20

Implication Truth Table

• p → q is false only whenp is true but q is not true.

• p → q does not implythat p causes q!

• p → q does not implythat p or q are ever true!

• E.g. “(1=0) → pigs can fly” is TRUE!

Tuesday, January 7, 2014

Page 45: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 21

Examples of Implications

• “If this lecture ends, then the sun will rise tomorrow.” True or False?

• “If Monday is a day of the week, then I am a not teacher.” True or False?

• “If 1+1=6, then George passed the exam.” True or False?

• “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False?

Tuesday, January 7, 2014

Page 46: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 21

Examples of Implications

• “If this lecture ends, then the sun will rise tomorrow.” True or False?

• “If Monday is a day of the week, then I am a not teacher.” True or False?

• “If 1+1=6, then George passed the exam.” True or False?

• “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False?

Tuesday, January 7, 2014

Page 47: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 21

Examples of Implications

• “If this lecture ends, then the sun will rise tomorrow.” True or False?

• “If Monday is a day of the week, then I am a not teacher.” True or False?

• “If 1+1=6, then George passed the exam.” True or False?

• “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False?

Tuesday, January 7, 2014

Page 48: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 21

Examples of Implications

• “If this lecture ends, then the sun will rise tomorrow.” True or False?

• “If Monday is a day of the week, then I am a not teacher.” True or False?

• “If 1+1=6, then George passed the exam.” True or False?

• “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False?

Tuesday, January 7, 2014

Page 49: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 21

Examples of Implications

• “If this lecture ends, then the sun will rise tomorrow.” True or False?

• “If Monday is a day of the week, then I am a not teacher.” True or False?

• “If 1+1=6, then George passed the exam.” True or False?

• “If the moon is made of green cheese, then I am richer than Bill Gates.” True or False?

Tuesday, January 7, 2014

Page 50: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 22

Inverse, Converse, Contrapositive

Some terminology:

• The inverse of p → q is: ¬ p → ¬q

• The converse of p → q is: q → p.

• The contrapositive of p → q is: ¬q → ¬ p.

Tuesday, January 7, 2014

Page 51: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 22

Inverse, Converse, Contrapositive

Some terminology:

• The inverse of p → q is: ¬ p → ¬q

• The converse of p → q is: q → p.

• The contrapositive of p → q is: ¬q → ¬ p.

• One of these has the same meaning (same truth table) as p → q. Can you figure out which?

Tuesday, January 7, 2014

Page 52: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 22

Inverse, Converse, Contrapositive

Some terminology:

• The inverse of p → q is: ¬ p → ¬q

• The converse of p → q is: q → p.

• The contrapositive of p → q is: ¬q → ¬ p.

Contrapositive

• One of these has the same meaning (same truth table) as p → q. Can you figure out which?

Tuesday, January 7, 2014

Page 53: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 23

How do we know for sure?

Proving the equivalence of p → q and its contrapositive using truth tables:

→ →

Tuesday, January 7, 2014

Page 54: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 24

The biconditional operator

Tuesday, January 7, 2014

Page 55: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 24

The biconditional operator

The biconditional p ↔ q states that p is true if and only if (IFF) q is true.

Tuesday, January 7, 2014

Page 56: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 24

The biconditional operator

The biconditional p ↔ q states that p is true if and only if (IFF) q is true.

•It is TRUE only when both p → q and q → p are TRUE.

Tuesday, January 7, 2014

Page 57: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 24

The biconditional operator

The biconditional p ↔ q states that p is true if and only if (IFF) q is true.

•It is TRUE only when both p → q and q → p are TRUE.

•p = “It is raining.”

Tuesday, January 7, 2014

Page 58: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 24

The biconditional operator

The biconditional p ↔ q states that p is true if and only if (IFF) q is true.

•It is TRUE only when both p → q and q → p are TRUE.

•p = “It is raining.”

•q = “The home team wins.”

Tuesday, January 7, 2014

Page 59: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 24

The biconditional operator

The biconditional p ↔ q states that p is true if and only if (IFF) q is true.

•It is TRUE only when both p → q and q → p are TRUE.

•p = “It is raining.”

•q = “The home team wins.”

•p ↔ q = “If and only if it is raining, the home team wins.”

Tuesday, January 7, 2014

Page 60: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 25

Biconditional Truth Table

Tuesday, January 7, 2014

Page 61: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 25

Biconditional Truth Table

• p ↔ q means that p and qhave the same truth value.

Tuesday, January 7, 2014

Page 62: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 25

Biconditional Truth Table

• p ↔ q means that p and qhave the same truth value.

• Note this truth table is theexact opposite of ⊕ʼs!

Tuesday, January 7, 2014

Page 63: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 25

Biconditional Truth Table

• p ↔ q means that p and qhave the same truth value.

• Note this truth table is theexact opposite of ⊕ʼs!

p ↔ q means ¬(p ⊕ q)

Tuesday, January 7, 2014

Page 64: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 25

Biconditional Truth Table

• p ↔ q means that p and qhave the same truth value.

• Note this truth table is theexact opposite of ⊕ʼs!

p ↔ q means ¬(p ⊕ q)

• p ↔ q does not implyp and q are true, or cause each other.

Tuesday, January 7, 2014

Page 65: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 26

Boolean Operations Summary

• We have seen 1 unary operator and 5 binary operators.

Tuesday, January 7, 2014

Page 66: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 27

Precedence of Logical Operators

¬ 1

∧ ∨

23

→↔

45

Operator Precedence

Tuesday, January 7, 2014

Page 67: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 28

Nested Propositional Expressions

• Use parentheses to group sub-expressions:“I just saw my old friend, and either heʼs grown or Iʼve shrunk.” = f ∧ (g ∨ s)

• (f ∧ g) ∨ s would mean something different

• f ∧ g ∨ s would be ambiguous

• By convention, “¬” takes precedence over both “∧” and “∨”.

• ¬s ∧ f means (¬s) ∧ f , not ¬ (s ∧ f)

Tuesday, January 7, 2014

Page 68: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 29

Some Alternative Notations

Tuesday, January 7, 2014

Page 69: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 30

Bits and Bit Operations

• A bit is a binary (base 2) digit: 0 or 1.

• Bits may be used to represent truth values.

• By convention: 1 represents “true”; 0 represents “false”.

• Boolean algebra is like ordinary algebra except that variables stand for bits, + means “or”, and multiplication means “and”.

Tuesday, January 7, 2014

Page 70: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 31

Bit Strings

• A Bit string of length n is an ordered series or sequence of n≥0 bits.

• By convention, bit strings are written left to right: e.g. the first bit of “1001101010” is 1.

• When a bit string represents a base-2 number, by convention the first bit is the most significant bit. Ex. 11012=8+4+1=13.

Tuesday, January 7, 2014

Page 71: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 32

Bitwise Operations

• Boolean operations can be extended to operate on bit strings as well as single bits.

• E.g.:01 1011 011011 0001 110111 1011 1111 Bit-wise OR01 0001 0100 Bit-wise AND10 1010 1011 Bit-wise XOR

Tuesday, January 7, 2014

Page 72: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Entezari

Propositional Equivalences

Tuesday, January 7, 2014

Page 73: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 34

Propositional Equivalence

Two syntactically (i.e., textually) different compound propositions may be semantically identical (i.e., have the same meaning). We call them equivalent.

NEXT:

• Learn about various equivalence rules or laws.

• Learn how to prove equivalences using symbolic derivations.

Tuesday, January 7, 2014

Page 74: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 35

Tautologies and Contradictions

Tuesday, January 7, 2014

Page 75: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 35

Tautologies and Contradictions

A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are!

Tuesday, January 7, 2014

Page 76: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 35

Tautologies and Contradictions

A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are!

Ex. p ∨ ¬p [What is its truth table?]

Tuesday, January 7, 2014

Page 77: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 35

Tautologies and Contradictions

A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are!

Ex. p ∨ ¬p [What is its truth table?]

A contradiction is a comp. prop. that is false no matter what! Ex. p ∧ ¬p [Truth table?]

Tuesday, January 7, 2014

Page 78: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 35

Tautologies and Contradictions

A tautology is a compound proposition that is true no matter what the truth values of its atomic propositions are!

Ex. p ∨ ¬p [What is its truth table?]

A contradiction is a comp. prop. that is false no matter what! Ex. p ∧ ¬p [Truth table?]

Other comp. props. are contingencies.

Tuesday, January 7, 2014

Page 79: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 36

Proving Equivalences

Tuesday, January 7, 2014

Page 80: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 36

Proving Equivalences

Compound propositions P and Q are logically equivalent to each other IFF P and Q contain the same truth values as each other in all rows of their truth tables.

Tuesday, January 7, 2014

Page 81: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 36

Proving Equivalences

Compound propositions P and Q are logically equivalent to each other IFF P and Q contain the same truth values as each other in all rows of their truth tables.

Compound proposition P is logically equivalent to compound proposition Q, written P⇔Q, IFF the compound proposition P↔Q is a tautology.

Tuesday, January 7, 2014

Page 82: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 83: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

F

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 84: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 85: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FTT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 86: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FTTT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 87: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

T

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 88: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TT

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 89: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTFT

T

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 90: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TT

FFT

T

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 91: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

FFT

T

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 92: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

FFF

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 93: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

TFFF

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 94: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

TFFF

FTT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 95: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

FFF

FTT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 96: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

FFF

F FTT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 97: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

FFF

FFF

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 98: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

FFF

F

FFF

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 99: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

FFF

F

FFF

F

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 100: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

TT

FFF

F

FFF

F

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 101: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

TT

FFF

F

FFF

F

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 102: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

TTT

FFF

F

FFF

F

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 103: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

TTT

FFF

F

FFF

F

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 104: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 37

Ex Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q). Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).. Prove thEx. Prove that pq (p q).

at p∨q ⇔ ¬(¬p ∧ ¬q).

Proving Equivalencevia Truth Tables

FT

TTT

T

T

TTT

FFF

F

FFF

F

TT

Ex. Prove that p∨q ⇔ ¬(¬p ∧ ¬q).

P Q

} }

Tuesday, January 7, 2014

Page 105: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 38

Equivalence Laws

• These are similar to the arithmetic identities you may have learned in algebra, but for propositional equivalences instead.

• They provide a pattern or template that can be used to match much more complicated propositions and to find equivalences for them.

Tuesday, January 7, 2014

Page 106: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 39

Equivalence Laws - Examples

• Identity: p∧T ⇔ p p∨F ⇔ p

• Domination: p∨T ⇔ T p∧F ⇔ F

• Idempotent: p∨p ⇔ p p∧p ⇔ p

• Double negation: ¬¬p ⇔ p

• Commutative: p∨q ⇔ q∨p p∧q ⇔ q∧p

• Associative: (p∨q)∨r ⇔ p∨(q∨r) (p∧q)∧r ⇔ p∧(q∧r)

Tuesday, January 7, 2014

Page 107: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 40

More Equivalence Laws

• Distributive: p∨(q∧r) ⇔ (p∨q)∧(p∨r) p∧(q∨r) ⇔ (p∧q)∨(p∧r)

• De Morgan’s:" ¬(p∧q) ⇔ ¬p ∨ ¬q " ¬(p∨q) ⇔ ¬p ∧ ¬q

Tuesday, January 7, 2014

Page 108: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 41

More Equivalence Laws

• Absorption:" p∨(p∧q) ⇔ p

p ∧(p ∨ q) ⇔ p

• Trivial tautology/contradiction: p ∨ ¬p ⇔ T p ∧ ¬p ⇔ F

Tuesday, January 7, 2014

Page 109: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 42

Defining Operators via Equivalences

Using equivalences, we can define operators in terms of other operators.

• Implication: p→q ⇔ ¬p ∨ q

• Biconditional: p↔q ⇔ (p→q) ∧ (q→p) p↔q ⇔ ¬(p⊕q)

• Exclusive or: p⊕q ⇔ (p∨q)∧¬(p∧q) p⊕q ⇔ (p∧¬q)∨(q∧¬p)

Tuesday, January 7, 2014

Page 110: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

Tuesday, January 7, 2014

Page 111: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

Tuesday, January 7, 2014

Page 112: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

(p ∧ ¬q) → (p ⊕ r) ⇔

Tuesday, January 7, 2014

Page 113: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

(p ∧ ¬q) → (p ⊕ r) ⇔

[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r)

Tuesday, January 7, 2014

Page 114: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

(p ∧ ¬q) → (p ⊕ r) ⇔

[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r)

[Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))

Tuesday, January 7, 2014

Page 115: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

(p ∧ ¬q) → (p ⊕ r) ⇔

[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r)

[Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))

[DeMorganʼs Law]

Tuesday, January 7, 2014

Page 116: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

(p ∧ ¬q) → (p ⊕ r) ⇔

[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r)

[Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))

[DeMorganʼs Law] ⇔ (¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))

Tuesday, January 7, 2014

Page 117: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 43

An Example Problem

• Check using a symbolic derivation whether (p ∧ ¬q) → (p ⊕ r) ⇔ ¬p ∨ q ∨ ¬r.

(p ∧ ¬q) → (p ⊕ r) ⇔

[Expand definition of →] ¬(p ∧ ¬q) ∨ (p ⊕ r)

[Defn. of ⊕] ⇔ ¬(p ∧ ¬q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))

[DeMorganʼs Law] ⇔ (¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r))

Tuesday, January 7, 2014

Page 118: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

Tuesday, January 7, 2014

Page 119: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

Tuesday, January 7, 2014

Page 120: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

Tuesday, January 7, 2014

Page 121: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]

Tuesday, January 7, 2014

Page 122: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]

⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r)))

Tuesday, January 7, 2014

Page 123: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]

⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r)))

[assoc.] ⇔ q ∨ (((¬p ∨ p) ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

Tuesday, January 7, 2014

Page 124: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]

⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r)))

[assoc.] ⇔ q ∨ (((¬p ∨ p) ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

[trivial taut.] ⇔ q ∨ ((T ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

Tuesday, January 7, 2014

Page 125: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]

⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r)))

[assoc.] ⇔ q ∨ (((¬p ∨ p) ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

[trivial taut.] ⇔ q ∨ ((T ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

[domination] ⇔ q ∨ (T ∧ (¬p ∨ ¬(p ∧ r)))

Tuesday, January 7, 2014

Page 126: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 44

Example Continued...

(¬p ∨ q) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) ⇔ [∨ commutes]

⇔ (q ∨ ¬p) ∨ ((p ∨ r) ∧ ¬(p ∧ r)) [∨ associative]

⇔ q ∨ (¬p ∨ ((p ∨ r) ∧ ¬(p ∧ r))) [distrib. ∨ over ∧]

⇔ q ∨ (((¬p ∨ (p ∨ r)) ∧ (¬p ∨ ¬(p ∧ r)))

[assoc.] ⇔ q ∨ (((¬p ∨ p) ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

[trivial taut.] ⇔ q ∨ ((T ∨ r) ∧ (¬p ∨ ¬(p ∧ r)))

[domination] ⇔ q ∨ (T ∧ (¬p ∨ ¬(p ∧ r)))

[identity] ⇔ q ∨ (¬p ∨ ¬(p ∧ r)) ⇔ cont.Tuesday, January 7, 2014

Page 127: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

Tuesday, January 7, 2014

Page 128: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

Tuesday, January 7, 2014

Page 129: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

[DeMorganʼs] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))

Tuesday, January 7, 2014

Page 130: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

[DeMorganʼs] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))

[Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r)

Tuesday, January 7, 2014

Page 131: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

[DeMorganʼs] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))

[Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r)

[Idempotent] ⇔ q ∨ (¬p ∨ ¬r)

Tuesday, January 7, 2014

Page 132: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

[DeMorganʼs] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))

[Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r)

[Idempotent] ⇔ q ∨ (¬p ∨ ¬r)

[Assoc.] ⇔ (q ∨ ¬p) ∨ ¬r

Tuesday, January 7, 2014

Page 133: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

[DeMorganʼs] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))

[Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r)

[Idempotent] ⇔ q ∨ (¬p ∨ ¬r)

[Assoc.] ⇔ (q ∨ ¬p) ∨ ¬r

[Commut.] ⇔ ¬p ∨ q ∨ ¬r

Tuesday, January 7, 2014

Page 134: Discrete Mathematics and Applications COT3100

COT3100 - Dr. Ungor 45

End of Long Example

q ∨ (¬p ∨ ¬(p ∧ r))

[DeMorganʼs] ⇔ q ∨ (¬p ∨ (¬p ∨ ¬r))

[Assoc.] ⇔ q ∨ ((¬p ∨ ¬p) ∨ ¬r)

[Idempotent] ⇔ q ∨ (¬p ∨ ¬r)

[Assoc.] ⇔ (q ∨ ¬p) ∨ ¬r

[Commut.] ⇔ ¬p ∨ q ∨ ¬r

Q.E.D. (quod erat demonstrandum)

Tuesday, January 7, 2014