Ch01 (Ch01 - v6)
Ch01 (Ch01 - v6)
Logic!
Is this a statement? no
It’s a request.
Is this a proposition? no
P P
true (T) false (F)
false (F) true (T)
P Q P Q (P)(Q)
T T F F F
T F F T T
F T T F T
F F T T T
•P Q R
• Why use XOR here? – example of
ambiguity of natural languages
Fall 2011 CSC 213 - Discrete Structures 22
Exercises
• School is closed if more than 2 feet of
snow falls or if the wind chill is below -100.
– P: School is closed
– Q: 2 feet of snow falls
– R: wind chill is below -100
•Q R P
• Precedence among operators:
, , , ,
T T F F T
T F T T T
F T T T T
F F T T T
The statements (PQ) and (P) (Q) are logically equivalent, since they
have the same truth table, or put it in another way, (PQ) (P) (Q) is
always true.
Is it true? yes
Nobody is perfect
x (Person(x) Perfect(x))
x (Person(x) Perfect(x))
Mathematical
Reasoning
pq pq
_____ Hypothetical
Simplificatio qr
p _____ syllogism
n p r (chaining)
p
pq
q Conjunction Disjunctive
_____ p
_____ syllogism
pq
q (resolution)
Fall 2011 CSC 213 - Discrete Structures 51
Arguments
Just like a rule of inference, an argument
consists of one or more hypotheses (or
premises) and a conclusion.
We say that an argument is valid, if whenever
all its hypotheses are true, its conclusion is
also true.
However, if any hypothesis is false, even a
valid argument can lead to an incorrect
conclusion.
Another example:
“If it rains today, then we will not have a
barbeque today. If we do not have a barbeque
today, then we will have a barbeque
tomorrow.
Therefore, if it rains today, then we will have a
barbeque tomorrow.”
pq
qr Hypothetical
______ syllogism
Pr
i: “Gary is intelligent.”
a: “Gary is a good actor.”
c: “Gary can count from 1 to 10.”
Step 1: c Hypothesis
Step 2: i c Hypothesis
Step 3: i Modus tollens Steps 1 & 2
Step 4: ai Hypothesis
Step 5: a Disjunctive Syllogism
Steps 3 & 4
x P(x)
__________ Universal
P(c) if cU instantiation
n is odd.
Therefore, 3n + 2 is even.
from 1 to 10.
Gary performs well.
Gary can only count from 1 to 3.
Therefore, not everyone is both intelligent and
a good actor
P(x): x performs well
I(x): x is intelligent
A(x): x is a good actor
C(x): x can count from 1 to 10
Fall 2011 CSC 213 - Discrete Structures 68
Another Example on Proof
Hypotheses:
1. Anyone performs well is either intelligent or a good
actor.
x (P(x) I(x) A(x))
2. If someone is intelligent, then he/she can count
from 1 to 10.
x (I(x) C(x) )
3. Gary performs well.
P(G)
4. Gary can only count from 1 to 3.
C(G)
Conclusion: not everyone is both intelligent and a good
actor
x(I(x) A(x))