0% found this document useful (0 votes)
174 views

Discrete Math

Discrete Math

Uploaded by

AkanshaJain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views

Discrete Math

Discrete Math

Uploaded by

AkanshaJain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

Biyani's Think Tank

Concept based notes

Discrete Mathematics
(MCA I SEM)

Alap Mukherjee
Revised By: Kalpana
BSc (Maths), MCA
Lecturer
Deptt. of Information Technology
Biyani Girls College, Jaipur
2

Published by :
Think Tanks
Biyani Group of Colleges

Concept & Copyright :


Biyani Shikshan Samiti
Sector-3, Vidhyadhar Nagar,
Jaipur-302 023 (Rajasthan)
Ph : 0141-2338371, 2338591-95 Fax : 0141-2338007
E-mail : [email protected]
Website :www.gurukpo.com; www.biyanicolleges.org

First Edition : 2011

While every effort is taken to avoid errors or omissions in this Publication, any
mistake or omission that may have crept in is not intentional. It may be taken note of
that neither the publisher nor the author will be responsible for any damage or loss of
any kind arising to anyone in any manner on account of such errors and omissions.

Leaser Type Setted by :


Biyani College Printing Department
Discrete Mathematics 3

Preface
I am glad to present this book, especially designed to serve the needs of the
students. The book has been written keeping in mind the general weakness in
understanding the fundamental concepts of the topics. The book is self-explanatory and
adopts the “Teach Yourself” style. It is based on question-answer pattern. The language
of book is quite easy and understandable based on scientific approach.
Any further improvement in the contents of the book by making corrections,
omission and inclusion is keen to be achieved based on suggestions from the readers
for which the author shall be obliged.
I acknowledge special thanks to Mr. Rajeev Biyani, Chairman & Dr. Sanjay Biyani,
Director (Acad.) Biyani Group of Colleges, who are the backbones and main concept
provider and also have been constant source of motivation throughout this Endeavour.
They played an active role in coordinating the various stages of this Endeavour and
spearheaded the publishing work.
I look forward to receiving valuable suggestions from professors of various
educational institutions, other faculty members and students for improvement of the
quality of the book. The reader may feel free to send in their comments and suggestions
to the under mentioned address.
Author
4

Syllabus
Introduction to Discrete Mathematical Structures, Formal Methods: Introduction
and Analogy, Abstraction.

Fundamentals: Sets & Relations- Sets, Types of Sets, Multi Sets, Operations on
Sets, Relations and Properties of Relations, Representation of Relations,
Equivalence Relation, Closures of Relations, Methods of Proof-Direct Proofs,
Indirect Proofs, Mathematical Induction, Method
of Contradiction.

Combinatorics: Permutations and Combinations, Pigeon Hole Principle,


Principle of Inclusion and Exclusion, Generating Functions.

Mathematical Logic, Posets and Lattices: Partial Order Set, Bounding Elements,
Well Ordered Set, Topological Sorting, Lattices, Principle of Duality, Bounded,
Distributed, and Complemented Lattices, Proposition and Propositional
Calculus.

Graphs and Group Theory: Basic Introduction of Graphs- Types of Graphs, Path
and Circuits,
Eulerian Path and Circuits, Hamiltonian Path and Circuits, Shortest Path
Algorithms, Group,
Definitions and Properties, Coset & Subgroup, Normal subgroup,
Homomorphism of groups,Cyclic Group, Permutation Group.

Finite State Machines and Languages: Grammar and Languages- Phrase


structure Grammar, Types of Grammars and Languages, Finite State Machines
and Languages, Minimization of Finite State Machines.
Discrete Mathematics 5

Contents

S No. „Topic

1 Formal Logic and Propositional


Calculus

2 Sets and Relations

3 Graph Theory

4 Group

5 Finite State Machines & Languages

6 Posets and Lattices

7 Combinatorics
6

Chapter-1

Formal Logic and Propositional Calculus

Q1 What is a Proposition? Give an example.


Ans A Proposition or a statement or logical sentence is a declarative sentence which is
either true or false.
For example: 10 > 9 is a proposition because it is always true.
We denote simple propositions, which consist of only one statement by English
alphabets like p, q, r, s etc. Each of p, q, r, s can have two values i.e. either true (T)
or false(F). Hence p, q, r, s are called propositional variables.
True and False are called propositional constants.

Q2 What is a Predicate? Give appropriate example.


Ans All that is told about the subject in a sentence is called predicate.
For example:- ―Amit is a good boy‖.
Here ‗ is a good boy ’ is the predicate and ‗Amit ‘ is subject.
Let ‗ is a good boy ’ is denoted by ‘B’ and ‗Amit ‘is denoted by ‗ J ‘ then the
above sentence can be written in logical form as B( J ).
Note:- If Q is predicate then sentence ‗P is Q‘ is denoted by Q(P).

Q3 What is a compound statement? List the logical connectives.


Ans Statements or propositional variables can be combined by means of logical
connectives (operators) to form a single statement called compound statements.

The five logical connectives are:


Discrete Mathematics 7

Symbol Connective Name


Not Negation
And Conjunction
Or Disjunction
Implies or if…then Implication or
conditional
If and only if Equivalence or
biconditional

Q4 What is the negation of a statement? Give example.


Ans If p is a statement then negation of p is denoted by p and read as ‗it is not the
case that p‘. So, if p is true then p is false and vice versa.
Example: if statement p is Paris is in France , then p is ‗Paris is not in France‘.

p p
T F
F T

Q5 What do you mean by the conjunction of two statements? Give examples.


Ans If p , q are two statements, then ―p and q‖ is a compound statement, denoted by
p q and referred as the conjunction of p and q.
The conjunction of p and q is true only when both p and q are true, otherwise it
is false.

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

Example: if statement p is ―6<7‖ and statement q is ―-3>-4‖ then the conjunction


of p and q is true as both p and q are true statements.
8

Q6 What do you mean by the disjunction of two statements? Give examples.


Ans If p , q are two statements, then ―p or q‖ is a compound statement, denoted by
p q and referred as the disjunction of p and q.
The disjunction of p and q is true whenever at least one of the two statements is
true, and it is false only when both p and q are false.

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

Example:- if p is ―4 is a positive integer‖ and q is ― is a rational number‖, then


p q is true as statement p is true, although statement q is false.

Q7 What do you mean by the Conditional Statement (or Implication) of two


statements? Give examples.
Ans Let p and q are two statements then ―if p then q‖ is a compound statement,
denoted by p q and referred as a conditional statement, or implication.The
implication p q is false only when p is true and q is false; otherwise it is
always true.
In this implication, p is called the hypothesis(or antecedent) and q is called the
conclusion(or consequent).

p Q p q
T T T
T F F
F T T
F F T

Q8 What are the Converse, Contrapositive and Inverse of a conditional statement?


Give the Truth Tables.
Ans If p q is an implication, then the Converse of p q is ―q p‖.
The Contrapositive of p q is the implication ― q p ―.

The Inverse of p q is the implication ― p q ―.


Discrete Mathematics 9

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

Table1) Truth Table of q p(converse)

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

Table2) Truth Table of q p (Contrapositive)

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

Table3) Truth Table of p q (Inverse)

Q9 Find the Converse, Contrapositive and Inverse of the following implications:-


(i) “If today is Thursday, then I have a test today”

Ans Let p : ―Today is Thursday‖ and q : ―I have a test today‖


Then Converse q p is ―If I have a test today, then today is Thursday‖
Contrapositive q p is ―If I do not have a test today, then today is not
Thursday‖.
Inverse p q is ―If today is not Thursday, then I do not have a test today‖.

Q10 What is a Biconditional statement or Equivalence ?


Ans If p and q are two statements then ―p if and only if q‖ is a compound statement,
denoted as p q and reffered as a biconditional statement or an equivalence.
10

The equivalence p q is true only when both p and q are true or when both p
and q are false.

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

Q11 Is the following equivalence a true statement ?


“3 > 2 if and only if 0 < 3 - 2”
Ans Let p: 3 >2 and q : 0 <3 – 2
Clearly both p and q are true, thus p q is also true.

Q12 Explain the Direct Proof approach.


Ans We will explain the direct proof approach using following example:
Let the following statements be true.
1) It is snowing.
2) If it is warm, then it is not snowing.
3) If it is not warm, then I cannot go for swimming.

Show that the statement ‗ I cannot go for swimming ‗ is a true statement.


Proof) :- let p, q, r represents the statements
P : It is snowing
Q : It is warm
R : I can go for swimming.
Consider the premises that the statements P, Q P, Q R are true.
Then we have to prove that:
R : ‗I cannot go for swimming is true‘.
Since, P is true and Q P , so its contrapositive ( P) Q i.e. P Q
is also true.
But Q R is true
Therefore P Q and Q R . So by law of syllogism we say
P R
And because P is true, R must also be true.
Discrete Mathematics 11

Q13 Explain the Indirect Proof approach.


