0% found this document useful (0 votes)
4 views77 pages

Topic 1

Uploaded by

EdwardLee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views77 pages

Topic 1

Uploaded by

EdwardLee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

Topic 1

Basic Logic and Proofs


Subtopics
♥ 1.1 Derive propositional logic
♥ 1.2 Derive predicate logic
♥ 1.3 Demonstrate proofs
1.1
Derive
Propositional Logic
Derive Propositional Logic
♥ Purpose of proposition logic
♥ Formulae of proposition logic
♥ Compound proposition
♥ Truth Table
♥ Write well-formed proposition
in English.
Purpose of Proposition Logic

♥ Logic: the study of correct


reasoning, especially in making
inferences.
Purpose of Proposition Logic

♥ 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)

♥ Connector : Not a connector


♥ Turn the TRUE value into FALSE value
♥ Turn the FALSE value into TRUE value
♥ Symbol : ~ ¬ —
♥ P : Malaysia does have 13 states. True
♥ ~P : Malaysia does not have 13 states. False
Formulae of Proposition
Logic

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:

TRUE formula FALSE formula

⊤ ⊥
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

❑ The phrase “is blue” is a predicate.


❑ It describes the property of being blue.
❑ So we can let “blue” as “B”
❑ x will be anything
❑ Therefore, B(x) represent the “x is blue”
Example 2

Example 3
❑ The car is blue
❑ The sky is blue
❑ The book’s cover is blue

❑ The phrase “is blue” is a predicate.


❑ It describes the property of being blue.
❑ So we can let “blue” as “B”
❑ x will be anything
❑ Therefore, B(x) represent the “x is blue”
QUANTIFIER (Universal)

QUANTIFIER (Existential)

Example 1 (Sentence to Symbol)

Example 2 (Sentence to Symbol)

Example 3 (Sentence to Symbol)

Example 4 (Symbol to Sentence)

Example 5 (Symbol to Sentence)

Example 6 (Symbol to Sentence)

Truth and Falsity
❑ Let G (x, y) represent the predicate “x > y”. X
and Y are the real number.

❖ G (6, 13) means 13 is greater than 6 False


❖ G (2, 0) True
❖ G (7, 1) means 7 is greater than 1 True
❖ “4 is less than 5” can be represented by G (5, 4) True
Exercise 1
❑ Let L (x, y) be the predicate “x likes y”, and let the
universe of discourse be the set of all people. Use
quantifiers to express each of the following
statements.

❑ ”Everyone likes everyone.” : ∀x ∀y [L(x, y)]


❑ “Everyone likes someone.” : ∀x ∃y [L (x, y)]
❑ “Someone does not like anyone.” : ∃x ∀y [∼L(x, y)]
❑ “Everyone likes George.” : ∀x [L(x, George)]
❑ “There is no one whom everyone likes” : ∼∃x ∀y [L(x, y)]
Exercise 2
❑ Let P(x) be the statement “x is shy” where the
universe of this course for x is the set of students.
Express each of the following quantification in
English.

❑ ∃(x) P(x) : Some students are shy.


❑ ∀ (x) ∼P(x) : Every student is not shy.
❑ ∼∀ (x) ∼P(x) : Not every student is not shy.
❑ ∼∃(x) P(x) : There is no student whom is shy.
Exercise 3

Exercise 4

1.3
Demonstrate
Proofs
Logical Equivalence / Tautology /
Contradiction / Contingency
♥ Tautology : A compound propositions that is always
TRUE
♥ Contradiction : A compound propositions that is
always FALSE
♥ Contingency : A compound propositions that is both
TRUE and FALSE.
♥ Logical equivalence : Compound A has same truth
values with Compound B
Tautology

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

Rules of inference Name Rules of inference Name


P P∧Q
Addition Simplification
∴P∨Q ∴P
P P⟶Q
Q Conjunction P Modus Ponens
∴P∧Q ∴Q
P∨Q P⟶Q
Disjunctive Hypothetical
∼P Q⟶R
Syllogism Syllogism
∴ Q ∴Q
P⟶Q
∼ Q Modus Tollens
∴∼P
Example 1: Determine the rules of
inference for the following arguments.
Question: Ahmad goes to school. Thus, Ahmad or Ali go to school.
P : Ahmad goes to school.
Q : Ali goes to school

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.

❑ All premises are true but the conclusions are


either true or false, thus arguments are invalid.
Example 1
❑ If roses are red and violets are Premise 1 : (P ∧ Q) ⟶ (R ∧ S)
blue, then sugar is sweet and so Premise 2 :P∧Q
are you. Roses are red and
violets are blue. Therefore, Conclusion :∴R∧S
sugar is sweet and so are you.
P : Roses are red Compare to rules of inference.
Q: Violets are blue If does not match with any rules, thus,
R : Sugar is sweet students need to construct table.
S : You are sweet
Solution Premise 2 Premise 1 Conclusion
P Q R S
T T T T T T T T
Premise 1 : (P ∧ Q) ⟶ (R ∧ S) T T T F T F F F

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

Premise 1 Premise 2 Premise 3 Conclusion • The argument is


T T T T T invalid
T T F T T
T T T T T
T T F F F
T T T T F
T T F T T
F F T T T
F F F T F
EXERCISE 1

EXERCISE 2

EXERCISE 3
a) What rule of inference is used in each of these
arguments?
❑ Alice is a mathematics major. Therefore, Alice is either a
mathematics major or a computer science major.
❑ Jerry is a mathematics major and a computer science major.
Thus, Jerry is mathematics major
❑ All men are mortal. Socrates is a man. Therefore, Socrates is
mortal.
❑ A man in an island or Manhattan is an island. No man in an
island. Therefore, Manhattan is an island.
❑ If I go swimming, then I will stay in the sun too long. If I stay
in the sun too long, then I will sunburn. Therefore, if I go
swimming, then I will sunburn.
EXERCISE 4
a) Elaborate the validity for of those arguments by
❑ Someone is sick. Some is not happy. So, someone is sick and not
happy.
❑ If he loves me then he gives me flowers. He gives me flowers.
Thus, he loves me.
❑ If it rains, the streets will be wet. If the streets are wet,
accidents will happen. Therefore, accidents will happen if it
rains.
❑ If it does not rain or if it is not foggy, then the sailing race will
be held and the lifesaving demonstration will go on. If the
sailing race is held, then the trophy will be awarded. The trophy
was not awarded. It concludes that it rained.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy