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

DM Ma8351 U1

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

1

2
Please read this disclaimer before proceeding:
This document is confidential and intended solely for the educational purpose of
RMK Group of Educational Institutions. If you have received this document
through email in error, please notify the system manager. This document
contains proprietary information and is intended only to the respective group /
learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender
immediately by e-mail if you have received this document by mistake and delete
this document from your system. If you are not the intended recipient you are
notified that disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited.

3
DISCRETE MATHEMATICS
(MA8351)
DEPARTMENT CSE/IT

BATCH/YEAR 2019-2023/II

CREATED BY Ms.V.Nirmala, Dr.P.Hema,


Ms.K.Sumathy, Mr.R.Jayamani
Dr.S.Karthikeyan, Mr.T.Venkatesan,
Dr.A.Jyothibala, Ms.A.K.Arulmozhi,

DATE 29.07.20

4
Table of Contents

S.No Topic Page No.


1. Course Objectives 6
2. Pre-Requisites 7
3. Syllabus 8
4. Course Outcomes 9
5. CO – PO/PSO Mapping 10
6. Lecture Notes: Unit I LOGIC AND PROOF 11
Lecture Plan 12
Activity Based Learning 13
1.1. Proposition 14
1.2. Connectives 15
1.3. Tautology and contradiction 20
1.4. Tautological Equivalences 24

1.5. Tautological Implication 29


1.6. Normal Forms 33
1.7. Rules of Inference 37
1.8. Direct Method of Proof 39
1.9. Predicate and Quantifiers 50
1.10. Inference theory of predicate calculus 55

1.11. Introduction to proof 64


1.12. Proof methods and strategy 67
1.13. Practice Quiz 70
1.14. Assignment 72
1.15. Part A Questions and Answers 73

1.16. Part B Questions 77


7. Supportive online Certification courses 79
8. Real time Applications 80
9. Content beyond the Syllabus 81
10. Prescribed Text Books & Reference Books 82

5
Course Objectives:

S.NO TOPIC

1. To extend student's logical and mathematical maturity


and ability to deal with abstraction.

2. To introduce most of the basic terminologies used in


computer science courses and application of ideas to
solve practical problems.
3. To understand the basic concepts of combinatorics and
graph theory.
4. To familiarize the applications of algebraic structures
5. To understand the concepts and significance of lattices
and Boolean algebra which are widely used in computer
science and engineering.

6
PREREQUISITES

S.NO TOPIC Course Name


with Code
1. Truth table technique

2. Knowledge in Set theory

3. Basics of Counting technique Studied all topics


in Higher
secondary level
4. Induction Method technique

5. Basics concepts of Group

6. Relations and Functions

7
MA8351 DISCRETE MATHEMATICS ENGINEERING LTPC30

UNIT I LOGIC AND PROOFS 12

Propositional logic – Propositional equivalences – Predicates and quantifiers –


Nested quantifiers – Rules of inference – Introduction to proofs – Proof methods
and strategy.

UNIT II COMBINATORICS 12

Mathematical induction – Strong induction and well ordering – The basics of


counting – The pigeonhole principle – Permutations and combinations – Recurrence
relations – Solving linear recurrence relations – Generating functions – Inclusion
and exclusion principle and its applications

UNIT III GRAPHS 12

Graphs and graph models – Graph terminology and special types of graphs – Matrix
representation of graphs and graph isomorphism – Connectivity – Euler and
Hamilton paths.

UNIT IV ALGEBRAIC STRUCTURES 12

Algebraic systems – Semi groups and monoids – Groups – Subgroups –


Homomorphism‘s – Normal subgroup and cosets –
Lagrange‘s theorem – Definitions and examples of Rings and Fields.

UNIT V LATTICES AND BOOLEAN ALGEBRA 12

Partial ordering – Posets – Lattices as posets – Properties of lattices


– Lattices as algebraic systems – Sub lattices – Direct product and homomorphism
– Some special lattices – Boolean algebra.

8
COURSE OUTCOMES

S.NO TOPIC

CO 1 Identify the concepts needed to test the logic of a


program

CO 2 Understanding the mathematical induction


methods and Inclusion and exclusion principle and
applying its applications

CO 3 Apply the concepts and techniques of


combinatorics and graph theory

CO 4 Utilize the concepts and properties of algebraic


structures such as groups, rings and fields.

CO 5 Associate the significance of lattices and Boolean


algebra in computer science and engineering..

CO 6 Develop knowledge in Logic, Graphs and algebraic


system in engineering.

9
Course Outcome mapping with POs / PSOs
MA8351 - DISCRETE MATHEMATICS

POs
PO PO PO PO PO PO PO PO PO PO PO PO PSO PSO PSO
1 2 3 4 5 6 7 8 9 10 11 12 1 2 3
COs

CO1 2 1 - - - - - - - - - - 2 - -

CO2 3 2 - - - - - - - - - - - -

CO3 3 3 2 - - - - - - - - - 3 - -

CO4 2 1 - 1 - - - - - - - - 2 - -

CO5 3 2 1 - - - - - - - - - 2 - -

CO5 3 3 2 1 - - - - - - - - 2 - -

1: Slight (Low) 2: Moderate (Medium) 3: Substantial (High)

10
UNIT I
LOGIC AND PROOFS

11
Lecture plan

Actual
S. Topics to No of Proposed Taxonomy Mode of
Lecture CO
No. be covered periods date level Delivery*
Date
Introduction
to
1 Propositional 1 22.06.20 22.06.20 CO1 K1 PPT
logic,
Connectives
Introduction
2 Tautology, 1 22.06.20 22.06.20 CO1 K1 PPT
Contradiction
Propositional
3 equivalences, 1 23.06.20 23.06.20 CO1 K1 PPT
Implications
PCNF and
4 1 23.06.20 23.06.20 CO1 K1 PPT
PDNF
Predicate
and
5 quantifiers, 1 24.06.20 24.06.20 CO1 K1 PPT
Nested
quantifiers
Rules of
inference,
6 1 24.06.20 24.06.20 CO1 K2 PPT
Statement
calculus
Rules of
inference-
7 1 25.06.20 25.06.20 CO1 K2 PPT
Predicate
calculus
8 Problems 1 25.06.20 25.06.20 CO1 K1 PPT
Introduction
9 1 26.06.20 26.06.20 CO1 K2 PPT
to Proofs
10 Problems 1 26.06.20 26.06.20 CO1 K1 PPT

12
ACTIVITY BASED LEARNING

Activity based learning helps students express and embrace their curiosity.
Once the students become curious, they tend to explore and learn by themselves.
To evoke curiosity in students, Practice quiz is designed .

S.NO Topic Activity Link

1. Propositiona Quiz and https://quizizz.com/join/quiz/5f2d


l logic- Laws Flash Cards e11316b905001c5cd3f9/start?fro
m=soloLinkShare&referrer=5dea0
1388362a6001b41136a

2. Rules of Quiz and https://quizizz.com/join/quiz/5f0e


inference Flash Cards c0081368cb001b781369/start?fro
m=soloLinkShare&referrer=5dea0
1388362a6001b41136a

3. Statement Assignment https://docs.google.com/documen


calculus t/d/1x7_y5C84y6ZvnxKgHYLNgefA
GmqaeD4r0luVe5JPIso/edit?usp=s
haring

4. predicate Assignment https://docs.google.com/documen


calculus t/d/16jorat1tEgyd82F5CoOeNiOu4
EH77-
5R35SgKRCsyLg/edit?usp=sharing

13
Unit I - LOGIC AND PROOFS
INTRODUCTION
Logic is the discipline that deals with the methods of reasoning. One of the aims of
logic is to provide rules by which we can determine whether a particular reasoning
or argument is valid. Logical reasoning is used in many disciplines to establish valid
results. Rules of logic are used to provide proofs of theorems in mathematics, to
verify the correctness of computer programs and to draw conclusions from scientific
experiments.

1.1 PROPOSITIONS
A declarative sentence (or assertion) which is either true or false, but not both, is
called a proposition (or statement). Sentences which are exclamatory, interrogative
or imperative in nature are not propositions. Lower case letterssuch as p, q, r . . .
are used to denote propositions. For example, we consider the following sentences:
l. Chennai is the capital of Tamilnadu.
2. How beautiful is Rose?
3.2+2=4
4. What time is it?
5. x+y=z
In the given statements, (2) and (4) are obviously not propositions as they are not
declarative in nature. (l) and (3) are propositions, but (5) is not, since (1) is true,
(3) is true and (5) is neither true nor false as the values of x, y and z are not
assigned.
If a proposition is true, we say that the truth value of' that proposition is true,
denoted by T or 1. If a proposition is false, the truth value is said to be false,
denoted by F or 0.

Definition: Atomic Statement


Propositions which do not contain any of the logical operators or connectives are
called atomic (primary or primitive) propositions.
The area of logic that deals with propositions is called propositional logic or
propositional calculus.

Definition: Molecular Statement


Mathematical statements which can be constructed by combining one or more
atomic statements using connectives are called molecular or compound
propositions.

14
Truth table:
A truth table is a table that displays the relationships between the truth
values of sub-propositions and that of compound proposition constructed
from them. The truth value of a compound proposition depends on those
of sub propositions and the way in which they are combined using
connectives.

1.2 CONNECTIVES
p q p  q
Definition-Conjunction
When p and q are any two propositions, the proposition T T T
"p and q" denoted by p  q and called the conjunction T F F
of p and q is defined as the compound proposition that
F T F
is true when both p and q are true and is false
F F F
otherwise.

Above table is the truth table for the conjunction of two propositions p and
q viz., "p and q”.

Definition-Disjunction
When p and q are any two propositions, the propositions
"p or q" denoted by p  q and called the disjunction of p p q pq
and q is defined as the compound proposition that is false T T T
when both p and q are false and is true otherwise.
T F T
Above table is the truth table for the disjunction of two F T T
propositions p and q, viz., "p  q". F F F

Definition-Negation

Given any proposition p, another proposition formed by writing "It


is not the case that" or "It is false that" before p or by inserting the p ¬p
word 'not' suitably in p is called the negation of p and denoted T F
by ~p (read as 'not p'). ~p is also denoted ¬P. F T
It p is true, then ~p is false and if p is false, then ~p is true.

Above table is the truth table for the negation of p.

For example, if p is the statement "New Delhi is in India", then ¬P is given


by ¬P:It is not the case that New Delhi is in India.

15
Conditional Statement: [If…........then]
Let p and q be any two statements. Then the statement p q is
called a conditional statement (read as if p then q). p q has a P q pq
truth value F if p has the truth value T and q has the truth value F. T T T
In all the remaining cases it has the truth value T.
T F F
Example:
F T T
p: Ram is a Computer Science student F F T
q: Ram study DS
pq: If Ram is a Computer Science student, then he will study DS.
The different situations where the conditional statements applied are listed below.
a) If p then q
b) p only if q
c) q whenever p
d) q is necessary for p
e) q follows from p
f) q when p
g) p is sufficient for q
h) p implies q
Definition: Converse, Contrapositive & Inverse Statements
If p q is a conditional statement, then
a. q p is called converse of pq
b. ¬q¬p is called contrapositive of p q
c. ¬p¬q is called inverse of pq
Example: Write are the contrapositive, the converse and the inverse of the implication
"The home team wins whenever it is raining".
Solution: Let p: It is raining q: The home team wins
p q : If it is raining then the home team wins.
Contra positive (¬q ¬p ) : If the home team does not win then it is not raining.
Converse (q p) : If the home team wins then it is raining.
Inverse (¬p¬q) : If it is not raining then the home team does not win.

16
BICONDITIONAL PROPOSITION

If p and q are two propositions, then the proposition p if and p q p↔q


only if q, denoted by p ↔ q is called the biconditional T T T
statement and is defined by the following truth table. T F F
F T F
Note : p↔q is True if both p and q have the same truth
F F T
values. Otherwise p↔q is False

Example:

p: You can take the flight

q: You can buy a ticket

p↔q: You can take the flight if and only if you buy a ticket

Symbolize the Statements using Logical Connectives

Examples:

1. The automated reply can be sent when the file system is full.

p: The automated reply can be sent

q: The file system is full

Solution: Symbolic form: q p

2. Write the symbolized form of the statement. If either Ram takes C ++


or Kumar takes Pascal, then Latha will take Lotus.

R: Ram takes C ++

K: Kumar takes Pascal

L: Latha takes Lotus

Solution: Symbolic form: (R  K) L

3. Let p, q, r represents the following propositions,

p: It is raining q: The sun is shining r: There are clouds in the


sky

Symbolize the following statements.

a. If it is raining, then there are clouds in the sky


b. If it is not raining, then the sun is not shining and there are clouds in
the sky.
c. The sun is shining if and only if it is not raining.
Solution: a)pr b) ¬p(¬q  r) c) q↔ ¬r
17
4. Symbolize the following statements:
(i) If the moon is out and it is not snowing, then Ram goes out for a
walk.
(ii) If the moon is out, then if it is not snowing, Ram goes out for a
walk.
(iii)It is not the case that Ram goes out for a walk if and only if it is not
snowing or the moon is out.
Solution: Let the propositions be,
p: The moon is out.
q: It is snowing.
r: Ram goes out for a walk.
Symbolic form:
(i) (p  ¬q)r
(ii) p(¬qr)
(iii)¬(r ↔ (¬q  p))

CONSTRUCTION OF TRUTH TABLES


Problems:

1. Show that the truth values of the formula p  (p q) q are


independent of their components.
Solution: The truth table for the formula is

p q pq p  (pq) (p  (pq))q)


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

The Truth values of the given formula are all true for every possible
Truth value of p and q. Therefore, the Truth value of the given formula
is independent of their components.

2. Show that the Truth value of (pq) ↔ (¬P  q) is independent of


their components.

18
Solution:

p q pq ⌐p  q Ans
T T T T T
T F F F T
F T T T T
F F T T T

The Truth values of the given formula are all true for every possible Truth value
of p and q. Therefore, the Truth value of the given formula is independent of
their components.

3. Construct a truth table for (q  ((p q)) p


Solution:

p q pq q  (pq) q  (pq)p


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

4. Construct a TRUTH table for ⌐ (p  (q  r)) ↔ ((p  q)  (p  r))


Solution:
p q r qr p  (q  r) (p  q) (p  r) (p  q)  ⌐(p  (q  r)) Ans
(p  r)
T T T T T T T T F F
T T F F T T T T F F
T F T F T T T T F F
T F F F T T T T F F
F T T T T T T T F F
F T F F F T F F T F
F F T F F F T F T F
F F F F F F F F T F

19
1.3 TAUTOLOGY AND CONTRADICTION
A statement formula which is always true regardless of the truth values
of the variables in it is called a Tautology (or) universally valid formula.

If a given formula is a tautology then its truth values are all T whatever
be the truth values of components. Therefore the last column of the truth
table of the given formula has truth values T only.
Example :A  ¬A is always a Tautology.
A statement formula which is false always for the truth values of the components
is called a contradiction.
Example: A  ¬A is always a contradiction.
The last column of the truth table of the contradiction has only the truth value F
for all cases.

Well-formed formula

View the video lecture on YouTube


https://youtu.be/qFRBT80Cmas

Propositional logic uses a symbolic “language” to represent the logical structure,


or form, of a compound proposition. Like any language, this symbolic language
has rules of syntax—grammatical rules for putting symbols together in the right
way. Any expression that obeys the syntactic rules of propositional logic is called
a well-formed formula, or WFF.

Fortunately, the syntax of propositional logic is easy to learn. It has only three
rules:

1. Any capital letter by itself is a WFF.


2. Any WFF can be prefixed with “¬”. (The result will be a WFF too.)
3. Any two WFFs can be put together with “  ”, “∨”, or “≡” between
them, enclosing the result in parentheses. (This will be a WFF too.)

20
Problems:
1. Prove that (p  q) (p  q) is a tautology
Proof:

p q pq p q (p  q)(p  q)
T T T T T
T F F T T
F T F T T
F F F F T

Since the truth value of given formula are all, true, the given formula is tautology.

2. Verify whether (p  (pq))q is a tautology


Proof:
p q pq p  (pq) (p  (pq))q
T T T T T
T F F F T
F T T F T
F F T F T

Since the truth value of given formula are all, true, the given formula is
tautology.

3. Prove that (¬p  p)  q is a contradiction.


Proof:
p q ¬q  p (¬p  p)  q
T T F F
T F T F
F T F F
F F F F

Since the truth value of given formula are all, FALSE the given formula is
contradiction.

21
4. Prove that (¬pq)(qp) is neither a tautology not a contradiction.
Proof:
p q (¬pq) qp (¬pq)(qp)
T T T T T
T F T T T
F T T F F
F F F T T

Since the last column is neither all false nor true therefore the given formula is
neither a tautology nor a contradiction.

5. Verify that p (q (p  q)) is a tautology.


Verification:

p q p q q(p  q) p(q(p  q))


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

Since all the truth values of given formula is all true then it is a tautology.

6. Verify that (p  q)  (p  q) is a tautology or not.


Verification:

p q pq pq (p  q)(p  q)


T T T T T
T F T F F
F T T T T
F F F T T
Since the last column contains not all true values, the given formula is neither
tautology nor a contradiction.

22
7. Prove that ¬ (p  q) (¬p  ¬q) is a tautology
Proof:

p q ¬ (p  q) (¬p  ¬q) ¬ (p  q)( ¬p  ¬q)


T T F F T

T F T T T

F T T T T

F F T T T

Therefore, the given formula is a tautology.


8. Prove that (p  q) (¬p  q) is a tautology
Proof:
p q pq (¬p  q) (p  q)( ¬p  q)
T T T T T

T F F T T
F T T T T

F F T T T

Therefore, the given formula is a tautology

Note: If p  q is a conditional statement, then ~q ~p is called the


contra positive of p  q. We note that p  q and its contra positive ~q
~p have same truth values. This is seen from the following truth table.
p q ~q ~p ~q~p pq
T T F F T T
T F F T F F
F T T F T T
F F T T T T
Hence, the conditional statement p q can be replaced by its contra positive
anywhere.

23
1.4 LOGICAL EQUIVALENCES / TAUTOLOGICAL EQUIVALENCES

View the video lecture on YouTube


:https://www.youtube.com/watch?v=CRQDXKD3aQ8&list=PLJvIzs_rP6R7v-
k_4htOEA8WmqmZzVK4z&index=3

Letp and q be two statement formulas, p is said to be logically equivalent to q if p


and q have the same set of truth values or equivalently p and q are logically
equivalent if p  q is a tautology.
Hence, p  q if and only if p  q is a tautology.
Notation: 1. p  q 2. p≡q
Problems
1. Prove that pq is logically equivalent to ¬p  q (i.e. p q  ¬p  q)
Proof:
p q pq ¬p  q
T T T T
T F F F
F T T T
F F T T
Hence, we seen that, p  q  ¬p  q
NOTE: Since p  q & ¬q¬p has same truth values we observe that
pq  ¬q¬p.

2. Prove that p↔q  (p  q)  (q p)


Proof:
p q pq p↔q qp (pq)  (qp)
T T T T T T
T F F F T F
F T T F F F
F F T T T T
From Truth table we see that p ↔ q, (p q)  (q p), have same truth values.
Hence, p ↔ q  (p  q)  (q  p).

24
3. Prove that p ↔ q  (p  q)  (¬p  ¬q)
Proof:

p q pq ¬p  ¬q (p  q)  (¬p  ¬q) p↔q


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

Since the truth values are same hence,


p ↔ q  (p  q)  (¬p  ¬q)
4. State and prove DE Morgan’s law
DE Morgan’s laws
i) ¬ (p  q)  ¬p  ¬q

ii) ¬ (p  q)  ¬p  ¬q

Proof: i) ¬ (p  q)  ¬p  ¬q

p q ¬ (p  q) ¬p  ¬q
T T F F
T F F F
F T F F
F F T T

ii) ¬ (p  q)  ¬p  ¬q

25
p q p q ¬(p  q) ¬p  ¬q
T T F F F
T F F T T
F T F T T
F F T T T
DUALITY LAW
The dual of a compound proposition that contains only the operators  ,  and ~
is the proposition obtained by replacing each  by  , each  by  , each T by F
and each F by T, where T and F are special variables representing compound
propositions that are tautologies and contradictions respectively. The dual of a
proposition A is denoted by A*.
DUALITY THEOREM
If A(p1,p2,…pn )≡ B(p1,p2,…pn )where A and B are compound
propositions, then A*(p1,p2,…pn) ≡B*(p1,p2,…pn)

LAWS OF LOGIC

S.No Primal Dual Name of the


law

1 p q  q p pqqp Commutative laws

2 p  (q  r)  (p  q)  r p  (q  r)  (p  q)  r Associative laws

3 p  ( q  r)  (p  v)  (p  r) p  (q  r)  (p  r)  (p  r) Distributive laws

4 ¬ (p  q)  ¬p  ¬q ¬ (p  q)  ¬p  ¬q De Morgan’s laws

5 pp  p p p p Idempotent laws

Absorption law
6 p  (p  q)  p p  (p  q)  p

Identity law
7 p F p p T p

Dominant law
8 p T T p F F

Complement law
9 p  ¬p  T p  ¬p  F
Double Negation
10 ¬(¬p)  p law

Above laws of logic can be easily verified by truth table


technique.

26
Problems:

1. Negate and simplify the compound statement (p  q) r


Solution: We know that
¬ ((p  q) r)  ¬ (¬ (p  q)  r)
 ¬ (¬ (p  q))  ¬r
 (p  q)  ¬r

2. Show that (p  q)  ¬ (¬p  q)  p


Proof:(p  q)  ¬ (¬p  q)  (p  q)  (¬ (¬p)  ¬q) (DE Morgan’s laws)
 (p  q)  (p  ¬q) (Involution law)
 p  ( q  ¬q) (Distributive laws)
 p  F
p

3. Show that p(qr)  p(¬q  r)  (p  q)r


Proof:Consider p(qr)
 p(¬q  r) (by logical equivalance)
 ¬p  (¬q  r) (by logical equivalance)
 (¬p  ¬q)  r (by associative law)
 ¬ (p  q)  r
 (p  q)r
Therefore, p(qr)  p(¬q  r)  (p  q)r
Note:
From the above problem, we have the result.
p(qr)  (p  q)r
This equivalence is useful in inference theory of statement calculus.

4. Show that (¬p  (¬q  r))  (q  r)  (p  r)  r using laws of logic.


Proof:
Consider (¬p  (¬q  r))  (q  r)  (p  r)
 ((¬p  ¬q)  r)  ((q  p)  r)
 (¬ (p  q)  r)  ((p  q)  r)
 (¬ (p  q)  (p  q))  r
 (¬A  A)  r Where A= (p V q)
 T r
r
Therefore, (¬p  (¬q  r))  (q  r)  (p  r)  r

27
5. Show that a) ¬(p  q) (¬p  (¬p  q))  (¬p  q)

b) (p  q)  (¬p  (¬p  q))  (¬p  q)

Proof:

a) ¬(p  q) (¬p  (¬p  q))  ¬ (¬(p  q))  (¬p  (¬p  q))

 (p  q)  (¬p  ¬p  q)---------------- (1)


 (p  q)  (¬p  q)
 (p  ¬p  q)  (q  ¬p  q)

 (T  q)  (q  ¬p)

 T  (q  ¬p)

 ¬p q
(1) Implies, (p  q)  (¬p  (¬p  q))  ¬p  q, Applying duality, we get

b) (p   q)  (¬p  (¬p  q))  (¬p  q)