Ans We will explain this with the help of an example:
Example: Show that 5 + is irrational number.
Proof) :- let 5 + = r, is a rational number or =r–5
Since r and 5 are rational number so (r – 5) is also rational.
This implies that is also rational, which is contradiction because is
irrational number.
Thus the assumption that 5 + is rational number is false, hence the given
number is irrational.
12

Chapter-2

Sets

Q1 Define a set giving examples?


Ans A well defined collection of objects or elements is called a set. Each of these
elements has to satisfy a property by which it can be decided whether a given
object belongs to the set or not.
Examples of sets are:
a)A set of rivers of India.
b)A set of vowels.
We generally denote a set by capital letter A, B, C etc. while the elements of the
set by small letter a, b, x, y etc.
If A is a set , and a is one of the element of A, then we denote it as a A. Here the
symbol denotes ―Element of‖.

Q2 How are sets represented? Give appropriate examples.


Ans Sets are represented in two forms:-
a) Roster or tabular form: In this from of representation we list all the elements of the
set within braces { } and separate them by commas.
Example: if A= set of all odd numbers less then 10 then in roster from it can be
written as A={ 1,3,5,7,9}.
b) Set Builder form: In this form of representation we list the properties satisfied by all
the elements of the set. We write as { x: x satisfies properties P}. and read as ‗ the set
of all those x such that each x has properties P ‘.
Example: if B= {2,4,8,16,32}, then the set builder representation will be:
B={ x: x=2n , where n N and 1 n 5 }
Discrete Mathematics 13

Q3 What are Finite and Infinite Sets? Give Examples.


Ans Finite set : A set is called a finite set if the process of counting the elements of
that set surely comes to an end. Example is A={2,4,6,8} is a finite set because the
number of elements in set A is 4.
Infinite set: A set is called an infinite set if the process of counting the number of
elements in that set never ends, ie there are infinite elements in the set. Example
is N= set of natural numbers .

Q4 What is the Principle of Extension?


Ans According to the Principle of Extension two sets A and B are equal if and only if
they have the same members. We denote equal sets by A=B.
If A={1,3,5} and B={3,1,5}, then A=B ie A and B are equal sets.
If A={1,4,7} and B={5,4,8}, then A B ie A and B are unequal sets.

Q5 What is a Universal set?


Ans In any application of the theory of sets, the members of all sets under
investigation usually belong to some fixed large set called the universal set. The
universal set is denoted by U.
Example: In the human population studies the universal set consists of all the
people in the world.

Q6 What are subsets? Give example. Write down the properties of sets.
Ans If every element in a set A is also an element of a set B, then A is called a subset
of B. It can be denoted as A B. Here B is called Superset of A.
Example: If A={1,2} and B={4,2,1} the A is the subset of B or A B.
The properties of subsets are:-
1) Every set is a subset of itself.
2) The Null set , ie is a subset of every set.
3) If A is subset of B, and B is a subset of C then A will be the subset of C.
If A B and B C A C
4) A finite set having n elements has 2n subsets.
14

Q7 What is a Null set?


Ans A set having no elements is called a Null set or void set. It is denoted by .

Q8 Define Power Set. Write Power Set of A = {1, 2, 3}.


Ans Let B be a set then the collection of all subsets of B is called Power Set of B and is
denoted by P(B).
i.e. P(B) = {S : S B}
If A = {1, 2, 3}
Then P(A) = {, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}

Q.9 Explain the following operations –


(a) Union (b) Intersection (c) Difference
Ans.: (a) Union : Let A and B be two sets then union of A and B which is denoted
as A  B is a set of elements which belongs either to A or to B or to both A
and B.
So, A  B {x : x A.or.x B}
Example : If A = {1, 2, 3, 4} and B = {3, 4, 5, 6} then A  B = {1, 2, 3, 4, 5, 6}

A B
A B

(b) Intersection : Intersection of A and B which is denoted as A  B is a set


which contains those elements that belong to both A and B.
So, A  B {x : x A.and .x B}
Example : If A = {1, 2, 3, 4} and B = {3, 4, 5, 6} then A  B = { 3, 4}
Discrete Mathematics 15

A B

A B
(c) Difference : Let A and B be two sets. The difference of A and B which is
written as A - B, is a set of all those elements of A which do not belongs to
B.
So, A B {x : x A.and .x B}
Similarly, B A {x : x B.and .x A}
Example : If A = {1, 2, 3, 4} and B = {3, 4, 5, 6} then A - B = { 3,
4} and B – A = {5, 6}

U U

A B A B

A–B B-A

Q.10 Define symmetric difference of two sets If A = {2, 3, 4} and B = {3, 4, 5, 6}, Find
A B.
Ans.: Let A and B be two sets, the symmetric difference of A and B is the set
( A B)  ( B A) and is denoted by A B or A B
Thus, A B ( A B)  ( B A) = {x : x A  B}
A = {2, 3, 4} and B = {3, 4, 5, 6}

A – B = {2} and B – A = {5, 6}


16

A B ( A B)  ( B A) {2}  {5,6} {2,5,6}

A B

A B
Q.11 State De Morgan‟s Law.
Ans.: If A and B are any two sets then
(i) ( A  B)' A ' B ' and (ii) ( A  B)' A ' B '

Q.12 Prove the following relation –


