This document discusses propositional logic and covers topics like propositions, common logical operators like negation and conjunction, proving the equivalence of logical formulas, constructing logical formulas based on truth tables, and simplifying logical formulas using laws like De Morgan's laws and distribution laws. Examples are provided for each topic to illustrate key concepts in propositional logic.
2. Agenda
• Proposition (Statement)
• Logic Operators
• Logical formula
• Problems
– Proofing formula
– Constructing formula from truth table
– Simplifying formula
3. Proposition (Statement)
• A sentence that is either TURE or FALSE
– 1 + 1 = 2.
– 1 + 1 = 3.
– Let’s end the tutorial now.
– This tutorial is boring.
– Wake up and listen to me!
– There are no aliens.
– x > 0.
– He is handsome. ?
• Tautology – proposition that is always true
• Contradiction – proposition that is always false
6. You are doing it wrong!
?
Your way of pretending to be a penguin is wrong!
7. Agenda
• Proposition (Statement)
• Logic Operators
• Logical formula
• Problems
– Proofing formula
– Constructing formula from truth table
– Simplifying formula
8. Logic Operators
• Let p and q be a proposition.
• Operators:
– Negation
– Conjunction
– Disjunction
– Conditional
– Bi-conditional
9. Negation (NOT)
• Negation (NOT)
– Flip the truth value.
• Example:
– p: My car is blue. ¬p: My car is not blue.
– p: Peter is good. ¬p: Peter is not good.
– p: 10 > 15. ¬p: 10 < 15 or 10 = 15
12. p: Elephants are larger than the moon
¬p: Elephants are smaller than or equal size to the moon
13. Conjunction (AND)
• Conjunction (AND)
– True only when p and q are True
• Example:
– Quiz one is easy and quiz two is difficult.
– Peter is so handsome and smart.
– Peter is so handsome and Peter is so smart.
14. Disjunction (OR)
• Disjunction (OR)
– True when either p or q or both are true.
• Example
– I will go with my sister or I will go with my brother.
15. Exclusive Or (XOR)
• Exclusive Or (XOR)
– True only when either p or q is true but not both
• Example
– Tomorrow is Thursday or tomorrow is Friday.
16. Conditional (If … then …)
• Conditional (If… then…)
– “If p then q” can only be disproved to be false when p
really happens but q doesn’t.
– p is sufficient condition q.
– q is necessary condition p.
– “p if q” = “if q then p”
– “p only if q” = “if p then q”
• Example
– If tomorrow is hot, I will go swimming.
(If tomorrow is cold, you can’t disprove the statement.)
17. Bi-Conditional (If and only if)
• Bi-Conditional (If and only if)
– “p if and only if q” can only be disproved when p
happens but not q or vice versa.
– p (q) is necessary and sufficient condition for q (p)
–
• Example:
– A computer program is correct
if and only if it produces correct
answer for all possible sets of
input data
18. Agenda
• Proposition (Statement)
• Logic Operators
• Logical formula
• Problems
– Proofing formula
– Constructing formula from truth table
– Simplifying formula
20. Agenda
• Proposition (Statement)
• Logic Operators
• Logical formula
• Problems
– Proofing formula
– Constructing formula from truth table
– Simplifying formula
23. Constructing Formula 1
• By using only
• Find the logical formula for
1. Truth table
2. When will this formula
be True?
3. Simplify
• Exercise: Try to construct an logical formula for
, ,
24. Constructing Formula 2
• Find the logical formula for
1. Truth table
2. When will this formula be True?
3. Simplify
• Exercise: Verify the above
formula.
25. Constructing Formula 3
• Find the logical formula for
1. Truth table
2. When is this formula True?
26. Constructing Formula 3
3. Simplify
De Morgan’s law
Distribution Laws
Distribution Laws
Distribution Laws
De Morgan’s law
28. Summary
• What is proposition?
• Common logical operator.
• Proving Equivalent of formula.
• Constructing formula from truth table.
• Simplifying formula.