6. Show that ((p  q)  (¬ (¬p  (¬q  ¬r)))  (¬p  ¬q)  (¬p  ¬r) is
tautology.

Proof:Consider (¬p  ¬q)  (¬p  ¬r)  ¬p  (¬q  ¬r)

 ¬p  ¬ (q  r)

 ¬ (p  (q  r)) ---------------- (1)

Consider, ((p  q)  (¬ (¬p  (¬q  ¬r)))  (p  q)  ¬ (¬p  ¬(q  r))

 (p  q)  (p  (q  r))

 (p  q)  (p  q)  (p  r)
 (p  q)  (p  r)
 (p  (q  r) ---------------- (2)

From (1) & (2)

((p  q)  (¬ (¬p  (¬q  ¬r)))  (¬p  ¬q)  (¬p  ¬r)

 p  (q  r)  ¬ (p  (q  r))

 T

28
7. Show that p(qp)  ¬ p(pq) by truth table method.

Proof: Truth table

p q qp p(qp) pq ¬ p(pq)


T T T T T T
T F T T F T
F T F T T T
F F T T T T
Since the truth values of p(qp) and ¬ p(pq) are same, the
equivalence is proved.

Equivalences Involving Biconditional


1. p ↔ q  (p q)  (q p)
2. p ↔ q  ¬ p ↔¬ q
3. p ↔ q  (p  q)  (¬p  ¬q)
4. ¬(p ↔ q)  p ↔¬ q

1.5 LOGICAL IMPLICATION / TAUTOLOGICAL IMPLICATION

View the video lecture on


https://www.coursera.org/learn/logic-introduction
A statement formula A logically implies another, statement formula B if
and only if A  B is a tautology.
Therefore, A=>B (A logically implies B) if and only if A B is a tautology.
If A => B then A is called antecedent and B is called consequent.
Further, A=> B guarantees that B has the truth value T whenever A has the
truth value T.
Therefore, in order to show any of the given implications, it is sufficient to
show that an assignment of the truth value T to the antecedent of the given
conditional leads to the truth value T for the consequent.

29
Equivalences Involving Conditional

1. p q ≡¬p  q
2. p q≡¬q¬p
3. p  q ≡¬pq
4. p  q ≡¬(p¬q)
5. ¬(pq)≡p  ¬q
6. (pq)  (p r) ≡p(q  r)
7. (pq)  (p r) ≡(p  q)r
8. (pq)  (p r) ≡p(q  r)
9. (pr)  (q r) ≡(p  q)r

Implications

1. p  q => 𝑝
2. p  q => 𝑞
3. p => p  q
4. ¬p => 𝑝 q
5. 𝑞 => 𝑝 q
6. ¬ (p q )=>p
7. ¬ (p q )=>¬q
8. p  (p q) => 𝑞
9. ¬ q  ( p q) => ¬p
10. ¬ p  ( p  q) => 𝑞
11. (p q)  (p r) => 𝑝 r
12. (p  q)  (p r)  (q r ) => 𝑟

Problems
1. Prove that (p  q) => (p  q)
Proof:To Prove: (p  q) (p  q) is a tautology.
p q p q p  q (p  q)(p  q)
T T T T T
T F F T T
F T F T T
F F F F T

30
The last column shows that (p  q) (p  q) is a tautology.

Therefore, (p  q) =>(p  q)

2. Show that (p  q) =>(p q)

Proof:To prove: (p ^ q)  (p q)

p q p q pq (p  q)(pq)
T T T T T
T F F F T
F T F T T
F F F T T

The last column shows that (p  q)  (p q) is a tautology.


Hence (p  q) => (pq) .

3. Prove that (p q)  (q r) =>p r [Hypothetical syllogism]


Proof: Let S: (pq)  (q r)  (p r)
To Prove: S is a tautology.

p q r (pq) (qr) (pr) S


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

The last column shows that S: (pq)  (q r) (p r) is a tautology.


Therefore, (p q)  (q r) =>p r.
Note:
The above implication is called as hypothetical syllogism (or) chain rule (or) Law
of syllogism.

31
4. Prove that p (q r) => (pq) (pr)
Proof:Let the formula S: p (q r) ((p q) (p r))

To Prove: S is a tautology.

p q r pq qr pr p(qr) (pq)(pr) S


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 T F T T T
F T T T T T T T T
F T F T F T T T T
F F T T T T T T T
F F F T T T T T T

The truth values of (p  (q r)) ((p  q) (p r)) are all T

Therefore, (p (qr)) ((p q) (p r)) is a tautology.

Hence p(q  r) => (p q) (pr).

32
1.6 NORMAL FORMS:

If we write given statement formula in terms of ,  and  then it is called Normal


form/ Canonical form.

It will be suitable to use the word product in the place of conjunction and sum in the
place of disjunction.

Principal Disjunctive Normal Form Principal Conjunctive Normal Form


(PDNF) (PCNF)
Conjunction  , Product Disjunction  , Sum
Elementary Product Elementary Sum
The Product of variables and their The Sum of variables and their Negation.
Negation. Example: p  p, p  q, q  q,  p  q, 
Example: p  p, p  q, q  q,  p  q, p   p,
 p   p,
Disjunctive normal form (DNF) Conjunctive normal form (CNF)
DNF = (Elementary product)  CNF= (Elementary Sum)  Elementary
(Elementary product)  (Elementary Sum)  (Elementary Sum)  ….
product)  …. CNF=( p  q)  (  p  q)  (p   q)
DNF=( p  q)  (  p  q)  (p   q) …
…
Min Terms Max Terms
Formulas consisting of conjunction of (p Formulas consisting of disjunction of (p
or  p) and (q or  q) but not both a or  p) and (q or  q) but not both a
same variable and its negation. same variable and its negation.
2 2
Min terms of 2 variable 2 =4 terms Max terms of 2 variable 2 =4 terms
(p  q), (  p  q), (p   q) and (  p  (p  q), (  p  q), (p   q) and
 q) (  p   q)
3 3
Min terms of 3 variables 2 = 8 terms Max terms of 3 variables 2 = 8 terms
(p  q  r), (  p  q  r), (p   q  r), (p  q  r), (  p  q  r), (p   q  r),
( p  q   r), (  p   q  r), (  p  q (p  q   r), (  p   q  r), (  p  q
  r),(p   q   r),(  p   q   r)   r),(p   q   r),(  p   q   r)
PDNF: Sum of min terms PCNF: Product of max terms
Example: (p  q)  (  p  q)  Example: (p  q)  (  p  q) 
(p   q)  (  p   q) (p   q)  (  p   q)
Working rule to obtain PDNF Working rule to obtain PCNF
Step 1: Write the given statement in Step 1: Write the given statement in
terms of  ,  and  . terms of  ,  and  .
Step 2: Apply (each term)  T. Step 2: Apply (each term)  F.
Step 3: Instead of T, apply p   p. Step 3: Instead of F, apply p   p.
Step 4: Apply Distributive Law. Step 4: Apply Distributive Law.
Step 5: Apply Commutative Law. Step 5: Apply Commutative Law.

33
Problems

1. Find PDNF and PCNF of the following compound proposition using truth
table and Laws of proposition: (p  q )  (p  q ).
Solution: Using Truth Table: Let A= (p  q )  (p  q ).
p q p q  p   q p  q A Min Max
terms terms
T T F F F F T p q -
T F F T T T T p  q -
F T T F T T T p  q -
F F T T T F F - p q

Therefore, PDNF: Sum of Min terms (p  q)  (p   q)  (  p  q).


PCNF: (p  q).
ii) Using Laws of Propositions,
sLet A  (p  q )  (p  q )
 (p  q )  (p  q )
 (p  q)   (p  q)  (p  q) 

PDNF of A  (p  q)  (p  q)  (p  q)


PDNF of A  p  q (Missing terms in PDNF)

PCNF of A is   (  A)   ( p  q )  (p  q).

2. Obtain PCNF and hence PDNF of (P  Q )  (P  R )  (Q  R ).


Solution: Let S  (P  Q )  (P  R )  (Q  R )
P Q R PQ P  R Q  R S Min terms Max terms
T T T T F T T P Q R
T T F T F F T P  Q  R
T F T F F F F P  Q  
R
T F F F F F F P  Q  R
F T T F T T T P  Q  R
F T F F F F F P  Q  R
F F T F T F T P  Q 
R
F F F F F F F P Q R

The PDNF of S is, (P  Q  R)  ( P  Q   R)  (  P  Q  R)  (  P   Q  R)


The PCNF of S is, (  P  Q   R)  (  P  Q  R)  ( P   Q  R)  (P  Q  R).
34
3. Obtain PCNF and hence PDNF of P   P  (Q  (Q  R ))  .
Solution: Let
S  P   P  (Q  (Q  R )) 
 P   P  (Q  (Q  R )) 
 P   P  (Q  (Q  R )) 
 P   P  (Q  R ) 
 P   P  (Q  R ) 
 P  P  Q  R 
 P  P   Q  R
 P Q  R
Therefore, PCNF of S  P  Q  R .
To find: PDNF
PCNF of
S  (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )
 (P  Q  R )  (P  Q  R )  (P  Q  R )
PDNF of
S   (PCNF of S )
 (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )
 (P  Q  R )  (P  Q  R )  (P  Q  R ).
4. Obtain PCNF and hence PDNF of (P  Q )  (P  Q )  (Q  R ) .
Solution: Let
S  (P  Q )  (P  Q )  (Q  R )
 (P  Q  T )  (P  Q  T )  (Q  R  T )  P  T  P 
 (P  Q  (R  R ))  (P  Q  (R  R ))  (Q  R  (P  P ))
 (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )
 (P  Q  R )  (P  Q  R )
PDNF of S  (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )
PDNF of S  (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )
PCNF of
S  (PDNF of S)  (P  Q  R )  (P  Q  R )  (P  Q  R )
.
 (P  Q  R )

35
5. Without constructing the truth table obtain the product-of-sums canonical form of
the formula (P  R )  (Q  P ). Hence find the sum-of products canonical form.
Solution: Let
S  (P  R )  (Q  P )
  (P )  R    (Q  P )  (P  Q ) 
  P  R   ( Q  P )  (  P  Q )
  (P  R )  F    (Q  P )  F    (P  Q )  F 
  (P  R )  (Q  Q )    (Q  P )  (R  R )    (P  Q )  (R  R ) 
 (P  R  Q )  (P  R  Q )  (Q  P  R )  (Q  P  R ) 
( P  Q  R )  (  P  Q   R )
PCNF of
S  (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )  (P  Q  R )
PCNF of S  (P  Q  R )  (P  Q  R )  (P  Q  R )
PDNF of S  (PCNF of S )  (P  Q  R )  (P  Q  R )  (P  Q  R ) .

36
1.7 RULES OF INFERENCE (OR)THEORY OF INFERENCE
.
View the video lecture on YouTube: https://www.youtube.com/watch?v=lh-
iZDxmXPg&list=PLJvIzs_rP6R7v-k_4htOEA8WmqmZzVK4z&index=6

Introduction

Proofs in mathematics are valid arguments that establish the truth of mathematical
statements. By an argument, we mean a sequence of statements that end with a conclusion.
By valid, we mean that the conclusion, or final statement of the argument, must follow from the
truth of the preceding statements, or premises, of the argument. Rules of inference are our
basic tools for establishing the truth of statements.
Here, we will show how rules of inference for propositions and for quantified statements
can be combined. These combinations of rule of inference are often used together in complicated
arguments.

Definition:
An argumentin propositional logic is a sequence of propositions. All but the final
proposition in the argument are called premisesand the final proposition is called the
conclusion. An argument is validif the truth of all its premises implies that the conclusion is
true.

Rules of Inference for Propositional Logic:


Inference theory is concerned with the inferring of a conclusion form certain hypothesis or
basic assumptions called premises by applying certain principles of reasoning called Rules of
Inference.

Table 1:

S.No. Name Rules of Premise Conclusion


Inference
p
1. Modus Ponens pq p, p  q q
q
q
2. Modus Tollens pq q , p  q p
p
pq
Hypothetical q r p  q, q r p r
3.
Syllogism
p  r
pq pq p  q, p q
Disjunctive p q
4.
Syllogism p  q, q p
q p

37
p q
5. Addition p ,q pq
p  q p  q
pq pq p
6. Simplification pq
p q
q
p
7. Conjunction q p ,q pq
p  q
pq
8. Resolution p  r p  q, p  r qr
q  r

VALIDITY USING RULES OF INFERENCE:

Rule P: A Premise may be introduced at any point in the derivation.

Rule T : A formula S may be introduced in a derivation if S is tautologically implied byany oneor


more of the preceeding formulas in the derivation.
Rule CP (Conditional Proof) : If we can derive S from R and a set of premises, then we can
derive R  S from the set of premises alone. It is also called deduction theorem. In such cases
R is taken as additional premise and S is derived from the given premises and R.
Examples

1) State which rule of inference is the basis of the following argument. “It is below freezing
now. Therefore, it is either below freezing or raining now”.
Solution:
Let p be the proposition ‘It is below freezing now’ and q be the proposition ‘It is
raining now’. Then the argument is of the form
p
i.e., Addition rule.
p  q

2) State which rule of inference is the basis of the following argument. “It is below freezing and
raining now. Therefore, it is below freezing now”.
Solution:
Let p be the proposition ‘It is below freezing now’ and q be the proposition ‘It is
raining now’. Then the argument is of the form
pq
i.e., Simplification rule.
p

