DS Lectures
DS Lectures
DS Lectures
• Conditional Statements
• Logical Equivalences
x+ 4 > 9.
Because this is true for certain values of x (such as x = 6) and false for
other values of x (such as x = 5), it is not a proposition.
5. Is the following sentence a proposition? If it is a proposition,
determine whether it is true or false.
He is a University student.
1. Not
2. And ˄
3. OR ˅
4. Exclusive OR
5. Implication
6. Biconditional
p p
true false
false true
p : Today is Friday.
The negation is
p : It is not the case that today is Friday.
“6 is negative”.
The negation is
p q pq
p : Today is Friday.
q : It is raining today.
The conjunction is
p q pq
p : Today is Friday.
q : It is raining today.
The disjunction is
In logic form
p (p q)
conclusion
hypothesis
Problems from Ex 2.1
Truth Table (if – then, Symbol: )
P Q PQ
P Q PQ
true true true
true false false
false true false
false false true
Problems from Ex 2.1
Examples
p q
Alternatively: p is a necessary and sufficient condition for q means “p if, and only
if, q.”
P Q P Q (P)(Q)
true true false false false
true false false true true
false true true false true
false false true true true
• Show that
p→q≡ ¬pq
• Show that
¬ (p → q) ≡ p ¬q
This means that negation of ‘if p then q’ is logically
equivalent to ‘p and not q’.
p q p q ¬ p q ¬ (p q) p¬q
T T T T T T
T F F F F F
F T T T T T
F F T T T T
• Propositions
• Logical Connectives
• Truth Tables
• Compound propositions
• Translating English to logic and logic to English.
• Valid and Invalid Statements
3. Distributive laws
p (q r ) ≡ (p q) (p r)
p (q r) ≡ (p q) (p r)
4. Identity laws
pt≡p ;pc≡ p
5. Negation laws
p¬p ≡ t ; p ¬p ≡ c
7. Idempotent laws
p p ≡ p ; pp ≡ p
8. Universal bound laws
pt≡t ;pc≡ c
9. Absorption laws
p (pq) ≡ p ; p (p q) ≡ p
b) Either it does not walk like a duck or it does not talk like a duck, or it is a
duck.
c) If it does not walk like a duck and it does not talk like a duck, then it is not
a duck.
Solution: Let p represent "It walks like a duck," q represent "It talks like a
duck," and r represent "It is a duck."
p˄q→~r
p ˅ ~q
~p→p
∴ ~r