Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Logic 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

LOGIC

 Logic comes from the word


“LOGOS” , which means “REASON” .

 It is concerned with the methods


and rules for correct thinking.
LOGIC
 IT IS THE STUDY OF THE PRINCIPLES OF
CORRECT REASONING.
 IT ALLOWS US TO DETERMINE THE
VALIDITY OR ARGUMENTS IN AND OUT OF
MATHAMATICS.
 IT ILLUSTRATES THE IMPORTANCE OF
PRECISION AND CONCISENESS OF THE
LANGUAGE OF MATHEMATICS.
MATHEMATICAL LOGIC
 IT IS A BRANCH OF MATHEMATICS WITH
CLOSE CONNECTIONS TO COMPUTERS.
 IT INCLUDES BOTH THE BOTH THE
MATHEMATICAL STUDY OF LOGIC AND THE
APPLICATIONS OF FORMAL LOGIC TO OTHER
AREAS OF MATHEMATICS.
 A STATEMENT OR PROPOSITION
IS A DECLARATIVE SENTENCE
THAT IS TRUE OR FALSE BUT NOT
BOTH.
 PROPORTIONAL VARIABLES such as 𝑝, 𝑞, 𝑟, 𝑠, 𝑡 𝑒𝑡𝑐.
are used to represent proposition.
Examples:
Determine which of the following statements are propositions and which are not.

1) San Fernando City is the capital of La Union.

ANSWER: PROPOSITION because it has a truth value (TRUE)

2) The girl is beautiful and sexy.

ANSWER: NOT A PROPOSITION because it neither true nor false.


3) Where are you going?
ANSWER: NOT A PROPOSITION because the sentence is interrogative

4) Please give me some water.


ANSWER: NOT A PROPOSITION because the sentence is
imperative.

5) Mt. Apo is the tallest mountain in the Philippines.


ANSWER: PROPOSITION because it is true. Mt. Apo is the tallest
mountain in the Philippines, having an elevation of 2,956 meters,
which offers a wonderful scene. (TRUE)
6) 1 + 1 = 2
ANSWER: PROPOSITION because the sentence has a truth value (TRUE).

7) 𝑥 > 5 𝑖𝑓 𝑥 = 6
ANSWER: PROPOSITION because the sentence has a truth value (TRUE).

8) 𝑥 > 6
ANSWER: NOT A PROPOSITION because the value of x is not given, hence,
the truth value of the statement cannot be determined.
7) 𝑥 > 5 𝑖𝑓 𝑥 = 4
ANSWER: PROPOSITION because the sentence has a truth value (FALSE).
Decide whether each of the following sentences is a valid
PROPOSITION
1. Tuguegarao City is located at Cagayan De Oro
2. Dogs are better than Cats.
3. Raise your Hands!
4. The sum of the first five positive integers is 11.
5. |−5|=5 12. 0/1 = 0
6. 2+2 = 8 13. The color of sunflower
7. 8 – 6 = 2 is red
8. X+ 4 = 6 14. 0.50 = 0.5
9. How are you? 15. 2x + 1 = 0
10.Please give me some water?
11. Today is Saturday
Exercises:
Decide whether each of the following sentences is a valid PROPOSITION
1. 8 is an even integer.
2. Kalibo is the capital of Aklan.
3. 6 (5) = 30.
4. √2is an integer.
5. Why are you here?
6. Be attentive in class.
7. a – 5 = 10
8. m + n = p
9. 15 is a prime number
10.(-1)(2) = -3
REMARKS:

If a proposition is true, then we