38
3)State which rule of inference is used in the argument: If it rains today, then we will
not have a barbecue today. If we do not have a barbecue today, then we will have a
barbecue tomorrow.Therefore, if it rains today, then we will have a barbecue
tomorrow.
Solution: Let p: It is raining today;
q: We will not have a barbecue today and
r : We will have abarbecue tomorrow.” Then thisargument is of the form
p  q
q  r
p  r
Hence, this argument is a hypothetical syllogism.

1.8. DIRECT METHOD OF PROOF:

When a conclusion is derived from a set of premises by using the accepted rules
of reasoning, then such a process of derivation is called a direct proof.

1. Demonstrate that R is a valid inference from the premises


P  Q, Q  R and P.
Solution: Premises: P  Q, Q  R , P
Conclusion: R
Steps Premise Reason
1 PQ Rule P
2 Q R Rule P
3 P R Rule T: Hypothetical Syllogism {1,2}
4 P Rule P
5 R Rule T: Modus Ponens {3,4}

2. Prove that ‘t’ is a valid conclusion from the premises


p  q, q r, r  s, s and p  t.
Solution: Premises: p  q, q r, r  s, s and p  t.
Conclusion: t
Steps Premise Reason
1 p  q Rule P
2 q r Rule P
3 p r Rule T: Hypothetical Syllogism {1,2}
4 r  s Rule P
5 p  s Rule T: Hypothetical Syllogism {3,4}
6 s Rule P
7 p Rule T: Modus Ponens {5,6}
8 pt Rule P
9 t Rule T: Disjunctive Syllogism {7,8}

39
3. Show that S  R is tautologically implied by P  Q  P  R    Q  S  .
(or)
Prove that P  Q  P  R    Q  S   S  R.
Solution:
Premises: P  Q , P  R  ,  Q  S  .
Conclusion: S  R

Steps Premise Reason

1 PQ Rule P

2 P  Q Rule T: P  Q   P  Q

3 QS Rule P

4 P  S Rule T: Hypothetical Syllogism {2,3}

5 P R Rule P

6 R  P Rule T: Contra-Positive {5}

7 R  S Rule T: Hypothetical Syllogism {6,4}

8 RS Rule T: R  S  R  S

9 SR Rule T: Commutative law {8}

 S  R is a valid conclusion.

4. Show that R  P  Q is valid conclusion from the premises


P  Q , Q  R  , P  M and M.
Solution: Premises: P  Q ,  Q  R  , P  M and M.
Conclusion: R  P  Q

Steps Premise Reason

1 P M Rule P

2 M Rule P

P Rule T: Modus Tollens {1,2}


3

40
4 PQ Rule P

5 Q Rule T: Disjunctive Syllogism {3,4}


6 Q R Rule P
7 R Rule T: Modus Ponens {5,6}

8 R  P  Q  Rule T: Conjunction {7,4}

 R  P  Q is a valid conclusion.

5. Prove that P  Q  R  S , Q  M  S  N ,  M  N and P  R   P.


Solution:Premises: P  Q  R  S  ,  Q  M  S  N ,  M  N and P  R 
Conclusion: P

Steps Premise Reason

1  P  Q   R  S  Rule P

2 PQ Rule T: Simplification {1}

3 R S Rule T: Simplification {1}

4  Q  M  S  N Rule P

5 QM Rule T: Simplification {4}

6 S N Rule T: Simplification {4}

7 P  R  Rule P

8 P S Rule T: Hypothetical Syllogism {7,3}

9 P N Rule T: Hypothetical Syllogism {8,6}

10  M  N Rule P

11 M  N Rule T: De Morgan’s law {10}

41
12 N  M Rule T: Commutative law {11}

13 N  M Rule T: P  Q   P  Q {11}

14 P  M Rule T: Hypothetical Syllogism {9,13}


15 M  P Rule T: Contra-Positive {14}
16 M Rule T: Simplification {5}
17 P Rule T: Modus Ponens {15,16}

  P is a valid conclusion.
6. Show that the following argument is valid. If today is Tuesday, I have a test in
Mathematics or Economics. If my Economics professor is sick, I will not have a test
in Economics. Today is Tuesday and my Economics professor is sick. Therefore I
have a test in Mathematics.
Solution: Let the proposition be
P: Today is Tuesday
q: I have a test in Mathematics
r: I have a test in Economics
 r : I have not a test in Economics
s: My Economics professor is sick
Premises: p   q  r  , s   r, p  s
Conclusion: q

Steps Premise Reason


1 ps Rule P
2 p Rule T: Simplification {1}

3 s Rule T: Simplification {1}

4 p  q  r  Rule P

5 qr Rule T: Modus Ponens {2,4}

6 s  r Rule P

7 r Rule T: Modus Ponens {3,6}

8 q Rule T: Disjunctive Syllogism {5,7}

42
7. Show that the following hypotheses ‘It is not sunny this afternoon and it is colder
than yesterday’, ‘We will go swimming only if it is sunny’. If we do not go swimming,
then we will take a canoe trip’ and ‘if we take a canoe trip, then we will be home by
sunset’ lead to the conclusion ‘we will be home by sunset’.
Solution: Let the proposition be
P: It is sunny this afternoon
 p : It is not sunny this afternoon
q: Iit is colder than yesterday
r: We will go swimming
 r : We will not go swimming
s: We take a canoe trip
t: We will not take a canoe trip
Premises: p  q, r  p, r  s and s  t
Conclusion: t
Steps Premise Reason
1 p  q Rule P

2 p Rule T: Simplification {1}


3 r p Rule P

4 r Rule T: Modus Tollens {2,3}

5 r s Rule P

6 s Rule T: Modus Ponens {4,5}

7 s t Rule P

8 t Rule T: Modus Ponens {6,7}

CONSISTENCY AND INCONSISTENCY OF PREMISES:


A set of formulas H1, H2..., Hm is said to be inconsistent if their conjunction implies
contradiction. i.e., H1 ∧H2 ∧....... ∧Hm⇔ F

INDIRECT METHOD OF PROOF:

The notion of inconsistency is used in a procedure called indirect method of proof.

Working Rule:
 Introduce Negation of desired conclusion as a new premise.

43
 From the new premise together with the given premises derive a

contradiction.
 Assert the desired conclusion as a logical inference from the premises.

8. Prove that the premises P  Q, Q  R, R  S, S  R and P  S are


inconsistent.

Solution: To prove inconsistency we have to derive a contradiction.

Steps Premise Reason

1 PQ Rule P

2 Q R Rule P
3 P R Rule T: Hypothetical Syllogism {1,2}
4 R S Rule P
5 P S Rule T: Hypothetical Syllogism {3,4}

6 S  R Rule P

7 P  R Rule T: Hypothetical Syllogism {5,6}

8 PS Rule P
9 P Rule T: Simplification {8}
10 S Rule T: Simplification {8}

11 R Rule T: Modus Ponens {7,9}

12 R Rule T: Modus Ponens {3,9 }

13 R  R Rule T: Conjunction {11,12}

14 F Rule T: Negation law {13}

 The given set of premises are inconsistent.


9. Prove that the premises
a  b  c  , d  b  c  , and a  d are inconsistent.

44
Solution:To prove inconsistency we have to derive a contradiction.

Steps Premise Reason


1 ad Rule P
2 a Rule T: Simplification {1}
3 d Rule T: Simplification {1}

4 a  b  c  Rule P
Rule T: Modus Ponens
5 bc {2,4 }
6 d  b  c  Rule P
Rule T: Modus Ponens
7 b  c {3,7 }
8 b Rule T: Simplification {7}
9 c Rule T: Simplification {7}
Rule T: Modus Ponens
10 c
{8,5}
c  c Rule T: Conjunction
11
{9,10}
12 F Rule T: Negation law {11}

 The given set of premises are inconsistent.

10. Show that the following premises are inconsistent.


 If Jack misses many classes through illness, then he fails high school.
 If Jack fails high school, then he is uneducated.
 If Jack reads a lot of books, then he is not uneducated.
 If Jack misses many classes through illness and reads a lot of books.

Solution: Let the proposition be


P: Jack misses many classes through illness
q: Jack fails high school.
r: Jack is uneducated
r : Jack is not uneducated
S: Jack reads a lot of books
Premises: p  q, q  r, s  r and p  s
Conclusion: F

45
Steps Premise Reason
1 pq Rule P
2 qr Rule P
3 p r Rule T: Hypothetical Syllogism {1,2}
4 s  r Rule P
5 r  s Rule T: Contra-Positive {4}
6 p  s Rule T: Hypothetical Syllogism {3,5}
7 ps Rule P
8 p Rule T: Simplification {7}
9 s Rule T: Simplification {7}
10 s Rule T: Modus Ponens {7,9}
11 s  s Rule T: Conjunction {9,10}
12 F Rule T: Negation law {11}

 The given set of premises are inconsistent.


p  s
11. Using indirect method of proof, derive from the premises
p   q  r  , q  p, s  r and p.
Solution:
Premises: p   q  r  , q  p, s  r and p
Conclusion: p  s
Additional premises:   conclution
  p  s 
   p  s 
ps
Steps Premise Reason

1 ps Rule P

2 p Rule T: Simplification {1}

46
3 s Rule T: Simplification {1}

4 p  q  r  Rule P

5 qr Rule T: Modus Ponens {2,4 }

6 s  r Rule P

7 r Rule T: Modus Ponens {3,6 }

8 q Rule T: Disjunctive Syllogism {5,7}

9 q  p Rule P

10 p Rule T: Modus Ponens {8,9}

11 p Rule P

12 p  p Rule T: Conjunction {10,11}

13 F Rule T: Negation law {11}

p  s is a valid conclusion.
12 . Show that R  S can be derived from the premises
P   Q  S  , R  P and Q.

Solution: Premises: P   Q  S  , R  P and Q


Conclusion: R  S
Additional premises: R

Steps Premise Reason

1 R Rule P (Additional premise)

2 R  P Rule P

3 R P Rule T: Conditional law {2}

4 P Rule T: Modus Ponens {1,3}

5 P  Q  S Rule P

6 QS Rule T: Modus Ponens {4,5}

47
7 Q Rule P

8 S Rule T: Modus Ponens {6,7}

9 R S Rule CP

∴ 𝑅 → 𝑆 is a valid conclusion.

