You are on page 1of 324

By the same authors

ENGINEERING MATHEMATICS Volume I-IV

^ BBA MATHEMATICS Volume I & 11

BCA MATHEMATICS Volume I - IV

By K. Das
numerical methods
By B. K. Pal
^ diploma engineering mathematics
Volume I & 11

'r'

■ "i
^ SONS PFiiv^'

jsiitce 193^4
I

*Ub]^mgiBc)oks on MATHEMAi'lO^SSfn^^^!

• K^tkATA 700 073


.'sJ^SSt-V-as
SYLLABUS

WBUT Code CS-503 & IT-605A


ModuI^^J
Introduction to Prepositional Calculus: Propositions, Logic
Connectives, Conjunction,Disjunction, Negation and their truth table.
Conditional Connectives,Implication, Converse,Contrapositive,Inverse,
Biconditional statements with truth table. Logical Equivalence,
Tautology, Normal forms - CNF, DFN; Predicates and Logical
Quantifications ofpropositions and related examples. [lOL]

Module III
Theory of Numbers:Well Ordering Principle,Divisibility theory and
properties of divisibility;Fundamental theorem ofArithmetic;Euclidean
Algorithm for finding G. C. D. and some basic properties of G. C. D.
with simple examples; Congruences;Residue classes ofinteger modulo
n(ZJ and its examples.
Order, Relation and Lattices: POSET, Hasse Diagram, Minimal,
Maximal,Gieatest and Leastelementsin a POSET,Lattices and its properties,
PrindpleofDuality.DistributiveandCoinplementedLattices. [lOL]
Module III I
Counting Techniques: Permutations, Combinations, Binomial
coefBcients,Pigeon-hole Principle,Principles ofinclusion and exclusions;
Recurrence relations: Formulation/Modelling of different counting
problemsin terms ofrecurrence relations,Solution oflinear recurrence
relations with constant coefficients(upto second order)by(i)The iterative
method (ii) Characteristic roots method (iii) Generating functions
method. [lOL]
Modulel^
Graph Coloring;Chromatic Numbers and its bounds,Independence
and Clique Numbers, Perfect Graphs-Definition and examples,
Chromatic polynomial and its determination. Applications of Graph
Coloring.
Matchings:Definitions and Examples ofPerfect Matching, Maximal
and Maximum Matching,Hall's Marriage Theorem (Statement only)
and related problems. [6L]
CONTENTS

Propositional Calculus
Introduction l-I
Proposition or Statement 1-1
Truth Table 1-2
'Logical Connectives' or 'Operations on statements' 1-2
Conditional Connectives 1-3
Biconditional Proposition 1-5
Propositional formula or Statement formula 1-6
Tautology 1-7
Contradiction 1-8
Logical Equivalence 1-8
Algebraic laws of'Connectives' 1-9
Normal Forms 1-13
Arguments 1-14
Predicate 1-14
Quantification of Proposition 1-16
Illustrative Examples 1-18

2.11 Theory Of Numbers


2.1.1 Introduction
2.1.2 Well ordering principle
2.1.3 Divisibility theory
2^1.4 Properties ofdivisibility
2.1.5 Fundamental theorem of arithmetic
2.1.6 Greatest Common Divisor
2.1.7 Euclidean algorithm for finding GCD
2.1.8 Some properties of GCD
2.1.9 Least CommonMuItiple
2.1.10 Diophantine Equations
2.1.11 Congruence
2.1.12 Properties of congruence
2.1.13 Residue classes of integer modulo n
2.21 Order Relation And Lattice
2.2.1 Relations
2.2.2 Partially Ordered Set(PC Set)
2.2.3 Hasse Diagram ofPC set
2.2.4 Special elements of a PC set
2.2.5 Lattice
2.2.6 Properties ofLattice
2.2.7 Distributive Lattice
2.2.8 Complemented Lattice

Counting Techniques

3.1.1 Introduction
3.1.2 Sum Rule Principle
3.1.3 Product Rule Principle
3.1.4 Expression of the above principle by set
3.1.5 Permutations
3.1.6 Combinations
3.1.7 Binomial Co-efficients
3.1.8 Pigeonhole Principle
3.1.9 Principle of Inclusion and Exclusion

3.21 Recurrence Relation


3.2.1 Introduction
3.2.2 Sequence
3.2.3 Recurrence Relation and its solution
3.2.4 Formulation of different counting problem
by recurrence relation
3.2.5 Linear recurrence relation with constant
co-efficient
3.2.6 Solution of linear recurrence relations with
constant co-efflcients by Iterative Method
3.2.7 Illustrative Examples
CONTENTS

3.2.8 Solution of linear homogeneous recurrence relation


with constant co-efficient by Characteristic Root
method 3-61
3.2.9 Illustrative Examples 3-61
3.2.10 Solution of linear non-homogeneous recurrence
relation with constant co-efficient by characteristic
root method 3-67
3.2.11 Illustrative Examples 3-69
3.2.12 Solution of linear recurrence relation with constant
co-efficient by Generating function method 3-77

4.11 Graph Colouring


4.1.1 Introduction 4-1

4.1.2 Vertex Colouring of Graphs 4-2

4.1.3 Chromatic Number of a Complete Graph 4-5

4.1.4 Chromatic number of a cycle {€„)


4.1.5 Chromatic Number of a Bi-Partite Graph 4-7

4.1.6 Upper Bound of Chromatic Number 4-9


4.1.7 Lower bounds of Chromatic Number 4-11
4.1.8 Perfect Graphs 4-13
4.1.9 Chromatic Polynomials(Chromials) 4-14
4.1.10 Evaluation of Chromatic Polynomial 4-15*
4.1.11 Four and Five Colour Theorem 4-18

4.2 I Matchings
4.2.1 Introduction 4-55
4.2.2 Matching 4-55
4.2.3 The Marriage Problem 4-57
Hall's Marriage Theorem 4-59
Illustrative Examples 4-61

W.B.U.Tech. Question Papers Q-1


Propositional Calculus

Introduction : Logic is the basis of all mathematical


reasoning. It provides rules and techniques for determining
whether a given argument is valid. Logic has practical
applications to the design of computing machines. It is directly
involved in computer programming and used to verify the
correctness of the programs.
Proposition or Statement
A declarative sentence which is either true or false, but not
both is called a Proposition or Statement. Proposition is denoted
by the letters p.q.r etc.
Example:(1) p .• It is hot. Here p is a proposition because the
sentence 'It is hot' is declared. It may be true or false.
(2) p •• 'who are you?'. Here p is not a proposition because this
is neither true not false.
(3) p;o+6= 3. Here p is not a proposition because it is not
true if 0 = 1. 6 = 4 and it is not false if a = 1.5, 6 = 1.5.
(4) q: Kolkata is capital of West Bengal. Here 9 is a
proposition because the declared sentence 'Kolkata is Capital of
West Bengal' is true.
Truth value of a proposition.
The truth or faUity of a proposition is called the Truth value
of the proposition. So a proposition may take two Truth values-
'true' which is denoted by t or 1 and 'false' which is denoted
byforO.
Example:(1) Let p:4.5= 10. p is a proposition which is
false. So p takes the Truth value F or 0
(2) q:Eveiy action has an equal and opposite reaction. This
IS a proposition which is true. So the truth value of q is T or 1
Note:The letters p, q,... etc. are also known as propositional
varmbles because these may take the two different values T
or r.
DISCRETE MATHEMATICS

[Ty Truth Table : The table which displays all the truth
val^s assumed by proposition is known as Truth Table.
Example: If p be a proposition then the Truth Table of p is

Remark. Truth table are especially valuable in the


determination of truth values of the propositions which are
modified firom many other proposition. These will be seen in the
subsequent discussion.
'Logical Connectives'or'Operations on statements.
Propositions or statements may be modified or combined m
various ways to form new propositions or statement. Different
type of connectives or operations are used for this purpose. These
are discussed below :

Conjunction. If p and q are two propositions then the


proposition 'p and q' is called conjunction of p and q. This JS
denoted by p a q (this will be read as p and q)
Example: Let p:It is raining;q:It is hot be two propositior*®-
Then p a q :It is raining and hot is conjunction of p and q
Truth Table for Conjunction. Let p and q be two
propositions. Then the proposition p a q is true whenever p
q are true, pAq is false when p is true and q is false, p Aq is
false whenever p is false and q is true, p a q is false when both
of p and q is true, p a q is false when both of p and q are false.
So the truth table of the conjuction p a q is
p Q PAq

T T T
T F F
F T F
F F F
PROPOSIJIONAL CALCULUS

Disjunction. If p and q are two propositions then the


proposition 'p or q or both is called disjunction of p and g.This is
denoted by p v g (this will be read as p or g )
Example: Let p;Sukrit is sincere and g .* Sukrit is intelligent
be two propositions. Then pvg ; Sukrit is sincere or he is
intelligent is disjunction of p and g.
Truth Table for disjuction.
Let p and g be two propositions. Then the proposition p v g is
true whenever p and g both are true, p v g is true when at least
one ofp and g is true, pvg is false when p and g both are false
. So the truth table of the disjunction p v g is

Negation. If p is a proposition then the proposition 'not p' is


called negation of p. It is denoted by ~p (this will be read as
'not p')
Example: Let 'p: Pappu is a student of Mathematics' be a
proposition. Then ~ p: Pappu is not a student ofMathematics is
negation of p.
Truth Table for Negation. Let p be a proposition. Then the
proposition ~ p is false when p is true, - p is true when p is
false. So the truth table of the negation - p is

Conditional Connectives:Ifp and g be two propositions


then the proposition' Kp then q' is called impHcation.It is denoted
by p g or p => g (this will be read as 'p imphes g')
Example :(1) Let p.- Buku works hard and q ;Buku comes
first in exam be two propositions.
DISCRETE MATHEMATICS

Then p->q :If Baku works hard, he comes first in exam is


implication.
(2) Let p ;It is raining and q :I go to library be two
propositions. Then p-*q:If it is raining then I go to library is
implication.
Truth Table for ImpUcation.
Let p and q be t^vo propositions. Then p^g is false if and
only if p is true and q is false otherwise it is true. So the truth
table of the proposition p-^q is

Converse. If p -> g is an implication then its converse is the


implication q-> p-
Example. In the previous example p g is "If Buku works
hard, he comes first in exam."Its converse g p is "IfBuku comes
first then he works hard."
Truth Table for Converse

Let p->g be implication. Then its converse is the implication


p->g. So its truth table is
p~^q

Contrapositive. Let p-*q be an implication. Then i


contrapositiveis the implication "Q-*"p.
PnOPOSlTIONAL CALCULUS

Example. In the previous example p-*q is "If Buku works


hard, he comes first". Its contrapositive is -q-*" p which means
"If Buku does not come first, he does not work hard".
Truth Table for Contrapositive
Let p-*q be an implication. Then its contrapositive is
-q-*-p. So its truth table is

Inverse. Let p~*q be an implication. Then its inverse is the


implication ~ p ~ g.

Example : If p-*q means 'If Buku works hard, he comes


first'. Its inverse ~ p-^-q is 'If Buku does not work hard, he
does not come first'.

Truth Table for Inverse

1^^ Biconditional Proposition.


If p and q be two propositions then the propositions'If p then
q and if q then p' is called biconditional propositions of p and q.
It is denoted by p^q or pog (this will be read as 'p if and
only if q').
Example:Let p:Sukrit is tail and q: Sukrit is intelligent be
two propositions. Then p^q:'If sukrit is tall then he is intelligent
and if Sukrit is intelligent then he is tall' is bioconditional
proposition.
DISCRETE MATHEMATICS

Truth Table for bioconditional proposition.


Let p and q be two propositions. Now p*r^q is true whenever
p and q are both true or both false but p<-^q is false whenever
p is true, g is false or g is true, p is false. So, the truth table of
p^q is
p q p^q

Note : The operations and are know as


Connectives.

[ltI Fropositional formula or Statement formula


The proposition obtained by connecting one or more
propositions p, g, r... by the connectives v,a,~ ^ or is called
a prepositional formula or statement formula. This is denoted by
/(p.9.r,....) where p, q, r... are known as variable.
This is called Compound proposition or Compoujj^
statement, when more than one propositions are connected.
This is called Simple proposition when only one proposition
is involved
Example :(1) If p, g and r be three propositions then the
proposition f{p,q,r)= pv(~g)vr->p is a proposition formula of
the variables p, g and r. This is a compound proposition also.
(2) p or ~ p is a simple proposition since only one proposition
is involved here.

Truth Table for Propositional formula.


By using the' truth table of the connectives (i.e. the
conjunction, disjunction etc.) we get the truth table for
propositional formula. This is illustrated by the following
example:(Shown in the next page)
PROPOSITIONAL CALCULUS

Example: f{p,q)=~(~pAq) is a proposition formula of the


variables p and q. Then the Truth Table of f{p,q) is

p Q -p ~pA(? ~(~pAg)
T T F F T

T F F F T

F T T T F

F F T F T

3rd column is formed from 1st row using truth of 4th


column is formed from 3rd and 2nd row using truth table of a .
Finally the last column is formed from 4th row by using truth
table of -. In fact the 1st, 2nd and the last columns constitute
the truth table of f{p.Q)■ Other columns axe made for computation
of the truth values.

Note. The truth table of a propositional formula of n variables


will have 2'' number of rows. e.g. in the above Example f{p,q) is
a formula of 2 variables p and g; so the truth table of f{p,q)
had 2^ = 4 rows.
|lj8j Tautology
A proposition formula or statement formula is called tautology
if it assumes only the truth value T i.e.in the Truth Table of the
formula every entry in the last column will be T.
Example: Cobsider the formula f{p,q)= p-*(q-> p)
The truth table of f{p,q) is
q q-^p P-»^(q-»p)
DISCRETE MATHEMATICS

Note:3rd column is formed from 2nd and 1st column by using


the truth table of .Finally the 4th column is constructed from
1st and 3rd column by using the truth table of —►.
Since all the entries in the last column are T so f{p,Q)
assumes the only truth value T. So /"(p.g) is a Tautology.
[^L9j Contradiction : A proposition formula is called
contradiction if it assumes only the truth value F i.e. in the truth
table of the formula every entry in the last column will be F.
Example: Consider the formula f{p, g) = (p a q)A " (p v g)
The truth table of th^ is

g pvg -(pvg) (pAg)A~(pvg)


T T T F

F F T F

T F T F

F F F F

We see every entry in the last column is F. So /(p.g) is a


contradiction.

I^IOJ Logical Equivalence


Two propositions P and Q (simple or compound proposition )
are said to be lo^cal equivalence if they have identical truth
tables. We denote this by P = Q
Example. Consider the two compound proposition p g and
~pvg. We see the truth table of p->g and -pvg are

Truth table for p-*q Truth table of ~ p v q


p-»g

Which are identicals. Therefore p-^qs-'pvg


pnoposmoNAL calculus

Algebraic laws of'Connectives'


The 'Logical connectives' v, a, etc. obey the following laws:
If P, Q, R are any propositions then
(1) PvPsP and P/\P =P (Idempotent law)

(2) (Pv^vPsPv(Qvi^ and (PaQ)aPsPa(Qa1?) (Associative


law)

{3)PvQsQvP and PaQsQaP (commutative law)

(4) pA(QvP)=(PAQ}v(PAie) and Pv(QAi^^(Pv^A(Pvi?)


(Distributive Laws)

(5) ~(Pv(?)-(~P)a(~Q) and --(Pa§)-(~P)v(-Q) (D'


Morgan's law )

(6) Pv(PaQ)= P and Pa(PvQ)= P (Absorption law)

(7) P-»Qs-Q-^P (contrapositive law )

(8) Pv (any contradiction )=P


p V (any Tautology) = The Tautology y

P A (any Tautology)= p
P/^ i any contradiction)= The contradiction
(Identity laws)

(9) Pv(-P)= Tautology

P A(~ P)s Contradiction (Complement Laws)


(10) (a tautology) = a contradiction
■. (a contradiction ) s a tautology

(11) -(-Pj^P
DISCRETE MATHEMATICS

Illustration, (i) We shall verify the distributive law

pA(gvr)s{pAg)v(pAr)

Truth table of pA(gvr)

pAfgvr)

Truth table of (p a q)v(p a r)

g pAg (pAg)v(pAr)

From above we see the two propositions pA(gvr) and


(pAg)v(pAr) have same truth table. Hence
pA(gvr)s(pAg}v(pAr).
PROPOSmONAL CALCULUS

(ii) We shall verify the D'Morgan's law ~(p v <})s(~ /?)a(~ g)

Truth Table of ~(p v g)

Truth Table of (-' p)a(- g)

~g (~p)A(~g)

From above we see the truth tables of ~(pvg) and p)


a(~ g) are identical.
Hence -(p v g)={- p)a(~ g). So D' Morgan's law is verified,
(ill) (Simplification of a compound proposition).
Here we shall show how the above laws can be used to
simplify a compound proposition like (p a g)v(~ p)
(p A g)V(~ p)s(~ p)V(p a g) (using commutative law)
s(--pvp)A(-'pvg) (using distributive law)
=(p V ~ p)A{- p V g)(using commutative prcq)erty)
= Tautology a{~ p v g) by complement laws.
s(~pvg)A Tautology, using commutative law.
s- p V g which is very simplified proposition.
DISCRETE MATHEMATICS

Theorem 1. p-* q = ~p\/q

Proof. Truth table for p~*q

Truth table for ~ p^q

We see the truth tables ot p-*q and - p\/q are same.


Hence p -> q s- p v g.

Theorem 2. p q h(p q)a(q ^ p)


Proof Truth table for p q
_P 9 9
T T T
T F F
F T P
_F F T
Truth table for (p^9)a(q^ p)

q-^p (p->q)A(q^p)

We see both the two truth tables are identical. So


p<-»gs(p-».q)A(q^p).
PROPOSITIONAL CALCULUS 1-13

Normal Forms

Conjunctive Normal Form (CNF).


A TOrapound proposition p is said to be conjunctive normal form
(CNF)of r simple propositions Pi,p2>—Pr if the expression p can
be expresed as p = Pi Apj a...ap„ where each p.- = Dkjunction
of a finite number of the simple propositions of each of Pi,p2y—Pn
or their negations and p,' ^ pj for all distinct i, j
Example, (i) P=('-A^AVP2)a(~;^v~p^V'-pij)a(;^ vft vft) is
a CNF of the simple propositions Pi,P2>P3
But p=(~'Pi vj:^)A(~/)iV~p2'^~P3) is not a CNF since the
expression (~Pivp2) does not contain p^ or its negation.
(ii) P=pv(~pAq) is not a CNF
(iii) (~ P V(j)A(- g V p) is a CNF of the two simple propositions
p and q.
Disjunctive Normal Form(DNF). A compound proposition
p is said to be Disjunctive Normal Form (DNF) of r simple
propositions pi.Ps Pr if the expression p can be expressed as
P = Pj VP2V....VP,,.

where each p,- is conjunction of some of the simple propositions


or their negations without any repeatations and no p^ -is
contained in any pj{j^ i).
Example:(1) P=(pA~r)v(~gApAr)v(~pA-g) is a DNF.
Here Fi=pA~r is copjunction of p and ^ r, P2=~gApAr is
conjunction of ~ q,p and r and P3 =- pA ~ g etc.
(2) (pA~r)v(pA~gAr)v(-rApAg) la not DNF since Pi=pA~r
DISCRETE MATHEMATICS

Arguments:Deduction of a proposition Q from a set of


propositions (compound or simple)is called argument.
Symbollically we write Pi.Pa—--P.. 1-Q: Px,P2....P„ are called
premises and Q is called conclusion.
Valid Argument : An argument Pi.Pg.—P,, i-Q is called
valid argument if (Pj Afg a....aP„)->'Q is a tautology.
An argument which is not valid is called invalid argumenl.
Example. Let Pj =J3 and Pg =p-^q be two propositions(We see
Pi is simple and Pg is compound proposition). We doubt whether
q can be deduced from Pj and P.- Therefore Pj.Pg i-q is an
argument.

Now we shall test whether it is a valid argument. For this


purpose we want to see whether (Pi aP^)-> (? is a tautology.
Truth Table of (Pi a Pg)-> g

P2=p-*q ^iaPj

In the this truth table we see all the entries in the last column
are p. So we conclude (PiAPg)-^? is a tautology. Thus
Pi,P2 h-g is a vahd argument. •
I1.I4I Predicate
In a sentence the word (or set of words) which describe the
nature or properties of a subject is called predicate. For example,
in the sentence 'x > 8' nature of'r' is described by the set of words
'>8'. So in this sentence 'r' is the subject and '>8' is predicate. We
can use the notation P(a;) for this statement 'x > 8'.

You might also like