Download Discrete Mathematics

Document related concepts

Factorization of polynomials over finite fields wikipedia , lookup

Dessin d'enfant wikipedia , lookup

Birkhoff's representation theorem wikipedia , lookup

Centrality wikipedia , lookup

Dual graph wikipedia , lookup

Signal-flow graph wikipedia , lookup

Transcript
Biyani's Think Tank
Concept based notes
Discrete Mathematics
(B.Sc -IYear)
Poonam Fatehpuria
Lecturer
Deptt. of Science
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
Edition: 2011
Price:
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
For free study notes log on: www.gurukpo.com
Discrete Maths
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
For free study notes log on: www.gurukpo.com
4
Syllabus
For free study notes log on: www.gurukpo.com
Discrete Maths
5
Content
S.No
Unit Name
1
Set Theory and Relation
2
Boolean Algebra
3.
Recurrence Relation and Finite State Machines and Languages
4.
Graph
5
Tree
6
Unsolved Paper 2011-12
For free study notes log on: www.gurukpo.com
6
Unit 1
Set Theory
Sets and Elements: A set may be viewed as an unordered collection of distinct objects called as
elements on members of the set.
Universal Set :
Large Set (denotes to
Empty Set:
The set with no elements (denotes to
Sub Sets:
If every element in a set A is also an element of a set B, then A is called a
subset of B.
)
)
Laws of the algebra of sets:
S.No
Laws
1
A
A=A
2
A
(B
A
3
4
5
A
C) = (A
(B
C) = (A
Laws Name
Idempotent Laws
A=A
B)
B)
Associative Laws
C
C
Commutative Laws
A
B=B
A
A
B=B
A
A
(B
C) = (A
B)
(A
C)
A
(B
C) = (A
B)
(A
C)
A
=A
A
U=A
Distributive Laws
Identity Laws
For free study notes log on: www.gurukpo.com
Discrete Maths
7
6
¬(¬A)) = A
7
¬(A
B) = ¬A
¬B
¬(A
B) = ¬A
¬B
8
Law of Double Complement
A
(A
B) = A
A
(A
B) = A
9
(A‟)‟ = A
10
A–B=A
11
A
B = (A
De Morgan‟s Laws
Absorption Laws
Involution Law
Definition of Set Difference
¬B
B) – (A
B)
Definition of Symmetric
Difference
Mathematical Induction:
The proof consists of two steps:
1. Basic Step : Showing that the statement holds when, n = 0 or n = 1.
2. The inductive step: Showing that if the statement holds for some n, then the statement
also holds when n + 1 is substituted for n.
For free study notes log on: www.gurukpo.com
8
Q.1
Prove that the set (A ∪ B) ∩ (A ′ ∩ B) ′ is simply the same as the set A itself.
Ans
(A ∪ B) ∩ (A ′ ∩ B) ′ = (A ∪ B) ∩ ((A ′) ′ ∪ B ′) By De Morgan‟s Law
= (A ∪ B) ∩ (A ∪ B ′)
By Involution Law
= A ∪ (B ∩ B ′)
By Distributive Law
=A∪ø
By Complement Law
=A
By Identity Law
Q.2
Prove that A ∪ (A ∩ B) = A.
Ans
A ∪ (A ∩ B)
= (A ∩ U) ∪ (A ∩ B) By Identity Law
= A ∩ (U ∪ B) By Distributive Law
= A ∩ (B ∪ U) By Commutative Law
= A ∩ U By Identity Law
= A By Identity Law
Q.3
Define Finite set.
Ans
Finite sets are sets that have a finite number of elements.
Example:
A = {0, 1, 2,3, 4, 2, 6, 7, 8, …, 100}
Q.4
Define Infinite set.
Ans
An infinite set is a set which is not finite. It is not possible to explicitly list out all the
elements of an infinite set.
Example:
T = {x : x is a triangle}
Q.5
Define Count ably Infinite set…
For free study notes log on: www.gurukpo.com
Discrete Maths
9
Ans.
Any set which can be put in a one-to-one correspondence with the natural numbers (or
integers).
Q.6
Define Uncountable Infinite Set.
Ans
An infinite set, such as the real numbers, which is not countable.
Q.7
If A and B are two finite sets, then prove that(Inclusion-Exclusion Principle):
|A
Ans.
B | | A|
| B|
|A
B|
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)
Again A
n( A  B ') n( A  B) n( A ' B)
(1)
( A  B ')  ( A  B)
By sum rule –
n( A)
n( A  B ') n( A  B)
(2)
n( A  B) n( A ' B)
(3)
Similarly
n( B)
Now eq^(2) + eq^(3) gives
n( A) n( B)
=>
n( A  B) n( A  B) n( A  B ') n( A ' B)
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.
OR
Given: A and B are finite set.
By Venue Diagram
For free study notes log on: www.gurukpo.com
10
Here Blue Part = A
B
Here we see that A and B over lap means in elements A
and B.
B belongs to both of the sets A
The sum of |A| and |B| count these elements twice.
To correct this
|A
B | | A|
| B|
|A
B|
Its also called Inclusion-Exclusion Principle.
Q.8
If A1 , A2 and A3 be finite sets then prove that
| A1
Ans.
A2
A3 | = | A1 | + | A | + | A3 | - | A1
2
A2 | - | A1
A3 | - | A2
A3 | + | A1
A2
Assume
| A1
A2 | = X
| A1 | + | A | - | A1
2
| A1
A2
A3 |
…………..(1)
A2 | =X
=|X
A3 |
| X | | A3 | | X
| X | | A3 |
| A1
A3 |
A2 |
A3
For free study notes log on: www.gurukpo.com
A3 |
Discrete Maths
11
| X | | A3 | - | A1
A3 |
| X | | A3 |
A3 | | A2
| A1
= | A1 | + | A2 | + | A3 | - | A1
| A2
A3 |
A3 ) | A1
A2 | - | A1
A3
A3 | - | A2
A2 |
By Eq.( 1)
A3 | +
| A1
A2
A3 |
Q.9
Among integers 1 to 300 , how many of them are divisible neither by 3, nor by 5, nor
by 7?
Ans
Total Integers = 300
Numbers divisible by 3 | A1 | | 300 / 3 | 100
Numbers divisible by 5 | A2 | | 300 / 5 | 60
Numbers divisible by 7 | A3 | | 300 / 7 | 42
| A1
A2 | = |300/3|= 100
| A1
A3 | = |300/5|= 60
| A2
A3 | = |300/7| = 42
Numbers that are divisible neither by 3, nor by 5, nor by 7 = 300 - | A1
= 300-[ | A1 | + | A2 | + | A3 | - | A1
A2 | - | A1
A3 | - | A2
A3 | + | A1
A2
= 300-162
= 138
Q.10
13
23
33
..... n3
1 2
n n 1
4
Ans
13
23
33
..... n3
1 2
n n 1
4
Basic Step: P 1
L.H.S = 13
1
For free study notes log on: www.gurukpo.com
A2
A3 | ]
A3 | =
12
1 2
.1 1 1
4
R.H.S
2
1
So P(1) is true
Induction Step: Prove for P(k+1)
13
L.H.S
23
33
1 2
k k 1
4
..... k 3
2
1
2
k 1 (k 2
4
1
k 1
4
1
K 1
4
1
K 1
4
R.H.S
2
2
2
k
k 1
4k
2
k 1
3
3
4)
2
K 1 1
K 1 1
2
2
So L.H.S = R.H.S
So P(k + 1) is true, if P(k) is true.
Q.11 Find the how many numbers are there between 1 & 65, which are divisible be any
one of 2, 3 & 5.
Sol.
Let A1 =
Let A2 =
|
| = 65/2 = 32
|
| = 65/3 = 21
|
| = 65/5 = 13
|
|=
For free study notes log on: www.gurukpo.com
Discrete Maths
13
=
|
|=
|
|=
|
|=
Acc. To ques
|
|=|
|+|
|+|
|-|
|-|
|-|
|-|
|
= 32+21+13-10-4-6+2 = 48
Q.12 For all sets A, B, C, show (A-B)U(B-A) = (AUB)-(A B)
Ans
Bc) U (B
(A-B) U (B-A) = (A
= (AU(B
Ac)
Ac))
(BcU (B
(A Ac))
= ((A B)
By set difference
= (A B)
U
U
= (A B)
(Bc
= (A B)
(B A)c
(Bc
Ac))
((Bc
Ac)
Ac)
B)
By Distributive Law
(Bc
Ac))
by Distributive Law
by Thm 5.3.3(2b)
by Thm. 5.2.2(4)
by Thm. 5.2.2(7)
= (A B) - (B A)
by Thm. 5.2.2(10)
= (A B) - (A B)
by Thm. 5.2.2(1)
Q. 13 . For all sets A,B,C, show (A-B)-C = A-(BUC)
Ans
(A-B)-C
Cc
= (A-B)
= (A
Bc)
By Set Difference
Cc
By Set Difference
=A
(Bc
Cc)
By Associative Law
=A
(B
C)c
By De Morgan‟ Law
= A – (BUC)
By Set difference
For free study notes log on: www.gurukpo.com
14
Q. 14 For any sets A, B and C prove that (A-C)-(B-C) = (A-B)-C
Ans
(A-C)-(B-C) =(A C')
(B C')'
=(A
C')
(B'
C'')
=(A
C')
(B'
C)
=A
(C'
(B'
C))
=A
((C'
B')
(C'
C))
=A
((C'
B')
)
=A
(C'
B')
=A
(B'
C')
= (A
B')
C'
= (A-B)-C
By Set Difference
By De Morgan‟s Law
By Double Complement
By Associative Law
By Distributive Law
By Inverse Law
By Identity Law
By Commutative Law
By Associative Law
By Set Difference
Q. 15 For any set A, B and C prove that
A B
B A A B A B
Ans
Let x
A B
B A
x
A B or x
B A
x
X
A and x B or x B and x
A B and X A B
X
A B
A B
Hence
A B
B A
A B A
Let X
X
x
x
A
A
B
A
B and X
x A B
B A
Hence
A B A B
A B
By 1 and 2
A B
B A
A
……………………….(1)
B
B
A
B
A and x B or x B and x
A B or x
A
A
B A
B A
B A
……………………….(2)
B
Q.16 Let A1 , A2 , A3 ......... An be any sets, then show by mathematical induction that
n
Ans
n
 Ai
A
i 1
i 1
i
Let P(n): The equality holds for any n sets, i.e
For free study notes log on: www.gurukpo.com
Discrete Maths
15
n
n
 Ai
A
i 1
i 1
i
Basis Step:
P(1) is the statement A1 A1 which is true.
Inductive Step:
Let p(k) be true, then we have to prove that P(k+1) is also true
Now , if P(k) is true then
k
k
A
A
i 1
i 1
i
i
Further, LHS of P(k+1) is
k 1
A
A1
A2
A3
......
Ak
( A1
A2
A3
......
Ak )
( by associativity of
)
i
Ak
1
i 1
( A1
A2
A3
......
Ak )
Ak
Ak
1
!
(by DeMorgan‟s law)
k
k
A
Ak
i
A
AK
i
1
1
i 1
i 1
(using (1))
k 1
A
i
RHS of P k 1
i 1
Thus the implication P(k)
P(K+1) is a tautology and hence by the principle of mathematical
induction, P(n) is true for all n 1.
n
Q.17 Show that B

i 1
i 1
i
n
Ans
Let P(n): B
n
A

i 1
i 1
i
P(2) is B
Ai , for n
2.
n
A
2
Basis Step:
B
B
Ai
2
A

i 1
i 1
i
B
Ai implies B
A1
A2
B
Which follows from the distributive law of union and intersection.
For free study notes log on: www.gurukpo.com
A1
B
A2
16
Inductive Step:
Let P(k) holds for any k, that is
k
B
k
 Ai

i 1
i 1
B
Ai
Then we have to show that P(k+1) holds, i.e.,
k 1
B
k 1
 Ai

i 1
i 1
B
Ai
Now LHS of P(k+1) is
k 1
A
B
i
i 1
k
A
B
Ak
i
1
i 1
k
A
B
B
i
Ak
!
i 1
k
B
Ai
B
Ak
1
i 1
k 1

B
Ai
i 1
=RHS of P(k+1)
Thus P(k+1) holds
Hence P(n) holds for every integer n 2
For free study notes log on: www.gurukpo.com
Discrete Maths
17
Relations and Functions
Relations:
A relation R from a set A to a set B is a B is a subset of A X B.
Domain of a Relation:
The set of all the first elements of the ordered pairs which belong
to R.
x : x Aand x, y R
The set of all the second elements of the ordered pairs which
belong to R.
y : y B and x, y R
Range of a Relation:
Inverse Relation:
R is a relation from set A to a Set B. Then the inverse of R is a relation
from B to A.
Types of Relations:
1. Identity Relation: The identity relation of a set A is that relation on A under which each element
of A is related to itself.
2. Reflexive Relation: A relation R on a set A is said to be reflexive if every element of A is related
to itself. a, a R for all a A
3. Symmetric Relation:
A relation R on a set A is said to be a symmetric relation if and only if
a, b
R
b, a
R for all a, b
A
4. Transitive Relation: Let A be any set. A relation R on A is said to be a transistive relation if
and only if a, b R and b, c R
a, c R for all a, b, c, A
5. Antisymmetric Relation: A relation R on a set A is said to be antisymmetric relation if and only
if a, b R and b, a R
a b for all a, b A
6. Equivalence Relation: A relation R on a set A is said to be an equivalence relation on A if and
only if it is reflexive, Symmetric and Transistive.
7. Partial Order Relation: A relation R on a set A is called Partial order, if R is reflexive,
antisymmetric and transitive.
Lattice:
A poset is called a lattice if every pair of elements has both a Ub and an Lb.
Ub and Lb:
An upper bound of a subset S of some partially ordered set (P, ≤) is an element of
P which is greater than or equal to every element of S.[1] The term lower bound is
For free study notes log on: www.gurukpo.com
18
defined dually as an element of P which is less than or equal to every element of S.
A set with an upper bound is said to be bounded from above by that bound, a set
with a lower bound is said to be bounded from below by that bound.
Pigeonhole Principle: If R+1 or more objects are placed into R boxes, then there id atleast one
box containing two or more of the objects.
Diagraph of a POSET:
The diagraph of partial order relation on a finite set can be denoted
in a simple manner than these of general relation.
We have following observation:
1. The POSET is reflexive so every vertex of the poset has a cycle pf length one.
2. The POSET order is anti-symmetric so if there is an edge fron a to b then there isno
edge from b to a , if b a .
3. If there is an edge from a to b and also an edge from b to c then by transistivity there
will be an edge from a to c.
4. In view of (b) and (c) we can say that the diagraph of a partial order relation has no
cycle of length more than one.
Hasse or Poset Diagrams
To construct a Hasse diagram:
1)
Construct a digraph representation of the poset (A, R) so that all arcs point up (except the
loops).
2)
Eliminate all loops
3)
Eliminate all arcs that are redundant because of transitivity
4)
Eliminate the arrows at the ends of arcs since everything points up.
Q.1
Prove that –
AxB
Ans.:
A = {a, b}
BxA
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
AxB
BxA
For free study notes log on: www.gurukpo.com
Discrete Maths
19
Q.2
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
ad bc
(a, b) R (c, d)
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)
NxN
So, R is symmetric on N x N.
(iii)
Transitivity: Let (a, b), (c, d), (e, f)
f), then
ad bc
(a, b) R (c, d)
and (c, d) R (e, f)
(ad )(cf )
af
N x N be such that (a, b) R (c, d) and (c, d) R (e,
cf
de
(bc)(de)
be
(a, b) R (e, f)
Thus (a, b) R (c, d) and (c, d) R (e, f)
d), (e, f) N x N
(a, b) R (e, f) for all (a, b), (c,
So, R is transitive.
For free study notes log on: www.gurukpo.com
20
Hence, R being reflexive symmetric and transitive is an equivalence
relation on N x N.
Q.3
Ans
The dual of a lattice is also a lattice.
Let (L,R)be a lattice, where R is a partial order relation on a non-void set L, i.e., (L,R) ia a
poset. If R 1 is the inverse of R, then R 1 is also a partial order relation. Consequently
L. R 1 is a poset.
Now we will prove that for any a, b L, a b and a b are the GLB and LUB respectively
of the subset {a, b} with regard to R 1 .
Since a, b L
with regard to R, a b Sup a, b
a R a b and b R a b
a b R
a
1
a and a b R
1
b
b is the LB of a and b with regard to R
1
Now if c is the another LB of a and b with regard to R 1 , then
c R 1 a and c R 1 b aR c and bR c
c is the UB of a and b with regard to R
(a b) R c
cR
1
a
b is the GLB of a and b with regard to R
a b
1
So in L, R
1
a
b
Inf a, b
Like wise it can be prove that In
L, R 1 a b Sup a, b
Hence L, R
Q.4
Ans
1
is a lattice.
There are 5 separate departments in a departmental store and total number of
employee are 36. Show that one of the department must have atleast 8 employee.
Acc to pigeonhole principle‟s aon of the department will have at least
36 1
1 employees
5
35
1 7 1 8
5
Q.5
Which elements of the poset{{2, 4, 5, 10, 12, 20, 25}/} are maximal and which are
minimal?
Ans
Hasse diagram:
For free study notes log on: www.gurukpo.com
Discrete Maths
21
Maximal Elements: 12, 20, 25
Minimal Elements: 2, 5
Q.6
Let f be a function defined from the set X to the set Y and let A, B be the subsets of
Y, then
(i)
Ans
f
1
A
f
f x
A
f x
A or f x
B
1
f
x
y
f
A
1
y
B
1
f y
y
f
1
f
1
A
1
1
1
B
B
A } {f
1
B
………….(1)
B
A or y
A
f
f
1
f
A } {f
A
f
B
B
A or x
1
f
1
B
1
f
1
f
f
A
x
Let
1
A
(i) Let x
B
f
1
B
B
A
f
B
1
B
f
1
A
B
…………..(2)
ForEq.(1) and (2)
f
1
A
B
f
1
A
f
1
B
For free study notes log on: www.gurukpo.com
22
Unit 2
Boolean Algebra and Application
Boolean Algebra is an algebraic structure which is based on the principles of logics.
Properties of Boolean Algebra:
Commutative:
Distributive:
Identity:
Complementation:
(i) a+b = b+ a
(ii) a.b = b.a
a, b B
(i) a + (b.c) = (a+b).(a+c)
(ii) a.(b+c) = (a.b)+(a.c)
(i) a+0 = a
a B
(ii) a.1 = a
(i) a+a’ = 1
(ii) aa’ = 0
The Mathematical structure is said to be Boolean algebra if its satisfies
(i)
Commutative Law
A B=B A
A B=B A
(ii)
Distributive Law
A (B C) = (A
A (B C) = (A
(iii)
Identity Law
A
=A
A U=A
(iv)
Complement Law
A ~A 1
A ~A
B)
B)
(A C)
(A C)
0
Every element of Boolean Algebra
(i)
a+a=a
(ii)
a.a = a
(iii)
a + 1 =1
(iv)
a.0 = 0
(v)
(a+ (ab)) = 1
(vi)
a(a+b) = a
For free study notes log on: www.gurukpo.com
Discrete Maths
(vii)
(viii)
(ix)
(x)
(xi)
23
o` = 1
1` = 0
(a`)` = a
(a+b)`=a`b`
(ab)` = a`+b`
Group:
(G,*) is said to be a group if following conditions satisfied:
(i)
Closure Property
a G, b G then a * b G
(ii)
Associative Property a * b * c
a *b *c
(iii)
(iv)
Existence of Identity a * e e * a
Existence of Inverse a * a
a *a
Abelian Group:
A group is said to be abelian group if it satisfy the commutative Property.
Commutativity a * b
b*a
SemiGroup: A group is said to be semi group if it satisfy the
(i)
The operation * is a closed operation.
(ii)
The operation * is an associative operation.
Ring: An algebraic structure R, , is called a ring if it satisfies the following property:
(i)
Addition is associative
(ii)
Addition is commutative
(iii)
There exits an element denoted by 0 in R such that
0+a =a
(iv)
(-a) + a = 0
(v)
(vi)
a.(b.c) (a.b).c
a.(b c) a.b a.c
(b c).a b.a c.a
Normal Forms: The two forms are:
(1) Disjunctive Normal Form: A disjunction of statement variables and(or) their negations
is called fundamental disjunction .
(2) Conjunction Normal Form: A statement form which consists of a conjunction of
fundamental disjunction is called CNF.
Q.1
Ans
Prove that for any a, b and c in a Boolean Algebra the following two expression are
equal: (a+b)(a`+c)(b+c) = (a+b)(a`+c)
L.H.S
For free study notes log on: www.gurukpo.com
24
=(a+b)(a`+c)(b+c)
= (a+b)(c+a`)(c+b)
By Commutative Law
= (a+b)(c+a‟b)
By Distributive law
= (a+b)c+(a+b) a`b
By Distributive Law
= ac+bc+a(a`b)+b(a‟b)
By Distributive Law
= ac+bc+(aa`)b+a(bb) By Commutative and Associative Law
= ac +bc +0.b + a`b
(aa‟=0 , bb=b)
= ac + bc +b.0 +a`b
By Commutative Law
= ac + bc + 0 +a`b
(b.0 = 0)
= ac + bc +a`b
( 0 is an additive identity)
L.H.S (a+b) ( a`+c)
= (a+b)a` +(a+b)c
= aa` + ba` +ac +bc
= 0 + ba`+ac +bc
= ba` +ac +bc `
=ac + ba` + bc
= ac + a`b+bc
By Distributive law
By Distributive law
(aa`=0)
( 0 is an additive identity)
By Commutative Law
By Commutative Law
R.H.S = L.H.S
Q.2
Prove that b(a+c) + ab' + bc' + c = a + b + c
Ans
b(a+c)
Q.3
Ans
The set I of Integers is a group under the operation of Multiplication.
The set I of integers is a group if it satisfies the following properties:
Closure Property:
Multiplication of two integers is always integers
Associative Property:
a*(b*c) = (a*b)*c
Existence of Identity:
a+0 = 0+a = a
Existence of Inverse:
a+ (-a) = (-a) +(a) = 0
+ ab' + bc' + c
= ba + bc + ab' + bc' + c
= a(b+b') + b(c + c') + c
= a.1 + b.1 + c
=a+b+c
The set of integers satisfies the following properties so it is Group.
Q.4
Consider the set Q of rational numbers and let * be the operation on Q defined by
Ans
Is it Commutative?
We have
a * b a b ab
a *b *c
a b ab * c
a b ab
c
a b ab c
a b ab c ac bc abc
a b c ab ac bc abc
For free study notes log on: www.gurukpo.com
Discrete Maths
25
a * b*c
a * b c bc
a * b c bc
a
b c bc
a b c bc
a b c ab ac bc abc
Hence * is Associative and semi group. Q,* is a commutative.
Q.5
Let R be the ring of integers under ordinary addition and multiplication. Let R` be
the set of all even integers . Let us define multiplication in R` to be denoted by * by
the relation
ab
a *b
2
Where ab is the ordinary multiplication of two integers a and b.Prove that (R1, +, *) ia a
commutative ring where + stand for ordinary addition of integers.
Ans
Here a and b are both even integers then
Therefore a * b
ab
2
ab
is also even integers.
2
R`
Thus R` is closed with respect to *.
a bc / 2
ab / 2 c
ab
a*
a * b*c
2
2
2
ab
*c
2
a *b *c
Hence it is associative.
a *b =
ab
ba
=
=(b*a)
2
2
Hence * is commutative.
a b c
ab ac
2
2
2
(b c)a ba ca
b c *a
2
2
2
Hence * is distributive.
a* b c
a *b
a *c
Hence (R`, + ,*) is a commutative ring.
‘
Q .6
Find the DNF of ~ p
r
p
q
For free study notes log on: www.gurukpo.com
26
Ans
The Truth table for the same is as:
p
q
r
~p
T
T
T
F
T
T
T
T
T
F
F
T
T
T
T
F
T
F
T
F
F
T
F
F
F
T
F
F
F
T
T
T
T
F
F
F
T
F
T
F
F
F
F
F
T
T
T
T
T
F
F
F
T
F
T
F
~p
r
p
q
~p
r
p
q
Hence the rows of p, q r in which has truth value T appears in the last Column
Hence the required DNF is p q r
p q ~r
~ p ~q r
Q.7
Ans
Let G be the set of all non-zero real numbers and let a*b=ab/2 . Then show that (G,
*) is an abelian group.
1)Closure:
Let a, b G
a and b are non zeroreal numbers
ab are non zeroreal numbers
ab
are non zeroreal numbers
2
ab
G
a *b G
2
G is closed
Associativity: a, b, c
a * b*c
a*
bc
2
G then
a bc
2.2
abc
4
Also
a *b *c
ab
*c
2
ab c
2 2
abc
4
Hence
For free study notes log on: www.gurukpo.com
Discrete Maths
27
a * b *c = a *b *c
Existence of Identity:
Let e be the identity element in G then
a * e a,
a G
ae
2
a
e 2 G
Hence 2 is an identity element in G
Existence of Inverse: Let b is the inverse of a G then a * b
ab
2
2
4
b
G
a
2
Hence a is an arbitrary element so each element of G has its inverse in G.
Abelian: Let a, b G
ab ba
2
2
a * b b * a,
a *b
b*a
a, b G
Therefore (G, *) is an abelian group
Q8
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
Q9
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
Q 10 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
For free study notes log on: www.gurukpo.com
28
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.
For free study notes log on: www.gurukpo.com
Discrete Maths
29
Unit 3
Recurrence Relation
For Homogenous Solution(f(r)=0):
Case 1:
C0 ar C1ar
Roots
h
r
Case 2:
1
,
h
r
If
1
h
r
Case 3:
C2 ar
,
3
2
r
1
C1
C0 ar C1ar
Roots
1
1
C2
r
0
k
0
r
...... Ck
2
2
k
........ Ck ar
are real and identical
2
r
C1 C2r
2
k
are distinct and real
C2 ar
1
........ Ck ar
2
C3
r
3
r
...... Ck
k
3
C1 C2 r C3r 2
r
C4
r
4
...... Ck
r
k
When two roots are complex and Distinct
h
2
r
2
2
r
tan
Where
Case 4:
C1 cos r
C2 sin r
C3
r
3
C4
r
4
..... Ck
r
k
1
2p roots are complex and repeated
....... p
i
1
2
3
p 1
h
r
2
p 2
r
2 2
i
C1 C2 r C3r 2 ........C p r p
Cp
1
1
cos r
cP 2 r C p 3r 2 ..... C2 p r p
For Particular Solution:
2
m
Case 1 When f(r)=A+Br+Cr ...... zr of degree m and root 1
For free study notes log on: www.gurukpo.com
1
sin r
30
P
A0 A1r A2r 2 ...... Amr n
When root = 1
P
r n A0 A1r A2 r 2 ...... Am r n
r
r
Case 2 When f(r)= A+Br+Cr 2
characteristic equation.
P
Ar A0 r m A1r m
r
...... zr m a r is a polynomial of degree m and if a is not root of the
1
A2 r m
2
...... Am 1r
Am
If a is the root of the characteristic equation
P
r n A0 A1r A2 r 2 ...... Am r m a r
r
k
r
(i)
ar
p
A
(ii)
ar
p
Ar
(iii)
ar
p
(iv)
F r
Case 3 f r
r
Ar
is not the root.
when A is constant and
r
2
when
is root of the equation.
r
1
2
C os r or Sin r
of F r
ar
p
AC os r
Sin r
Coefficient of Generating Function:
S.No
1
Coefficient of x k
Generating Function
1 x
n
n
n
n
Ck x k
Ck
k 0
2
1 ax
a k n ck
n
n
ak
n
Ck x k
k 0
3
1
1 x
4
k
a .x
n
n
Ck
a
k
xk
ak
n k 1
Ck
k 0
1
1 x
ak
k
0
1
1 ax
6
k 0
1
1 ax
5
1
xk
k
1 xk
1
k
k 0
For free study notes log on: www.gurukpo.com
Discrete Maths
7
1
1 ax
8
ex
k 0
Q. 1
Ans
31
1
n
k
n k 1
Ck a
k 0
k
1
xk
1 ax
1
n
k
a
k
n k 1
Ck
k 0
1
k!
xk
!
k
Consider the recurrence relation
a n = 6a n-1 - 9a n-2 with initial conditions a 0 = 4 and a 1 = 6
The characteristic equation is
2
2
6
9
3
0
3
We get
Apply Case 2
h
h
r
n
C1 C2n
C1 C2n 3n
r
When a 0 = 4
C1 C2 .0 30
4
C1 C2 .1 31
6
When a 1 = 6
Solving this system, we get C1 = 4 and C 2 = −2. The solution of (3) with its initial
conditions is then
h
n
n
r = 4 · 3 − 2n 3
Q.2
Ans
Consider the recurrence relation
a n = 7a n-1 - 12a n-2 with initial conditions a 0 = 2 and a 1 = 5
The characteristic equation is
2
7 12 0
2
4
3
3, 4
Apply Case 1
3
12 0
h
r
C1 3n C2 4n
When a 0 = 2
C1 30 C2 40
2
C1 31 C2 41
6
When a 1 = 5
For free study notes log on: www.gurukpo.com
32
Solving this system, we get C1 = 3 and C 2 = −1. The solution of with its initial conditions
is then
h
3.3r 4r
r
Q.3
Ans
Consider the recurrence relation
a n = a n-1 + a n-2 with initial conditions a 0 = 0 and a 1 = 1
The characteristic equation is
2
1 0
1
5
2
Apply Case 1
n
h
1
C1
r
n
5
1
C2
2
5
2
When a 0 = 0
C1 C2
0
When a 1 = 1
1
C1
1
1
5
C2
2
1
C1 C2
2
= C1 C2
1
5
2
1
5
C1 C2 1
2
2 C1 C2 0
,
5
Solving this system, we get C1 =
1
and C 2 =
5
1
. The solution of with its initial
5
conditions is then
n
1
5
h
r
Q.4
Ans
1
5
2
n
1
5
2
Consider the recurrence relation
a n + a n-2 0 with initial conditions a 0 = 1 and a 1 = 3
The characteristic equation is
2
1 0
i
For free study notes log on: www.gurukpo.com
Discrete Maths
33
Apply Case 3
h
1
n
n
2
C1 cos n
C2 sin n
Where
h
1
n
n
2
C1 cos n
2
tan
1
1
0
C2 sin n
2
2
When a 0 = 1
C1.1 C2 .0 1
When a 1 = 3
C1 0
C2 .1 3
Solving this system, we get C1 = 1 and C 2 = 3. The solution of with its initial conditions
is then
n
n
h
cos
3sin
r
2
2
Q.5
Ans
Consider the recurrence relation
a n + 2a n-1 2an 2 0 with initial conditions a 0 = 1 and a 1 = 3
The characteristic equation is
2
2
2
2
0
4 8
1 i
2
Apply Case 3
h
n
1 1
n
2
C1 cos n
Where
h
n
2
n
2
C1 cos n
3
4
C2 sin n
1 3
1
4
3
C2 sin n
4
tan
1
When a 0 = 1
C1.1 C2 .0 1
When a 1 = 3
2 C1 cos
3
4
C2 sin
3
4
3
For free study notes log on: www.gurukpo.com
34
Solving this system, we get C1 = 1 and C 2 = 4. The solution of with its initial conditions
is then
n
3
3
h
2
2
cos n 4sin
n
n
4
4
Q. 6
Consider the recurrence relation
a n = 5a n-1 - 6a n-2 8r 2 with initial conditions a 0 = 4 and a 1 = 7
Ans
Here f( r) = 8r 2
The characteristic equation is
2
5
6
3
2 0
We get
3, 2
h
Apply Case1
C1 2
r
r
C2 3
r
For Particular Solution:
Apply case 1
p
ar
Ar 2 Br1 C
A0 r 2
A1 r1
A3
8 A r2
5 A r 1
2
B r 1
C
6 a r 2
2
B r 2
C
14 A B r 19 A 7B C
Equate the Coefficient
A=8–A
B = 14A – B
C = -19A + 7B - C
Solving this system, we get A = 4, B = 28 , C=60 The Particular solution is
p
4r 2
r
28r
60
The general Solution = ar
C1 2
When a0
r
r
4r 2
ar
p
28r
60
4
C1 C2
When a1
C2 3
h
56
7
2C1 3C2
85
Solving this we get
C1
83 , C2
Answer becomes
Q.7
27
83 2r
27.3r
4r 2
28r 60
Consider the recurrence relation
For free study notes log on: www.gurukpo.com
8r 2
Discrete Maths
Ans
35
a r = 5a r-1 - 6a r-2 3.5r with initial conditions a 0 = 4 and a 1 = 7
The characteristic equation is
The characteristic equation is
2
5
6
3
2 0
We get
3, 2
h
Apply Case1
C1 2
r
r
C2 3
r
For Particular Solution:
Apply case
ar ( p )
A.5r
A.5r
5 A.5r
1
6 A.5r
2
3.5r
Equating Coefficient we get
A=25/2
25 r
5
2
ar ( p )
The general Solution
C1 2r
ar =
When a0
c1
c2
C2 3r
25 r
5
2
4
17
2
When a1
2C1
7
3C2
111
2
Solving these we get
Q.8
Ans
C1
30 or C2
ar
30.2 r
77
2
77 r
3
2
25 r
.5 r
2
0
Find the generating functions for the following sequences
(i)
1, 1, 1, 1, 1, 1, 0, 0, 0, 0, …
(ii)
1, 1, 1, 1, 1, …
(iii) 1, 3, 3, 1, 0, 0, 0, 0, …
The generating function is
G x
1 1x 1x2 1x3 1x4 1x5 0x6 0x7 ......
G x
1 x x2
x3
x4
x5 .
We can apply the formula for the sum of a geometric series to rewrite G(x) as
1 x6
G x
1 x
For free study notes log on: www.gurukpo.com
36
(v)
The generating function is
1 x x2
G x
x4 ............
1
G x
(vi)
x3
1 x
The generating function is
1 3x 3x2 1
G x
G x
1 x
3
Q. 9 Find the generating functions of the following sequences in closed form
(i) 1, 2, 3, 4, 5, 6, 7
1 1 1
(ii) 0,1,
, , ,........
2 3 4
Ans (i) The generating function is
1 2x 3x2
G x
d
x
dx
d
x
dx 1 x
1
4x3 ........
x2
x3
x4
.........
2
1 x
(ii) The generating function is
1 2 1 3 1 4
G x
x
x
x
x
2
3
4
1 x x2 x3 ...... dx
......
dx
1 x
ln 1 x
C
Q .10 Find the discrete numeric function corresponding to the following generating function:
G x
1 x2
1 x
Ans
G x
4
1 x2
1 x
4
1 x2 1 4 x
4.5 2
x
2!
4.5.6 3
x
3!
........
4.5.6.... r 3
r!
xr
....
For free study notes log on: www.gurukpo.com
Discrete Maths
37
4.5
1 x2
2!
1 4x
4.5.6
3!
x15 in
Q.11
Ans
4 x3
x3
1 x
Coefficient of x15 in x3 1 x
3
15
3
Coefficient of x in x 1 x
3
=
3 12 1
3
4.5.6..... r 1
r!
r
3
3
5x 1 x
Coeff of x15
5x 1 x
Coeff of x14 in 1 x
C12
5
= 91
4.5.6..... r 3
5x
Find the coefficient of
Coefficient of x12 in 1 x
....
-
3 14 1
3
3
C14
600
= -509
Q.12
1
Find the coefficient of x8 in
x 3 x 2
Ans
By partial Derivation
1
2
x 3 x 2
1
1
x
1
3
3
1
1
1
x 3
x 2
x 2
1
x
1
2
2
Coefficient of x in
8
Coefficient of x in
8
Coefficient of x in
1
3
1
39
9
1
2
9
1
1
x
1
4
2
1
1
x
1
3
3
8
Q.13
2
1
x
1
2
2
1
x
1
4
2
9 1
2 2
1
2
1
3
1
2
1
4
2
2
1 8 1
C8
1 8 1
C8
2 8 1
C8
1
2
1
2
1
3
8
8
8
9
7
210
Using Generating Function find the Recurrence Relation of
For free study notes log on: www.gurukpo.com
2 !
38
ar
6ar
9ar
1
0,
2
a0
2, a1
3
Ans
ar x r
We have A x
r 0
ar x r
ar 1 x r
6
r 2
r 2
A x
a0
ar 2 x r
9
0
r 2
a1 x
6x A x
A x 1 6x 9x2
a0
a0
9x 2 A x
0
a1 x 6 xa0
a0 a1 x 6 xa0
1 6 x 9 x2
Put the value of a0 2, a1
2 3x 12 x
1 6 x 9 x2
2 9x
A x
3
2
1 3x
By Partial Derative
2 9x
1 3x
A
1 3x
2
B
1 3x
2
By Solving we get
3
1 3x
1
1 3x
3r x r
3
r 0
2
r 1 3r x r
r 0
3r
1
r 1 3r x r
r 0
3r 2 r x r
r 0
ar
2 r 3r
Another Method:
Q..14 Using generating functions, find a n in terms of n in
a0
Ans
1, a1
2 and an
2
5an
1
4an for n 0
We have
G x
a0
5xG x
a1 x a2 x2 a3 x3 ........
5a0 x 5a1 x2 5a2 x3 .............
For free study notes log on: www.gurukpo.com
Discrete Maths
4 x2 G x
39
4a0 x2 4a1 x2 ...............
Adding these three equations, and using the initial conditions as well as the given
recurrence relation, we get
1 5 x 4 x 2 G x 1 3x
Applying partial fraction decomposition, we have
1 3x
G x
1 5x 4 x2
2 1
1
1
3 1 x
3 1 4x
2
1
2
1 x x 2 x3 .....
1 4x
4x
4 x3
3
3
2 1 n
G x
4
3 3
.....
For free study notes log on: www.gurukpo.com
40
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)
(ii)
A={0,1} is a binary alphabet.
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.
If A={0,1} then
A* ={
,0,1,00,01,10,11,000,001,……}
Therefore, A*= A0
A1
A2 ……
For free study notes log on: www.gurukpo.com
Discrete Maths
41
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)
(2)
(3)
A* is language on alphabet A.
i.e. the empty language is also a language on alphabet A.
{
}, where is empty word is also a language.
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).
For free study notes log on: www.gurukpo.com
42
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)
2)
3)
4)
5)
A={a,b}, input symbols.
S={s0,s1,s2}, internal states.
Y={ s0,s1 }, “yes” states.
s0 , initial state.
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
b
a
a
s0
s0
s1
s0
s2
s2
s1
s2
s2
b
a,b
b
S0
S1
S2
a
For free study notes log on: www.gurukpo.com
Discrete Maths
43
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)
2)
3)
4)
5)
6)
A finite set A of input symbols.
A finite set S of “internal” states.
A finite set Z of output symbols.
An initial state s0 in S.
A next-state function f from S x A into S.
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.
For free study notes log on: www.gurukpo.com
44
Unit 4
Graph Theory
Graph:
Graph is collection of finite set of vertices and edges where each edge lie
between any two of vertices.
Undirected Graph: Direction of an edge is not defined in a graph is called undirected
Graph.
Directed Graph:
Direction of an edge is defined in a graph is called undirected
Graph.
Mixed Graph:
Some edges are directed and some are not directed are called mixed
Graph.
Isolated Vertex:
In a Graph a vertex which is not connected by any edge is called
isolated vertex.(Vertex of degree zero).
Null Graph:
A graph in which each vertex ia an isolated vertex is called null
graph.
Pendent Vertex:
In a Graph the vertex which is associated with a single edge are
caller pendent vertex.
Multiple Edges or Parallel Edges: In a graph if there exit more than one edge between
any two pair of vertices then the edges are called
parallel edges.
Self Loop:
In a graph if the origin and destination of an edge are same vertex
then it is called self loop.
Simple Graph:
A graph without any loop and parallel edges.
Multi Graph:
A graph which is not simple.
Finite Graph:
Number of vertices and edges are finite.
Infinite Graph:
Number of vertices and edges are infinite.
Order of Graph:
The number of vertices in a graph is called order of graph.
Size of Graph:
The number of edges in a graph is called size of graph.
For free study notes log on: www.gurukpo.com
Discrete Maths
45
Adjacent Vertices:
Adjacent Edge:
Two vertex connected by an edge is called adjacent vertices in a
graph.
Two non parallel edges are connected to a same vertex is called
adjacent edge.
Degree of a vertex: The number of edges associated with a vertex is called degree of a
vertex.
In Degree:
Directed towards vertex V
Out Degree:
Start from Initial vertex.
Regular Vertex:
Degree of it vertices are equal.
Complete Graph( k n ):A simple graph (without loop & parallel edges) if contains exactly
one edges between each pair of distinct vertex.
n n 1
Size of k n :
2!
Weighted Graph: In a graph if every edge of graph is assigned by an integer
number is called weighted Graph.
Bipartite Graph:
In a graph if the set of vertices can be dividef into two non
empty subsets V1 and V2 such that:
(1) Every vertex of V1 is connected with some vertex of V2 and Every vertex of V2 is connected
with some vertex of V1 (No vertex is isolated)
(2) No edge between the vertices of V1 itself and V2 itself.
Complete Bipartite Graph: In a Bipartite graph if every vertex of V1 is connected with
every vertex of V2 then it is called complete Bipartite Graph( K m , n )
K 2,3
Vertices
Edges
Complementary Graph:
m n
mn
Complementary graph of a graph which contains all the
vertices of graph and all the edges which are not in G but
exit in complete graph.
For free study notes log on: www.gurukpo.com
46
Isomorphic Graph:
Two graphs are isomorphic to each other if
(i)
Vertices of graph 1 = Vertices of Graph 2
(ii)
Edges of Graph 1 = Edges of Graph 2
(iii)
Degree Sequence of Graph 1 = Degree Sequence of
Graph 2
(iv)
If f(V)=V‟ where V G1 and V’ G2, then
V'
Ans.:
V
Connected Graph:
There exit a path between every pair of vertices.
Disconnected Graph:
A graph which is not connected.
Euler Graph:
A circuit in a connected graph contain all the edges of graph
without repeat ion of edge.
Hamiltonian Graph:
In a connected graph a path contains every vertex is
Hamiltonian Graph that contains every vertex is said to be
Hamiltonian Cycle.
Planer Graph:
Q.1
f
A graph G is said to be planer if G can be drawn in a plane so that
no edge intersect except at vertices.
Define the followings :(i)
Walk
(ii) Trail
(iii) Path
(iv) Circuit
(v) Cycle
(i)
Walk : An alternating sequence of vertices and edges is called a Walk. It is denoted by
‘W’.
Example :
a
d
e 1 e4
e6
b
e5
e3
e2
e
c
Figure (1)
Here W = ae1 b e2 c e3 d is a walk.
For free study notes log on: www.gurukpo.com
Discrete Maths
47
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) :
(iv)
Circuit : A closed trail is called a Circuit.
Example for fig.(1) :
(v)
W = a e1 b e5 e e6 a is a circuit.
Cycle : A closed path is called a Cycle.
Example for fig.(1) :
Q.2
W = a e1 b e4 d e3 c is a path.
W = a e1 b e5 e e6 a is a cycle.
Show that following two graphs are not isomorphic.
V5
V1
V2
V3
V4
U6
U1
U2
U3
U4
V6
G
Ans.:
G’
In graph G and G‟ we find that
(i)
No. of vertices in G = No. of vertices in G‟ = 6.
For free study notes log on: www.gurukpo.com
U5
48
(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 V 4
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.
Q.3
Show that if G = (V, E) is a complete bipartite graph with n vertices then the total numbers
of edges in G cannot exceed
Ans.:
n2
.
4
Let Kp,q be a complete bipartite graph. The total no. of edges in Kp,q is p.q and total no. of vertices
will be (p+q). If we take p = q =
n n
.
2 2
n
then in complete bipartite graph K n , n no. of edges will be
2 2
2
n2
which is maximum (If two numbers are equal then their product is maximum). Hence
4
in a complete bipartite graph of n vertices the no. of edges cannot exceed
n2
.
4
Q.4
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 –
deg(v)
2e
v V

28 = 2e

e = 14
So, total no. of edges in G = 14.
For free study notes log on: www.gurukpo.com
Discrete Maths
49
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.
deg(v)
Hence
2e
v V
Q.6
Draw the Union graph, Intersection Graph and Ring Sum Graph of G1 and G2 .
Ans
G1
G2
V1
V2 , E1
E2
G1
G2
V1
V2 , E1
E2
G1
G2
V1
V2 , E1
E2
G1
G2
E1
E2
For free study notes log on: www.gurukpo.com
50
G1
G2
G1
G2
For free study notes log on: www.gurukpo.com
Discrete Maths
Q.7
51
Find the shortest path between the vertex a and z in the following graph.
b
5
d
5
f
4
a
7
2 33
3
1
z
2
3
4
c
6
e
5
g
Ans.:
First we label the vertex a by permanent label 0 and rest by „∞‟.
Q.8
K 5 is planer or Not.
Ans
Vertex = 5
Edges
n n 1
2
10
By Planer Property
E 3V 6
E=10
3V-6 = 9
10 is not less then 9
For free study notes log on: www.gurukpo.com
52
So K 5 is not planer.
Q.9
Show that the complete bipartite graph K 3,3 is a non-planer graph.
Ans
Vertex = 3+3 = 6
Edges = 3 X 3 = 9
R
= E-V+2
So there are 5 regions . Since the bipartite graph K 3,3 cannot have a cycle of odd length so that
each cycle has length 4 . Thus degree of each region must be 4 . So the sum of degrees of r
regions must be 4 . But the sum of the degrees of all regions = 2e
v1
v2
V4
v3
v5
v6
4r 2e
But r = 5, and e = 9
20 18
The equation (1)
Which is not possible.
Hence K 3,3 is not planer.
Q.10 Write the adjacency matrix and Incidence matrix of the following graph:
For free study notes log on: www.gurukpo.com
Discrete Maths
53
Ans: The adjacency matrix is given below:
v1 v 2 v3 v 4 v5
v1
0
1
1
1
0
v2
v3
1
1
0
1
1
0
1
0
1
1
v4
1
1
0
0
1
v5
0
1
1
1
0
The incidence matrix is given below:
v1
v2
v3
v4
v5
Q.11
e1 e2 e3 e4 e5 e6 e7 e8
1 0 0 1 0 0 0 1
0 1 0 0 0 1 1 1
1 0 1 0 0 0 1 0
0 1 0 1 1 0 0 0
0 0 1 0 1 1 0 0
Write the adjacency matrix of the following Digraph:
For free study notes log on: www.gurukpo.com
54
Ans
The adjacency matrix of the diagraph is
v1
v2
v3
v4
v5
v1 v 2 v3 v 4 v5
1 0 0 1 0
1 0 1 0 1
0 1 1 0 0
0 0 1 0 0
0 0 0 0 0
Q .12 A planar graph has 30 vertices each of degree 3. In how many regions can this graph
be partitioned.
Ans
Here n=3 and
deg(v) =3 x 30 = 90
But the sum of the degrees of vertices = 2 x Number of edges
90 2e
e 45
If the graph can be partitioned into r regions, then appealing to the Euler‟s formula
n – e + r =2
30 45 r 2
r = 17
For free study notes log on: www.gurukpo.com
Discrete Maths
55
Unit 5
Tree
Tree:
A connected undirected graph without any loop and parallel edges
called tree.
Trival Tree:
A tree having single vertex is called Trival Tree.
Non-Trival :
A tree which is not trival as called non trival tree(more than one
vertex).
Pendent Vertex:
Vertex of degree one is called pendent vertex.
Branch Node:
Vertex of degree greater than oneis called Branch node.
Forest:
A collection of disjoint tree is called forest.
Minimal Connected Graph:
A connected graph is said to be minimally connected if
removal or elimination of any edge between two vertex
from it disconnects the graph.
The eccentry of a vertex V of a graph G is the length of the longest
path between V and an other vertex.
Eccentry of a vertex:
Centre of Graph:
A vertex in a graph G which has minimum Eccentricity is called
centre of graph.
Radius of Graph:
Eccentry of a centre in tree is called Radius.
Diameter:
The length of the longest path in a tree is called Diameter.
Directed Tree:
A directed graph is said to be directed tree if it become a tree when
the direction of the edges are ignored.
Rooted Tree:
In a directed tree the vertex if indegree 0 is called root of that tree.
Ordered Rooted Tree:
An ordered rooted tree is a rooted tree is which each vertex give an
integer 1, 2, 3 ,…..
Binary Tree:
A tree having one vertex of degree two and rest vertex of degree
one or three is called Binary tree.
For free study notes log on: www.gurukpo.com
56
Binary Rooted Tree:
A Rooted tree is called binary rooted tree if for each vertex V; out
degree - 0, 1 or 2 not more than 2, every vertex has at the most two
children.
Spaning Tree:
Let G be a Graph with n vertices and e edges then spanning tree T
of G is a subgraph of G having:
(i)
(ii)
(iii)
all vertices of G
it is connected sub graph of G
it does not have any loop or circuit.
Q.1
Obtain the minimal spaning tree in the following graph:
Ans
Step 1: Arrange the edges in ascending order:
Edges
(b, e)
Weight 3
(g,d)
(d, e)
(e,h)
(a, c)
(a, b)
(f,g)
(a,d)
(g,h)
(a,b)
(c,g)
4
5
5
5
15
15
15
15
15
18
Step 2 Locate the all vertices:
For free study notes log on: www.gurukpo.com
Discrete Maths
57
Step 3: Select the edge of minimum weight and make connection between the vertices. Then
choose the next lowest edges. Make connection………
Q.2
Find the shortest path between the vertices a & z in the following graph by Prism’s
Method.
Ans
First prepare the table:
For free study notes log on: www.gurukpo.com
58
a
b
c
d
a
b
4
4
-
3
2
5
c
3
2
-
3
6
5
3
-
1
6
1
-
d
e
f
e
5
g
5
h
f
g
z
5
5
-
2
7
2
-
4
7
4
-
Step 2: Locate the vertices and connect the vertices, no connection between vertices which has
weight .
Minimum Spanning Tree =16
Path a – c – d – e – g – z
Q.3
Ans
A graph G is a tree if it is minimally connected.
Let graph be minimally connected graph than graph doesnot contain any circuit or parallel
edges because of graph contains a circuit than by eliminating any edge from graph its still
connected which is contradict that it is minimally connected. Hence graph does not
contain any circuit. Hence graph is tree.
Converse:
If graph is not minimally so by elimination of any edge the graph will connected which is
contradict so graph is minimally connected.
For free study notes log on: www.gurukpo.com
Discrete Maths
Q.4
Ans
59
n 1
.
2
A binary tree (only 1 vertex of degree 2 and rest vertex of degree 1 & 3) .Let k be pendent
vertex & one vertex of degree two and remaining vertex of degree 3 so total number of
degree:
….(1)
deg k.1 2.1 n k 1 3
Show that number of pendent vertex in a binary tree with n vertex with
We have
deg ree 2E
In tree E = n-1
From (1) and (2)
3n – 2k – 1 = 2n-2
N – 2k = -1
N = 2k-1
….(2)
n 1
2
Hence Proved
K=
Q.5
Ans
The number of vertex in a binary tree is always odd.
A binary tree ( only one vertex of degree 2 and rest vertex of degree two and remaining
vertex of degree 3 so total number of degree:
deg k.1 2.1 n k 1 3
= k 2 3n 3k -3
3n - 2k - 1 = 0
We have
deg ree 2E
In tree E = n-1
3n – 2k – 1 = 2n-2
N – 2k = -1
N = 2k-1
Which is always odd.
Q.6
….(1)
Write down the Pre-order , Post Order and In order:
For free study notes log on: www.gurukpo.com
60
Ans
Pre Order:
(I)
Visit the root
(II)
Traverse the left subtree
(III) Traverse the right subtree
Pre Order: K h a b i c d j f g
Post Order:
(i)
Traverse the left subtree
(ii)
Visit the root
(iii)
Traverse the right subtree
Post Order: a b h k c I d e j f g
In Order:
(i)
Traverse the left subtree
(ii)
Traverse the right subtree
(iii)
Visit the root
In order: a h b k c I d e j f g
Q.7
Ans
A tree with n vertices of degree 1, 2 vertices of degree 2, 4 vertices of degree 3 and 3
vertices of degree 4. Obtain n.
The total number of vertices are
n+2+ 4+3=n+9=V
Sum of the degrees of all the vertices is
n + 2.2 + 4.3 + 3.4 = n + 28
We have
deg ree 2E
n + 28 = 2E
E = 14 + n/2
Since it is tree so we have
V=E+1
n +P = 14 +
n
2
For free study notes log on: www.gurukpo.com
Discrete Maths
61
Q. .8
If h be the height of a balanced complete tree on n – vertices, then h
Ans
For a binary tree of n-vertices and height h,
log 2
n 1
2
2h 1 1
Thus 2h 1 n 1
n 1
or 2 h
2
n 1
h log 2
2
n
If T be a complete balanced binary tree, then
2
........ 2h 1 2h 1
n  1 2 2
Thus 2h
1

n 1
2
On taking log 2 of both sides we have
n 1
h
2
n 1
log 2
2
h 1  log 2
Hence h
Q.9
If G is an acyclic graph with n vertices and k connected components then G has (n-k)
edges.
Ans.: Proof : Let G be an acyclic graph. Let G1, G2, . . . . . . . . . . GK be its k connected
components. For every i (1 i k ) ith component Gi has ni vertices then clearly n1 + n2 + n3 +. . . . . . . . . .+ nK = n
Again since every Gi is a tree. Hence no. of edges in every Gi will be (ni-1) so total no. of
edges in G
= (n1 – 1) + (n2 – 1) + . . . . . . . . . . + (nk – 1)
= (n1 + n2 + . . . . . . . . . . + nk) – k
=n–k
Hence proved.
Q.10 Prove that every tree has either one or two centres.
Ans.:
Let T be a tree if T contains only one vertex then this vertex will be centre of T. If T
contains two vertices then both vertices are centre of T. Now let T contains more than two
vertices. The maximum distance max.d (v, vi) from a given vertex v to any other vertex vi
For free study notes log on: www.gurukpo.com
62
occurs only when vi is a pendent vertex. Tree T must have two or more pendent vertices.
Delete all pendent vertices form T. The resulting graph T‟ is still a tree in which the
eccentricity of all vertices is reduced by 1. Hence the centre of T will also be centre of T‟.
From T‟, we can again remove all pendent vertices and we get another tree T”. We
continue this process until we are left with a vertex or an edge. If a vertex is left then this
vertex is the centre and if an edge is left then both its end vertices are centre of T.
Example :
f(6)
g(6)
e(6)
h(6)
d(5)
m(6)
a(6)
b(5)
c(4)
j(3)
k(4)
l(5)
n(6)
i(5)
Removing all pendent vertices
d(4)
b(4)
c(3)
j(2)
k(3)
l(4)
Removing all pendent vertices
c(2)
j(1)
k(2)
For free study notes log on: www.gurukpo.com
j (centre)
Discrete Maths
63
Q.11 Find eccentricity, centre radius and diameter of the following graph.
Ans.: (i)
Eccentricity :
V1
V2
E(V1) = 2
E(V2) = 2
V3
E(V3) = 1
E(V4) = 2
(ii)
V4
Centre : Centre of the given graph is the vertex V3 because it has minimum
eccentricity.
(iii)
Radius : Radius (eccentricity of the centre) = 1
(iv)
Diameter : Maximum eccentricity = 2
Diameter of the given graph = 2
Q.12 Let T be a binary tree of n vertices and height h then
h 1
Ans
2h
n
1
1
Suppose that at the k th level of the tree there are nk
0
k
h vertices then we have
h
nk =n
k 0
Because for each k, nk
nk
2k
2k
1 2 22
1 and nk
2nk 1 ;1 k
h
h
Again
......... 2h
2h
1
1
k 0
h
h
1 n
And also h + 1 =
k 0
nk
k 0
For free study notes log on: www.gurukpo.com
64
h
2k
2h
1
1
k 0
Hence
h+1
n
2h
1
1
For free study notes log on: www.gurukpo.com
Discrete Maths
65
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 .
For free study notes log on: www.gurukpo.com
66
(C) C . (D) C.
Ans:C
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 aiRa j and 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.
For free study notes log on: www.gurukpo.com
Discrete Maths
67
Ans:B
Q.14The expression a a c is equivalent to
(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
For free study notes log on: www.gurukpo.com
68
Q.21 The number of distinct relations on a set of 3 elements is:
(A) 8 (B) 9
(C) 18 (D) 512
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
For free study notes log on: www.gurukpo.com
Discrete Maths
69
Ans:C
Q.29 Let * be a Boolean operation defined by
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
For free study notes log on: www.gurukpo.com
70
(C) 32 (D) 15
Ans:A
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
For free study notes log on: www.gurukpo.com
Discrete Maths
71
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
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
For free study notes log on: www.gurukpo.com
72
(D) Only the vertices of even degree
Ans:A
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
For free study notes log on: www.gurukpo.com
Discrete Maths
73
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.
For free study notes log on: www.gurukpo.com
74
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’.
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.
For free study notes log on: www.gurukpo.com
Discrete Maths
75
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 :properties:
Let R is a relation on a set S satisfying the following three
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.
Combination: Combination means selection of things. The word selection is used, when the order
of things has no importance.
For free study notes log on: www.gurukpo.com
76
B.A./B.SC. (PART I) EXAMINATION, 2012
(COMMON FOR THE FACULTIES OF ARTS AND SCIENCE)
[Also common with subsidiary paper of B.A./B.Sc.(Hons.) Part I]
(Three-Year Scheme of 10+2+3 Pattern)
MATHEMATICS
FIRST PAPER
(Discrete Mathematics)
TIME ALLOWED : THREE HOURS
Maximum Marks - 50 for Science, 66 for Arts
(1)
(2)
No supplementary answer-book will be given to any candidate. Hence the candidates should write
the answers precisely in the Main answer-book only.
All the parts of one question should be answered at one place in the answer-book. One complete
question should not be answered at different places in the answer-book.
Attempt five questions in all, selecting one question from each Unit.
Unit I
1. (a)
(i)
(ii)
If A, B and C are any three sets, then prove that:A x (B C) = (AxB) (AxC)
Prove by principle of mathematical induction that:13 + 23 + 33 + …… + n3 = (
(b)
2. (a)
(b)
3. (a)
(b)
4. (a)
(b)
)2
If A and B are any two finite sets, then prove that:=
+
-
If R and S are any relations from the sets A to B and from B to C respectively, then prove
that
Prove that the dual of a lattice is also a lattice.
Unit II
Prove that the identity element in a group (G, O) is unique.
Prove that every field is an integral domain but its converse is not always true
Prove that in Boolean algebra B, for all elements a, b, c ∈ B:ab+bc+ca= (a+b) (b+c) (c+a).
Express the following Boolean function in its conjunctive normal form:f(x1,x2,x3) = (x1+x2+x3)(x1x2+x1x3)
For free study notes log on: www.gurukpo.com
Discrete Maths
77
Unit III
5. (a)
Define Finite State Machine. Find the output string corresponding to the input string:w=cacbccbaabac
in the following transition diagram:-
(b)
Let
G=(V,T,P,S), where V={S,a,b}, T={a,b}, S is the initial symbol and P={S→aaS, S→a,
S→b}. Find the language L(G) of the grammar G.
6. (a)
(b)
Find the discrete numeric function corresponding to the following generating function:Solve the following recurrence relation using generating functions:-
7. (a)
Define the following:(i)
Simple graph
(ii)
Cycle graph
(iii)
Complementary graph
(iv)
Union of two graphs
(v)
Sub graph
Unit IV
(b)
Prove that in a complete graph on n vertices (n is odd and ≥3), there are exactly
n 1
2
edge-disjoint Hamiltonian cycles.
8.
(a)
Determine the shortest path and its value between the vertices a and I in the
following weighted graph:-
For free study notes log on: www.gurukpo.com
78
(b) If G is a connected planar graph n vertices, e edges and r regions, then prove that n-e+r=2.
Unit V
9.
Prove that a tree on n vertices has exactly n-1 edges.
(a)
Define the following:(i)
Eccentricity of a vertex.
(ii)
Centre of a tree.
(iii)
Binary tree.
(iv)
Height of a binary tree.
(v)
Spanning tree.
10. (a)
(b)
Prove that every tree has either one or two centres.
Define the adjacency matrix of a directed graph, and find the adjacency matrix of the
following directed graph:-
For free study notes log on: www.gurukpo.com
Discrete Maths
79
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.
2.
3.
4.
en.wikipedia.org/wiki/Discrete_mathematics
http://home.iitk.ac.in/~arlal/book/mth202.pdf
http://www.cs.columbia.edu/~zeph/3203s04/lectures.html
http://www.cs.columbia.edu/~zeph/3203s04/lectures.html
For free study notes log on: www.gurukpo.com