0% found this document useful (0 votes)
13 views49 pages

LESSON 4 Fundamentals of Logic

Uploaded by

christinamerill
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)
13 views49 pages

LESSON 4 Fundamentals of Logic

Uploaded by

christinamerill
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/ 49

Lesson 3_ Fundamentals

of Logic
Learning Outcomes
• Define a propositional logic and its categories.

• Explain logical connectives and exemplify truth values of propositions.

• Transform logical statements into symbolic form (or vice versa).

• Construct truth tables of compound propositions.

• Classify compound propositions based on its truth value.


PROPOSITIONAL LOGIC
Proposition (or Statement)
• any meaningful statement that is either true or false,
but not both.
example
• Manila is the capital of the Philippines
• 1+ 1 = 4
•x + y = 9
Propositional variables or statement variables is a
variable that represent propositions

Use letters to denote propositional variables ( p, q and


r)

p= today is Monday.
q= x + y = 3
Operations / Connectives
Logical Operators
• Compound Statements
• Conjunction Statements
= AND, symbol (˄)
= Ex: p ˄ q (conjunction of p AND q)
Today is Monday and x+y=3.
• Disjunction Statements
= OR, symbol (˅)
= Ex: p ˅ q (disjunction of p OR q)
Today is Monday or x+y=3.
Logical Operators
• Nega%on Statements
= NOT, symbol (¬ or )̴
= Ex: ¬p or p̴ (nega%on of p) (no, not, never)
Today is not Monday.
• Condi%onal Statements
= Implies, (if…then…) If today is Monday then tomorrow is Tuesday.
= Symbol (→) p →q
Today is Monday then x+y=3.
P q
Logical Operators
• Biconditional
= Iff, (if and only if)
I will go to the movie only if it is opening night.
= Symbol (↔)
• Exclusive OR
= XOR, symbol ( ) Today is Monday or x+y=3.
= Ex: p q (p exclusive OR q)
Negation
let p be a proposition
the negation of p, denoted by ¬p is the statement
“ it is not the case that p”

The proposition ¬p is read “not p”


Truth Table for Negation

P ¬p

F T
T F
Truth Table for Nega6on

P ¬p

0 1
1 0
•p = 1 + 9 = 10
•q = Baseball is a sport

What is
•¬p
•¬q
•p = 1 + 9 = 10
•q = Baseball is a sport
Q ¬Q
T (1) F(0)
Answer
•¬p = 1 + 9 ≠ 10
•¬q = Baseball is not a sport
Conjunction
Let p and q be propositions.

The conjunction of p and q, denoted by p ^ q, is the


proposition “p and q”.
Truth Table for Conjunction
The conjunction p^q is true when both p and q
are true and is false otherwise.
p q p^q
F F F
F T F
T F F
T T T
Truth Table for Conjunction
The conjunction p^q is 1 when both p and q are 1
and is 0 otherwise.
p q p^q
0 0 0
0 1 0
1 0 0
1 1 1
•p = three is an even integer
•q = ten is a positive integer

•p^q ?
•¬p^q ?
•p = three is an even integer
•q = ten is a positive integer

•p^q = Three is an even integer AND ten is a positive


integer.
•¬p^q = three is NOT an even integer AND ten is a
positive integer
Truth Table for Conjunction
p q ¬p p ˄ q ¬p ˄ q
0 0 1 0 0 F
0 1 1 0 1 T
1 0 0 0 0 F
1 1 0 1 0 F
•p = three is an even integer
•q = ten is a positive integer

•p ˄ q ?
•¬p ^ q ?
•p = three is an even integer
•q = ten is a positive integer

•p^q = If three is an even integer AND ten is a positive


integer
•¬p^q = three is NOT an even integer AND ten is a
positive integer
Disjunction
Let p and q be propositions.

The disjunction of p and q, denoted by p v q , is the