n( A  B) n( A) n( B) n( A  B)
Ans.: If A and B are two sets then we know that
A B ( A  B ')  ( A  B)  ( A ' B)
Hence by sum rule –
n( A  B) n( A  B ') n( A  B) n( A ' B) (1)
Again A ( A  B ')  ( A  B)
By sum rule –
n( A) n( A  B ') n( A  B) (2)
Similarly
n( B) n( A  B) n( A ' B) (3)
Now eq^(2) + eq^(3) gives
n( A) n( B) n( A  B) n( A  B) n( A  B ') n( A ' B)
Discrete Mathematics 17

=> n( A) n( B) n( A  B) n( A  B) n( A  B ') n( A ' B)


From eq^(1)
n( A) n( B) n( A  B) n( A  B)
Hence proved.

Q.13 What is Rusell‟s Paradox.


Ans For a collection to be a set it is necessary that we should be able to decide
whether it belongs to the set or not. The assumption that every collection is a set
leads to a paradox known as Russel Paradox .
Consider following example:
A barber in a certain town shaved all those who did not shave themselves and only those.
If S be the collection of all those people whom the barber shaved, is the barber
the member of the set S or not ?
From the above example we get two contradictory statements:
(a) The barber is a member of set S because he shaves himself.
(b) The barber is not a member of the set because he shaves only those who did not
shave themselves.

Q.14 Prove that –


AxB BxA
Ans.: A = {a, b} and B = {1, 2, 3}
A x B = { (a, 1) (a, 2) (a, 3) (b, 1) (b, 2) (b, 3)}
B x A= { (1, a) (1, b) (2, a) (2, b) (3, a) (3, b)}
Here A x B BxA

Q.15 Show that the relation „is congruent to‟ on the set of all triangles in plane is an
equivalence relation.
Ans.: Proof : Let S be the set of all triangles in a plane and R be the relation on S
defined by ( 1 , 2 ) R triangle 1 is congruent to triangle 2 .
(i) Reflexivity : for each triangle S , we have
18

( , ) R S
R is reflexive on S.
(ii) Symmetry : Let 1 and 2 S such that ( 1 , 2 ) R , then

( 1, 2 ) R 1 2

2 1

( 2 , 1 ) R

R is symmetric on S.
(iii) Transitivity : Let 1 , 2 , 3 S such that ( 1 , 2 ) R and ( 2 , 3 ) R , then
( 1, 2 ) R 1 2

( 2 , 3 ) R 2 3

Since 1 2 and 2 3 1 3 ( 1 3 ) R

So, R is transitive.
Hence R is on equivalence relation.

Q.16 Let N be the set of all natural numbers and Let R be a relation on Nx N,
defined by (a, b) R (c, d) ad = bc for all (a, b), (c, d) N x N. Show that R is
an equivalence relation on Nx N.
Ans.: (i) Reflexivity : Let (a, b) be an arbitrary element of N x N, then
(a, b) NxN a, b N
ab ba
(a, b) R (b, a)
(by commutativity of multiplication on N)
Thus (a, b) R (b, a) for all (a, b) NxN .
So, R is reflexive.
(ii) Symmetry : Let (a, b), (c, d) N x N be such that (a, b) R (c, d), then
(a, b) R (c, d) ad bc
Discrete Mathematics 19

cb da
(by commutativty of multiplication on N)
(c, d) R (a, b)
Thus, (a, b) R (c, d) (c, d) R a, b) for all (a, b), (c, d) Nx
N
So, R is symmetric on N x N.
(iii) Transitivity: Let (a, b), (c, d), (e, f) N x N be such that (a, b) R (c, d) and
(c, d) R (e, f), then
(a, b) R (c, d) ad bc
and (c, d) R (e, f) cf de
(ad )(cf ) (bc)(de)
af be
(a, b) R (e, f)
Thus (a, b) R (c, d) and (c, d) R (e, f) (a, b) R (e, f) for all (a,
b), (c, d), (e, f) N x N
So, R is transitive.
Hence, R being reflexive symmetric and transitive is an
equivalence relation on N x N.

Q.17 If A = {1, 2, 3, 4, 5, 6, 7} which of the following two is a partition giving rise to


an equivalence relation.
(i) A1 = {1, 3, 5} A2 = {2} A3 = {4, 7}
(ii) B1 = {1, 2, 5, 7} B2 = {3} B3 = {4, 6}
Ans.: (i) Since A1  A2  A3 = {1, 2, 3, 4, 5, 7} A

So sets A1 , A2 , A3 do not form a partition of A.


(ii) Since B1  B2  B3 = {1, 2, 3, 4, 5, 7} =A and B1 , B2 , B3 are disjoint sets.

Hence B1 , B2 , B3 form a partition of A.


20

Q.18 If R and S are two equivalence relations on a set A, then prove that R  S is an
equivalence relation.
Ans.: It is given that R and S are equivalence relation on A. We have to show that R  S
is an equivalence relation.
(i) Reflexivity : Let a A then
(a, a) R and (a, a) S [ R & S are reflexive]
(a, a) R S
Thus (a, a) R  S for all a A, so R  S is a reflexive relation on A.
(ii) Symmetry : Let a, b A such that (a, b) R S
(a, b) R S (a, b) R and (a, b) S
(b, a) R and (b, a) S
[ R & S are symmetric]
(b, a) R S
Thus (a, b) R S (b, a) R S
R  S is symmetric relation.
(iii) Transitivity: Let a, b, c A such that (a, b) R  S and (b, c) R S
(a, b) R  S and (b, c) R S
(a, b) R and (a, b) S and (b, c) R and (b, c) S
(a, b) R and (b, c) R (a, c) R [ R is transitive]
(a, b) S and (b, c) S (a, c) S [ S is transitive]
(a, c) R and (a, c) S
(a, c) R S
Thus (a, b) R  S and (b, c) R S (a, c) R S
So, R  S is transitive
Hence R  S is an equivalence relation on A.
Discrete Mathematics 21

Chapter-3

Graph Theory

Q.1 Draw simple graphs with one, two, three and four vertices.
Ans.:

Simple graph with one vertex •V1

Simple graph with two vertices V1 V2

Simple graph with three vertices V3

V1 V2

Simple graph with four vertices V4 V3

V1 V2

Q.2 Show that if G = (V, E) is a complete bipartite graph with n vertices then the
n2
total numbers of edges in G cannot exceed .
4
22

Ans.: Let Kp,q be a complete bipartite graph. The total no. of edges in K p,q is p.q and
n
total no. of vertices will be (p+q). If we take p = q = then in complete bipartite
2
n n n2
graph K n2 , n2 no. of edges will be . which is maximum (If two numbers
2 2 4
are equal then their product is maximum). Hence in a complete bipartite graph of
n2
n vertices the no. of edges cannot exceed .
4

Q.3 Show that following two graphs are not isomorphic.


V5 U6

V1 V2 V3 V4 U1 U2 U3 U4 U5
V6
G G‟

Ans.: In graph G and G‘ we find that


(i) No. of vertices in G = No. of vertices in G‘ = 6.
(ii) No. of edges in G = No. of edges in G‘ = 5.
(iii) No. of vertices of degree one in G and G‘ = 3.
No. of vertices of degree two in G and G‘ = 2
No. of vertices of degree three in G and G‘ = 1
i.e. Number of vertices of equal degree are equal. Although it satisfies all
the three conditions but then also G and G‘ are not isomorphic because
corresponding to vertex V4 in G there should be a vertex U3 because in
both G and G‘ there is only one vertex of degree three. But two pendent
vertices V5 and V6 are incident on the vertex V4 in G whereas only one
pendent vertex U6 is incident on the vertex U3 in G‘.
Hence G and G‘ are not isomorphic.
Discrete Mathematics 23

Q.4 Define the followings :-


(i) Walk (ii) Trail (iii) Path (iv) Circuit (v) Cycle
Ans.: (i) Walk : An alternating sequence of vertices and edges is called a Walk. It is
denoted by ‘W’.
Example :

a e1 e4 d

e6 b e3
e e5 e2 c
Figure (1)
Here W = ae1 b e2 c e3 d is a walk.
Walk is of two types :-
(a) Open Walk : If the end vertices of a walk are different then such a
walk is called Open Walk.
Example from fig.(1) : W = a e1 b e2 c e3 d is an open walk.
(b) Closed Walk : If a walk starts and end with same vertex then such
a walk is called closed walk.
Example from fig.(1) : W = a e6 e e5 b e1 a is a closed walk as it starts
and end with same vertex a.
(ii) Trail : An open walk in a graph G in which no edge is repeated is called a
Trail.
Example from fig.(1) : W = a e1 b e2 c e3 d is a trail.
(iii) Path : An open walk in which no vertex is repeated except the initial and
terminal vertex is called a Path.
Example for fig.(1) : W = a e1 b e4 d e3 c is a path.
(iv) Circuit : A closed trail is called a Circuit.
Example for fig.(1) : W = a e1 b e5 e e6 a is a circuit.
(v) Cycle : A closed path is called a Cycle.
24

Example for fig.(1) : W = a e1 b e5 e e6 a is a cycle.

Q.5 State and prove Handshaking Theorem.


Ans.: Handshaking Theorem : The sum of degrees of all the vertices in a graph G is
equal to twice the number of edges in the graph.
Mathematically it can be stated as :

deg(v) 2e
v V

Proof : Let G = (V, E) be a graph where V = {v1, v2, . . . . . . . . . .} be the set of


vertices and E = {e1, e2, . . . . . . . . . .} be the set of edges. We know that every edge
lies between two vertices so it provides degree one to each vertex. Hence each
edge contributes degree two for the graph. So sum of degrees of all vertices is
equal to twice the number of edges in G.

Hence deg(v) 2e
v V

Q.6 Explain Matrix Representation of Graphs.


Ans.: Although a pictorial representation of a graph is very convenient for a visual
study, other representations are better for computer processing. A matrix is
convenient and useful way of the representation of a graph to a computer for a
graph. There are different types of matrices :
(i) Incidence Matrix
(ii) Circuit Matrix
(iii) Adjacency Matrix
(iv) Path Matrix etc.

Q.7 How many edges are there with 7 vertices each of degree 4?
Ans.: In graph G, there are 7 vertices and degree of each vertex is 4. So sum of the
degrees of all the vertices of graph G = 7 x 4 = 28.
According to Handshaking Theorem –
Discrete Mathematics 25

deg(v) 2e
v V

 28 = 2e
 e = 14
So, total no. of edges in G = 14.

Q.8 Define Regular and Complete Graph.


Ans.: Regular Graph : A simple graph G = (V, E) is called a Regular Graph if degree of
each of its vertices are equal.
Examples :
1-
Here degree of each
V1 V2
vertex is one. So it is
regular graph.

V3
2- Degree of each vertex is
two.
V1 V2

3- V4 V3 Degree of each vertex is


two.

V1 V2

Complete Graph : A simple graph G = (V, E) is called a Complete Graph if there


is exactly one edge between every pair of distinct vertices. A complete graph
with n-vertices is denoted by Kn.
26

•K1
K2
K3

K4
K5
K6
n(n 1)
In a complete graph Kn total no. of edges =
2
n(n 1)
i.e. size of Kn =
2

Q.9 Find the shortest path between the vertex a and z in the following graph.

b 5 d 5 f
4 7
3 1 2
a 2 33 z
3 4
c 6 e 5 g
Discrete Mathematics 27

Ans.: First we label the vertex a by permanent label 0 and rest by ‗∞‘.
a b c d e f g h

0 ∞ ∞ ∞ ∞ ∞ ∞ ∞

0 4 3 ∞ ∞ ∞ ∞ ∞

0 4 3 6 9 ∞ ∞ ∞

0 4 3 6 9 ∞ ∞ ∞

0 4 3 6 7 11 ∞ ∞

0 4 3 6 7 11 12 ∞

0 4 3 6 7 11 12 18

0 4 3 6 7 11 12 16

Hence shortest path is a → c → d → e → g → z = 16

Q 10 Explain the Topological Sort.


Ans Let S be a directed graph such that:
1) each vertex vi of S represents a task, and
2) each ( directed) edge (u,v) of S means that the task u must be completed before
beginning the task v . Suppose such a graph S contains a cycle, say P=(u,v,w,u)

