Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 321 Discrete Structures

Similar presentations


Presentation on theme: "CSE 321 Discrete Structures"— Presentation transcript:

1 CSE 321 Discrete Structures
Winter 2008 Lecture 3 Propositional Proofs

2 Announcements Reading for Monday: 1.3 Signup for the mailing list
See course website for details Office hours Richard Anderson, CSE 582, Friday 2:30-3:30 Natalie Linnell, CSE 218, Monday, 11:00-12:00, Tuesday, 2:00-3:00

3 Highlights from Lecture 2
Tautology: A compound proposition that is always true. P is equivalent to Q (P  Q): P Q is a tautology Truth table algorithm for testing equivalence DeMorgan’s laws  (p  q)  __________  (p  q)  __________

4 Equivalences relating to implication
p  q   p  q p  q   q   p p  q   p  q p  q   (p   q) p  q  (p q)  (q  p) p  q   p   q p  q  (p  q)  ( p   q)  (p  q)  p   q

5 Logical Proofs To show P is equivalent to Q To show P is a tautology
Apply a series of logical equivalences to subexpressions to convert P to Q To show P is a tautology Apply a series of logical equivalences to subexpressions to convert P to T

6 Why bother with logical proofs when we have truth tables?
Truth tables only practical for small problems Understanding of logic Understanding of a wide class of algorithms based on rewrite algorithms Basis for formal reasoning in other domains. Most formal domains extend propositional calculus Algorithms for important practical problems: Query optimization Search equivalence Program verification

7 Show (p  q)  (p  q) is a tautology

8 Show (p  q)  r and p  (q  r) are not equivalent
All false works

9 Predicate Calculus Predicate or Propositional Function “x is a cat”
A function that returns a truth value “x is a cat” “x is prime” “student x has taken course y” “x > y” “x + y = z” Prime(65353)

10 Quantifiers  x P(x) : P(x) is true for every x in the domain
 x P(x) : There is an x in the domain for which P(x) is true Relate  and  to  and 

11 Statements with quantifiers
Domain: Positive Integers  x Even(x)  x Odd(x)  x (Even(x)  Odd(x))  x (Even(x)  Odd(x))  x Greater(x+1, x)  x (Even(x)  Prime(x)) Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y)

12 Statements with quantifiers
Domain: Positive Integers  x  y Greater (y, x)  x  y Greater (x, y)  x  y (Greater(y, x)  Prime(y))  x (Prime(x)  (Equal(x, 2)  Odd(x))  x  y(Equal(x, y + 2)  Prime(x)  Prime(y)) Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y)

13 Statements with quantifiers
Domain: Positive Integers Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y) “There is an odd prime” “If x is greater than two, x is not an even prime” xyz ((Equal(z, x+y)  Odd(x)  Odd(y)) Even(z)) “There exists an odd integer that is the sum of two primes”

14 Goldbach’s Conjecture
Every even integer greater than two can be expressed as the sum of two primes Even(x) Odd(x) Prime(x) Greater(x,y) Equal(x,y) xyz ((Greater(x, 2)  Even(x))  (Equal(x, y+z)  Prime(y)  Prime(z)) Domain: Positive Integers


Download ppt "CSE 321 Discrete Structures"

Similar presentations


Ads by Google