13.Show that the hypothesis ’ If you send me an e-mail message then I will finish
writing the program’, If you do not send me an e-mail message, then I will go to
sleep early’ and if I go to sleep early, then I will wake feeling refreshed’ lead to the
conclusion ‘if I do not finish writing the program, then I will wake feeling refreshed’.
Solution: Let the proposition be
P: you send me an e-mail message
 p : you do not send e-mail message
q: I will finish writing the program
 q : I will not finish writing the program
r: I will go to sleep early
s: I will wake up feeling refreshed
Premises: p  q, p  r, r  s
Conclusion:  q  s
Additional premises:  q

Steps Premise Reason

1 q Rule P (Additional premise)

2 pq Rule P

P Rule T: Modus Ponens {1,2}


3

4 p  r Rule P
Rule T: Modus Ponens {3,4}
5 r

6 r s Rule P
Rule T: Modus Ponens {5,6}
7 s

8 q  s Rule CP

 q  s is a valid conclusion.

48
14.Show that the following argument is valid. If Mohan is a lawyer then he is ambitious. If

Mohan is early riser then he does not like idlies. If Mohan is ambitious, then he is an

early riser. Then ‘if Mohan is a lawyer, then he does not likeidlies.

Solution: Let the proposition be

P: Mohan is a lawyer

q: Mohan is ambitious

r: Mohan is an early riser

s: Mohan like idlies

 s : Mohan does not like idlies

Premises: p  q, r   s, q  r

Conclusion: p  s

Additional premises: p

Steps Premise Reason

1 p Rule P (Additional premise)

2 pq Rule P

3 q Rule T: Modus Ponens {1,2}

4 qr Rule P

5 r Rule T: Modus Ponens {3,4}

6 r  s Rule P

7 s Rule T: Modus Ponens {5,6}

8 p  s Rule CP

49
1.9 PREDICATES AND QUANTIFIERS
View the Video Lecture on YouTube:
https://www.youtube.com/watch?v=JpnsHllI7hE&list=PLJvIzs_rP6R7v-
k_4htOEA8WmqmZzVK4z&index=7

Introduction
In mathematics and computer programs, we encounter statements
involving variables such as " x >10", "x = y + 5" and "x + y = z". These
statements are neither true nor false, when the values of the variables are not
specified.
The statement " x is greater than 10" has 2 parts. The first part, the variables
x, is the subject of the statement. The second part “is greater than 10” which
refer to the property that the subject can have, is called predicate. We can
denote the statement “x is greater than 10” by the notationP(x) where P
denotes the predicate “is greater than 10” and x is a variable.
Predicate
A part of a declarative sentence that attributes a property to the subject.
In otherwords, A predicate is a sentence depending on variables which
becomes a statement upon substituting values in the domain.
Propositional function
The combination of a variable and a predicate is called propositional
function and it is denoted by P(x)
Once a value has been assigned to a variable x then P(x) becomes a
proposition and has a truth value.
Example 1. Let P(x) denote the statement " x >3 ". What are the truth values
of P(4) and P(2)
Solution P(x) : x >3
P(4) : 4 >3 which is true
P(2) : 2 >3 which is false
Example 2. Let Q(x, y) denote "x = y + 3" what are the truth values of the
proposition Q(1,2) and Q(3,0)
Solution Q(x, y) : x = y + 3
Q(1,2) : 1 = 2 + 3 ⟹1 = 5 which is false
Q(3,0) : 3 = 0 + 3 ⟹3 = 3 which is true

50
Example 3. Let R(x, y, z) denote "x + y = z" what are the truth values for the
proposition R 1,2,3 , R(0,1,1), R(−2, −1,4)
Solution R(x, y, z) : x + y = z
R(1, 2, 3) : 1+ 2 = 3 ⟹ 3 = 3 which is true
R(0,1, 1) : 0+ 1 = 1 ⟹ 1 = 1 which is true
R(−2, −1, 4) : −2 − 1 = 4⟹ − 3 = 4which is false
Note: The logic based on the analysis of predicates in any statement is called
predicate logic or predicate calculus.
Universe of discourse
The universe of discourse is a particular domain which specifies the possible
values of the variable x

Quantification
To create a proposition from a propositional function is called a quantification
There are two types namely (i) Universal quantification and (ii) Existential
quantification

(i) Universal Quantifers


Let P(x)be a propositional function. “For every x” or “for all x” is called
the universal quantifier and is denoted by ∀x or x . ∀ xP(x)means that
the proposition is true for all x .
The notation ∀ xP(x) denote universal quantification of P(x). In English
the word All, for all, each, every, everything are used in universal
quantification

(ii) Existential Quantifier


Let P(x) be a propositional function. “There exists a x” or “There exists
some x” is called as the existential quantifier and is denoted by ∃x.
∃xP(x)means that the proposition is true for some x.

51
The notation ∃xP(x) denote existential quantification of P(x). In English the
word some, few, there is, there exist atleast one are used in universal
quantification
Example1.Consider “all scents have pleasant fragrance”.
Solution: x S(x)
Let S(x) : x is a scent.
F(x) : x has pleasant fragrance.
∀x S x ⟶ F x .

Example2. Some students are intelligent.


Solution Let S x : x is a student.
I x : 𝑥 is intelligent.
∃x S x ∧ F x is the symbolic representation of the given statement.

Note: ∃x is the negation of ∀x and


∀x is the negation of ∃x.
The meaning is ‘there is some y whom x likes and it is true for all x ’.

Therefore the universe for this proposition is the set of all people.
Negation of a Quantified Expression
If P x is the statement “x has taken a course in Calculus”, Then ∀xP x
means that “every student in the class has taken a course in Calculus”. The
negation of this statement is “It is not the case that every students in the class
has taken a course in Calculus” or equivalently “There is a student in the class
who has not taken a course in Calculus” which is denoted by ∃x ~ P x . Thus
we see that ~∀xP x ≡ ∃x ~ P x
Similarly, ∃x P x means that “there is a student in the class who has
take a course in Calculus”. The negation of this statement is “Every student in
this class has not taken a course in Calculus” which is denoted by ∀x ~ P x .
Thus we get ~ ∃x P x ≡ ∀x~P x

52
Thus the negation of a Quantified Expression is
(i) ~∀xP x ≡ ∃x ~ P x and (ii) ~ ∃x P x ≡ ∀x~P x

Nested Quantifiers
Two quantifiers are nested if one is within the scope of the other such as ∀x ∃y x +
y =0

Problem1.Translate the following into a logical expression


i. The Sum of two positive integers is always positive.
ii. Every real number except zero has a multiplicative inverse
iii. The product of a positive real number and a negative real number is always a
negative real numbers
Solution
i. ∀x ∀y x > 0 ∧ y > 0 → x + y > 0 or ∀x ∀y x + y > 0
ii. ∀x x ≠ 0 → ∃y xy = 1
iii. ∀x ∀y x > 0 ∧ y < 0 → xy < 0

Problem2.Translate the following into logical expression (symbolic form)


Every student in this class has studied calculus
Solution
S x : x is a student in this class
C x : x has studied Calculus.
The statement is
“For every person x, if person x is a student in this class then x has studied Calculus”
Symbolic form: ∀x S x ⟶ C(x)

53
Problem 3.Translate the following into logical expression (symbolic form)
(i) Some student in this class has visited Mexico
(ii) Every student in this class has visited either Canada or Mexico
Solution
S x : x is a student in this class
M x : x has visited Mexico
C x : x has visited Canada
Symbolic form (i) ∃x S x ∧ M x
(ii) ∀x S x → C x ∨ M x
Free and Bounded Variables

When a quantifier is used on a variable x or when we have to assign a value


to this variable to get a proposition, the occurrence of the variable is said to be
bound or the variable is said to be a bound variable. An occurrence of a variable
that is not bound by a quantifier or that is set equal to a particular value is said to
befree.

The part of the logical expression or predicate formula to which a quantifier is


applied is called the scope of the quantifier.

Example 1. ∀x P x, y , x is bound by ∀x and y is said to be free and the scope of


the quantifier is P x, y

Example 2. ∃x P x ∧ Q x ∀x R x ,all variables are bound, the scope of the


quantifier is P x ∧ Q x , R x

Example 3. ∀x P x → ∃y R x, y , All variables are bounded, the scope of ∃y is


R x, y ,The scope of ∀x is P x → ∃y R x, y

Example 4. ∃x P x ∧ Q(x), x is free in Q(x) and the scope of ∃x is P x

Example 5. ∀x P x → Q x , x is bounded and the scope of ∀x is P x → Q x

54
1.10 INFERENCE THEORY OF PREDICATE CALCULUS
Derivations of formal proof in predicate calculus are done mostly in the same
way as in statement calculus, using implications and equivalences, provided that the
statement formulas are replaced by predicate formulas. Also the three basic rules P, T
and CP of Inference theory used in statement calculus can also be used in predicate
calculus. Moreover, the indirect method of proof can also be used in predicate
calculus.
Apart from the above rules of inference, we require certain additional rules to
deal with predicate formulas involving quantifiers. If it becomes necessary to eliminate
the quantifiers during the course of derivation, we require two rules of specification,
called US and ES rules. Once the quantifiers are eliminated, the derivation is similar to
that in statement calculus. If it becomes necessary to quantify the desired conclusion,
we requir two rules of generalisation, called UG and EG rules
Rules of Inference for Quantified Statement

S.
Rule Inference
No

∀x P(x)
1 Universal Specification (US) ∴ 𝑃 c for an arbitrary ′c′

∃x P(x)
2 Existential Specification (ES) ∴ 𝑃 c for some element ′c′

𝑃 c for an arbitrary ′c′


3 UniversalGeneralization (UG)
∴ ∀x P(x)

𝑃 c for some element ′c′


4 Existential Generalization (EG) ∴ ∃x P(x)

Problems:
1. Show that “All men are mortal”, “Socrates is a man” . Therefore Socrates is a mortal
Solution
Let us use the notations H(x) : x is a man