This means we must complete task u before beginning v, we must complete task
v before beginning w, and we must complete task w before beginning task u.
Thus we cannot begin any of the three tasks in the cycle. Accordingly, such a
graph S representing tasks and prerequisite relation cannot have any cycles or
we can say such a graph S must be cycle free or acyclic. A directed acyclic ( cycle
free) graph is called a dag for short.
A fundamental operation on a dag S is to process the vertices one after the other
so that the vertex u is always processed before vertex v whenever (u,v) is an
edge. Such a linear ordering T of the vertices of S, which may not be unique, is
called a topological sort.
28

F E C

E G B A D F C

Above is a Topological sort


Discrete Mathematics 29

Chapter-4

Group

Q1 What is a group?
Ans Let G be a non void set with a binary operation * that assigns to each ordered
pair (a,b) of elements of G an element of G denoted by a * b. We say that G is a
group under the binary operation *, if the following three properties are
satisfied:
1) Associativity: the binary operation * is associative i.e.
a*(b*c)=(a*b)*c , a,b,c G
2) Identity: there is an element e, called the identity , in G, such that
a*e=e*a=a , a G
3) Inverse: For each element a in G, there is an element b in G, called an inverse
of a, such that
a*b=b*a=e , a,b G
Note: If a group has the property that
a*b=b*a , i.e commutative law holds then the group is called an abelian.

Q2 What are the elementary properties of Groups ?


Ans The elementary properties of Groups can be understood by the following
theorems:-
Theorum1):-
(i) Statement :- In a Group G, there is only one identity element(uniqueness
of identity)
Proof:- let e and e‘ are two identities in G and let a G
ae = a (i)
ae‘ = a (ii)
30

R.H.S of (i) and (ii) are equal


ae=ae‘
Thus by the left cancellation law, we obtain
e=e‟
there is only one identity element in G for any a G. Hence the
theorem is proved.
(ii) Statement:- For each element a in a group G, there is a unique element b in
G such that ab= ba=e (uniqueness if inverses)
Proof:- let b and c are both inverses of a G
Then ab = e and ac = e
c = ce { existence of identity element }
c = c (ab) { ab = e }
c = (c a) b
c = ( ac ) b { ac = ca }
c = eb
c=b { b = eb }
Hence inverse of a G is unique.
Theorem 2):-
(i) Statement:- In a Group G , (a-1)-1 = a , a G
Proof:- We have a a-1 = a-1 a = e
Where e is the identity element of G
Thus a is inverse of a-1 G
i.e. (a-1)-1 = a , a G

(ii) Statement:- In a Group G, (a b)-1 = b-1 a-1 , a,b G


Proof:- By associatively we have
( b-1 a-1) ab = b-1 (a-1a)b
Discrete Mathematics 31

( b-1 a-1) ab = b-1 (e)b { a-1a = e }


( b-1 a-1) ab = b-1 b { eb = b }
( b-1 a-1) ab = e , { b-1 b=e }
Similarly
(ab)(b-1 a-1) = a (bb-1) a-1
(ab)(b-1 a-1) = a (e) a-1
(ab)(b-1 a-1) = a a-1
(ab)(b-1 a-1) = e { aa-1=e}
Thus ( b-1 a-1) ab = (ab)(b-1 a-1)=e
b-1 a-1 is the inverse of ab
i.e. b-1 a-1 = (ab)-1
Hence the theorem is proved.
Theorum3):-
In a group G, the left and right cancellation laws hold i.e.
(i) ab = ac implies b=c
(ii) ba=ca implies b=c

Proof
(i) Let ab=ac
Premultiplying a-1 on both sides we get
a-1 ( ab ) = a-1 (ac)
(a-1 a) b = ( a-1 a) c
eb = ec
b=c
Hence Proved
Proof
(ii) Let ba=ca
Post multiplying a-1 on both sides
32

(ba) a-1 = (ca) a-1


b ( aa-1) = c(aa-1)
be=ce
b=c
Hence the theorem is proved

Q3 What is the order of an element in the context of Groups ?


Ans The order of an element x in a group G is the smallest positive integer n such
that xn = e.
The order of an element x is denoted by O(x) or |x|. If no such integer exists we
say x has infinite order. So to find the order of an element x G, we need to
compute the sequence of products x, x2,x3,…..until we reach the identity for the
first time.The exponent of this product is the order of x.

Q4 Define Subgroup.
Ans If a nonvoid subset H of a group G is itself a group under the operation of G, we
say H is a subgroup of G.
Theorum:- A subset H of a group G is a subgroup of G if:
(i) the identity element e H.
(ii) H is closed under the operation of G i.e. if a,b H, then ab H and
(ii) H is closed under inverses, that is if a H then a-1 H.

Q5 What are Cyclic subgroups and Cyclic Groups ?


Ans Cyclic Subgroup:- A Subgroup K of a group G is said to be cyclic subgroup if
there exists an element x G such that every element of K can be written in the
form xn for some n Z.
The element x is called generator of K and we write K=<x>
Cyclic Group:- In the case when G=<x>, we say G is cyclic and x is a generator of
G. That is, a group G is said to be cyclic if there is an element x G such that
every element of G can be written in the form xn for the some n Z.
Discrete Mathematics 33

Example, the group G= { 1, -1, i,-i} under usual multiplication is a finite cyclic
group with i as generator , since i1 = i, i2 = -1, i3 = - i and i4 = 1

Q6 Explain Permutation Groups.


Ans A one- to –one mapping of the set {1,2,3,…n} onto itself is called a permutation.
Let A be a nonvoid set, and let SA be the collection of all permutations of A. Thus
permutation group of set A denoted by SA is a set of permutations of A that
forms a group under function composition.
Let A={1,2,3…n}, the set of all permutations of A is called the symmetric group of
degree n and is denoted by Sn.
Elements of Sn may be written as =
The symmetric group Sn has n elements

Q7 What are Cosets ?Explain it.


Ans Let H be a subgroup of a group G. A left coset of H in G is a subset of G whose
elements may be expressed as
xH={ xh | h H}
for any x G. The element x is called a representation of the coset .
Similarly, a right coset of H in G is a subset that may be expressed as
Hx= { hx | h H } , for any x G
Thus complexes xH and Hx are called respectively a left coset and a right coset.
If the group operation is additive (+) then a left coset is denoted as
x + H={ x+h | h H}
and a right coset is denoted by
H + x = { h+x | h H}

Q8 What are Normal Subgroups ?


Ans Let G be a group. A subgroup H of G is said to be a normal subgroup of G if for
all h H and x G , x h x-1 H .
34

If x H x-1 = { x h x-1 | h H } then H is normal in G if and only if xHx-1 H,


x G
We hereby discuss a theorem:
Statement: If G is an abelian group, then every subgroup H of G is normal in G.
Proof: Let any h H, x G , then
x h x-1 = x (h x-1)
x h x-1 = (x x-1) h
x h x-1 = e h
x h x-1 = h H
Hence H is normal subgroup of G.

Q9 Define Group Homomorphism.


Ans A homomorphism is a mapping f: G G „ such that f(xy)=f(x) f(y) , x,y G
The mapping f preserves the group operation although the binary operations of
the group G and G „ are different. Above condition is called the homomorphism
condition.
Kernel of Homomorphism:- The Kernel of a homomorphism f from a group G to
a group G‘ with identity e‘ is the set { x G | f(x) = e‘ }
The kernel of f is denoted by Ker f.
If f: G G „ is a homomorphism of G into G‘, then the image set of f is the range,
denoted by f(G), of the map f. Thus
Im(f) = f(G)= { f(x) G‘ | x G}
If f(G) = G‘, then G‘ is called a homomorphic image of G.
Note:- A group homomorphism f: G G „ which is bijective is known as an
isomorphism.

Q 10 The mapping f: R R+ defined by f(x) = ex is an isomorphism from the group


(R,+) to the group ( R+ , .)
Ans It is clear that the mapping f is bijective in nature and satisfies homomorphism
condition.
Discrete Mathematics 35

f (x+y)=ex+y = ex . ey = f(x) f(y), x, y R


Hence f is an isomorphism.
36

Chapter-5

Finite State Machines and Languages

Q1 What are alphabets ?


Ans The finite non-void set A of symbols is called alphabet or vocabulary. Symbols
can be 0,1 or a,b,c,….,z
(i) A={0,1} is a binary alphabet.
(ii) A={ a,b,c,….., z}

Q2 What are word or sentence ?


Ans If we select some symbols out of the alphabet A to form a finite sequence or a
finite string, then what we obtain is called a word or sentence.
Example: string w=101011 is a sentence formed out of the element of alphabet
A={0,1}
Similarly, w=aabcb is a sentence formed out of the alphabet A={a,b,c}

Q3 Define Empty word or empty string.


Ans Any string is called empty string, if it is formed by none of the symbols/letters
of alphabet A. Empty string is denoted by
Length of any string w is denoted by |w| if w=101011 then |w|=6.

Q4 Define Powers of an alphabet.


