DM 2
DM 2
regions,
26
haseedges, v vertices and r
connected planar graphG
(2) Ifa then v - e t r = 2 .
Fig. : (2)
Fig. :(1)
b.
U
i lits vertices
havethe same degree K.A graph whose all vertices have degree 2is called 2-regular
complete graph Kis regular of degree n-1.
Semester Solved papers, July -2022
27
V
Fig. : 2-regular Graph
Fig. : 3-regular Graph
Undirected Complete Graph : An undirected complete graph
isagraph in which each vertex is connected to every other vertex G=(,E) ot nverteeS
i.e., and edge exists between
every pair of distinct vertices. It is denoted by K. Acomplete graph with nvertices
will have
n(71)2 edges.
28 1. Thus 2 +
R=
V= 2and 1+
2-|=2.
we have Thus
In Fig.(|) V'= |and R= 2.
we have
In Fig.(2)
ofinduction is verified. formula
connected planar graphs
holds for co
Hence, the basis assumethat
the
Induction Step
: Let us
with K edges.
bea graph with K+ l
edges.
circuits. Now, takea
vertexvand
find apath
Let G contains no a new
suppose that G
we an edge, We
have vertex. At last
Firstly, whenever we find
Gis circuitfree, further as shown in Fig.(3).
cannotimove
starting at v. Since with degreee1. So we
incident on v. So, we are left with
we will reach a vertex v corresponding edge
Nowremove vertex
vand the
Fig.(4).
G* having K edges as shown in
agraph
G
Fig. : (3) Fig. : (4)
V.
Fig, :(5)
Fig. : (6)
Semester Solved papers, July -2022
Now, as eissthe part of a 29
leftwith graph G*
boundary for two regions. So, we
weare having Kedges
Lence. by inductive assumption, (Fig.(6).
only remove the edge and
Now, since G has more edge Euler's fomula holds for G*.
than G*,one more region
vertices as G* Hence the formula than G* with same number of
also holds for Gwhich,
proves the theorem verifies the inductive:step and hence
Q.9.(b) What do you mean by Spanning
Tree ? Explain an algorith mto find
Minimal Spanning Tree.
Ans. Spanning Tree: Consider aconnected (7.5)
graph G=(V, E). Aspanning tree 1 is
defined as a subgraph of GifTis atree and Tincludes
all the vertices of G.
Minimum Spanning tree: Consider a connected weighted graph
minimal spanning treeT of the graph Gis atree whose total weight is G=(V, E). A
smallest among allthe
spanning trees of the graph G. The total weight of the spanning tree is the sum oftheweights of
the edges of the spanning trees.
The minimum weight ofthe spanning tree is unique but the spanning tree may not be
unique because morethanonespanning
o tree are possible when more than one edges exist
having the same weight
Kruskal'sAlgorithm :Suppose we are given aconnected weighted graph. First of all
name allthe vertices. Also listállthé edges in thè increasing order oftheir weights (i.e.taking the
minimum cost first).
Now, jot down allthe vertices along with their names given in the graphs.
Step 1:Get the first edge byjoiningthe vertices topping the above list.
Step 2: Get the second edge by joiningthe vertices topping in the list.
Step 3:Consider the next (3d) edge in the list. Ifit doesnot forn acycle with already
selected edges than join the vertices to get the edge. Ifit forms acycle with the already selected
edges, reject it.
Step 4: Repeat the above step till you get aspanning tree i.e. you have jointed all the
vertices.
(2) Prim'sor Dijkstra's Algorithm :Another way to compute minimum spanning
tree for a weighted graph is Prim's Algorithm. It was discovered by Prim and Dijkstra
simultanously but independenty.
Step 1:Select any arbitary vertex say v, as tree root.
Step 2: Find edge e, = (Vo, )in E such that its one end vertex v, is in T and its
weight is minimum Join the vertex v, to v.
Discrete Mathemuti
30 v, is in
v) suchthat its one end vertex Tand the
Step 3: Select the next edge e, =(V, from acircuit)
weight
also the
and of the edgee
should not
other end vertex v,is not in T. (e,: to
Join the edge e,and Ithe vertex v,
is as small as possible. 1.
the step 3 until all the vertices of Gare in
Step 4 :Repeat
Tis the required minimum spanning tree.
This is the required Minimal Spanning Tree.
RO
DISCRETE MATHEMATICS
May - 2023
Paper Code:-PCC-CSE-202-G
2
V,
Fig.(1)
Fig.(2)
0.2.(a) Explain in detail Unit-1
Ans. Operations on sets:difTerent
The basicoperations and law sets.
() Union of Sets : Union of set operations are:
eleiments which belong1to Aor. Bor the sets Aand Bis defined to be the set of allthose
both and is
AUB =x:xE AOrdenoted by AUB.
e.g.. Let xE B}
AUB = =1,2,3), B= (3, 4. 5,6}
{1.2,3.4, 5,6}.
Solved papers, May -2023
Semester;
ics
(2) IntersectionnofSets : Intersection of two sets A 33
hich belongto both Aand Band is denoted by A n B. and Bis the set of allthose
clements
AnB= x:E Aandre B}
en Let
e.g. A = (a. b, c, d. B (a,
b, l, m}
AnB = (u. b}
(3) Difference of Sets :The difference of twosets
A
and Bis a set of all those elements
shich belong to 4 but do not belong to Band is denoted by 4- B.
A B (r:xe Aand x EB}
e.g., Let A =(a, b,c, d), B- (d. l, m, n}
f 4B- {a, b. c}.
(4) Complement of aSet w.rt. a Universal Set :The coimplement ofa set Ais a set
nfallthose elements of the universalset which do not belong to 4 and is denoted by A.
A° = U-- A= (r:xe Uand x A}={r:x A}
e.g.. Let U is the set ofallnatural numbers.
A ={1. 2.3}
A° = (all natural numbers except 1.2, 3}.
(5) Symmetric Difference of Sets :The symmetric difference of two sets Aand Bis
the set containingall the elements that are in Aor in Bbut not in both and is denoted by A B
ie.,
A
DB = (AUB)-(4nB)
e.g.,
() Let A = (a, b, c, d}
B =(a, b, l, m}
ADB = (c, d, l, m}
(i) Let A={1, 2, 3, 4}
A {1,2, 3, 4}
(iii) Let A = {I. m, n, m}
AA = ).
Law Sets:
(i) Idempotent Laws (v) ldentity Laws
(a) AUA=A (a) AUØ= A
(b) AnA=A (b) 4n U= 4
(c).4UU=
(ii) Associative Laws
(a) (AU B)oC=AU(BUC)
(b) (40 B)oC=An(BoC) (vi)Complement LLaws
(a) 4U4=U
(ii)Commutative Laws
(b) An4
(u) Au B= BUA
(c) =
(b)An B= BoA (d) =U
Discrete Matleat B Tec
(viii) Involution aw
34
(iv) (Distributive Laws
(a) (A'y A. 6. 10
a) 4 U B n C ) = AUB)o(4U)
Laws
(") De Morgan's
AB
(o) (4U B) +
() (4n B)UB.
Detemine all the sublattices of D, that contain at least four elements. D,1.2.3.5.
6. 10, 15, 30}.
Sol: The sublattices of D, that contain at least four elements are as follows:
() {1.2, 6, 30} (ii) {1, 2.3.30
(ii){1, 5, 15, 30} (iv) {1, 3. 6, 30}
(r) {I.5, 10, 30} (vi) {1,3, 15, 30}
(vii) {2. 6, 10, 30}.
isomorphic lattices if
(3) lsomorphic Lattices : Two lattices L, and L, are called
there is a bijection from L,to L, i.e.. f: L, -’L, such that
f(an b)= f(a) af(b) andf(av b) = f(u) v f(b)
for every element a, b belongs to L,.
Example :Determine whetherthe lattices shown in Fig.(1 )are isomorphic.
Sol: The lattices shown in Fig.(1) are isomorphic. Considerthe mappingf-(a. l).
Af(c)-2A3
(b. 2). (c. 3). (d, 4)}. For example f(b a c)=f(a)=1.Also we have f(b)
1.
b 2
Fig. : (|)
lattice if for any elenents d.
(4) Distributive Lattice:Alattice L is called distributive
hand cofL. it satisfies following distributiveproperties :
(i) an (bvc)=(a ab) v(avc) (aac)
(i} av (bnc)=(avb) a properties.it is called a non-distributive
íthe lattice L does not satisfies the above
latice.
For Example : union is a
power set P(S) of the set Sunder the operations ofintersection and
(1) The
distributive function. Since,
an(buc) = (anb)u(unc)
any sets a. band cof P(S).
ad also uv(bnc) =(aub)n(uuc) for
Since it satislies the distributive properties
(2) The lattice shown in Fig.(2) is distributive.and
1.2,3, 4.
forall ordered triples which are taken from
3 2
Fig. : (2)
Discrete Mathenatics B.T
36
following in short : Neg
Q.3. Explain the
(a) Propositions de
(b) Tautologies
(c) Logicalequivalence stateiment
whichis either true or false. Itisa
propositionis a
Ans.(a) Proposition:Ap
declarative sentence. propositions :
following statements are all
For example : The
Nehru is the first prime minister of India.
() Jawahar Lal
(i) Itrained yesterday.
(ii) Ifx is an integer, then is a+ ve integer. propos1tions : be
Yrexample : The following statementsare
not
are
() Please report at 1la.m. sharp.
(ii) What is your name ?
(ii)x= 13.
Combination of propositions : We can combine the propositions
to produce new
connectos to conbine the
propositions. There are three fundamental and three derived
propositions. These are explained as follows:
(a) Fundamental Connectors
(19 Conjunction : It means ANDing oftwostatements. Assume p and ybe two
propositions. Conjunction of pand qto be aproposition which is true when both pand yare
true, otherwise fålse. It is denoted by pAg. [Fig.(1)) p
Truth tables are used to determine the truth or falsity of thecombined proposition.
T T
T F F
T F
F F F
Fig.(1): Truth
(2) Disjunction : It means ORingTable of pAq. tru
of two statements. ASsume p
propositions. Disjunction of pand qto be a proposition and g be WO
which is
when both p and q are false. It is true when either one or boui
p and gare true and is false
denoted by Dva. [Fig.(2))
T T
T F
F| T
FF F
T
F
Fig.(3):Truthtable of ~ p.
(b) Derived Connectors:
()NAND: It means negation after ANDing oftwo statements. Assume p and g
be two propositioins. Nanding ofp and qto be a proposition which is false when both pand g
are true, otherwise true. It is denoted by pTq. [Fig.(4)]
Tg
F
F
F T T
F T
Fig. : (4)
(2) NORorJoint Denial:Itmeans negation after ORingoftwo statements. Assurne
pand gbe two propositions. NORing of pand qto bea proposition which is true when both
pand qare false, otherwise false. It is denoted by p q.[Fig.(5)].
pq
|
T T F
T F F
F T F
F F
Fig. :(5)
(3) XOR:Assume pand qbe two propositions. XORing of pand qis true ifp is
true or if qistrue but not both and vice-versa. It is denoted by pq. [Fig.(6)].
pq
T T
T F T
F T
F F F
Fig. : (6)
Ans.(b)Tautologies : Aproposition Pisatautology ifit is true under all circumstances.
Itmeans it contains only Tin the final column of its truth table.
Example : Prove that the statement (p-’ ) +(-q’-p) is atautology.
Discrete Matlhemati
38 B.7
statement :
Sol:Make the truth table of above ~pp ’ ) <’(~4 -’
p ~q ’
p’q
T T
F F
F 7 T all
T
F F
T
F 7 T D
tautology.
As the finalcolumn contains alT's soit isa
prupositions are said to be logically equivalenti
Ans.(c)Logicalequivalence: Twounder all circumstances.
The table
contains the
they have exactly the same truth values
fundament.al logicalequivalent expressions : (6)Complement Properties the
() De Morgan's Laws
(7) Transposition
(2) Commutative Properties
PvgqYpipaq=q^p. (p’ )(-g’-p)
(3) Associative Properties (8) Material Implication
a
(pvq)vr<pv(qvr) (p-’)@ (-pvq)
(paq)arpaqAr)
(4) Distributive Properties (9) Material Equivalence
palqvr)(paq) v(gvr) (p ’ ) [(p’ ) A(q- >p))
pv(gar)=(pv)a (q vr) (pt)=|(p’) v(-pA- g)
(5) Impotent Laws (10) Exportation
pvpp and p a psp. (p vq)-<(p’(4’))
Unit-II
Unit-III
Q.6. Define following terms with the help of suitable examples :
(a) 0somorphism
(b) Group
(c) Normal subgroup
Ans.(a) Isomorphism:An algebraic system (B, *) is said to be isomorphicto another
system (4. ) if we can obtain (B, *) from (4, *) by renaming the elements of Aand /or by
renaming the operation . More precisely. we say that an algebraic system (B, *) is isomorphic
to another algebraic system (4, «) if there exists a one to one correspondence ffrom AtoB
such that for all elements a, and a, in A.
Ka, « a) =Aa,) *u,)
The function fis called an isomorphism from (4, )to (B, *). (B, *) is called an
isomorphic image of A.
For example, consider the algebraic systems (4, +) and (B, *)defined as shown in
table on the right. ue
b
b B
B. Tech 4 Semester; Solved papers, May -2023 41
V.
Fig. ¢l)
Fig. (2)
Ans.(c) Weighted graph : Agraph G=(V. E)
of graph Gis assigned positive number is calleda weighted graph ifeach edge
w
For example :The gaph shown incalled the weight ofthe edge e.
fig.(3) and fig.(4) is a weighted
graph.
B.Tech 4 Semester, Solved papers, May -2023
45
4
C
K
8 11 24
6
D E
M
Fig.(3) Fig.(4)
Q.9. Write short note on:
(a) Binary trees and its traversals
(b) Eluerian paths and circuits
Ans.(a) Binary tree: Ifthe outdegree of every node is less than or equal to 2. in a
directed tree then the tree is called a binary tree. Atree consisting of no nodes
(empty tree) is
also a binary tree. Abinary tree is shown in Fig.(1).
M
Fig. : (1)
Traversing Binary trees : Traversing means to visit all the nodes of the tree. There
are three standard methods totraverse the binary trees. These are as follows :
(1) Preorder traversal
(2) Postorder traversal
(3) Inorder traversal.
(1) Preorder traversal: The preorder traversal of abinary
tree is a recursive proces.
The preorder traversal ofa tree is
(i) Visit the root ofthe tree.
() Traverse the left subtree in preorder.
(ii) Traverse the right subtree in preorder.
Discrete Mathematics
46
(2) Postorder traversal: The postorder traversal ofa binary tree is arecursive process.
as follows:
The preorder, postorder and inorder traversal ofthetree is
Preorder 2 3 4 5 6 7 8 9 10 11
Postorder 3 4 2 7 10 9 || 8 6 I
Inorder 2 5 4 7 6 9 10 8 |1.
Ans.(b) Euler Path:An Euler path through agraph is a path whose edge list contains
each edge of the graph exactly once.
Euler Circuit :An Eulercircuit is a path through a graph. in which the initial vertex
appears second time as the terminal vertex.
In the graph G, shown in fig.(1). ae be,ce de ae, is an Euler path because the edges
appear exactly once. In the graph G2 ae,be,ce de e,ais the Euler circuit.
G, Gz
Fig. : (1)