say its true value is TRUE, and
if a proposition is false, we say
its truth value is FALSE.
LOGICAL CONNECTIVES
Mathematical statements may be joined by
logical connectives which are used to combine
simple propositions to form compound
statements. These connectives are CONJUCTION,
DISJUCTION, IMPLICATION, BICONDITIONAL
AND NEGATION.
DEFINITIONS:
Let p and q be propositions.
• If a statement is true, we assign it the truth value T. If a
statement is false, we assign it the truth value F. In practice,
we will often think of statements as potentially having one of
the two possible truth values without actually giving it a
specific assignment.
• In fact, we may not even give an actual statement. Instead,
we use lower case letters such as p, q, r, s to denote
propositional variables (unspecified statements).
• We then consider all possible ways of assigning truth values
to variables representing statements, often after combining
several statements using logical connectives to form
compound propositions.
LOGICAL OPERATORS
Many mathematical statements are
constructed by combining one or more
propositions. These new propositions
are formed using logical operators. The
logical operators that are used to form
new propositions from 2 or more
existing propositions are called
connectives.
CONNECTIVES SYMBOL MATHEMATICAL TERM
Not ¬ Negation
And ^ Conjunction
Or v Disjunction
If, then Conditional
If and only if Bi-conditional
Definition:
Let p be a proposition. The statement “It is not
the case that p” is another proposition,
called the negation of p, denoted by ¬p.
The proposition ¬p is read “not p”.
Example 1:
The negation of the proposition
p: “9 is positive.”
is ¬p: “It is not the case that 9 is
positive.”
 or ¬p: “9 is not positive.”
Definition: Let p & q be propositions. The propositions
“p & q” denoted by p ٨ q, is the proposition that is
true when both p & q are true & is false otherwise.

 The proposition p ٨ q is called


the conjunction of p & q.
Example 2:
Consider the following sentences:
p: 6 is an even integer.
q: 7 is an odd integer.
The conjunction of this proposition,
p ٨ q, is the proposition
“6 is an even integer & 7 is an
odd integer.”
Example 3:
Let p: 4 divides 16.
q: 4 divides 24.
p ٨ q, is the proposition,
“4 divides 16 and 4 divides 24.”
or “4 divides both 16 and 24.”
Example 4:
Let p: ¼ is a rational number.
q: √2 is not a rational number.
 p ٨ q, is the proposition
 “1/4 is a rational number and
√2 is not a rational number”.
 or "1/4 is a rational number but
√2 is not a rational number.”
Definition: Let p & q be propositions. The
proposition “p or q”, denoted by p v q, is the
proposition that is false when both p & q are false
& true otherwise.
This proposition p v q is called the disjunction of
p & q.
EXAMPLE 5
Let p: Students who have taken
Algebra can take Discrete Math.
 q: Students who have taken
Computer Science can take
Discrete Math.
 The disjunction of the propositions
p & q is, p v q,
 “Students who have taken
Algebra or Computer Science,
but not both, can take
Discrete Math.
Definition: Let p & q be propositions.
The implication p q is the proposition
that is false when p is true and q is false,
and true otherwise.
In this implication p is called the premise or the
hypothesis, & q is called the consequence or
conclusion.
The implication p q can be
expressed in the following:
 “if p then q”

 “p implies q”

 “p is sufficient for q”

 “a necessary condition for p is q”

 “q is necessary for p”

 “q follows from p”
 Definition:
 Let p & q be propositions. The bi-
conditional p q is the proposition
that is true when p & q have the
same truth values, & is false
otherwise.
EXAMPLE 7
 1. The curve is a circle if and only if the
curve is equidistant to a point.
 2. The polygon is a triangle if and only if
it has three sides.
 3. 68,295 is divisible by 15 if & only if
68,295 is divisible by 3 & 5.
Exercises:
1.) Let
p : Today is Friday.
r : It is sunny.
m: I am going to a movie
b: I am not going to the basketball game.

Translate symbolic form to sentences