Ans Let A is an alphabet. Then all the possible strings(words) formed from the
symbols/letters of an alphabet A of each having length k are denoted by Ak and
is called power of an alphabet A.
Example:- for any alphabet A , A0= { }.
If A={0,1} , A1 = {0,1}, A2 = { 00,01,10,11}, A3 = {000,001,010,011,100,101,110,111 }
A* is a set consisting of all the words formed from the letters of alphabet A.
Discrete Mathematics 37

If A={0,1} then
A* ={ ,0,1,00,01,10,11,000,001,……}
Therefore, A*= A0 A1 A2 ……

Q5 What is Concatenation of words ?


Ans Let u and v are two words on alphabet A. Then uv is called the concatenation of
words u and v, obtained by writing u and v one after the other.
Let u = 10011 and v=011011
Therefore uv=10011011011
vu=01101110011
clearly, for any three words u,v,w
(uv)w=u(vw)

Q6 What are subwords and initial segments?


Ans let u=a1a2…..an is any word on alphabet A. Then string w= aj aj+1 …..ak is called
a subword of word u.
When j=1 i.e. w=a1a2……ak is called the initial segment of u.

Q7 What is a Language. Explain.


Ans The collection of words on an alphabet A is called a language. If A is an alphabet
and
L A* where A* ={ ,0,1,00,01,10,11,……} , then L is called language.
If L is a language on alphabet A, then L will be also a language on any superset
of A.
Example: Let A={a,b}
L1 ={a,ab,ab2 ,……} , L2 ={ a2,a4,a6,…….} are languages on alphabet A.
Note:-
(1) A* is language on alphabet A.
(2) i.e. the empty language is also a language on alphabet A.
(3) { }, where is empty word is also a language.
38

Q8 What is the Finite State Automata ?


Ans A finite state automata (FSA) denoted by M consists of five parts:-
1) A finite set (alphabets) A of inputs.
2) A finite set S of (internal) states .
3) A subset Y of S (whose elements are called accepting or ―yes‖ states).
4) An initial state s0 in S.
5) A next – state function F from S x A into S.

Such an automation M is denoted by M=(A,S,Y,s0 ,F) when we want to indicate


its five parts.
Example:- The following defines an automation M with two input symbols and
three states:
1) A={a,b}, input symbols.
2) S={s0,s1,s2}, internal states.
3) Y={ s0,s1 }, ―yes‖ states.
4) s0 , initial state.
5) Next-state function F: S x A S defined by
F(s0 , a)= s0 , F(s1 , a)= s0 , F(s2 , a)= s2
F(s0 , b)= s1 , F(s1 , b)= s2 , F(s2 , b)= s2

F a b

s0 s0 s1

s1 s0 s2

s2 s2 s2
Discrete Mathematics 39

a b
a,b

b
S0 S2
S1
a

Q9 What is a Phase Structure Grammar or simply a Grammar ?


Ans A Phase structure grammer consists of four parts:
1) A finite set (vocabulary) V.
2) A subset T of V whose elements are called terminals.
3) A non-terminal symbol S called the start symbol.
4) A finite set P of productions. A production is an ordered pair(a,b) usually written as
a b where a and b are words in V. Each production in P must contain at least one
nonterminal on its left side.

Such a grammer G is denoted by G=G(V,T,S,P) when we want to indicate its four


parts.
Terminals are denoted by lower case a,b,c.. and nonterminals will be denoted by
capital A,B,C..with S as the start symbol.

Q10 What is the concept of Finite State Machines ?


Ans A finite state machine (FSM) is similar to a finite state automation (FSA) except
that the finite state machine ―prints‖ an output using an output alphabet distinct
from the input alphabet. The formal definition follows.
A Finite state machine M consists of six parts:
1) A finite set A of input symbols.
2) A finite set S of ―internal‖ states.
3) A finite set Z of output symbols.
4) An initial state s0 in S.
5) A next-state function f from S x A into S.
40

6) An output function g from S x A into z.

Such a machine M is denoted by M=M(A,S,Z,s0 , f , g) when we want to indicate


its six parts.
Discrete Mathematics 41

Chapter-6

Posets and Lattices

Q1 What is a Partially ordered set or Poset ?


Ans Let R is a relation on a set S satisfying the following three properties:
1) Reflexive: For any a S, we have a R a.
2) Antisymmetric: If a R b and b R a, then a=b.
3) Transitive: If a R b and b R c, then a R c.

Then R is called a partial order.


The set S with the partial order is called a partial ordered set or simply a poset.

Q2 What are Supremum and Infimum ?


Ans Let A be a subset of a partially ordered set S. An element M in S is called an
upper bound of A if M succeeds every element of A, i.e. if for every x in A, we
have
x <=M
If an upper bound of A precedes every other upper bound of A, then it is called
the supremum of A and is denoted by
Sup( A )
An element m in a poset S is called a lower bound of a subset A of S if m
precedes every element of A, i.e. if ,for every y in A, we have
m <=y
If a lower bound of A succeeds every other lower bound of A, then it is called the
infimum of A and is denoted by
Inf(A)

Q3 Explain Well-Ordered sets.


Ans An ordered set S is said to be well – ordered if every subset of S has a first
element
One of the example of a well ordered set is the set N of positive integers.
42

A well ordered set is linearly ordered. For if a,b S, then { a, b} has a first
element; hence a and b are comparable. Every subset of a well –ordered set is
well-ordered.

Q4 What are Lattices ?


Ans Let L be a non empty set closed under two binary operations called meet and
join, denoted by and . Then L is called a lattice if the following axioms hold
where a,b,c are elements in L :
1) Commutative law:-
(a) a b = b a (b) a b = b a
2) Associative Law :-
(a) (a b) c = a b c) (b) ( a b) c=a (b c)
3) Absorption Law:-
(a) a ( a b) = a (b) a (a b) = a

Q5 What is the Duality ?


Ans The dual of any statement in a lattice ( L , , ) is defined to be a statement that
is obtained by interchanging an . For example, the dual of a (b a ) = a a
is
a ( b a )= a a

Q6 Define Bounded Lattices.


Ans A lattice L is said to have a lower bound 0 if for any element x in L we have 0
<=x. L is thus said to have an upper bound I if for any x in L , we have x<=I. We
say L is bounded if L has both a lower bound 0 and an upper bound I. In such a
lattice we have the identities:
a I = I , a I = a , a 0 =a , a 0 = 0 for any element a in L

Q7 Define Complements and complemented lattices.


Ans Let L be a bounded lattice with lower bound o and upper bound I. Let a be an
element if L. An element x in L is called a complement of a if
a x = I and a x = 0
A lattice L is said to be complemented if L is bounded and every element in L has
a complement.
Discrete Mathematics 43

Chapter-7

Combinatorics

Q1 What are Permutation and Combinations. Explain with examples.

Ans Permutation : Permutation means arrangement of things. The word arrangement


is used, if the order of things is considered.

Number of permutations of ‗n‘ different things taken ‗r‘ at a time is given by:-

nPr = n!/(n-r)!

Combination: Combination means selection of things. The word selection is used,


when the order of things has no importance.

Example: Suppose we have to form a number of consisting of three digits


using the digits 1,2,3,4, To form this number the digits have to be arranged.
Different numbers will get formed depending upon the order in which we
arrange the digits. This is an example of Permutation.

Now suppose that we have to make a team of 11 players out of 20 players, This is
an example of combination, because the order of players in the team will not result
in a change in the team. No matter in which order we list out the players the
team will remain the same! For a different team to be formed at least one player
will have to be changed.

Q2 Explain the fundamental principles of counting.


Ans The two fundamental principles of counting:
44

Addition rule : If an experiment can be performed in ‗n‘ ways, & another


experiment can be performed in ‗m‘ ways then either of the two experiments can
be performed in (m+n) ways. This rule can be extended to any finite number of
experiments.

Example: Suppose there are 3 doors in a room, 2 on one side and 1 on other
side. A man want to go out from the room. Obviously he has ‗3‘ options for it. He
can come out by door ‗A‘ or door ‗B‘ or door ‘C‘.

Multiplication Rule : If a work can be done in m ways, another work can be done
in ‗n‘ ways, then both of the operations can be performed in m x n ways. It can be
extended to any finite number of operations.

Example.: Suppose a man wants to cross-out a room, which has 2 doors on


one side and 1 door on other site. He has 2 x 1 = 2 ways for it.

Q3 What is the Factorial of any number?


Ans Factorial n : The product of first ‗n‘ natural numbers is denoted by n!.

n! = n(n-1) (n-2) ………………..3.2.1.

Ex. 5! = 5 x 4 x 3 x 2 x 1 =120
Discrete Mathematics 45

Note 0! = 1

Proof n! =n, (n-1)!

Or (n-1)! = [n x (n-1)!]/n = n! /n

Putting n = 1, we have

O! = 1!/1

or 0 = 1

Q4 Explain the various types of permutations.


Ans (1) Number of permutations of ‗n‘ different things taken ‗r‘ at a time is given by:-