55
M(x) : x is a mortal
s : Socrates
With these symbolic notations, the problem becomes
∀x ((H(x) → M(x)) ∧ H(s) ⟹ M(s)
The derivation of the proof is as follows:
Step Statement Reason
1 ∀x ((H(x) → M(x)) Rule P
2 H(s) → M(s) 2, US
3 H(s) Rule P
4 M(s) T,2,3, Modus ponens

2. Show, by indirect method of proof, that ∀x P x ∨ Q x ⟹ (∀x P x) ∨ (∃x Q x)


Let us assume that ∼ (∀x P x) ∨ (∃x Q x) as an additional premise and prove a
contradiction
Solution
Step Statement Reason
1 ∼ (∀x P x) ∨ (∃x Q x) Rule P(additional)
2 ∼ (∀x P x) ∧∼ (∃x Q x) 1, De Morgan’s law
3 ∼ (∀x P x) 2, Simplification
4 ∼ (∃x Q x) 2, Simplification
5 ∃x ∼ P x 3, negation
6 ∀x ∼ Q x 4, negation
7 ∼P a 5, ES
8 ∼Q a 6, US
9 ∼P a ∧∼ Q a 7,8, conjuction
10 ∼ (P a ∨ Q a ) 9, De Morgan’s law
11 ∀x P x ∨ Q x Rule P
12 P a ∨Q a 11, US
13 P a ∨ Q a ∧ ∼ (P a ∨ Q a ) 10,12, conjunction
14 False 13, contradiction

56
3. Prove that ∀x P x → Q y ∧ R x , ∃xP x ⟹ Q y ∧ ∃x P x ∧ R x
Solution
Step Statement Reason
1 ∀x P x → Q y ∧ R x Rule P

2 P z → Q y ∧R z 1, US
3 ∃xP x Rule P
4 Pz 3, ES
5 Q y ∧R z 2,4, Modus ponens
6 Qy 5, Simplification
7 Rz 5, Simplification
8 P z ∧R z 4, 7, conjunction
9 ∃x P x ∧ R x 8, EG
10 Q y ∧ ∃x P x ∧ R x 6,9, conjunction

4. Show that the conclusion ∀x P x → ∼ Q x from premisis


∃x P x ∧ Q x → ∀y R y → S y and ∃y R y ∧ ∼ S y
Solution
Step Statement Reason
1 ∃y R y ∧ ∼ S y Rule P
2 R a ∧∼S a 1, ES
3 ~ R a →S a 2, equivalence
4 ∃y ~ R y → S y 3, EG

5 ~ ∀y R y → S y 4, negation equivalence
6 ∃x P x ∧ Q x → ∀y R y → S y Rule P
7 ~ ∃x P x ∧ Q x 5,6, modus tollens
8 ∀x ~ P x ∧ Q x 7, negative equivalence
9 ~ P b ∧Q b 8, US
10 ~P b ∨ ~Q b 9, De Morgan’s law
11 P b → ~Q b 10, equivalence
12 ∀x P x → ∼ Q x 11, UG

57
5. Show that the premises “Everyone in this discrete mathematics class has taken
a course in computer science” and “ Mala is a student in this class imply the
conclusion “ Mala has taken a course in computer science”
Solution
P x : x is a student in this discrete mathematics class
P c : Mala is a student in this class
C x : x has taken a course in computer science
C c : Mala has taken a course in computer science
Given premises ∀x P x → C x , P c
Conclusion: C c
Step Statement Reason
1 ∀x P x → C x Rule P
2 P c → C c 1, US
3 P c Rule P
4 C c 2,3, Modus ponens

6. Show that ∀x P x ⟶ Q(x) ⋀ ∀x Q x ⟶ R(x) ⟹ ∀x P x ⟶ R(x)


Solution
Rewrite the question as ∀x P x ⟶ Q(x) , ∀x Q x ⟶ R(x) ⟹ ∀x P x ⟶
R(x)

Step Statement Reason

1 ∀x P x ⟶ Q(x) Rule P

2 P a ⟶ Q(a) Rule US, 1, a is arbitary

3 ∀x Q x ⟶ R(x) Rule P

4 Q a ⟶ R(a) Rule US, 3, a is arbitary


5 P a ⟶ R(a) 2,4, Hypothetical Syllogism

6 ∀x P x ⟶ R(x) 5, UG

58
7. Using CP or otherwise obtain the following implication
∀x P x ⟶ Q(x) , ∀x R x ⟶∼ Q(x) ⟹ ∀x R x ⟶∼ P(x)
Solution
Step Statement Reason
1 ∀x P x ⟶ Q(x) Rule P
2 P a ⟶ Q(a) 1, US
3 ∀x R x ⟶∼ Q(x) Rule P
4 R a ⟶∼ Q(a) 3, US
5 Q a ⟶∼ R(a) 4, contrapositive
6 P a ⟶∼ R(a) 2,5, Hypothetical Syllogism
7 R a ⟶∼ P(a) 6, contrapositive
8 ⟹ ∀x R x ⟶∼ P(x) 7, UG

8. Prove that ∃x M x follows logically from the premises ∀x H x ⟶ M(x) and


∃x H x
Solution
Step Statement Reason
1 ∃x H x Rule P

2 H a 1, ES
3 ∀x H x ⟶ M(x) Rule P
4 H a ⟶ M(a) 3, US
5 M(a) 2,4, modus ponens
6 ∃x M x 5, EG

59
9. Prove that ∃x P x ⋀ Q(x) ⟹ ∃x P x ∧ ∃x Q x
Solution
Step Statement Reason
1 ∃x P x ⋀Q(x) Rule P

2 P a ⋀Q(a) T1, ES, a is fixed


3 P(a) 2, Simplification
4 Q(a) 3, Simplification
5 ∃x P x 3, EG
6 ∃x Q x 4, EG
7 ∃x P x ⋀∃x Q x T, 5,6, conjunction

10. Prove that ∃x P x ⋀ S(x) , ∀x P x ⟶ R(x) ⟹ ∃x R x ⋀ S(x)


Solution
Step Statement Reason
1 ∃x P x ⋀S(x) Rule P

2 P a ⋀S(a) T1, ES, a is particular


3 S(a) 2, Simplification
4 ∀x P x ⟶ R(x) Rule P
5 P a ⟶ R(a) T4,US
6 Pa 2, Simplification
7 R(a) 5,6, modus ponens
8 R(a) ∧ S(a) 3,7, conjunction
9 ∃x R x ∧ S(x) 8, EG

60
11. By indirect method, prove that ∀x P(x) → Q(x) , ∃x P(x) ⟹ ∃x Q(x)
Solution
We assume that contrary and come to contradiction
Assume ∼ (∃x Q(x))
Step Statement Reason
1 ∃x P(x) Rule P
2 P(a) 1,ES, a is particular
3 ∼ (∃x Q(x)) Rule P
4 ∀x~Q(x) 3, negation
equivalence
5 ~Q(a) 4,US
6 ∀x P(x) → Q(x) Rule P
7 P(a) → Q(a) 6, US
8 P(a)⋀~Q(a) 2,5, conjunction
9 ~ ~P(a ∨ Q(a)) 8, demorgan law
10 ∼ (P(a) → Q(a)) 9, logical equivalences
11 (P a → Q a ) ∧∼ (P(a) 7,10, conjunction
→ Q(a))
12 False 11, negation law
Thus we come to a contradiction.
12. Show that the premises “ One student in this class knows how to write programs in
Java” and “everyone who knows how to write programs in Java can get high paying job”
imply the conclusion someone in this class can get a high paying job.
Solution
Let 𝐶 x : x is in the class
𝐽 x : x knows Java programming
𝐻 x : x can get a high paying Job
Then the given premises are ∃x C(x ⋀ J(x)) and ∀x J(x → H(x))
Therefore the conclusion is ∃x C(x ⋀ H(x))

61
Step Statement Reason
1 ∃x C(x ⋀J(x)) Rule P
2 C a ⋀ J(a) 1, ES
3 C(a) T,2, Simplification
4 J(a) T,2, Simplification
5 ∀x J(x → H(x)) Rule P

6 J(a) → H(a) T,5, US


7 H(a) T,4,6, modus ponens
8 C a ⋀ H(a) T,3,7, conjunction
9 ∃x C(x H(x)) 8, EG

13. Show that ~𝑃 𝑎, 𝑏 follows logically from ∀𝑥∀𝑦 𝑃(𝑥, 𝑦) → 𝑊(𝑥, 𝑦) and
~𝑊 𝑎, 𝑏
Solution

Step Statement Reason


1 ∀𝑥∀𝑦 𝑃(𝑥, 𝑦) → 𝑊(𝑥, 𝑦) Rule P
2 ∀𝑦 𝑃(𝑎, 𝑦) → 𝑊(𝑎, 𝑦) 1,Universal Specification
3 𝑃(𝑎, 𝑏) → 𝑊(𝑎, 𝑏) 2, Universal Specification
4 ~𝑊(𝑎, 𝑏) → ~𝑃(𝑎, 𝑏) T,3,Contraposition
5 ~𝑊(𝑎, 𝑏) Rule P
6 ~𝑃(𝑎, 𝑏) Rule T,4,5, modus ponens

14. Show that ∀x P(x ∨ Q(x)), ∀𝑥 P(x ⟹ ∃x Q(x)


Solution
Step Statement Reason
1 ∀x P(x ∨ Q(x)) Rule P
2 P(c ∨ Q(c) 1, US
3 ∀𝑥 P(x ) Rule P
4  P(c ) 3, US
5 Q(c) 3, 4, Disjunctive Syllogism
6 ∃xQ(x) 5, EG

62
15. To show that the premises “ A student in this class has not read the book” and
“Everyone in this class passed the first exam” imply the conclusion “Someone
Who passed the first exam has not read the book”
Solution

P(x): x is a student in this class


Q(x): x has read the book
R(x): x passed the first exam

Premises: ∃x P(x ∧  Q(x)), ∀x P(x) → R(x)


Conclusion: ∃x R(x ∧  Q(x))

Step Statement Reason

1 ∃x P(x ∧  Q(x)) Rule P

2 P c ∧  Q(c) 1, ES

3 P c 2, Simplification

4 ∀x P(x) → R(x) Rule P

5 P(c) → R(c) 4, US

6 R(c) 3,5, modus ponens

7  Q(c) 2, Simplification

8 R c ∧  Q(c) 6,7, conjunction

9 ∃x R(x ∧ Q(x)) 8, EG

63
1.11 INTRODUCTION TO PROOFS

Proof: A proof is a valid argument that establishes the truth of a mathematical


statement.
Theorem: A theorem is a statement that can be shown to be true

1.11.1 Direct Proofs: A direct proof shows that a condiditonal statement


𝑝 → 𝑞 is true by showing that if 𝑝 is true then 𝑞 must also be true

1.11.2 Proof by contraposition (or) Proof by contra positive


(or) indirect proof:
In proof by contraposition of 𝑝 → 𝑞 we take 𝑞 as a hypothesis and using axioms,
definition together with rules of reference show that 𝑝 must follow

1.11.3 Vacuous Proof


To show that 𝑝 is false that proof is called vacuous proof of the conditional
statement.

1.11.4 Trivial Proof: A proof of 𝑝 → 𝑞 that uses the fact 𝑞 is true is called a
trivial proof

1.11.5 Proof by contradiction:


In proof by contraiction of 𝑝 → 𝑞 assume 𝑞 → 𝑝 to show that 𝑝 is true

1.11.6 Proofs of equivalence:


To prove a theorem that is biconditional statement, that is a statement of the form
𝑝 ↔ 𝑞 we show that 𝑝 → 𝑞 and 𝑞 → 𝑝 are both true

1.11.7 Counter examples:


A statement of the form ∀x P(x) is false we need only find a counterexample, that
is an example x for which P(x) is false.

64
Problems

1. Prove that 2 is irrational by giving a proof by contradiction

Solution:𝑝 : 2 is irrational

To start a proof by contradiction (ie) 𝑝 is true (ie) 2 is rational


Now we have to show that 𝑝 is true leads to a contradiction
a
If 2 is rational there exist integers′a′ and ′b′ the 2 = b → (1)

where a and b do not have common factor


a 2
Now 2 = squaring (1)
b

2b2 = a2 which gives a2 is even


a2 is even implies a is even then a = 2c
2b2 = 2c 2
= 4c2 ⟹ b2 = 2c2 that means b2 is even
Again using the fact that if the square of an integer is even then the
integer must be even ∴ b is even
a
2=
b
′a′ and ′𝑏′ have common number ‘2’ which gives the contradiction to (1)

∴ our assumption 2 is rational is wrong. Hence 2 is irrational


2. Prove that if n is a positive integer then n is odd if and only if 5n + 6 is odd.
Solution: Case i: Assume n is odd.
Let n = 2k + 1 where k is a positive integer
 5n + 6 = 5(2k + 1) + 6
= 10k + 11 = 2(5k + 5) + 1 which is an odd number.
Hence if n is odd then 5n + 6 is odd
Case ii: To prove the converse
Let n be even. i.e n = 2k where k is a positive integer.
Then 5n + 6 = 5(2k) + 6 = 2 (5k + 3) which is always even.
Thus 5n + 6 is odd if and only if n is odd.

65
3. Prove that square of an even number is an even number by (i) direct method
(ii) indirect method and (iii) proof by contradiction
Solution:
Direct proof: (p  q)
Let n be even i.e. n = 2k, where k is an integer.
n2 = (2k) 2 = 4k2 = 2 (2k2) = an even number.

Indirect proof: ( q  p )
To prove that if n is odd then n2 is odd
Let n be odd. i.e. n = 2k – 1
 n = (2k – 1)2 = 4k2 – 4k + 1
2

= 2(2k2 – 2k) + 1 = odd number


Hence if n is odd then n2 is odd. Or if n is even then n2 is even.

Proof by contradiction: Let q be F then if p  q is T implies p is F or p is T.


Assume n2 to be even when n is odd. But if n is even we have proved that n 2 is
even by the indirect method. Hence if n2 is even then n is even and our
assumption that n2 is even when n is odd is wrong. So, if n is even then n 2 is
even.

4. Prove that proposition P(0), where P(n) is the proposition “ If n is a positive


integer greater than 1, then n2 > n". What kind of proof you use
Solution: Proposition P(0) is the implication “If 0 > 1, then 02 > 0”.
Since the hypothesis 0 > 1 is false, the implication P(0) is automatically true.
We have used Vacuous Proof to the above problem.

5. Let P(n) be “If a and b are positive integers with a ≥ b, then a𝑛 ≥ b𝑛 . Show
that the proposition P 0 is true
Solution: Proposition P(0) is the implication “If a ≥ b, then a0 ≥ b0
Since a0 = b0 = 1, the conclusion of P(0) is true. Hence P(0) is true (using
trivial proof)

66
1.12 PROOF METHODS AND STRATEGY

Proof methods are

(i) Proof by cases


𝑝 ≡ 𝑝1 ∨ 𝑝2 ∨ 𝑝3 … .∨ 𝑝𝑛
(𝑝 → 𝑞) ⟷ 𝑝1 → 𝑞 ∧ 𝑝2 → 𝑞 ∧ 𝑝3 → 𝑞 ∧ … 𝑝𝑛 → 𝑞
A proof by cases must cover all possible cases that arise in a theorem

(ii) Exhaustive proof (Special type of proof by cases)


Some theorem can be proved by examining a relatively small number
of examples. Such proofs are called exhaustive proofs

(iii) Leveraging proof by cases

(iv) Existence proof


There are two types of existence proof namely
(a)Constructive existence proof and
(b) non constructive existence proof

(a)Constructive existence : A proof that an element with a specified property


exists that explicitly finds such an element

(b) non constructive existence proof : A proof that an element with a specified
property exists that does not explicitly find such an element.

(v) Uniqueness Proof: A proof that there is exactly one element satisfying a
specified properly.
The two parts of uniqueness proof are Existence and Uniqueness. In
Existence we need to show that an element x with the desired property
exists and In Uniqueness we need to show that if y ≠x, the y does not have
desired property

Proof Strategies are


(i) Forward Reasoning
(ii) Backward Reasoning
(iii) Adapting existing proof

67
Problems
1. Prove that if 𝑛 is an integer, then 𝑛2 ≥ 𝑛
Solution: Consider three cases 𝑖 𝑛 = 0, 𝑖𝑖 𝑛 ≤ −1, 𝑖𝑖𝑖 𝑛 ≥ 1
Case 𝒊 : 𝒏 = 𝟎
02 = 0 so 02 ≥ 0 It follows 𝑛2 ≥ 𝑛 is true
Case 𝒊𝒊 : 𝒏 ≤ −𝟏
𝑛2 ≥ 0 It follows 𝑛2 ≥ 𝑛 is true
Case 𝒊𝒊𝒊 : 𝒏 ≥ 𝟏
𝑛. 𝑛 ≥ 1. 𝑛 ⟹ 𝑛2 ≥ 𝑛 It follows 𝑛2 ≥ 𝑛 is true
Since 𝑛2 ≥ 𝑛 holds good for all three cases, we can conclude that if 𝑛 is an
integer, then 𝑛2 ≥ 𝑛

2. Prove that 𝑛 + 1 3
≥ 3𝑛 if 𝑛 is a positive integer with 𝑛 ≤ 4
Solution:Using Exhaustive proof we can verify for 𝑛 = 1, 2, 3, 4
𝑛 =1, 1+1 3
≥ 31 gives 8 ≥ 3 which is true
𝑛 =2, 2+1 3
≥ 32 gives 27 ≥ 9 which is true
𝑛 =3, 3+1 3
≥ 33 gives 125 ≥ 81 which is true
Therefore, 𝑛 + 1 3
≥ 3𝑛 if 𝑛 is a positive integer with 𝑛 ≤ 4

3. Show that there is apositive integers that can be written as the sum of cubes
of positive integers in two different ways
Solution:
Using constructive existence proof, we have 1729 = 103 + 93 = 123 + 13

4. Show that there exist irrational numbers x and y such that x 𝑦 is rational
Solution:We know that 2 is irrational
2 2 2
Consider 2 , if 2 is irrational then let x = 2 and 𝑦 = 2
2
2 2
So that x 𝑦 = 2 = 2 =2

68
5. To prove that 3 is irrational
Solution:We know that 3 is irrational
Assume𝑝: 3 is irrational
To start a proof by contradiction (ie) 𝑝 is true (ie) 3 is rational
Now we have to show that 𝑝 is true leads to a contradiction
a
If 3 is rational there exist integers′a′ and ′b′ the 3 = → (1)
b
where a and b do not have common factor
a 2
Now 3 = squaring (1)
b
3b2 = a2
Since 3 is a factor of a2 , 3 is a factor of a
Further more, since 3 is a factor of a
9 is a factor of a2 which means 9 is a factor of 3b2
⟹ 3 is a factor of b2 (ie) 3 is a factor of b
This makes 3 is a factor of both a and b, which is a contradiction to (1).
∴ our assumption that 3 is rational is wrong. Hence 3 is irrational.
Hence to prove 3 is irrational we have adapted the existing proof 2 is irrational
Generally, 𝑛 is irrational whenever 𝑛 is a positive integer that is not a perfect
square

69
1.13 PRACTICE QUIZ

1) Which of the following propositions is tautology?


a. (p v q)→q
b. p v (q→p)
c. p v (p→q)
d. Both (b) & (c)

2) The proposition p∧(~ p v q) is


a. A tautology
b. A contradiction
c. Logically equivalent to p ∧ q
d. All of above

3) Which of the following is/are tautology?

a. a v b → b ∧c
b. a ∧ b →( b v c)
c. a v b → (b → c)
d. None of these

4) The truth value of( 4+3=7) v(5 is not prime)

