Logic and Set Theory
Logic and Set Theory
lo
LOGIC
&
SET THEORY
LOGI
Gottfried Wilhelm Leibniz tries to advance
the study of logic from a mere philosophical
subject to a formal mathematical subject.
Leibniz never completely achieved this goal;
however, several mathematicians, such as
Augustus de Morgan and George Boole,
contributed to the advancement of symbolic
logic as a mathematical discipline.
LOGIC
¾ Logic is the study of the
methods and principles of
reasoning.
LOGIC
STATEMENT
¾ A logic statement or proposition is a declarative
sentence that is true or false but not both.
¾ There must be no ambiguity.
¾ In logic, the truth of a statement is established
beyond ANY doubt by a well-reasoned
argument.
LOGIC
STATEMENT
Examples:
a. You will pass the licensure examination for
teachers.
b. You will be a topnotcher.
c. You did well today.
d. It’s okay not to be okay.
e. Loving him was red.
LOGIC
STATEMENT
Exercise: Determine whether each sentence
is a statement.
1.Do you think you'll pass the LEPT?
2. I love Philippines.
3. Wena is a good dancer.
4.Did he cheat on Kath?
5.Please give me another chance.
6.
SIMPLE STATEMENT
A simple statement is a statement that conveys a
single idea.
Examples:
a) Zero times any real number is zero.
b) 1+1=2.
c) All birds can fly
COMPOUND STATEMENT
A compound statement is a statement that
conveys two or more ideas. It contains several
simple statements. The ideas in a compound
statement are connected by connectives.
LOGICAL
CONNECTIVES
Mathematical statements may be joined by logical
connectives, such as and, or, if . . . then, and if and
only if, which are used to combine simple
propositions to form compound statements.
These connectives are negation, conjunction,
disjunction, implication, and biconditional.
LOGICAL
CONNECTIVES
Examples:
a)The grass is green and the sky is blue.
b)It is cold or it is sunny.
c)If a person is kind, then he is helpful.
d)The number 12 is an even number if
and only if it is divisible by 2.
LOGICAL
CONNECTIVES
Statements can be represented by propositional variables 𝒑, 𝒒.
LOGIC SYMBOLS NOTATION MEANING
Negation
Conjunction
Disjunction
Conditional /
Implication
Biconditional
NEGATION OF
STATEMENT
The negation of a statement is the opposite of a given
mathematical statement.
Examples:
𝑞→𝑠
If it is raining, then I am not going to
the basketball game.
TRANSLATE SYMBOLIC
STATEMENTS
Consider the following simple statements.
p: The pageant will be held in Manila.
q: The pageant will be televised on ABS-CBN.
r: The pageant will not be shown in GMA.
s: The Philippines' candidate is favored to win.
CONVER
To form the inverse of the
conditional statement (𝑝→𝑞), take
the negation of both the hypothesis
and the conclusion.
INVERS
To form the contrapositive of
the conditional statement (𝑝→𝑞),
interchange the hypothesis and the
conclusion of the inverse statement.
CONTRAPOS
CONVERSE,
INVERSE, &
CONTRAPOSITIVE
Example: If I get a job, then I can help my
parents.
Converse: If I can help my parents, then I get a
job.
Inverse: If I don’t get a job, then I cannot help
my parents.
Contrapositive: If I can’t help my parents, then I
won’t get a job.
TRUTH TABLES,
TAUTOLOGIES,
&
LOGICAL
Mathematicians normally use a two-valued logic: Every
statement is either True or False. This is called the Law
of the Excluded Middle.
A statement in sentential logic is built from simple
statements using the logical connectives , , , , and . The
truth or falsity of a statement built with these
connectives depends on the truth or falsity of its
components.
A truth table shows how the truth or
falsity of a compound statement depends
on the truth or falsity of the simple
statements from which it's constructed.
TRUTH TABLE FOR
NEGATION
T F
F T
If P is true, its negation is false. If P is false, then
is true.
TRUTH TABLE FOR
CONJUNCTION
T T T
T F F
F T F
F F F
should be true when both P and Q are true,
and false otherwise.
TRUTH TABLE FOR
DISJUNCTION
T T T
T F T
F T T
F F F
is true if either P is true or Q is true or both. It's only
false if both P and Q are false.
TRUTH TABLE FOR
CONDITIONAL
T T T
T F F
F T T
F F T
The statement “if P then Q” is true if both P and Q are
true, or if P is false.
TRUTH TABLE FOR
BICONDITIONAL
T T T
T F F
F T F
F F T
means that P and Q are equivalent. So, the double implication is true
if P and Q are both true or if P and Q are both false; otherwise, the
double implication is false.
THINGS TO
REMEMBER
When constructing a truth table,
do consider all possible assignments of
True (T) and False (F) to the
component statements. Each of these
statements can be either true or false,
so there are possibilities.
THINGS TO
REMEMBER
To avoid duplication or omission
in assigning truth values to the
component statements, the easiest
and most systematic approach is to
use lexicographic ordering.
THINGS TO
REMEMBER
Example: For a compound statement with three
components P, Q, and R, here are the possible assignments:
THINGS TO
REMEMBER
There are different ways of
setting up truth tables. For instance,
write the truth values "under" the
logical connectives of the compound
statement, gradually building up to the
column for the "primary" connective.
EXAMPLE
Construct a truth table for the compound
statement :
T T F T F
T F F F F
F T T T T
F F T T T
TAUTOLOGY
A tautology is a formula that is
"always true“, that is, it is true for every
assignment of truth values to its simple
components. Think of tautology as a rule of
logic.
CONTRADICT
ION
A contradiction is false for
every assignment of truth
values to its simple
components.
EXAMPLE
Show that is a tautology.
T T T T T
T F F T T
F T T F T
F F T T T
LOGICALLY
EQUIVALENT
Two statements X and Y are logically
equivalent if is a tautology. Another way to
say this is: For each assignment of truth
values to the simple statements that make up
X and Y, the statements X and Y have
identical truth values.
EXAMPLE
Show that and are logically equivalent.
T T T F T
T F F F F
F T T T T
F F T T T
TAUTOLOGIES &
LOGICAL EQUIVALENCES
Examples:
G = {vowel in the word “CRYPT”}
G=∅
SINGLETON
SET
A set with only one member.
Examples:
H = {number that is an even prime number}
H = {2}
EQUAL
SETS
Two sets are equal if they contain the same elements.
Examples:
F = {x ∈ N | x < 5}
I= {1, 2, 3, 4}
EQUIVALENT
SETS
Two sets are equivalent if they contain the same
number of elements.
Example:
E = {Instagram, Facebook, X, TikTok}
F = {x ∈ N | x < 5}
UNIVERSAL
A set thatSET
contains all the elements considered in a
particular situation and denoted by U.
Example:
U = {letters of the English alphabet}
J={b,c,d,e,f,g,h,i,j}
SUBSET
A set A is called a subset of B if every element
of A is also an element of B. “A is a subset of B”
is written as A B.
∅ is a subset of every set.
A set is always a subset of itself.
SUBSET
Example: I = { 1, 2, 3, 4}
Subsets:
{ 1 }, { 2 }, { 3 }, { 4 },
{ 1, 2 }, { 1, 3 }, { 1, 4 }, { 2, 3 }, { 2, 4 }, { 3, 4 },
{ 1 , 2 , 3 }, { 1 , 2 , 4 }, { 1 , 3 , 4 }, { 2 , 3 , 4 },
{ 1 , 2 , 3 , 4 }, and ∅
POWER SET
This is defined to be the set of all subsets of a given set,
written as P(A).
Example: I = { 1 , 2 , 3 , 4 }
P (L) = { { 1 } , { 2 } , { 3 } , { 4 } , { 1 , 2 } , { 1 , 3 } , { 1 ,
4 }, { 2 , 3 } , { 2 , 4 } , { 3 , 4 } , { 1 , 2 , 3 } , { 1 , 2 , 4 },
{ 1 , 3 , 4 } , { 2 , 3 , 4 }, { 1 , 2 , 3 , 4 }, ∅ }
B D 12 𝑥 +11 𝑦 >11
2
Translate the symbolic compound statement into words. Let
represent the statement: "Students are happy" and let
represent the statement: "Teachers are happy."
A
It is not the case that students are happy or teachers are
not happy.
B
Students are not happy and teachers are not happy.
D
Students are not happy or teachers are not happy.
3
Write the negation of the statement: We will deduct points if
there is no work to justify your answer. If not a statement,
state so.
A
We may not deduct points if there is no work to justify
your answer.
B
We will not deduct points if there is no work to
justify your answer.
A Do not make sure that you fill in the circle on the answer sheet
that corresponds to your answer choice.
B
Do not make sure that you do not fill in the circle on the answer
sheet that corresponds to your answer choice.
C Make sure that you do not fill in the circle on the answer sheet
that corresponds to your answer choice.
A 25 8
C
B10 D32
SOLUTION
We have 5 logical statements: p, q, r, s, and t.
5
2 =32
5 Give the number of rows in the truth table for
the compound statement:
A 25 8
C
B10 D32
6 Find the number of subsets of the set:
A 32 28
C
B24 D16
SOLUTION
We have 5 elements in the given set.
5
2 =32
6 Find the number of subsets of the set:
A 32 28
C
B24 D16
7 Find the number of subsets of the set:
A 6 256
C
B8 D1024
SOLUTION
We have 10 elements in the given set:
{18, 20, 22, 24, 26, 28, 30, 32, 34, 36}
10
2 = 1024
7 Find the number of subsets of the set:
A 6 256
C
B8 D1024
8
A.
Construct a truth table for the compound
statement:
B.
s p (~s ∧ ~p ) s p (~s ∧ ~p )
T T F T T F
T F T T F F
F T T F T F
F F T C. F F T D.
s p (~s ∧ ~p ) s p (~s ∧ ~p )
T T T T T F
T F F T F F
F T F F T F
F F T F F F
SOLUTION
Construct a truth table for the compound statement:
T T F F F
T F F T F
F T T F F
F F T T T
8
A.
Construct a truth table for the compound
statement:
B.
s p (~s ∧ ~p ) s p (~s ∧ ~p )
T T F T T F
T F T T F F
F T T F T F
F F T C. F F T D.
s p (~s ∧ ~p ) s p (~s ∧ ~p )
T T T T T F
T F F T F F
F T F F T F
F F T F F F
9
A.
Construct a truth table for the compound
statement:
B.
q s ~[~(q ∨ s )] q s ~[~(q ∨ s )]
T T T T T T
T F F T F T
F T T F T T
F F F F F F
C. D.
q s ~[~(q ∨ s )] q s ~[~(q ∨ s )]
T T F T T T
T F F T F T
F T F F T F
F F T F F F
SOLUTION
Construct a truth table for the compound statement:
T T T F T
T F T F T
F T T F T
F F F T F
9
A.
Construct a truth table for the compound
statement:
B.
q s ~[~(q ∨ s )] q s ~[~(q ∨ s )]
T T T T T T
T F F T F T
F T T F T T
F F F F F F
C. D.
q s ~[~(q ∨ s )] q s ~[~(q ∨ s )]
T T F T T T
T F F T F T
F T F F T F
F F T F F F
10
Construct a truth table for the compound
statement:
SOLUTION
Construct a truth table for the statement:
)
T T T F T T
T F F F F T
F T T T T T
F F T T T T
10
Construct a truth table for the compound
statement:
11
Construct a truth table for the compound
statement:
A. B.
p q ~(p → q ) → (p ∧ ~q ) p q ~(p → q ) → (p ∧ ~q )
T T T T T T
T F F T F T
F T F F T T
F F T F F T
C. D.
p q ~(p → q ) → (p ∧ ~q ) p q ~(p → q ) → (p ∧ ~q )
T T T T T T
T F F T F F
F T F F T T
F F F F F T
SOLUTION
Construct a truth table for the statement:
T T T F F F T
T F F T T T T
F T T F F F T
F F T F T F T
11
Construct a truth table for the compound
statement:
A. B.
p q ~(p → q ) → (p ∧ ~q ) p q ~(p → q ) → (p ∧ ~q )
T T T T T T
T F F T F T
F T F F T T
F F T F F T
C. D.
p q ~(p → q ) → (p ∧ ~q ) p q ~(p → q ) → (p ∧ ~q )
T T T T T T
T F F T F F
F T F F T T
F F F F F T
12
Let U = {q, r, s, t, u, v, w, x, y, z}; A = {q, s, u, w, y}; B =
{q, s, y, z}; and C = {v, w, x, y, z}. List the members of the
indicated set, using set braces. Find .
A {t, v, x} C \{ r, t, u, v, w, x, z\}
B \{q, s, t , u, v, w, x, y\} D\{ s , u , w \}
SOLUTION
Let U = {q, r, s, t, u, v, w, x, y, z}; A = {q, s, u, w, y}; B = {q, s, y, z}; and C = {v,
w, x, y, z}. List the members of the indicated set, using set braces. Find .
U = {q, r, s, t, u, v, w, x, y, z}
A = {q, s, u, w, y} 𝐴∩ 𝐵={𝑞 , 𝑠 , 𝑦 }
B = {q, s, y, z} ( 𝐴 ∩ 𝐵)′={𝑟 , 𝑡 ,𝑢 ,𝑣 , 𝑤 , 𝑥 , 𝑧 }
12
Let U = {q, r, s, t, u, v, w, x, y, z}; A = {q, s, u, w, y}; B =
{q, s, y, z}; and C = {v, w, x, y, z}. List the members of the
indicated set, using set braces. Find .
A {t, v, x} C \{ r, t, u, v, w, x, z\}
B \{q, s, t , u, v, w, x, y\} D\{ s , u , w \}
13
Let U = {q, r, s, t, u, v, w, x, y, z}; A = {q, s, u, w, y}; B =
{q, s, y, z}; and C = {v, w, x, y, z}. List the members of the
indicated set, using set braces. Find .
A 11 13
C
B12 D10
SOLUTION
, and ; what is ?
𝑛 ( 𝐴∪ 𝐵 ) =𝑛 ( 𝐴 )+𝑛 ( 𝐵 ) − 𝑛( 𝐴∩ 𝐵)
𝑛 ( 𝐴∪ 𝐵 ) =4+9− 2=11
A B
2 7
2
14 , and ; what is ?
A 11 13
C
B12 D10
15
Shade the Venn diagram to
represent the set: A' ∩ B'
A C
B D
SOLUTION
A' A' ∩ B' B'
A B A B A B
15
Shade the Venn diagram to
represent the set: A' ∩ B'
A C
B D
16
Shade the Venn diagram to
represent the set:
A C
B D
SOLUTION
(𝐴 ∩ 𝐵) ∪ (𝐴 ∪ 𝐵)′
𝐴∩𝐵 𝐴∪𝐵 (𝐴 ∪ 𝐵)’
A B
A B A B A B
16
Shade the Venn diagram to
represent the set:
A C
B D
17
Use a Venn Diagram and the given information to determine
the number of elements in the indicated region. If and , find
.
A 48 C 56
B 4 D12
SOLUTION
If 𝑛(𝑈) = 60, 𝑛(𝐴) = 34, 𝑛(𝐵) = 22, and 𝑛(𝐴 ∩ 𝐵) = 8, find
𝑛(𝐴 ∪ 𝐵)′.
A B
8 14 12
26
17
Use a Venn Diagram and the given information to determine
the number of elements in the indicated region. If and , find
.
A 48 C 56
B 4 D12
18 If , , , , , , , and , Find .
A 7 C 10
B 9 D8
SOLUTION
𝑛(𝐴 ∪ 𝐵 ∪ 𝐶) = 77
𝑛(𝐴 ∩ 𝐵 ∩ 𝐶) = 11
B
𝑛(𝐴 ∩ 𝐵) = 24 6
𝑛(𝐴 ∩ 𝐶) = 21
13 8
𝑛(𝐵 ∩ 𝐶) = 19
𝑛(𝐴) = 56 A 11 C
𝑛(𝐵) = 38
𝑛(𝐶) = 36 22 10
7
Find 𝑛(𝐴′ ∩ 𝐵 ∩ 𝐶).
18 If , , , , , , , and , Find .
A 7 C 10
B 9 D8
19
A survey of 240 families showed that 91 had a dog; 70 had a cat;
31 had a dog and a cat; 91 had neither a cat nor a dog, and in
addition did not have a parakeet; 7 had a cat, a dog, and a
parakeet. How many had a parakeet only?
A 19 C 34
B 24 D29
SOLUTION
91 had a dog
70 had a cat 91 D
31 had a dog and a cat
91 had neither a cat nor a 60
24
dog, and in addition did not
have a parakeet C 7 P
7 had a cat, a dog, and a
39
parakeet.
19
A survey of 240 families showed that 91 had a dog; 70 had a cat;
31 had a dog and a cat; 91 had neither a cat nor a dog, and in
addition did not have a parakeet; 7 had a cat, a dog, and a
parakeet. How many had a parakeet only?
A 19 C 34
B 24 D29
20
Determine whether the statement is true or
false.
A True
B False
21
Determine whether the statement is true or false.
A True
B False
22 Determine whether the statement is true or false.
A True
B False
Let A = {1, 3, 5, 7}; B = {5, 6, 7, 8}; C = {5, 8}; D
A True
B False
Let A = {1, 3, 5, 7}; B = {5, 6, 7, 8}; C = {5, 8}; D
A True
B False
Let A = {1, 3, 5, 7}; B = {5, 6, 7, 8}; C = {5, 8}; D
A True
B False
Let A = {1, 3, 5, 7}; B = {5, 6, 7, 8}; C = {5, 8}; D
A True
B False
Let A = {1, 3, 5, 7}; B = {5, 6, 7, 8}; C = {5, 8}; D
A True
B False
28
Let represent a true statement, and let and
represent false statements. Find the truth value of
the given compound statement:
A True
B False
SOLUTION
Find the truth value of the given compound statement:
~(~𝑝 ∧ ~𝑞) ∨ (~𝑟 ∨ ~𝑝)
T F F F T T F T T
T
28
Let represent a true statement, and let and
represent false statements. Find the truth value of
the given compound statement:
A True
B False
29 Are the statements equivalent?
B 𝐸𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 D 𝑁𝑜 𝑎𝑛𝑠𝑤𝑒𝑟
SOLUTION
Are the statements ~(𝑞 → 𝑝) 𝑎𝑛𝑑 𝑞 ∧ ~𝑝 equivalent?
T T T F F F
T F F T T F
F T T F F F
F F T F T F
29 Are the statements equivalent?
B 𝐸𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 D 𝑁𝑜 𝑎𝑛𝑠𝑤𝑒𝑟
30 Are the statements equivalent?
B 𝐸𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 D 𝑁𝑜 𝑎𝑛𝑠𝑤𝑒𝑟
SOLUTION
Are the statements 𝑞 ∧ ~𝑝 𝑎𝑛𝑑 ~𝑝 → ~𝑞 equivalent?
T T F F F T
T F T T F F
F T F F T T
F F T F T T
30 Are the statements equivalent?
B 𝐸𝑞𝑢𝑖𝑣𝑎𝑙𝑒𝑛𝑡 D 𝑁𝑜 𝑎𝑛𝑠𝑤𝑒𝑟
31
Let p represent a true statement, and let q represents
a false statement. Find the truth value of the
compound statement:
A True
B False
SOLUTION
Find the truth value of the compound statement:
T F F F T F T
31
Let p represent a true statement, and let q represents
a false statement. Find the truth value of the
compound statement:
A True
B False
32
Write the statement, “If the sun comes out tomorrow, the roses
will open,” as an equivalent statement that does not use the if . . .
then connective. (Remember that is equivalent to .)
A The sun does not come out tomorrow and the roses will not
open.
B
The sun does not come out tomorrow or the roses will not
open.
C The sun does not come out tomorrow or the roses will open.
D
The sun comes out tomorrow and the roses will not open.
33
Write the negation of the statement: If it is raining, you take
your umbrella. (Remember that the negation of p → q is p ∧
~q.)
A Collection of objects
D Description
In a survey of university students, 64 had taken mathematics course, 94
36
had taken chemistry course, 58 had taken physics course, 28 had taken
mathematics and physics, 26 had taken mathematics and chemistry, 22
had taken chemistry and physics course, and 14 had taken all the three
courses. Find how many had taken one course only.
A 106 C 82
B 94 D72
SOLUTION
64 had taken math
94 had taken chemistry P
58 had taken physics
28 had taken math & physics
22
26 had taken math & chem 8 14
22 had taken chem & physics
14 had taken all
C 14 M
60 12 24
In a survey of university students, 64 had taken mathematics course, 94
36
had taken chemistry course, 58 had taken physics course, 28 had taken
mathematics and physics, 26 had taken mathematics and chemistry, 22
had taken chemistry and physics course, and 14 had taken all the three
courses. Find how many had taken one course only.
A 106 C 82
B 94 D72
An advertising agency finds that, of its 170 clients, 115 use
37
Television, 110 use Radio and 130 use Magazines. Also 85 use
Television and Magazines, 75 use Television and Radio, 95 use
Radio and Magazines, 70 use all the three. Draw Venn diagram to
represent these data. How many uses only Radio?
A 10 C 15
B 25 D50
SOLUTION
115 use Television R
110 use Radio
130 use Magazines
10
85 use TV & Magazines 75 5 25
use TV & Radio
95 use Radio & Magazines
T 70 M
70 use all the three 25 15 20
An advertising agency finds that, of its 170 clients, 115 use
37
Television, 110 use Radio and 130 use Magazines. Also 85 use
Television and Magazines, 75 use Television and Radio, 95 use
Radio and Magazines, 70 use all the three. Draw Venn diagram to
represent these data. How many uses only Radio?
A 10 C 15
B 25 D50
An advertising agency finds that, of its 170 clients, 115 use
38
Television, 110 use Radio and 130 use Magazines. Also 85 use
Television and Magazines, 75 use Television and Radio, 95 use
Radio and Magazines, 70 use all the three. Draw Venn diagram to
represent these data. How many uses only Television?
A 10 C 15
B 25 D50
SOLUTION
115 use Television R
110 use Radio
130 use Magazines
10
85 use TV & Magazines 75 5 25
use TV & Radio
95 use Radio & Magazines
T 70 M
70 use all the three 25 15 20
An advertising agency finds that, of its 170 clients, 115 use
38
Television, 110 use Radio and 130 use Magazines. Also 85 use
Television and Magazines, 75 use Television and Radio, 95 use
Radio and Magazines, 70 use all the three. Draw Venn diagram to
represent these data. How many uses only Television?
A 10 C 15
B 25 D50
An advertising agency finds that, of its 170 clients, 115 use Television,
39
110 use Radio and 130 use Magazines. Also 85 use Television and
Magazines, 75 use Television and Radio, 95 use Radio and Magazines,
70 use all the three. Draw Venn diagram to represent these data. How
many uses both Television and Magazine but not radio?
A 10 C 15
B 25 D50
SOLUTION
115 use Television R
110 use Radio
130 use Magazines
10
85 use TV & Magazines 75 5 25
use TV & Radio
95 use Radio & Magazines
T 70 M
70 use all the three 25 15 20
An advertising agency finds that, of its 170 clients, 115 use Television,
39
110 use Radio and 130 use Magazines. Also 85 use Television and
Magazines, 75 use Television and Radio, 95 use Radio and Magazines,
70 use all the three. Draw Venn diagram to represent these data. How
many uses both Television and Magazine but not radio?
A 10 C 15
B 25 D50
40
There are 30 students in a class. Among them, 8 students are
learning both English and French. A total of 18 students are
learning English. If every student is learning at least one
language, how many students are learning French in total?
A 8 C 20
B 12 D28
SOLUTION
30 students in a class
8 students are learning both
English and French
18 students are learning
E F
English
10 8 12
every student is learning at
least one language
40
There are 30 students in a class. Among them, 8 students are
learning both English and French. A total of 18 students are
learning English. If every student is learning at least one
language, how many students are learning French in total?
A 8 C 20
B 12 D28
Thank You