nPr = n!/(n-r)!

Proof: Say we have ‗n‘ different things a1, a2……, an.

Clearly the first place can be filled up in ‗n‘ ways. Number of things left after
filling-up the first place = n-1

So the second-place can be filled-up in (n-1) ways. Now number of things left
after filling-up the first and second places = n - 2

Now the third place can be filled-up in (n-2) ways.

Thus number of ways of filling-up first-place = n

Number of ways of filling-up second-place = n-1

Number of ways of filling-up third-place = n-2

Number of ways of filling-up r-th place = n – (r-1) = n-r+1


46

By multiplication – rule of counting, total no. of ways of filling up, first, second --
rth-place together :-

n (n-1) (n-2) ------------ (n-r+1)

Hence:
nPr = n (n-1)(n-2) --------------(n-r+1)

= [n(n-1)(n-2)----------(n-r+1)] [(n-r)(n-r-1)-----3.2.1.] / [(n-r)(n-r-1)] --


--3.2.1

nPr = n!/(n-r)!

3) Number of permutations of ‗n‘ different things taken all at a time is given by:-

nP n = n!

Proof :
Now we have ‗n‘ objects, and n-places.

Number of ways of filling-up first-place = n

Number of ways of filling-up second-place = n-1

Number of ways of filling-up third-place = n-2

Number of ways of filling-up r-th place, i.e. last place = 1

Number of ways of filling-up first, second, --- n th place =


n (n-1) (n-2) ------ 2.1.

nPn = n!

Concept.
Discrete Mathematics 47

We have nPr = n!/n-r

Putting r = n, we have :-

nPr = n! / (n-r)

But nPn = n!

Clearly it is possible, only when n! = 1

Hence it is proof that 0! = 1

Note : Factorial of negative-number is not defined. The expression –3! has no


meaning.

4) Number of permutations of n-thing, taken all at a time, in which ‗P‘ are of


one type, ‗g‘ of them are of second-type, ‗r‘ of them are of third-type, and rest
are all different is given by :-

n!/p! x q! x r!

4) Number of permutations of n-things, taken ‗r‘ at a time when each thing can
be repeated r-times is given by = nr.

Proof.

Number of ways of filling-up first –place = n

Since repetition is allowed, so

Number of ways of filling-up second-place = n

Number of ways of filling-up third-place

Number of ways of filling-up r-th place = n

Hence total number of ways in which first, second ----r th, places can be filled-up
48

= n x n x n ------------- r factors.

= nr

Q5). How many different signals can be made by 5 flags from 8-flags of different
colours?
Ans. Number of ways taking 5 flags out of 8-flage = 8P5

= 8!/(8-5)!

= 8 x 7 x 6 x 5 x 4 = 6720

Q6 How many words can be made by using the letters of the word
“SIMPLETON” taken all at a time?
Ans. There are ‗9‘ different letters of the word ―SIMPLETON‖

Number of Permutations taking all the letters at a time = 9P9

Q7 In how many ways can the letters of the word “Pre-University” be arranged?
Ans The possible ways are=13!/2! X 2! X 2!

Q8 A child has 3 pocket and 4 coins. In how many ways can he put the coins in
his pocket.
Ans. First coin can be put in 3 ways, similarly second, third and forth coins also can be
put in 3 ways.

So total number of ways = 3 x 3 x 3 x 3 = 34 = 81

Q9 What are circular permutations? Explain


Ans There are two cases of circular-permutations:-
Discrete Mathematics 49

(a) If clockwise and anti clock-wise orders are different, then total number of
circular-permutations is given by (n-1)!

(b) If clock-wise and anti-clock-wise orders are taken as not different, then
total number of circular-permutations is given by (n-1)!/2!

Proof(a):

(a) Let‘s consider that 4 persons A,B,C, and D are sitting around a round table

Shifting A, B, C, D, one position in anticlock-wise direction, we get the following


agreements:-

Thus, we use that if 4 persons are sitting at a round table, then they can be shifted
four times, but these four arrangements will be the same, because the sequence of
A, B, C, D, is same. But if A, B, C, D, are sitting in a row, and they are shifted,
then the four linear-arrangement will be different.
50

Hence if we have ‗4‘ things, then for each circular-arrangement number of linear-
arrangements =4

Similarly, if we have ‗n‘ things, then for each circular – agreement, number of
linear – arrangement = n.

Let the total circular arrangement =p

Total number of linear–arrangements = n.p

Total number of linear–arrangements = n. (number of circular-arrangements)

Or Number of circular-arrangements = 1 (number of linear arrangements)

n = 1( n!)/n

circular permutation = (n-1)!

Proof

(b) When clock-wise and anti-clock wise arrangements are not different,
then observation can be made from both sides, and this will be the
same. Here two permutations will be counted as one. So total
permutations will be half, hence in this case.

Circular–permutations = (n-1)!/2

Note: Number of circular-permutations of ‗n‘ different things taken ‗r‘ at a


time:-

(a) If clock-wise and anti-clockwise orders are taken as different, then total
number of circular-permutations = nPr /r

(b) If clock-wise and anti-clockwise orders are taken as not different, then
total number of circular – permutation = nPr/2r
Discrete Mathematics 51

Q10 How many necklace of 12 beads each can be made from 18 beads of different
colours?
Ans. Here clock-wise and anti-clockwise arrangement s are same.
Hence total number of circular–permutations: 18P12/2x12

= 18!/(6 x 24)

Q11 What are restricted permutations ?


Ans (a) Number of permutations of ‗n‘ things, taken ‗r‘ at a time, when a
particular thing is to be always included in each arrangement

= r n-1 Pr-1

(b) Number of permutations of ‗n‘ things, taken ‗r‘ at a time, when a


particular thing is fixed: = n-1 Pr-1

(c) Number of permutations of ‗n‘ things, taken ‗r‘ at a time, when a


particular thing is never taken: = n-1 Pr.

(d) Number of permutations of ‗n‘ things, taken ‗r‘ at a time, when ‗m‘
specified things always come together = m! x ( n-m+1) !

(e) Number of permutations of ‗n‘ things, taken all at a time, when ‗m‘
specified things always come together = n ! - [ m! x (n-m+1)! ]

Example: How many words can be formed with the letters of the word ‗OMEGA‘
when:

(i) ‗O‘ and ‗A‘ occupying end places.

(ii) ‗E‘ being always in the middle


52

(iii) Vowels occupying odd-places

(iv) Vowels being never together.

Ans.

(i) When ‗O‘ and ‗A‘ occupying end-places

=> M.E.G. (OA)

Here (OA) are fixed, hence M, E, G can be arranged in 3! ways

But (O,A) can be arranged themselves is 2! ways.

=> Total number of words = 3! x 2! = 12 ways.

(ii) When ‗E‘ is fixed in the middle

=> O.M.(E), G.A.

Hence four-letter O.M.G.A. can be arranged in 4! i.e 24 ways.

(iii) Three vowels (O,E,A,) can be arranged in the odd-places (1st, 3rd and 5th)
= 3! ways.

And two consonants (M,G,) can be arranged in the even-place (2nd, 4th) = 2
! ways

=> Total number of ways= 3! x 2! = 12 ways.

(iv) Total number of words = 5! = 120!

If all the vowels come together, then we have: (O.E.A.), M,G

These can be arranged in 3! ways.

But (O,E.A.) can be arranged themselves in 3! ways.


Discrete Mathematics 53

=> Number of ways, when vowels come-together = 3! x 3!

= 36 ways

=> Number of ways, when vowels being never-together

= 120-36 = 84 ways.

Q12 Give the formula for calculating combinations.Explain


Ans Number of Combination of ‗n‘ different things, taken ‗r‘ at a time is given by:-
nCr= n! / r ! x (n-r)!

Proof: Each combination consists of ‗r‘ different things, which can be arranged
among themselves in r! ways.

=> For one combination of ‗r‘ different things, number of arrangements = r!

For nCr combination number of arrangements: r nC r

=> Total number of permutations = r! nC r --------------- (1)

But number of permutation of ‗n‘ different things, taken ‗r‘ at a time

= nPr -------(2)

From (1) and (2) :

nPr = r! . nCr

or n!/(n-r)! = r! . nCr

or nC r = n!/r!x(n-r)!
54

Note: nCr = nCn-r

or nC r = n!/r!x(n-r)! and nCn-r = n!/(n-r)!x(n-(n-r))!

= n!/(n-r)!xr!

Q13 Explain restricted combinations.


(a) Number of combinations of ‗n‘ different things taken ‗r‘ at a time, when ‗p‘
particular things are always included = n-pCr-p.
(b) Number of combination of ‗n‘ different things, taken ‗r‘ at a time, when ‗p‘
particular things are always to be excluded = n-pCr

Example: In how many ways can a cricket-eleven be chosen out of 15 players? if

(i) A particular player is always chosen,

(ii) A particular is never chosen.