a. True
b. False

5) Negation of statement (A ∧ B) → (B ∧ C) is _____________

a. (A ∧ B)∧ ¬(B ∧ C)
b. ¬(A ∧ B) v ( B v C)
c. ¬(A →B) →(¬B ∧ C)
d. None of the mentioned
s

70
6) What is the contrapositive of the conditional statement? “The home team
misses whenever it is drizzling?”
a. If it is drizzling, then home team misses
b. If the home team misses, then it is drizzling
c. If it is not drizzling, then the home team does not misses
d. If the home team wins, then it is not drizzling

7) Which of the following is not a declarative statement?


a. It's right
b. He says
c. 2 may not be an even integer
d. I love you

8) P → (Q → R) is equivalent to
a. (P ^ Q) → R
b. (P v Q) → R
c. (P v Q) → ˥R
d. None of these

9) Which of the following are tautologies?


a. ((P v Q) ^ Q)
b. ((P v Q) ^ ˥P) → Q
c. ((P v Q) ^ P) → P
d. Both (a) & (b)

10)What are the inverse of the conditional statement “ A positive integer is a


composite only if it has divisors other than 1 and itself.”
a. “A positive integer is a composite if it has divisors other than 1 and itself.”
b. “If a positive integer has no divisors other than 1 and itself, then it is not
composite.”
c. “If a positive integer is not composite, then it has no divisors other than 1
and itself.”
d. None of the mentioned

71
1.14 ASSIGNMENT 1 Statement Calculus

1. Prove that (P→Q)(R→Q)  (PR)→Q.


2. Find PCNF and PDNF of (P  R)  (Q  P) .

3. Obtain the PDNF and PCNF of the statement (P  R)  (Q  P) .

4. Without using truth table find PCNF and PDNF of


P  (Q  R)  (P  (Q  R)) .

5. Show that R   P  Q  is a valid conclusion from the premises

P  Q, Q  R, P  M , M .

6. Obtain the PDNF and PCNF of the statement P(P→(Q(Q→R))).


7. Using indirect method of proof derive P  (S ) follows from the premises
P  (Q  R), Q  P, S  R and P .

ASSIGNMENT 2 Predicate Calculus


1. Prove that (x)( p( x)  q( x))  (x) p( x)  (x)q( x) using indirect method.

2. Establish the validity of the argument “All integers are rational numbers. Some
integers are of powers of 3. Therefore, some rational numbers are powers of 3”
3. Verify the validity of the argument. “Every living thing is a plant or an animal.
John’s gold fish is alive and it is not a plant. All animals has hearts. Therefore ,
John’s Gold fish has a heart
4. Verify the validity of the argument. If one person is more successful than
another, then he has worked harder to deserve success. Ram has not worked
harder than Siva. Therefore, Ram is not more successful than Siva
5. Verify the validity of the argument. “Every living thing is a plant or an animal.
John’s gold fish is alive and it is not a plant. All animals has hearts. Therefore ,
John’s Gold fish has a heart.
6. Use the rules of inference to show that the hypothesis "If it does not rain or if it
is not foggy , then the sailing race will be held and the lifesaving demonstration
will go on", " If the sailing race is held , then the trophy will be awarded " and "
The trophy was not awarded " imply the conclusion " It rained".

72
Part A – Q & A (with K level and CO)

S.No Question & Answer K CO


Le
ve
l
1. Get the contra positive of the statement “If it is raining K2 CO1
then I get wet”.
Solution: Let p : It is raining and
q : I get wet
Given p → q. Its contra positive is given by ~q →~ p
That is “If I don’t get wet then it is not raining”.
2. Write the negation of the statement “If there is a will, K1 CO1
then there is a way”.
Solution: Let p :There is a will and
q : There is a way
Given p  q  p  q .
Its negation is given by p  q
So, the negation of the given statement is “There is a will
and there is no way”.
3. When do you say that two compound propositions are K1 CO1
equivalent?
Solution: Two statement formulas A and B are equivalent iff
A⟺B or A  B is a tautology. It is denoted by the symbol
A⟺B which is read as “A is equivalence to B”.
4. Define Compound statement formula. K1 CO1
Solution: An expression consisting of simple statement
functions (one or more variables) connected by logical
Connectives are called a compound statement.
5. Write the truth table for the formula ( p  q )  (  p   q) K1 CO1
Solution:

𝑝 𝑞 ~𝑝 ~𝑞 𝑝∧𝑞 ∽ 𝑝 ∧∽ 𝑞 𝑝 ∧ 𝑞 ∨ ∽ 𝑝 ∧∽ 𝑞

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

73
S.N Question & Answer K C
o Leve O
l
6. Define Direct Proof. K1 CO
Solution: When a conclusion is derived from a set of 1
premises by using the equivalence rule and implication rule,
then the process of derivation is called a direct proof.
i.e If 𝐻1 , 𝐻2 , 𝐻3 … … 𝐻𝑚 are premises and 𝐶 is the conclusion
the principle involved in direct proof
𝐻1 ∧ 𝐻2 ∧ 𝐻3 ∧ … … ∧ 𝐻𝑚 ⇒ 𝐶.
7. “If the Labour market is perfect, then the wages of all K2 CO
person in a particular employment are equal. But it is 1
a case that wages for such persons are not equal.
Therefore the Labour market is not perfect”. Test the
validity of the argument.
Solution: Let P : Labour market is perfect.
𝑄 ∶ Wages of all persons in a particular
employment
Premises: 𝑃 → 𝑄 , ~𝑄 Conclusion: ~𝑃
Steps Premises Reason

1. 𝑃→𝑄 Rule P

2. ~𝑄 Rule P
3. ~𝑃 Rule T, {1,2},Modus Tollens

8. Define Indirect method. K1 CO


