You are on page 1of 28

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I

FACULTY OF COMPUTING AND INFORMATICS


MULTIMEDIA UNIVERSITY
What you will learn in this lecture:
Propositions
Truth values
Compound propositions and logical connectives
Inverse, Converse, Contrapositive Statements
Tautology, Contradiction, Contingency
Logical Equivalence

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
PROPOSITIONS
A proposition is a declarative statement that is either TRUE or FALSE, but NOT BOTH.
Example:

• Kuala Lumpur is the capital of Malaysia.


Proposition •1+5=9
• Tuesday is the day after Wednesday.

• Please sit down.


NOT proposition •x+1=2
• What time is it?

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
TRUTH VALUES
The TRUE or FALSE is known as the truth value for the proposition.
TRUE is abbreviated as T and FALSE is abbreviated as F.
The notation [[ ]] is used to indicate finding the truth value of a proposition.

Example:
1. [[Kuala Lumpur is the capital of Malaysia]] = T
2. [[1 + 6 = 9]] = F

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
TRUTH VALUES
Since propositions are naturally long, they are normally represented as, p, q, r, s or
some other alphabets.

Example:
p : TMA1401 is a compulsory subject for students who take Bachelor of I.T. (I.S.) at MMU.
q : You are sitting in this class to learn mathematical logic.

[[p]] =
[[q]] =

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
COMPOUND PROPOSITIONS AND LOGICAL CONNECTIVES
Compound proposition is a term to describe two or more propositions combined
by logical connectives.

The four basic logical connectives are:


Negation (¬)
A TRUTH TABLE can display the
Conjunction (∧) relationships between the truth values of the
Disjunction (∨) propositions when connected with these
logical connectives.
Implication (→)

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL CONNECTIVES – NEGATION ( )
Compound proposition is a term to describe two or more propositions combined by logical
connectives.
Negation is a connective “not” in English.
It is symbolized by “¬”.
The truth table of a negation operator for a proposition p is:
p
T F
F T
Example:
p : It is sunny.
¬p: It is not sunny.
The statement “It is not sunny.” is true only when
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
the statement “It is sunny.” is false. FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL CONNECTIVES – CONJUNCTION (∧)
Conjunction is a connective “and” in English.
It is symbolized by “∧”.
The truth table of a conjunction operator for
propositions p and q is:
Example:
p q ∧ p: Today is Tuesday.
T T T q: It is raining today.
T F F
∧ : Today is Tuesday and it is raining today.
F T F The statement “Today is Tuesday and it is raining
F F F today.” is true only when both the statements “Today is
Tuesday.” and “It is raining today.” are true.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL CONNECTIVES – DISJUNCTION (∨)
Disjunction is a connective “or” in English.
It is symbolized by “∨”.
The truth table of a disjunction operator for
propositions p and q is:
Example:
p q ∨ p: Mary likes jogging.
T T T q: Mary likes dancing.
T F T
∨ : Mary likes jogging or dancing.
F T T The statement “Mary likes jogging or dancing” is true if
F F F Mary likes either jogging or dancing. It is false only
when Mary likes neither.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL CONNECTIVES – IMPLICATION (→)
Implication is a connective “if … then” in English. p q →
It is symbolized by “→”. T T T
The truth table of a disjunction operator for T F F
propositions p and q is: F T T
F F T
Example:
p: It is sunny. In English, this compound proposition can have
q: We go to the beach. these meaning:
“p implies q”
“p only if q”
p → q: If it is sunny, we go to the beach.
“p is sufficient for q”
The statement “If it is sunny, we go to the beach” is “q is necessary for p”
false only when it is sunny, but we do not go to the “q if p”
beach. “q when p”
“q whenever p”
LOGICAL CONNECTIVES – OTHER CONNECTIVES (↔,⊕)
Two other connectives related to “→” are
“↔” (if and only if) and “⨁” (exclusive or)

The truth values of these two operators for propositions p and q are:

p q ↔ ⊕
T T T F In English, the compound proposition p ↔ q
can have these meaning:
T F F T
“p if and only if q”
F T F T “p is a necessary and sufficient condition for q”
F F T F