Ans:

(i) A particular player is always chosen, it means that 10 players are selected out of
the remaining 14 players.

= Required number of ways = 14C10 = 14C4

= 14!/4!x19! = 1365

(ii) A particular players is never chosen, it means that 11 players are selected out of
14 players.

=> Required number of ways = 14C11


Discrete Mathematics 55

= 14!/11!x3! = 364

(iii) Number of ways of selecting zero or more things from ‗n‘ different things is
given by:- 2n-1

Proof: Number of ways of selecting one thing, out of n-things = nC 1

Number of selecting two things, out of n-things = nC 2

Number of ways of selecting three things, out of n-things = nC 3

Number of ways of selecting ‗n‘ things out of ‗n‘ things = nC n

=>Total number of ways of selecting one or more things out of n different things

= nC 1 + nC2 + nC3 + ------------- + nCn

= (nC0 + nC1 + -----------------nCn) - nC0

= 2n – 1 [ nC0=1]

Example: John has 8 friends. In how many ways can he invite one or more of
them to dinner?

Ans. John can select one or more than one of his 8 friends.

=> Required number of ways = 28 – 1= 255.

(iv) Number of ways of selecting zero or more things from ‗n‘ identical things is
given by :- n+1

Example: In how many ways, can zero or more letters be selected form the
letters AAAAA?

Ans. Number of ways of :

Selecting zero 'A's = 1


56

Selecting one 'A's = 1

Selecting two 'A's =1

Selecting three 'A's = 1

Selecting four 'A's = 1

Selecting five 'A's = 1

=> Required number of ways = 6 [5+1]

Q14 What are generating function ?


Ans Let a0 , a1, a2, …., ar be a sequence of real numbers. Then the function defined
as:

G( a,z) = a0 + a1 z + a2 z2 + ….+ ar zr +…= n zn

Is called Generating function for the given sequence, where z is a variable.

For example, the generating function of the numeric function ar = 3r ( r >= 0) is

G(x) = 30 + 31 x + 32 x2 +…+ 3r xr +… which can be written in closed form as

G(x) =

Q 15 What is the Pigeonhole Principle ?


Ans If n pigeonholes are occupied by n+1 or more pigeons, then atleast one
pigeonhole is occupied by more than one pigeon.

Generalized pigeonhole principle is:- If n pigeonholes are occupied by kn+1 or


more pigeons, where k is a positive integer, then at least one pigeonhole is
occupied by k+1 or more pigeons.
Discrete Mathematics 57

Q16 What is the principle of inclusion-exclusion?


Ans Let A , B and C be any finite sets. Then according to principle of inclusion and
exclusion:-

(1) n (A B)= n(A) + n(B) - n( A B)


(2) n( A B C)= n(A)+n(B)+n(C)-n(A B)-n(A C)-n(B C) +n(A B C)
58

Multiple Choice Question


Q1. Which of the following statement is the negation of the statement,
“2 is even and –3 is negative”?
(A) 2 is even and –3 is not negative.
(B) 2 is odd and –3 is not negative.
(C) 2 is even or –3 is not negative.
(D) 2 is odd or –3 is not negative.
Ans:D

Q2 A partial ordered relation is transitive, reflexive and


(A) antisymmetric. (B) bisymmetric.
(C) antireflexive. (D) asymmetric.
Ans:A

Q3 Let N = {1, 2, 3, ….} be ordered by divisibility, which of the following subset is totally
ordered,
(A) 2, 6, 24. (B) 3, 5, 15.
(C) 2, 9, 16. (D) 4, 15, 30.
Ans:A

Q.4 If B is a Boolean Algebra, then which of the following is true


(A) B is a finite but not complemented lattice.
(B) B is a finite, complemented and distributive lattice.
(C) B is a finite, distributive but not complemented lattice.
(D) B is not distributive lattice.
Ans:B

Q.5The number of distinguishable permutations of the letters in the word BANANA are,
(A) 60. (B) 36.
(C) 20. (D) 10.
Ans:A

Q.6 The minimized expression of ABC ABC ABC ABC is


(A) A C. (B) BC .
(C) C . (D) C.
Ans:C
Discrete Mathematics 59

Q.7 Which of the following pair is not congruent modulo 7?


(A) 10, 24 (B) 25, 56
(C) -31, 11 (D) -64, -15
Ans:B

Q.8 For a relation R on set A, let M m , m 1 R ij ij if aiRaand


