Topic 1
Topic 1
♥ Proposition : A meaningful
sentence that has only one truth
value.
♥ Also known as Statement.
Proposition
/
Statement
false
true
Purpose of Proposition Logic
♥ Not Proposition :
A sentence that gives both truth
values.
Question Unknown
Variable
Opinion Command
Meaningless
Sentence
Purpose of Proposition Logic
♥ Example of Proposition:
a) Malaysia has 13 states. True
b) Malaysia has 2 federal territories. False
c) Sun is hot. True
d) It is 5 days in a weekdays. True
e) Johor is located at East Malaysia. False
f) 31st July is Malaysia’s Independence Day. False
g) X = 5 for X + 6 = 12. False
Purpose of Proposition Logic
♥ Example of Not Proposition:
a) Where is Malaysia? Question
b) Read this sentence carefully. Command
c) X = Y + 5. Unknown variable
d) I think the cake is delicious. Opinion
e) Bring me the books. Command
f) Abradacabra. Meaningless Sentence
g) Socrates are brilliant. Opinion
State whether the sentences are proposition or not
and if proposition, state the truth value and if not,
state the reason.
a) The earth is round. Proposition. True.
b) 2 + 3 = 6. Proposition. False
c) Segamat is a big city. Not Proposition. Opinion.
d) What a beautiful flower! Not proposition. Command.
e) Is Mr. Lau tall? Not Proposition. Question.
f) Take two aspirins. Not Proposition. Command.
Formulae of Proposition
Logic
♥ Logical Connectives: (also called a
logical operator, sentential
connective, or sentential operator) is
a symbol or word used to connect
two or more statements.
Formulae of Proposition
Logic
5 Logical Connectives
♥ Negation (Not)
♥ Conjunction (And)
♥ Disjunction (Or)
♥ Implication (If… then…)
♥ Biconditional (… if and only if …)
Formulae of Proposition
Logic
1) Negation (Not)
T = 0 T = 0 T
T = 0 F = 1 F
F = 1 T = 0 F
F = 1 F = 1 F
Formulae of Proposition
Logic
•
T T T
T F T
F T T
F F F
Formulae of Proposition
Logic
•
T T T
T F F
F T T
F F T
Formulae of Proposition
Logic
5) Implication (another terms)
♥ If P, Q
♥ P implies to Q
♥ Q if P
♥ Q when P
Formulae of Proposition
Logic
•
T T T
T F F
F T F
F F T
Example in Logical Connectives
•
Formula of TRUE / FALSE
• It is also common to consider the always true formula
and the always false formula to be connective:
⊤ ⊥
0 1
T F
Compound Propositions
❑ A compound statement is having two
or more statements in one sentences
or formulae.
❑ The statements must have logical
connectives in order to make the
statements become compound.
English convert to Formula
Let p, q and r are the •
propositions where
p: You will get A in
Discrete
Mathematics.
q: You are hardworking
r: You do all exercises
given by lecturer.
English convert to Formula
Let p, q and r are the •
propositions where
p: You will get A in
Discrete
Mathematics.
q: You are hardworking
r: You do all exercises
given by lecturer.
English convert to Formula
Let p, q and r are the •
propositions where
p: You will get A in
Discrete
Mathematics.
q: You are hardworking
r: You do all exercises
given by lecturer.
Formula convert to English
Let p, q and r are the •
propositions where
p: You will get A in
Discrete
Mathematics.
q: You are hardworking
r: You do all exercises
given by lecturer.
Formula convert to English
Let p, q and r are the •
propositions where
p: You will get A in
Discrete
Mathematics.
q: You are hardworking
r: You do all exercises
given by lecturer.
Formula convert to English
Let p, q and r are the •
propositions where
p: You will get A in
Discrete
Mathematics.
q: You are hardworking
r: You do all exercises
given by lecturer.
Truth Table
•
P Q
T T
T F
F T
F F
Truth Table
• P Q R
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Truth Table
• P Q R
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
Truth Table for Compound
Propositions
•
p q
T T F F T F
T F F T T F
F T T F F F
F F T T T T
Truth Table for Compound
Propositions
•
P Q R P∧Q ∼P R ⟶ ∼P (P ∧ Q) ∧ (R ⟶ ∼P)
T T T T F F F
T T F T F T T
T F T F F F F
T F F F F T F
F T T F T T F
F T F F T T F
F F T F T T F
F F F F T T F
Truth Table for Compound
Propositions
• P Q R S ∼P ∼R ∼P ∨ ∼R ∼S Q ⟶ ∼S (∼P ∨ ∼R) ⟷ (Q ⟶ ∼S)
T T T T F F F F F T
T T T F F F F T T F
T T F T F T T F F F
T T F F F T T T T T
T F T T F F F F T F
T F T F F F F T T F
T F F T F T T F T T
T F F F F T T T T T
F T T T T F T F F F
F T T F T F T T T T
F T F T T T T F F F
F T F F T T T T T T
F F T T T F T F T T
F F T F T F T T T T
F F F T T T T F T T
F F F F T T T T T T
EXERCISE 1
•
1.2
Derive Predicate
Logic
Derive Predicate Logic
•
Example 1
❑ The car is blue
❑ The sky is blue
❑ The book’s cover is blue
P Q
T T F T F T
T F F T F T
F T T T T T
F F T F F T
∴ It is tautology
Contradiction
•
P Q
T T F T F T F
T F F T F T F
F T T T T T F
F F T F F T F
Contingency
•
P Q R
T T T T T
T T F T T
T F T F T
T F F F F
F T T T T
F T F T T
F F T T T
F F F T T
•
P Q
T T T T
T F F T
F T T F
F F T T
⇎
•
P Q
T T T T
T F F F
F T F F
F F F F
7 Rules of Inference (Valid)
❑ Addition
❑ Conjunction
❑ Simplification
❑ Modus Ponens
❑ Modus Tollens
❑ Disjunctive Syllogism
❑ Hypothetical Syllogism
Types of rules
Answer:
Premise 1 : Ahmad goes to school , P
Conclusion: Thus, Ahmad or Ali go to school ∴P ∨ Q
The answer is addition
Example 2: Determine the rules of
inference for the following arguments.
Question:
Ahmad and Ali go to school. Therefore, Ahmad goes to
school.
Answer:
Premise 1 : P∧Q
Conclusion :∴P
The answer is simplification.
Example 3: Determine the rules of
inference for the following arguments.
If sun is hot, then water is cold. If water is cold, then I am
giggling. Therefore, if sun is hot, then I am giggling.
P : Sun is hot
Q : water is cold
R : I am giggling
Answer:
P ⟶Q
Q⟶R
∴ P ⟶R
The answer is Hypothetical Syllogism
Validity of Inference
❑ All premises are true and the conclusions are all
true then, arguments are valid.
Premise 2 :P∧Q T T F T T F F F
T T F F T F F F
Conclusion : ∴ R ∧ S T F T T F T T T
T F T F F F T F
T F F T F F T F
Answer: T F F F F F T F
F T T T F T T T
The arguments are valid.
F T T F F F T F
F T F T F F T F
F T F F F F T F
F F T T F T T T
F F T F F F T F
F F F T F F T F
F F F F F F T F
Example 2
❑ “Randy works hard. If Randy works •
hard then he is a dull boy. If Randy is
a dull boy, then he will not get a job.
Imply to the conclusion “Randy will
not get a job”
P : Randy works hard
Q : He is a dull boy
R : He will get a job
Solution
Premise 1 Premise 2 Premise 3 Conclusion
P Q R
T T T T F F F
T T F T T T T
T F T F F T F
T F F F T T T
F T T T F F F
F T F T T T T
F F T T F T F
F F F T T T T
Example of Invalid 1
•
Premise 1 Premise 2 Premise 3 Conclusion
P Q R
T T T T T
T T F T F
T F T F T
T F F F F
F T T T T
F T F T F
F F T T T
F F F T F
Example of Invalid 2