p ↔ q is defined to be (p → q) ∧ (q → p), it is True when p, q are both true or both false.

p ⨁ q is the negation of p ↔ q, it is True when exactly one of p or q is true (but not both).
LOGICAL CONNECTIVES
Example:
Given
p : It is raining.
q : The sun is shining
r : There are clouds in the sky.

Write the following propositions using p, q, r and logical operators:


(a) If it is raining, then the sun is not shining and there are clouds in the sky. (a) p → (¬q ∧ r)
(b) If the sun is shining or there are no clouds in the sky, then it is not raining. (b) (q ∨ ¬r)→ ¬p
(c) The sun is shining if and only if it is not raining. (c) q ↔ ¬p
(d) If there are no clouds in the sky, then it is not raining and the sun is shining. d) ¬r → (¬p ∧ q)

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL CONNECTIVES
Example:
Given
p : Today is Monday.
q : It is raining.
r : It is hot.

Express each of the following propositions as an English sentence.


(a) ¬p → q ∨ r
(b) ¬ (p ∨ q) ↔ r (a) If today is not Monday, then it is raining or it is hot.
(b) It is not the case that today is Monday or it is raining if and
(c) p ∧ (q ∨ r) → r ∨ (q ∨ p) only if it is hot.
(c) Today is Monday and either it is raining or it is hot imply that it
is hot or it is raining or today is Monday.
LOGICAL CONNECTIVES - CONSTRUCTING THE TRUTH TABLE FOR
A COMPOUND PROPOSITION
(p → q) ∧ (r ∨ ¬q)
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
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
INVERSE, CONVERSE, CONTRAPOSITIVE STATEMENTS
For a compound proposition involving the implication connective (p → q),
we can write the converse, inverse, and contrapositive statement of the
implication.

Mathematically,
the converse of p → q :q→p
the inverse of p → q : ¬p → ¬q
the contrapositive of p → q: ¬q → ¬p

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
INVERSE, CONVERSE, CONTRAPOSITIVE STATEMENTS
Example:
p : It is sunny.
q : We go to the beach.
p → q : If it is sunny, then we go to the beach.

Its converse, q → p, is “If we go to the beach, then it is sunny.”

Its inverse, ¬p → ¬q, is “If it is not sunny, then we do not go to the beach.”

Its contrapositive, ¬q → ¬p, is “If we do not go to the beach, it is not sunny.”


TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
INVERSE, CONVERSE, CONTRAPOSITIVE STATEMENTS – TRUTH TABLE

p q → → → →
T T T T F F T T
T F F T F T T F
F T T F T F F T
F F T T T T T T

The truth values for the implication and its contrapositive are similar in every
row, BUT NOT with its inverse and converse.

So we said that the implication and its contrapositive are logically equivalent .
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
TAUTOLOGY, CONTRADICTION, CONTINGENCY
A compound proposition is called:

Tautology Contradiction Contingency


• It is always TRUE, • It is always FALSE, • it is NEITHER a
no matter what the no matter what the tautology NOR a
truth values of the truth values of the contradiction.
propositions that propositions that
occur in it. occur in it.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
TAUTOLOGY, CONTRADICTION, CONTINGENCY
Example:
Given
p: Today is raining.
q: I am going out.

p ∨ ¬p is a tautology. Today is raining or today is not raining.


p ∧ ¬p is a contradiction. Today is raining and today is not raining.
p ∨ q is a contingency. Today is raining or I am going out.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
TAUTOLOGY, CONTRADICTION, CONTINGENCY – TRUTH TABLE

∨ ∧ ∨

T F T T F F T T T

F T T F T F T F T

F T T
Tautology Contradiction
F F F

Contingency

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
PRECEDENCE OF LOGICAL OPERATORS
Precedence Logical Operator
1 ()
2
3 ∧
4 ∨
5 →
6 ↔

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE
A compound proposition containing propositions, p and q are said to be
logically equivalence when p ↔ q is a TAUTOLOGY.

Logical equivalence can also be denoted as follows:


p≡q
p⇔q