a. f∧r
b. ∼r ⟷ m
c. ∼b ∨ m
d. r→b
Exercises:
1.) Let
p : Today is Friday.
r : It is sunny.
m: I am going to a movie
b: I am not going to the basketball game.
Translate sentences into symbols
1. If today is Friday, then I am going to a movie.
2. Today is Friday and I am going to a movie.
3. I am going to the basketball game and I am not
going to a movie.
4. I am going to the movie if and only if it is sunny
2.) Let p and q be the propositions.
p: The election is decided
q: The vote have been counted, respectively
Express each of these compound propositions as
an English sentence.
1. ∼p
2. qp
3. 𝑝 ↔ 𝑞
4. ∼p  p
p: It's raining.
q: The grass is wet.
r: The sun is shining.
s: The flowers are blooming.
t: The birds are chirping.
A. Translate logical symbols
into sentences B. Translate sentences into symbols
1. p ∧ q 1. It's not the case that it's raining and the grass is wet.
2. r ∨ s 2. If the sun is shining and the flowers are blooming, then
3. ¬q the birds are chirping.
4. p → t 3. Its raining and the grass is wet.
5. ¬p ∧ q: 4. The flowers are blooming if and only if the grass id wet
6. (r ∧ s) → t 5. The sun is not shining
7. (r ∨ s) ∧ (¬q ∨ t) 6. If the sun is shining then the birds are chirping.
8. (¬p ∧ q) → ¬t 7. If it's not raining then the birds are not chirping.
Translate the following into expressions:
1) You can access the Internet from campus only if you are an
Info Tech student or you are not a freshman.
SOLUTION:
Let:
p be the proposition “You can access the Internet from the campus”
q be the proposition “you are an Info Tech student.”
r be the proposition “you are a freshman.”
𝒑 ⟶ (𝒒 ∨ 𝒓)
Translate the following into expressions:
2) You cannot access the Internet if you are a sophomore
unless you are an Info tech student.
SOLUTION:
Let:
p be the proposition “You are sophomore.”
q be the proposition “You can access the Internet”
r be the proposition “”You are an Info tech student.”
𝒑 ⟶ ( 𝒒) ⟶ 𝒓
CONVERSE, INVERSE AND CONTRAPOSITIVE
For every implication or conditional statement, you can
construct its converse, inverse, and contrapositive.

Suppose we have the following statements for P and Q.


P: It rains
Q: They can cancel school.
CONVERSE, INVERSE AND CONTRAPOSITIVE
The IMPLICATION: 𝑷 ⟶ 𝑸
Suppose we have the following statements for P and Q.
P: It rains
Q: They can cancel school.

If it rains then they cancel school.


CONVERSE, INVERSE AND CONTRAPOSITIVE
The CONVERSE: 𝑸 ⟶ 𝑷
Suppose we have the following statements for P and Q.
P: It rains
Q: They can cancel school.

If they cancel school then it rains.


CONVERSE, INVERSE AND CONTRAPOSITIVE
The INVERSE: ∼ 𝑷 ⟶∼ 𝑸
Suppose we have the following statements for P and Q.
P: It rains
Q: They can cancel school.

If it does not rain then they do not cancel school.


CONVERSE, INVERSE AND CONTRAPOSITIVE
The CONTRAPOSITIVE:∼ 𝑸 ⟶∼ 𝑷
Suppose we have the following statements for P and Q.
P: It rains
Q: They can cancel school.

If it they do not cancel school, then it does not rain.


TRUTH
T

TABLE
The truth value of propositions us
presented in a truth table. The TRUTH
TABLE displays the relationships
between the truth values of propositions.
Truth tables are especially valuable in
the determination of the truth values of
propositions constructed from simpler
propositions.
CONJUNCTION
The CONJUNCTION of the
propositions p and q is the
compound statement
"𝑝 𝑎𝑛𝑑 𝑞" denoted as
p ∧ 𝑞 which is TRUE ONLY
WHEN BOTH p and q ARE
TRUE, OTHERWISE, IT IS
FALSE.
DISJUNCTION
The DISJUNCTION of the
propositions p and q is the
compound statement
"𝑝 𝑜𝑟 𝑞“ denoted as
p ∨ 𝑞 which is FALSE
ONLY WHEN BOTH p and q
ARE FALSE, OTHERWISE, IT
IS TRUE.
negation
The NEGATION of the
statement p is denoted by
¬p where ¬ is the symbol
for “not”. THE TRUTH
VALUE OF THE NEGATION
IS ALWAYS THE REVERSE
OF THE TRUTH VALUE OF
THE ORIGINAL STATEMENT.
implication
The IMPLICATION of the
propositions 𝑝 𝑎𝑛𝑑 𝑞 is
the compound statement
"𝐼𝑓 𝑝, 𝑡ℎ𝑒𝑛 𝑞. “ denoted
as 𝑝 ⟶ 𝑞 which is false
only when p is true and q
is false.
biconditional
The BI-CONDITIONAL of the
propositions p and q is the
compound statement
"𝑝 𝑖𝑓 𝑎𝑛𝑑 𝑜𝑛𝑙𝑦 𝑖𝑓 𝑞. “
denoted as 𝑝 ⟷ 𝑞 which
is true only when both p
and q have the same truth
values.
TRUTH VALUES
Summary of truth values of compound statements using
logical connectives

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 T T F
F F F F T T
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬p ∨¬q
T T
T F
F T
F F
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p
a) Negation T T F
THE TRUTH T F F
VALUE OF THE
F T T
NEGATION IS
ALWAYS THE F F T
REVERSE OF THE
TRUTH VALUE OF
THE ORIGINAL
STATEMENT.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q
a) Negation T T F F
THE TRUTH T F F T
VALUE OF THE
F T T F
NEGATION IS
ALWAYS THE F F T T
REVERSE OF THE
TRUTH VALUE OF
THE ORIGINAL
STATEMENT.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬p ∨¬q
a) Negation T T F F F
b) Disconjunction T F F T T
FALSE ONLY F T T F T
WHEN BOTH p F F T T T
and q ARE
FALSE,
OTHERWISE, IT
IS TRUE.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬p ∨¬q
T T F F F
T F F T T
F T T F T
F F T T T
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T
T F
F T
F F

(¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T F
T F F
F T T
F F T
a) Negation
2) (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)
THE TRUTH VALUE OF THE NEGATION IS ALWAYS THE REVERSE OF
THE TRUTH VALUE OF THE ORIGINAL STATEMENT.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T F F
T F F T
F T T F
F F T T

2) (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)
a) Negation
THE TRUTH VALUE OF THE NEGATION IS ALWAYS THE REVERSE
OF THE TRUTH VALUE OF THE ORIGINAL STATEMENT.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T F F F
T F F T F
F T T F T
F F T T F
b) Conjunction
2) (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒) TRUE ONLY WHEN BOTH p and q ARE TRUE, OTHERWISE, IT IS FALSE.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T F F F F
T F F T F T
F T T F T F
F F T T F F
b) Conjunction
TRUE ONLY WHEN BOTH p and q ARE TRUE,
OTHERWISE, IT IS FALSE.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T F F F F F
T F F T F T T
F T T F T F T
F F T T F F F
c) Disjunction
FALSE ONLY WHEN BOTH p and q ARE FALSE,
OTHERWISE, IT IS TRUE.
CONSTRUCT THE TRUTH TABLE FOR EACH OF THE FOLLOWING STATEMENTS.

p q ¬p ¬q ¬𝒑 ∧ 𝒒 𝒑 ∧ ¬𝒒 (¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)

T T F F F F F
T F F T F T T
F T T F T F T
F F T T F F F

(¬𝒑 ∧ 𝒒) ∨ (𝒑 ∧ ¬𝒒)
Exercise 1
Construct a truth table for each of these compound
statements.
1. 𝒑 ∨ 𝒒 → 𝒑 ∧ 𝒒
Solution:
Exercise 2
Construct a truth table for each of these compound
statements.
2. 𝒑 ↔ 𝒒 → 𝒑 ∧ 𝒒
Solution:
Exercise 3
Construct a truth table for each of these compound
statements.
3. 𝒑 ↔ 𝒒 → ∼ 𝒑 ↔ 𝒒
Solution:
Midterm -Quiz 3
Construct a truth table for each of these compound
statements.

1. 𝒑 ↔ 𝒑
2. 𝒑 ↔∼ 𝒒 ↔ (q v p)
3. ∼ (r ∧ p) ∨ ( ∼ q ∨ q)
4. (𝒑 ∨∼ 𝒒) ∧∼ 𝒓 ∧∼ (𝒑 ∨ 𝒒)
5. 𝒑 ↔ 𝒒 ∨ ∼ 𝒑 ↔∼ 𝒓
Exercise 5
Construct a truth table for each of these compound
statements.
5. (𝒑 ∨∼ 𝒒) ∧∼ 𝒓 ∧∼ (𝒑 ∨ 𝒒)
Solution:

You might also like