RGPV Cs-It-302 Solution Discrete Structure Dec 2015
RGPV Cs-It-302 Solution Discrete Structure Dec 2015
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
UNIT–I
1. a) If A 1, 4 , B 4, 5 , C 5, 7 , determine
(i). A B A C
(ii). A B A C
Solution: Give: A 1, 4 , B 4, 5 , C 5, 7
Now, A B 1, 4 , 1, 5 , 4, 4 , 4, 5 and A C 1, 5 , 1, 7 , 4, 5 , 4, 7
A B A C 1, 4 , 1, 5 , 4, 4 , 4, 5 , 1, 7 , 4, 7 Answer
and A B A C 1, 5 , 4, 5 Answer
b) Let A 2, 3, 4 and B 3, 4, 5, 6, 7 . Assume a relation R from A to B such that (x, y)R when a
divides 6.
Solution: Given: A 2, 3, 4 and B 3, 4, 5, 6, 7
Since R is a relation from A to B such that (x, y)R, when a divides 6 i.e. x and y both divisor of 6.
R 2, 3 , 3, 3 Answer
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 1
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
1.3.1
P 1 1
3
There statement true for n = 1 i.e. P(1) is true.
Case 2: Suppose the statement true of n = k such that
k 2k 1 2k 1
P k 12 32 52 ... (2k 1)2 … (2)
3
Next we will prove the statement true for n = k + 1.
Now, 12 32 52 ... (2k 1)2 2 k 1 1 P k 2k 1
2 2
k 2k 1 2k 1
2k 1
2
from (2)
3
(2k 1) (2k 1)
k (2k 1) 3(2k 1) (2k 2 k 6k 3)
3 3
(2k 1) 2 (2k 1)
2k 5k 3 (k 1)(2k 3)
3 3
(k 1) 2(k 1) 1 2 k 1 1
P k 1
3
Which is true for n = k +1. Thus P(k + 1) is true.
Hence the statement true for each positive integral values of n. Hence proved
OR
d) Let f : R R be defined by
2 x 1; x 0
f ( x) 2
x 1; x 0
Let g : R R be defined by
3x 7 ; x 0
g ( x) 3
x ;x0
Then find the composition gof.
2 x 1; x 0
Solution: Given, f ( x) 2
x 1; x 0
Putting x = … –1, 0, 1, 2 …, we get
f (1) 2 1 1 1 , f (0) 2 0 1 1 , f (1) 12 1 2 and f (2) 22 1 5 ….
3x 7 ; x 0
and g ( x) 3
x ;x0
Putting x = … –1, 0, 1, 2 …, we get
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 2
Vis
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 3
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
a–nH
H contains elements which are positive as well as negative integral power of a.
Suppose m be the least positive integer such that
amH
then we shall prove that
H = {am} i.e. H is cyclic and is generated by am.
Suppose at be any arbitrary element of H, then division algorithm, integer q and r, such that
t = mq + r, 0 ≤ r < m …(1)
Now, amH (am)q H
a m qH
(am q)–1H
a – m qH
Also, atH and a – m qH at. a – m q H
at–mq H
ar H [From (1)]
Now m is the least positive integer, such that
amH, 0 ≤ r < m
Thus r must be equal to 0, then t = mq so that amq = (am)q
Therefore, H is cyclic and am is a generate of H.
d) Prove that the G = {0, 1, 2, 3, 4, 5} is a finite abelian group of order 6 with respect to addition
modulo 6.
Solution: The composite table under addition modulo 6.
6 0 1 2 3 4 5
0 0 1 2 3 4 5
1 1 2 3 4 5 0
2 2 3 4 5 0 1
3 3 4 5 0 1 2
4 4 5 0 1 2 3
5 5 0 1 2 3 4
G1 Closure Property:
Since all the elements of composite table belongs to set G, then G is closed with respect to addition
modulo 6.
G2 Associative Law:
If a, b, cG, then
a 6 b 6 c a 6 b 6 c , a, b, cG
Example: If a = 1, b = 2 and c = 3, then
1 6 2 6 3 1 6 5 0 and 1 6 2 6 3 3 6 3 0 , then
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 4
Visit for mor
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
1 6 2 6 3 1 6 2 6 3
G3 Existence of identity:
Suppose aG be any element, then from composite table
a 6 0 0 6 a a , aG
e = 0G is the additive identity element.
G4 Existence of inverse:
Since if aG, then bG such that a + 6 b = e = 0
From the composite table we can see that,
0 6 0 0 b 0 , additive inverse of 0
1 6 5 0 b 5 , additive inverse of 1
2 6 4 0 b 4 , additive inverse of 2
3 6 3 0 b 3 , additive inverse of 3
4 6 2 0 b 2 , additive inverse of 4
5 6 1 0 b 1 , additive inverse of 5
G5 Commutative identity:
If aG, then a 6 b b 6 a , a, bG
Since G has finite number of elements, then (G, +6) is an abelain group.
OR
d) Let (R, +, ×) be a ring, the operation is defined by a b = a × b + b × a, show that (R, +, ×) is a
commutative ring.
Solution: Statement of above question is wrong.
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 5
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
~rs
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 6
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
Solution: Here the three premises are p r, ~p q, q s and conclusion is (~r s). The given argument
will be valid if [(p r) (~p q) (q s)] (~r s) is a tautology.
Suppose A ( p r ) (~ p q) (q s) and B ~ r s , then A B is a tautology.
Truth table
p q r s p r ~p ~p q q s (p r) (~p q) A ~r B ~ r s A B
T T T T T F T T T T F T T
T T T F T F T F T F F T T
T T F T F F T T F F T T T
T T F F F F T F F F T F T
T F T T T F T T T T F T T
T F T F T F T T T T F T T
T F F T F F T T F F T T T
T F F F F F T T F F T F T
F T T T T T T T T T F T T
F T T F T T T F T F F T T
F T F T T T T T T T T T T
F T F F T T T F T F T F T
F F T T T T F T F F F T T
F F T F T T F T F F F T T
F F F T T T F T F F T T T
F F F F T T F T F F T F T
Since all entries in the last column are of “T” only, therefore A B is a tautology. Hence the given argument is
valid.
d) Design DFA and NDFA accepting all string over {0, 1}, which end in 0 but do not contain 11 as
substring.
Solution: (i) DFA (Deterministic Finite Automata):
The required DFA is defined by
M q0 , q1, q2 , q3 , q4 , 0,1 , q3 , q4
Where is given by
0 1
Q
q0 q1 q2
q1 q3 q2
q2 q1 q4
q3 q3 q3
q4 q4 q4
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 7
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
0, 1
Transition graph
0
q1 q3
0
q0 1 0 0, 1
1 q2 q4
1
q0 1 0
0 q3
0
OR
~p (Conclusion)
Here two premises are p ~q, q and conclusion is ~p. The given argument will be valid if
[(p ~q) (q)] (~p) is a tautology.
Suppose A (p ~q) (q) and B ~p, then A B is a tautology.
Truth table:
p q ~q p ~q A ( p ~ q) q B~ p AB
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 8
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
T T F F F F T
T F T T F F T
F T F T T T T
F F T T F T T
Since all entries in the last column are of “T” only, therefore A B is a tautology. Hence the given argument is
valid.
4. a) Prove that, in a graph total number of odd degree vertices is even but then number of even degree
vertices may be odd.
Solution: Suppose G = (V, E) be any graph in which
V = {v1, v2, v3, … vn} and E = {e1, e2, e3, … em}Where n = m or n m.
By Handshaking theorem we have,
The sum of degree of all the vertices of the graph, is twice the number of edges.
in
Therefore, d (vi ) 2em
i 1
d (vi ) d (vi ) 2m
i odd i even
d (vi ) 2m d (vi )
i odd i even
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 9
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
e1 e4
e2 e3
v2
If we starting from v1 and covering all the edges such that v1 e1 v2 e2 v1 e4 v2 e3 v1.
(ii). Hamiltonian Graph:
If a closed walk contains every vertex of the graph G, such that the degree of every vertex is 2, then the
walk is called Hamiltonian circuit or graph, and if the walk is open then it is said to be Hamiltonian path.
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 10
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
v1 e1 v2 v1 e1 v2
e11 e11
v6 e6 v7 e12 v6 e12
v7
Hamiltonian
e4 e5 e7 e2 e5 e7
circuit
v8 v8
v e8 e9 e10 v5 e9
e10 5
v4 e3 v3 v4 e3 v3
d) Find minimum distance between two vertices K and L of graph, using Disjkstra’s algorithm.
A 7 B
4 4 1
5
1 20
K L
2 16
2
C 6 D
Solution: Suppose
Step 1: P1 K and T1 A, B, C, D, L
Then, we have
l (A) = 4, l (C) = 2 (Minimum) l (B) = , l (D) = and l (L ) =
1 is the minimum value, then next vertex is C.
Step 2: Taking, P2 K , C and T2 A, B, D, L
Now, l A minimum 4, 2 +1 3 (Minimum)
l B minimum 4 7, 3 7 10
l D minimum 2 6, 4 8
l L minimum 20, 2 , 4 20
3 is minimum value, and then we take next vertex A.
Step 3 Taking, P3 K , C, A and T3 B, D, L
Now, l B minimum 3 7, 4 7, 2 5 7
l D minimum 3 4, 2 6 7 (Minimum)
l L minimum 20, 3 20
7 is minimum value, and then we take next vertex D.
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 11
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
5. a) Let L = {1, 2, 3, 4, 5} be the lattice show below. Find all sub lattices with three or more elements.
5
2 3 4
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 12
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
Solution: Given the Lattice L = {1, 2, 3, 4, 5}. The sub-lattice are S1 = {1, 2, 3, 4}, S2 = {1, 2, 3, 5},
S3 = {1, 2, 3, 4, 5}, S4 = {1, 2, 3, 4, 5} and S3 = {1, 3, 4, 5}
5
5 5 5
2 3 4
2 4 2 3 3 4
1 1 1 1
5
5
2 3 4
2 3 4
1
1
c) Draw hasse diagram for the “less than or equal to” relation on set A = {0, 2, 5, 10, 11, 15}
Solution: Given the set A = {0, 2, 5, 10, 11, 15} and R be a relation of less than or equal to, then
R = {(0, 2), (2, 5), (5, 10), (10, 11), (11, 15)}
The required Hasse Diagram is
\
15
10 11
5 2
0
d) Determine the particular solution of the recurrence relation
ar 5ar 1 6ar 2 3r 2
Solution: Given, ar 5ar 1 6ar 2 3r 2 …. (1)
For homogeneous solution, the characteristic equation is
m2 + 5m + 6 = 0
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 13
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
(m + 2) (m + 3) = 0
m = –2, –3
Homogeneous solution is
ar(h) c1 2 c2 3
r r
…. (2)
2
For the particular solution f (r) = r is a polynomial of degree 2, so that P.S. is
ar A0 A1r A2r 2 …. (3)
Putting in equation (1), we get
A0 A1r A2 r 2 5 A0 A1 (r 1) A2 r 12 6 A0 A1 (r 2) A2 r 2 2 r 2
A A r A r 2 5 A A r A A r 2 A 2 A r 6 A A r 2 A A r 2 4 A 4 A r r 2
0 1 2 0 1 1 2 2 2 0 1 1 2 2 2
115 17 1
ar c1 2 c2 3
r r
r r2 Answer
864 72 12
OR
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 14
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
d) Explain briefly:-
(i). Poset (ii). Permutation
(ii). Combination (iv) Total solutions
Solution: (i). Poset
A set on which a partial ordering relation is defined, is called a partially ordered set or poset.
Example: Suppose I+ be the set of positive integers, then usual notation (Less than or equal to) is a poset on
I+, So, (I+, ) is a poset.
(ii). Permutation:
The different arrangements which can be made out of a given number of objects by taking some or all it
a time, are called permutations.
Suppose n objects, can be arranged in r ways, then it is denoted by n Pr or P n, r and it defined as
n
Pr
n
nr
n (n 1) (n 2).... n r 1
5 5 4 3
Example: The number of permutations formed by the letters of ELORA is 5 P2 20
52 3
(iii). Combination:
Each of the different groups or selections which can be obtained by taking r objects of n given objects,
irrespective of their arrangements, is called a combination.
Suppose n objects in which r objects to be selected, then it is denoted by nCr or C n, r and
It is defined as
n n (n 1) (n 2)...(n r 1)
n
Cr
r nr r.(r 1).(r 2)....3.2.1
Example: The number of combinations can be formed by taking 2 letters at a time from the letters of DELHI is
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 15
RGPV, Bhopal
Discrete Structure (Grading System)
Dec. 2015
Subject: Discrete Structure Paper Code: CS/IT–302
5 5 4 3
5
C2 10
5 2 2 2 1 3
(iv). Total solutions
The solution of any difference equation is called the total solution.
Suppose we have any difference equation, then we will two solution one is called Auxiliary solution say ar( h)
and another is called particular solution say a ( p ) , then total solution of difference equation is
r
( p)
ar ar( h) a
r
New Batches
starting from 1st
March 2016 a2zSubjects.com Page 16