When using the truth table to show logical equivalence, basically the
columns of giving the final truth values agreed.
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE
Example:
Verify that the statements, (p ∨ q) ∧ q and q, are logically equivalent.

This column shows that


These columns are equivalent! (p ∨ q) ∧ q ↔ q is a
(p ∨ q) ∧ q ⇔ q tautology!
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
(p ∨ q) ∧ q ⇔ q if and only if (p ∨ q) ∧ q ↔ q ⇔ T FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE – IDENTITIES AND LAWS
Identity laws Associative laws Conversion of Implication
Other than using the p∧T⇔p (p ∨ q) ∨ r ⇔ p ∨ (q ∨ r) p → q ⇔ ¬p ∨ q
Truth Table method, p∨F⇔p (p ∧ q) ∧ r ⇔ p ∧ (q ∧ r) p ∨ q ⇔ ¬p → q
Equivalences’ Laws Domination laws Absorption Laws Contrapositive
can be used to show p∨T⇔T p ∨ (p ∧ q) ⇔ p p → q ⇔ ¬q → ¬p
p∧F⇔F p ∧ (p ∨ q) ⇔ p p ↔ q ⇔ ¬q ↔ ¬p
logical equivalence.
Idempotent laws Commutative laws Conversion of Equivalence
p∨p⇔p p∨q⇔q∨p p ↔ q ⇔ (p → q) ∧ (q → p)
p∧p⇔p p∧q⇔q∧p
Negation laws Distributive laws De Morgan’s laws
p ∨ ¬p ⇔ T p ∨ (q ∧ r) ⇔ (p ∨ q) ∧ (p ∨ r) ¬(p ∧ q) ⇔ ¬p ∨ ¬q
p ∧ ¬p ⇔ F p ∧ (q ∨ r) ⇔ (p ∧ q) ∨ (p ∧ r) ¬(p ∨ q) ⇔ ¬p ∧ ¬q

Double Negation (p ∨ q) ∧ r ⇔ (p ∧ r) ∨ (q ∧ r)
laws (p ∧ q) ∨ r ⇔ (p ∨ r) ∧ (q ∨ r)
¬(¬p) ⇔ p
LOGICAL EQUIVALENCE – IDENTITIES AND LAWS
Example:
Show that (p ∨ q) ∨ (¬p ∧ q) is logically equivalent to ¬p.

¬(p ∨ q) ∨ (¬p ∧ q)
⇔ ∧ ∨ ∧ De Morgan’s Law
⇔ ∧ ∨ Distributive Law
⇔ ∧ Negation Law
⇔ Identity Law

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE – IDENTITIES AND LAWS
Example:
Show that p → (q → r) is logically equivalent to q → (p → r)

p → (q → r)
⇔ p → (¬q ∨ r) Conversion of implication
⇔ ¬p ∨ (¬q ∨ r) Conversion of implication
⇔ (¬p ∨ ¬q) ∨ r Associative law
⇔ (¬q ∨ ¬p) ∨ r Commutative law
⇔ ¬q ∨ (¬p ∨ r) Associative law
⇔ q → (¬p ∨ r) Conversion of implication
⇔ q → (p → r) Conversion of implication
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
LOGICAL EQUIVALENCE – IDENTITIES AND LAWS

Show that p ∧ (¬p ∨ q) ↔ (p ∧ q) is a tautology.

p ∧ (¬p ∨ q) ↔ (p ∧ q)
⇔ (p ∧ ¬p) ∨ (p ∧ q) ↔ (p ∧ q) Distributive law
⇔ F ∨ (p ∧ q) ↔ (p ∧ q) Negation law
⇔ (p ∧ q) ↔ (p ∧ q) Identity law
⇔ T

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
SUMMARY
We have learnt the following:
Definition of a proposition and compound propositions
Logical connectives: , ∧, ∨, →, ↔, ⨁
Truth values and truth table
Rephrasing into a Converse, Inverse, Contrapositive Statements
Classification into Tautologies, Contingency, Contradiction Statements
The meaning of Logical Equivalence

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY

You might also like