Solution: For doing indirect method introduce the negation 1
of the conclusion as a additional premise and from the
additional premise together with the given premises derive
conclusion as contradiction.
i.e., If 𝐻1 , 𝐻2 , 𝐻3 … … 𝐻𝑚 are premises and 𝐶 is the conclusion
the principle involved in indirect proof ~𝐶 ∧ (𝐻1 ∧ 𝐻2 ∧ 𝐻3 ∧
… … ∧ 𝐻𝑚 ) ⇒ 𝐹 where 𝐹 is a contradiction.
9. Give an indirect proof of ~𝑷 ∧ ~𝑸 ⇒ ~ 𝑷 ∧ 𝑸 . K2 CO
Solution: We introduce ~(~ 𝑃 ∧ 𝑄 ) as an additional 1
premise and show that the additional premise leads to a
contradiction.
Steps Premises Reason
1. ~(~ 𝑃 ∧ 𝑄 ) Rule P,Additional Premise
2. 𝑃∧𝑄 Rule T [~(~𝑃)) ⇔ 𝑃]
3. 𝑃 Rule T, {2}[𝑃 ∧ 𝑄 ⇒ 𝑃]
4. ~𝑃 ∧ ~𝑄 Rule P
5. ~𝑃 Rule T, {4}, [𝑃 ∧ 𝑄 ⇒ 𝑃]
6. 𝑃 ∧ ~𝑃 ≡ 𝐹 Rule T,{3,5},[𝑃, 𝑄 ⇒ 𝑃 ∧ 𝑄]

74
S.N Question & Answer K C
o Leve O
l
10. Define Conditional proof. K1 CO
Solution:If the conclusion is of the form of 𝑃 → 𝑄, then set 1
Additional Premise :P and derive the conclusion : 𝑄

11. Show that 𝑹 → 𝑺 can be derived from 𝑷 → 𝑸 → 𝑺 , K2 CO


~𝑹 ∨ 𝑷 and 𝑸. 1
Solution: Premise: 𝑃 → (𝑄 → 𝑆), ~𝑅 ∨ 𝑃, 𝑄.
Additional Premises: 𝑅 Conclusion : 𝑆
Steps Premises Reason
1 𝑅 Rule P
2 ~𝑅 ∨ 𝑃 Rule P
3 𝑃 Rule T, {2,1}Disjunction
4 𝑃 → (𝑄 → 𝑆) Rule P.
5 𝑄→𝑆 Rule T, {3,4}, Modus Ponens
6 𝑄 Rule P
7 𝑆 Rule T, {5,6}, Modus Ponens

12. Define consistency and inconsistency of premises. K1 CO


SolutionA set of formulae 𝐻1 , 𝐻2 , 𝐻3 … … 𝐻𝑚 is said to be 1
inconsistent if 𝐻1 ∧ 𝐻2 ∧ 𝐻3 ∧ … … ∧ 𝐻𝑚 ≡ 𝐹 where 𝐹
stands for a contradiction, and consistent if 𝐻1 ∧ 𝐻2 ∧ 𝐻3 ∧
… … ∧ 𝐻𝑚 ≡ 𝑇.
13. Show that the following premises are inconsistent.
A diagnostic message is stored in a buffer or it is
retransmitted. A diagnostic message is not stored in
the buffer. If the diagnostic message is stored in
buffer then it is retransmitted. A diagnostic message
is not transmitted.
Solution: Let 𝑃 : A diagnostic message is stored in buffer.
𝑄 : Message is retransmitted.
Therefore, the given premises are 𝑃 ∨ 𝑄, ~𝑃, 𝑃 → 𝑄, ~𝑄.
Steps Premises Reason
1 ~𝑃 Rule P
2 𝑃∨𝑄 Rule P
3 𝑄 Rule T, {1,2}(𝑃 ∨ 𝑄) ∧ ~𝑃 ⟹ 𝑄
4 ~𝑄 Rule P.
5 𝑄 ∧ ~𝑄 ≡ 𝐹 Rule T, {3,4}, 𝑃, 𝑄 ⇒ 𝑃 ∧ 𝑄.
∴ The given premises are inconsistent.

75
S.No Question & Answer K CO
Level
14. Let S(x) be the predicate “x is a student”, F(x) the K2 CO1
predicate “x is a faculty member” and A(x, y) the
predicate “x has asked y a question” where the universe
of discourse is the set of all people associated with your
school. Use quantifiers to express each of the following
statements. (a) Some student has not asked any faculty
member a question. (b) There is a faculty member who
has asked every other faculty member a question.
Solution:
(a) ∃𝑥 𝑆(𝑥 ∧ ∀𝑦 𝐹(𝑦) → 𝐴(𝑥, 𝑦)
(b) ∃𝑥 𝐹(𝑥 ∧ ∀𝑦 𝐹 𝑦 ∧ 𝑦≠𝑥 → 𝐴(𝑥, 𝑦

15. State the difference between proof by contraposition K1 CO1


and proof by contradiction.
Solution: Proof by contraposition: A proof that p  q is
true that proceeds by showing that if q is false than p is false
i.e.  𝑞 →  𝑝 is also true.
Proof by contradiction – A proof that p is true based on
the truth of the conditional statement  𝑝 → 𝑞 where q is
contradiction. i.e Assume q be F then if  𝑝 → 𝑞 is T it implies
that  𝑝 is F or p is T.

16. If the universe of discourse consists of all real numbers K2 CO1


and if 𝐩(𝐱) and 𝐪(𝐱) are given by 𝐩 𝐱 ∶ 𝐱 ≥ 𝟎 and 𝐪 𝐱 ∶
𝐱 𝟐 ≥ 𝟎, then determine the truth value of ∀ 𝐱 𝐩 𝐱 →
𝐪(𝐱) .
Solution: ∀ x p x → q(x) is true for all x which belongs to
set of all real numbers.
17. Let 𝐏(x) denote the statement 𝐱 ≤ 𝟒. Write the truth K1 CO1
values of 𝐏(𝟐) and 𝐏(𝟔).
Solution:P x ∶ x ≤ 4
P 2 ∶ 2 ≤ 4 which is TRUE
P 6 ∶ 6 ≤ 4 which is FALSE
18. What are the negation of the statements ∀𝐱 𝐱 𝟐 > 𝒙 K1 CO1
and ∃𝐱 𝐱 𝟐 = 𝟐 ?
Solution:The negation of ∀x x2 > 𝑥 is
∼ ∀x x 2 > 𝑥 ≡ ∃x ∼ x 2 > 𝑥 ≡ ∃x x 2 ≤ x
The negation of ∃x x 2 = 2 is
∼ ∃x x 2 = 2 ≡ ∀x ∼ x 2 = 2 ≡ ∀x x 2 ≠ 2

76
1.16 PART B (QUESTIONS)

S.No Part B (Question) K CO


Level
1. Obtain the PDNF of K1 CO1
P  (P  (Q  P )).
2. Obtain the principal disjunctive and K1 CO1
conjunctive normal forms of
P  (Q  R )    P  (Q  R )  .
3. Show that t is a valid conclusion from K2 CO1
( p  q), (q  r ), (r  s ) , s , p  t .
4. Show that the hypotheses, “it is not K2 CO1
sunny this afternoon and it is colder
than yesterday,” “we will go
swimming only if it is sunny,” “if we do
not go swimming, then we will take a
canoe trip,” and “if we take a canoe
trip, then we will be home by sunset”
lead to the conclusion “we will be
home by sunset”.
5. Check the following set of premises K2 CO1
are inconsistent.
(a) If Tharun gets his degree, he will
go for a job.
(b) If he goes for a job, he will get
married soon.
(c) If he goes for higher study, he will
not get married.
(d)Tharun gets his degree and goes
for higher study.
6. Show that ∀x P x ∨ Q x ⟹ K2 CO1
(∀x P x) ∨ (∃x Q x) .
7. Show that the premises “A student in K2 CO1
this class has not read the book” and
“ Everyone in this class passed the
Semester Exam” imply the
conclusion “Someone who passed
the Semester Exam has not read the
book”.
8. Let K x : x is a two-wheeler, L x K2 CO1
: x is a scooter, M x : x is a

77
S.No Part B (Question) K CO
Level
9. Show that the premises “one student in this class knows how K2 CO1
to write programs in JAVA” and “Everyone who knows how to
write programs in JAVA can get a high paying job” imply the
conclusion “Someone in this class can get a high-paying job”.

10. Show that ∀x P x ⟶ Q x ∧ ∀x Q x ⟶ R x ⟹ K2 CO1


∀x P x ⟶ R x .
11. Prove that if n is a positive integer then n is odd if and only K2 CO1
if 5n + 6 is odd.
12. Prove that square of an even number is an even number by K2 CO1
(i) direct method (ii) indirect method and (iii) proof by
contradiction.
13. Prove that 2 is irrational by giving a proof by contradiction. K2 CO1

78
Supportive online Certification Courses

https://nptel.ac.in/courses/106/106/106106094/#

79
Real life applications of discrete mathematics in day
today life and to industry

Discrete Mathematics is part of everyone’s life. In every instant of life everyone has

connectivity with mathematics. By every aspect, mathematics is used in our real

life. We have various applications of mathematics. The applications of the discrete

mathematics are given as below:

Computers
Now a day’s Computer is part of everyone’s day today’s life. Along with the various

uses, arithmetic operation is one of basic part of computer machine. It’s a good

discrete computation machine. Various kinds of useful discrete mathematical models

can be implementing in computer coding language. It’s very easy to analyze and

understand how a computing machine works when you understand the discrete

mathematics. Now a day’s various applicational computer software’s are available

and design in market by using discrete mathematics which is generally used for

generally used for complex calculation purpose.

Computers run software and store files. The software and files are both stored as

huge strings of 1s and 0s. Binary math is discrete mathematics.

Encryption and decryption are part of cryptography, which is part of discrete

mathematics. For example, secure internet shopping uses public-key cryptography.

Electronic health care records are kept as parts of databases, and there is a lot

of discrete mathematics involved in the efficient and effective design of databases

Compact discs store a lot of data, which is encoded using a modified Reed-

Solomon code (a binary code, and thus discrete math) to automatically correct

transmission errors.

80
CONTENT BEYOND THE SYLLABUS

The topic Propositional Logic in Artificial Intelligence is the content beyond the
sylabus for the course Algebra and Number Theory.
View the lecture on YouTube:
https://youtu.be/tpDU9UXqsUo
Value Added Courses:

Mathematical Foundations for Cryptography (Coursera online course)

81
PRESCRIBED TEXT BOOKS & REFERENCE BOOKS

TEXTBOOKS: MA8351 Notes Discrete Mathematics


1. Rosen, K.H., “Discrete Mathematics and its Applications”, 7th
Edition, Tata McGraw Hill Pub. Co. Ltd., New Delhi, Special
Indian Edition, 2011.
2. Tremblay, J.P. and Manohar. R, ” Discrete Mathematical
Structures with Applications to Computer Science”, Tata McGraw
Hill Pub. Co. Ltd, New Delhi, 30th Reprint, 2011.

REFERENCES: MA8351 Notes Discrete Mathematics


1. Grimaldi, R.P. “Discrete and Combinatorial Mathematics: An
Applied Introduction”, 4th Edition, Pearson Education Asia, Delhi,
2007.
2. Lipschutz, S. and Mark Lipson., “Discrete Mathematics”,
Schaum’s Outlines, Tata McGraw Hill Pub. Co. Ltd., New Delhi,
3rd Edition, 2010.
3. Koshy, T. “Discrete Mathematics with Applications”, Elsevier
Publications, 2006.

82
Thank you

Disclaimer:

This document is confidential and intended solely for the educational purpose of RMK Group of
Educational Institutions. If you have received this document through email in error, please notify the
system manager. This document contains proprietary information and is intended only to the
respective group / learning community as intended. If you are not the addressee you should not
disseminate, distribute or copy through e-mail. Please notify the sender immediately by e-mail if you
have received this document by mistake and delete this document from your system. If you are not
the intended recipient you are notified that disclosing, copying, distributing or taking any action in
reliance on the contents of this information is strictly prohibited.

83

You might also like