j 0 otherwise, be the
matrix of relation R. If 2 MR =MR then R is,
(A) Symmetric (B) Transitive
(C) Antisymmetric (D) Reflexive
Ans:B
`
Q.9 If x and y are real numbers then max (x, y) + min (x, y) is equal to
(A) 2x (B) 2y
(C) (x+y)/2 (D) x+y
Ans:D

Q.10 The sum of the entries in the fourth row of Pascal’s triangle is
(A) 8 (B) 4
(C) 10 (D) 16
Ans:A

Q.11 Which of the following statement is the negation of the statement “2 is even or –3
isnegative”?
(A) 2 is even & -3 is negative (B) 2 is odd & -3 is not negative
(C) 2 is odd or –3 is not negative (D) 2 is even or –3 is not negative
Ans:B

Q.12 In how many ways can a president and vice president be chosen from a set of 30
candidates?
(A) 820 (B) 850
(C) 880 (D) 870

Q.13 The relation { (1,2), (1,3), (3,1), (1,1), (3,3), (3,2), (1,4), (4,2), (3,4)} is
(A) Reflexive. (B) Transitive.
(C) Symmetric. (D) Asymmetric.
Ans:B

Q.14The expression a a c is equivalent to


60

(A) a (B) a+c


(C) c (D) 1
Ans:B

Q.15 A partial order relation is reflexive, antisymmetric and


(A) Transitive. (B) Symmetric.
(C) Bisymmetric. (D) Asymmetric.
Ans:A

Q.16 If n is an integer and n2 is odd ,then n is:


(A) even. (B) odd.
(C) even or odd. (D) prime.
Ans:B

Q.17 In how many ways can 5 balls be chosen so that 2 are red and 3 are black
(A) 910. (B) 990.
(C) 980. (D) 970.
Ans:B

Q.18 A tree with n vertices has _____ edges


(A) n (B) n+1
(C) n-2 (D) n-1
Ans:D

Q.19 Which of the following statement is true:


(A) Every graph is not its own sub graph.
(B) The terminal vertex of a graph are of degree two.
(C) A tree with n vertices has n edges.
(D) A single vertex in graph G is a sub graph of G.
Ans:D

Q.20 Pigeonhole principle states that AB and A B then:


(A) f is not onto (B) f is not one-one
(C) f is neither one-one nor onto (D) f may be one-one
Ans:B

Q.21 The number of distinct relations on a set of 3 elements is:


(A) 8 (B) 9
(C) 18 (D) 512
Discrete Mathematics 61

Ans:D

Q.22 A self complemented, distributive lattice is called


(A) Boolean Algebra (B) Modular lattice
(C) Complete lattice (D) Self dual lattice
Ans:A

Q.23 How many 5-cards consists only of hearts?


(A) 1127 (B) 1287
(C) 1487 (D) 1687
Ans:B

Q.24 The number of diagonals that can be drawn by joining the vertices of an octagon is:
11
(A) 28 (B) 48
(C) 20 (D) 24
Ans:C

Q.25 A graph in which all nodes are of equal degrees is known as:
(A) Multigraph (B) Regular graph
(C) Complete lattice (D) non regular graph
Ans:B

Q.26 Transitivity and irreflexive imply:


(A) Symmetric (B) Reflexive
(C) Irreflexive (D) Asymmetric
Ans:D

Q.27A binary Tree T has n leaf nodes. The number of nodes of degree 2 in T is:
(A) log n (B) n
(C) n-1 (D) n+1
Ans:A

Q.28 Push down machine represents:


(A) Type 0 Grammar (B) Type 1 grammar
(C) Type-2 grammar (D) Type-3 grammar
Ans:C

Q.29 Let * be a Boolean operation defined by


62

A * B = AB + A B , then A*A is:

(A) A (B) B
(C) 0 (D) 1
Ans:D

Q.30 In how many ways can a party of 7 persons arrange themselves around a circular table?
(A) 6! (B) 7!
(C) 5! (D) 7
Ans:A

Q.31 In how many ways can a hungry student choose 3 toppings for his prize from a list of
10delicious possibilities?
(A) 100 (B) 120
(C) 110 (D) 150
Ans:B

Q.32 A debating team consists of 3 boys and 2 girls. Find the number of ways they can sit in a
row?
(A) 120 (B) 24
(C) 720 (D) 12
Ans:A

Q.33Suppose v is an isolated vertex in a graph, then the degree of v is:


(A) 0 (B) 1
(C) 2 (D) 3
Ans:A

Q.34In an undirected graph the number of nodes with odd degree must be
(A) Zero (B) Odd
(C) Prime (D) Even
Ans:D

Q.35 Find the number of relations from A = {cat, dog, rat} to B = {male , female}
(A) 64 (B) 6
(C) 32 (D) 15
Ans:A
Discrete Mathematics 63

Q.36 The number of functions from an m element set to an n element set is:
(A) mn (B) m + n
(C) nm (D) m * n
Ans:A

Q.37 Which of the following statement is true:


(A) Every graph is not its own subgraph
(B) The terminal vertex of a graph are of degree two.
(C) A tree with n vertices has n edges.
(D) A single vertex in graph G is a subgraph of G.
Ans:D

Q.38 What is the converse of the following assertion?


I stay only if you go.
(A) I stay if you go. (B) If you do not go then I do not stay
(C) If I stay then you go. (D) If you do not stay then you go.
Ans:B

Q.39 The length of Hamiltonian Path in a connected graph of n vertices is


(A) n–1 (B) n
(C) n+1 (D) n/2
Ans:A

Q.40A graph with one vertex and no edges is:


(A) multigraph (B) digraph
(C) isolated graph (D) trivial graph
Ans:D

Q 41If R is a relation “Less Than” from A = {1,2,3,4} to B = {1,3,5} then RoR-1 is


(A) {(3,3), (3,4), (3,5)}
(B) {(3,1), (5,1), (3,2), (5,2), (5,3), (5,4)}
(C) {(3,3), (3,5), (5,3), (5,5)}
(D) {(1,3), (1,5), (2,3), (2,5), (3,5), (4,5)}
Ans:C

Q.42 How many different words can be formed out of the letters of the word VARANASI?
(A) 64 (B) 120
(C) 40320 (D) 720
64

Ans:D

Q.43Which of the following statement is the negation of the statement “4 is even or -5 is


negative”?
(A) 4 is odd and -5 is not negative (B) 4 is even or -5 is not negative
(C) 4 is odd or -5 is not negative (D) 4 is even and -5 is not negative
Ans:A

Q.44 A complete graph of n vertices should have __________ edges.


(A) n-1 (B) n
(C) n(n-1)/2 (D) n(n+1)/2
Ans:C

Q.45 A relation that is reflexive, anti-symmetric and transitive is a


(A) function (B) equivalence relation
(C) partial order (D) None of these
Ans:C

Q.46 A Euler graph is one in which


(A) Only two vertices are of odd degree and rests are even
(B) Only two vertices are of even degree and rests are odd
(C) All the vertices are of odd degree
(D) All the vertices are of even degree
Ans:D

Q.47 What kind of strings is rejected by the following automaton?


(A) All strings with two consecutive zeros
(B) All strings with two consecutive ones
(C) All strings with alternate 1 and 0
(D) None
Ans:B

Q.48 A spanning tree of a graph is one that includes


(A) All the vertices of the graph
(B) All the edges of the graph
(C) Only the vertices of odd degree
(D) Only the vertices of even degree
Ans:A
Discrete Mathematics 65

Q.49The Boolean expression A AB AB is independent to


(A) A (B) B
(C) Both A and B (D) None
Ans:B

Q.50 Seven (distinct) car accidents occurred in a week. What is the probability that they
alloccurred on the same day?
(A) 1 76 (B) 7 1 2
(C) 5 1 7 (D) 7 1 7
Ans:A
66

KEY TERMS
Proposition:-A Proposition or a statement or logical sentence is a declarative sentence
which is either true or false.
Predicate:- All that is told about the subject in a sentence is called predicate.
compound statement:- Statements or propositional variables can be combined by
means of logical connectives (operators) to form a single statement called compound
statements.

Biconditional statement or Equivalence:- If p and q are two statements then ―p if and


only if q‖ is a compound statement, denoted as p q and reffered as a biconditional
statement or an equivalence.
Set:- A well defined collection of objects or elements is called a set.
Finite set : A set is called a finite set if the process of counting the elements of that set
surely comes to an end. Example is A={2,4,6,8} is a finite set because the number of
elements in set A is 4.
Infinite set: A set is called an infinite set if the process of counting the number of
elements in that set never ends, ie there are infinite elements in the set. Example is N=
set of natural numbers .
Universal set:- In any application of the theory of sets, the members of all sets under
investigation usually belong to some fixed large set called the universal set. The
universal set is denoted by U.
Subsets:- If every element in a set A is also an element of a set B, then A is called a
subset of B. It can be denoted as A B. Here B is called Superset of A.
Example: If A={1,2} and B={4,2,1} the A is the subset of B or A B.
Null set:- A set having no elements is called a Null set or void set. It is denoted by .
Union : Let A and B be two sets then union of A and B which is denoted as A  B is a
set of elements which belongs either to A or to B or to both A and B.
Intersection : Intersection of A and B which is denoted as A  B is a set which contains
those elements that belong to both A and B.
Difference : Let A and B be two sets. The difference of A and B which is written as A -
B, is a set of all those elements of A which do not belongs to B.
Rusell‟s Paradox:- For a collection to be a set it is necessary that we should be able to
decide whether it belongs to the set or not. The assumption that every collection is a set
leads to a paradox known as Russel Paradox.
Walk : An alternating sequence of vertices and edges is called a Walk. It is denoted by
‘W’.
Discrete Mathematics 67

Open Walk : If the end vertices of a walk are different then such a walk is called Open
Walk.
Closed Walk : If a walk starts and end with same vertex then such a walk is called
closed walk.
Trail : An open walk in a graph G in which no edge is repeated is called a Trail.
Path : An open walk in which no vertex is repeated except the initial and terminal
vertex is called a Path.
Circuit : A closed trail is called a Circuit.
Cycle : A closed path is called a Cycle.
Regular Graph : A simple graph G = (V, E) is called a Regular Graph if degree of each
of its vertices are equal.

Complete Graph : A simple graph G = (V, E) is called a Complete Graph if there is


exactly one edge between every pair of distinct vertices. A complete graph with n-
vertices is denoted by Kn.
Group:- Associativity, Identity, Inverse.
Subgroup.:- If a nonvoid subset H of a group G is itself a group under the operation of
G, we say H is a subgroup of G.
Cyclic Subgroup:- A Subgroup K of a group G is said to be cyclic subgroup if there
exists an element x G such that every element of K can be written in the form xn for
some n Z.
The element x is called generator of K and we write K=<x>
Cyclic Group:- In the case when G=<x>, we say G is cyclic and x is a generator of G.
That is, a group G is said to be cyclic if there is an element x G such that every
element of G can be written in the form xn for the some n Z.
Alphabets:- The finite non-void set A of symbols is called alphabet or vocabulary.
word or sentence :- If we select some symbols out of the alphabet A to form a finite
sequence or a finite string, then what we obtain is called a word or sentence.
Empty word or empty string:- Any string is called empty string, if it is formed by none
of the symbols/letters of alphabet A. Empty string is denoted by .
Language. Explain ::-The collection of words on an alphabet A is called a language.
Partially ordered set or Poset :- Let R is a relation on a set S satisfying the following
three properties:
Reflexive,Antisymmetric ,Transitive , Then R is called a partial order.
Permutation : Permutation means arrangement of things. The word arrangement is used,
if the order of things is considered.
68

Combination: Combination means selection of things. The word selection is used, when
the order of things has no importance.
Discrete Mathematics 69

Bibliography

1. Bush, James R. (2003), Discrete Mathematics Workbook (Upper Saddle River, NJ:
Pearson/Prentice Hall).
2. Ensley, Douglas E.; & Crawley, J. Winston (2006), Discrete Mathematics:
Mathematical Reasoning and Proof with Puzzles, Patterns, and Games (Hoboken, NJ:
John Wiley & Sons).
3. Epp, Susanna S. (2004), Discrete Mathematics with Applications, Third Edition
(Belmont, CA: Brooks/Cole—Thomson Learning).
4. Feil, Todd; & Krone, Joan (2003), Essential Discrete Mathematics for Computer
Science (Upper Saddle River, NJ: Pearson/Prentice Hall).
5. Gerstin, Judith L. (2007), Mathematical Structures for Computer Science: A Modern
Approach to Discrete Mathematics, Sixth Edition (New York: W.H. Freeman).
6. Goodaire, Edgar G.; & Parmenter, Michael M. (2006), Discrete Mathematics with
Graph Theory, Third Edition (Upper Saddle River, NJ: Pearson/Prentice Hall).
7. Grassmann, Winfried Karl; & Tremblay, Jean-Paul (1996), Logic and Discrete
Mathematics: A Computer Science Perspective (Upper Saddle River, NJ: Prentice
Hall).

Websites:

1. en.wikipedia.org/wiki/Discrete_mathematics
2. http://home.iitk.ac.in/~arlal/book/mth202.pdf
3. http://www.cs.columbia.edu/~zeph/3203s04/lectures.html
4. http://www.cs.columbia.edu/~zeph/3203s04/lectures.html
70

You might also like