proposition “p or q”.
Truth Table for Disjunction
The Disjunction p ˅ q is false when both p and q
are false and is true otherwise.
p q p˅q
F F F
F T T
T F T
T T T
Truth Table for Disjunction
The Disjunction p ˅ q is true when both p and q
are true and is false otherwise.
p q p˅q
0 0 0
0 1 1
1 0 1
1 1 1
•p = three is an even integer
•q = ten is a positive integer

•p ˅ q ?
•¬p ˅ q ?
•p = three is an even integer
•q = ten is a positive integer

•p˅q = three is an even integer OR ten is a positive integer


•¬p˅q = three is NOT an even integer OR ten is a
positive integer
Truth Table for Disjunction
p q ¬p p ˅ q ¬p ˅ q
0 0 1 0 1 T
0 1 1 1 1 T
1 0 0 1 0 F
1 1 0 1 1 T
Exclusive OR (XOR)
Let p and q be propositions.

The Exclusive OR of p and q, denoted by p Å q is


the proposition that is true when exactly one of
p and q is true and is false otherwise.
Truth Table for Exclusive OR

p q pÅq
F F F
F T T
T F T
T T F
Truth Table for Exclusive OR

p q pÅq
0 0 0
0 1 1
1 0 1
1 1 0
Truth Table for XOR
p q ¬p ¬p Å q
0 0 1 1 T
0 1 1 0 F
1 0 0 0 F
1 1 0 1 T
Conditional Statement
Let p and q be propositions.

The conditional statement p ®q is the proposition “if p, then


q”.
p is called hypothesis and q is the conclusion.
• A conditional statement is also called an implication.

• Terminologies used to express p ® q


“if p, then q” “if, q”
“q if p” “p implies q”
“p only if q” “q whenever p”
“q follows from p” “q is necessary for p”
“a necessary condition for p is q”
Truth Table for Conditional
It is false when p is true and q is false, and true otherwise. All
four of the statements are true. Remember, the only way for an
implication to be false is for the if part to be true and the then part to be
false.
p q p®q
F F T
F T T
T F F
T T T
Truth Table for Conditional
It is 0 when p is 1 and q is 0, and 1 otherwise.

p q p®q
0 0 1
0 1 1
1 0 0
1 1 1
Truth Table for Conditional
p q ¬p ¬p ® q
0 0 1 0 F
0 1 1 1 T
1 0 0 1 T
1 1 0 1 T
• p = (x+3=9)
• q = (9-3=x)

•p ® q ?
•¬ p ® ¬ q ?
• p = (x+3=9)
• q = (9-3=x)

• p ® q = If x + 3 = 9, then 9 – 3 = x
• ¬ p ® ¬ q = If x + 3 ≠ 9, then 9 – 3 ≠ x
Biconditional Statement
• Let p and q be propositions.
• The biconditional statement p « q is the proposition “ p if
and only if q”.
• The biconditional statement p « q is true when p and q
have the same value, and is false otherwise.
• It is also called bi-implication or double implication
Truth Table for Biconditional
p q p«q
F F T
F T F
T F F
T T T
Truth Table for Biconditional
p q p«q
0 0 1
0 1 0
1 0 0
1 1 1
Other common ways to express p«q

“p is necessary and sufficient for q”


“if p then q, and conversely”
“p iff q”
• p = You will pass the exam
• q = You study well

•p « q ?
•¬ p « ¬ q ?
• p = You will pass the exam
• q = You study well

• p « q = You will pass the exam if and only if you study


well.
• ¬ p « ¬ q = You will NOT pass the exam if and only if
you NOT study well.
Example
• p = it is very cold
• q = it is raining
• r = stay at home

• Write the following propositions using p, q and logical


connectives.
1. ¬ p ↔ q
2. ¬ p ˅ ¬ q
3. (p ˄ q) → r
Answer
1. ¬ p ↔ q = It is not very cold if and only if it is raining
2. ¬ p ˅ ¬ q = It is not very cold or it is not raining
3. (p ˄ q) → r = If it is very cold and it is raining, then stay at
home
Questions?
Clarifications?
Thank you for
listening!

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