Week-4 Material
Week-4 Material
Week-4 Material
Mathematical Logic
WEEK- 4
Learning Objectives:
Key topics
1. Logic
1.1 Introduction
1.2 Statements
1
2.2 Compound statement-explanation
3. Connectives
3.1. Explanation
4. Compound Statements
__________________________________________________________________________________
1.1 Introduction
2
It helps to construct correct mathematical arguments. Logic is the foundation for all
mathematical reasoning with practical applications in designing Computing Machines,
Computer Programming and many other areas of Computer Science.
Statement or Proposition is a declarative sentence which is true or false but not both.
Examples
• 2+2=3. (False)
Examples
If a statement is true, the truth value of the statement is true and is denoted by T or 1.
Truth Table: A Truth Table is a table that displays the relationship between truth values of
statements.
3
2. Simple and Compound statements
2.1 Simple statement
Definition:
Definition:
4
2.3 Symbolic Representation
Examples
Symbolic form:
Ans: P
Symbolic form:
P: Today is Saturday
Q: it is raining today.
Ans: P and Q
P: I go to office early
Ans: If P then Q.
P: I will go to London
5
3.Logical Operators or Logical Connectives
3.1 Definition
NOT Negation ˜ or ¬
AND Conjunction ˄
OR Disjunction ˅
If…Then Conditional →
Let p be a proposition. The statement ‘not p’ ‘it is not the case that p’ or ‘it is false that p’ is
another proposition called the negation of p denoted ∼p or ¬p.
6
Example
Then the negation of the above statement denoted by ¬P is “New Delhi is not the capital of
India” or “it is not the case that New Delhi is the capital of India”.
Here the truth value of p is True and hence the truth value of ¬P is False. The truth table of
Negation operator is as follows:
p ⅂p
T F
F T
b) AND (Conjunction, ˄)
Let p and q be propositions. The proposition ‘p and q’ denoted by p˄q is the proposition that
is true when both p and q are true and false otherwise.
Example
If the statement p and q is defined by “2+3=5” and “6 is not a prime number” then p ˄ q has
the truth value True as each has truth value True.
If p and q is defined by “2+3=5” and “6 is a prime number” then p ˄ q has the truth value
False as the second statement is False.
If p and q is defined by “2+3=6” and “6 is not a prime number” then p ˄ q has the truth value
False as the first statement is False.
If the statement p and q is defined by “2+3=4” and “6 is a prime number” then the statement
p ˄ q has the truth value False as each has the truth value False
7
p q p˄q
T T T
T F F
F T F
F F F
c) OR (Disjunction, ˅):
Let p, q be any propositions. The proposition ‘p or q’ denoted p ˅q that is false when both p
and q are false and is true otherwise.
Example
If p or q is defined by “To ride the bus you must have a ticket or hold a pass” then any one of
the condition is sufficient though both could be true. This OR is an Inclusive OR.
Note:
Here the OR is Excusive as students can take either French or Hindi as their third language
but not both.
p q p ˅q
T T T
T F T
F T T
F F F
8
3.3 Additional Connectives
If p, q are any two statements, then the statement p →q read as ‘if p then q’ is called the
conditional statement which is false only when p is true and q is False. Otherwise, it has
truth value True.
Example
If my contract is “If I get up at 5 AM then I will go for a walk” (p →q is True)
• If I get up at 5 AM, I will not go for a walk (the contract is violated, so p →q is False)
• If I have not got up by 5 AM, I may or may not go for a walk (The contract is not
violated, so p →q is True)
p → q can also be read as ‘p implies q’; ‘p is sufficient for q’; ‘p only if q’; ‘q is necessary for p’;
‘q follows from p’; q is a consequence of p’. The truth table of Conditional operator is as
follows:
p q p→q
T T T
T F F
F T T
F F T
Note.
9
~q → ~p is called the contra positive of p → q
If p and q are any two statements the proposition p ↔q read as ‘p if and only if q’ is called
the biconditional statement which is true whenever p and q has identical truth values.
Example
Let us consider the compound statement “I will go by train if and only if I have a ticket”.
Then the biconditional has the truth value True if both have the same truth value and False
otherwise. The truth table of Biconditional operator is as follows:
p q p⟷q
T T T
T F F
F T F
F F T
Negation ¬
Conjunction ˄
Disjunction ˅
Conditional →
Bi conditional ⟷
For example,
10
4. Compound statements
a. p: 3 < 3 q: 4 < 6
p: 3 < 3. (F) q: 4 < 6. (T)
∴ p ˅ q is True and p ˄ q is False.
b. p: 3 x 2 = 5 q: 8 + 9 = 18
p: 3 x 2 = 5. (F) q: 8 + 9 = 18. (F)
∴ p ˅ q is False p ˄ q is False
2. Write in Symbolic form and find the truth value of the following compound
propositions:
a. If the earth is round, then the earth travels round the sun.
p: The earth is round. (T)
q: The earth travels around the sun. (T)
The given proposition in symbolic form: p → q which is True.
11
q: I am the President of India. (F)
The given proposition in symbolic form: p → q which is False [if p is true and
q is false]
Example.1
a). (p ∧ q) → (p ˅q)
12
Proof.
a) (p∧q) → (p ˅q)
T T T T T
T F F T T
F T F T T
F F F F T
b) (p →q) → (q →p)
T T T T T
T F F T T
F T T F F
F F T T T
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
13
d) (p⟷ 𝑞) ⟷ ((p ∧ q) ˅ (¬p ∧ ¬q))
T T F F T T F T T
T F F T F F F F T
F T T F F F F F T
F F T T T F T T T
Example.2.
Construct the truth table for (p→ (q →r)) → ((p →q) → (p →r))
T T T T T T T T T
T T F T F F F F T
T F T F T T T T T
T F F F F T T T T
F T T T T T T T T
F T F T T T F T T
F F T T T T T T T
F F F T T T T T T
14
Example.3. Construct the truth table for (Ꞁ𝒑 ⟷ Ꞁ𝒒) ⟷ (𝒒 ⟷ 𝒓)
q r Ꞁ𝒑 Ꞁ𝒒 Ꞁ𝒑 ⟷ Ꞁ𝒒 ≡ 𝒂 𝒒⟷𝒓≡𝒃 𝒂⟷𝒃
T T T F F T T T
T T F F F T F F
T F T F T F F T
T F F F T F T F
F T T T F F T F
F T F T F F F T
F F T T T T F F
F F F T T T T T
Example.4. Construct the truth table for ¬(𝒑 ∨ (𝒒 ∧ 𝒓)) ↔ ((𝒑 ∨ 𝒒)˄(p →r))
(a) (b)
T T T T T F T T T F
T T F F T F T F F T
T F T F T F T T T F
T F F F T F T F F T
F T T T T F T T T F
F T F F F T T T T T
F F T F F T F T F F
F F F F F T F T F F
15
Summary
This topic covers the introduction and the basis of mathematical logic, which is the
application of logic to Mathematics. This includes propositions and logical connectives. After
completing the introductory part, students will be able to distinguish between propositions
and those sentences which are not. Logical connectives play the key role in forming compound
propositions are studied using a tabular format called truth table based on all possible
combinations of the propositions with respect to the logical connective. Truth tables help the
students to construct a new proposition and analyze its truth value and validity.
References
1. Johnsonbaugh, Richard (2005), Discrete Mathematics, Sixth Edition (Upper Saddle River,
NJ: Pearson/Prentice Hall).
2. Goodaire, Edgar G.; & Parmenter, Michael M. (2006), Discrete Mathematics with Graph
Theory, Third Edition (Upper Saddle River, NJ: Pearson/Prentice Hall).
3. Haggard, Gary; Schlipf, John; & Whitesides, Sue (2006), Discrete Mathematics for Computer
Science (Belmont, CA: Brooks/Cole—Thomson Learning).
4. T. Veerarajan, Discrete Mathematics, with Graph Theory and Combinatorics,2017.
16
Further reading
1. Kenneth H. Rosen (2007). Discrete Mathematics: And Its Applications. McGraw-Hill College.
17