DMS Solved Question Paper 2024..
DMS Solved Question Paper 2024..
Date: 04-01-24
--------------------------------------------------------------------------------------------------------------------------------------
A) Let P(x), Q(x), and R(x) be the statements “x is a professor,” “x is ignorant,” and “x is vain,”
respectively. Express each of these statements using quantifiers; logical connectives; and P(x), Q(x),
and R(x), where the domain consists of all people.
(a) No professors are ignorant. (b) All ignorant people are vain.
(c) No professors are vain. (d) Does (c) follows (a) and (b)?
Answer:-
Given:
P(x): x is a professor.
Q(x): xis ignorant.
R(x): xis vain.
The domain consists of all people.
∀x(P(x)→¬Q(x))
∀x(Q(x)→R(x))
∀x(P(x)→¬R(x))
--------------------------------------------------------------------------------------------------------------------------------------
Answer:-
For n=1:
Assume that the formula is true for some positive integer kkk, i.e.,
Using the inductive hypothesis, we substitute the sum of the first k terms:
Step 4: Conclusion
Since the formula holds for n=1(base case) and we have shown that if it holds for n=k, then it also
holds for n=k+1, by the principle of mathematical induction, the formula is true for all positive
integers n. ✅
------------------------------------------------------------------------------------------------------
C) Use De Morgan’s laws to find the negation of each of the following statements.
Answer:-
--------------------------------------------------------------------------------------------------------------------------------------
A) Answer these questions for the partial order represented by this Hasse diagram.
Answer:-
A Hasse diagram represents a partially ordered set (poset), where an edge between two
elements indicates a covering relation (i.e., one element is directly greater than another).
The elements at the top are the maximal elements (no element is greater than them).
The elements at the bottom are the minimal elements (no element is smaller than them).
A maximal element is an element that no other element is greater than (i.e., it is not covered by
any other element).
From the diagram, the maximal elements are:
l,m
A minimal element is an element that no other element is smaller than (i.e., it does not cover any
other element).
From the diagram, the minimal elements are:
a,b,c
These are at the bottom of the diagram.
A greatest element is an element that is greater than or equal to all other elements in the poset.
Here, there is no single element that is greater than all others because both l and m are
maximal elements, but neither is greater than the other.
Answer: No, there is no greatest element.
A least element is an element that is less than or equal to all other elements in the poset.
Here, there is no single element that is smaller than all others because a, b, and c are
minimal elements, but neither is smaller than the others.
Answer: No, there is no least element.
An upper bound of a set is an element that is greater than or equal to all elements in the set.
A lower bound of a set is an element that is less than or equal to all elements in the set.
Final Answers:
(a) Maximal elements: l,m
(b) Minimal elements: a,b,c
(c) Greatest element: No
(d) Least element: No
(e) Upper bounds of {a, b, c}: e,h,k,l,m
(f) Lower bounds of {f, g, h}: e
--------------------------------------------------------------------------------------------------------------------------------------
B) Let f(x) = x + 2, g(x) = x – 2, and h(x) = 3x for x ∈ R where R = set of real numbers.
Find i) gof
ii) fohog
iii) foh
Answer:-
(i) g∘f
(g∘f)(x)=g(f(x))
g(f(x))=g(x+2)=(x+2)−2=x
Thus,
(g∘f)(x)=x
(ii) f∘h∘g
(f∘h∘g)(x)=f(h(g(x)))
g(x)=x−2
f(h(g(x)))=f(3x−6)=(3x−6)+2=3x−4
Thus,
(f∘h∘g)(x)=3x−4
(iii) f∘h
(f∘h)(x)=f(h(x))
f(h(x))=f(3x)=3x+2
Thus,
(f∘h)(x)=3x+2
Final Answers:
(i) g∘f(x)=x
(ii) f∘h∘g(x)=3x−4
(iii) f∘h(x)=3x+2
--------------------------------------------------------------------------------------------------------------------------------------
a) K7 b) K1,8 c) K4,4 d) C7 e) W7
Answer
a) K7 has 7 vertices and there needs to be an edge between every pair of vertices.
b) K1,8 has two sets of vertices: a set of 1 vertex and a set of 8 vertices
M={A}M={A}
N={B,C,D,E,F.G.H.I}N={B,C,D,E,F.G.H.I}
The vertex that is alone in its set should be connected to all other vertices.
c) K4,4 has two sets of vertices: a set M of 4 vertices and a set N of 4 vertices
M={A,B,C,D}M={A,B,C,D}
N={E,F,G,H}N={E,F,G,H}
All vertices in the set M should be connected with every vertex in the set N.
d) C7 has 7 vertices A,B,C,D,E,F,G, where A and B are connected, B and C are connected,...,
F and G are connected, and G and A are connected.
e) W7 is the graph of C7 in part (d) to which a vertex H was added and this vertex is connected with
all other vertices.
--------------------------------------------------------------------------------------------------------------------------------------
B) Use paths either to show that these graphs are not isomorphic or to find an isomorphism
between them.
Answer:-
To determine whether the graphs and are isomorphic, we should compare their structure using key
graph properties:
Since they have the same number of vertices and edges, isomorphism is still possible.
2. Vertex degrees
Since graph has varying degrees while graph has uniform degrees, the two graphs cannot be
isomorphic.
Conclusion
Graphs and are not isomorphic because their degree sequences differ. This confirms that no one-
to-one correspondence preserves adjacency between them.
----------------------------------------------------------------------------------------------------------------------------------
C) Use Dijkstra’s algorithm to find the length of a shortest path between the vertices 1 and 4 in the
weighted graph displayed in Figure below.
Answer:-
We will use Dijkstra’s algorithm to find the shortest path between vertex 1 and vertex 4 in the given
weighted graph.
1. Initialization:
(1 → 2) = 8
(1 → 0) = 4
(2 → 3) = 2
(2 → 5) = 4
(2 → 8) = 2
(3 → 5) = 14
(4 → 5) = 10
(5 → 6) = 6
(6 → 7) = 7
(7 → 0) = 11
(7 → 8) = 1
(8 → 6) = 6
Execution of Algorithm
Final Answer:
A) Use Huffman’s algorithm to provide an optimal average-bit-length code for the probability
distribution a: 0.2, b: 0.2, c: 0.15, d: 0.15, e: 0.15, f: 0.1, and g: 0.05. Draw a binary tree to find the
prefix code for for each probability distribution and compute the average bit-length of a codeword
Answer:-
Symbol Probability
g 0.05
f 0.10
c 0.15
d 0.15
e 0.15
a 0.20
b 0.20
We iteratively combine the two smallest probabilities until we form a single tree.
a 00 2
Symbol Huffman Code Code Length
b 01 2
c 100 3
d 101 3
e 110 3
f 1110 4
g 1111 4
L=∑(Pi×li)
L=(0.2×2)+(0.2×2)+(0.15×3)+(0.15×3)+(0.15×3)+(0.1×4)+(0.05×4)
=0.4+0.4+0.45+0.45+0.45+0.4+0.2
=2.7
(1.00)
/ \
(0.40) (0.60)
/ \ / \
(a) (b) (0.30) (0.30)
/ \ / \
(c) (0.15) (d) (e)
/ \
(f) (g)
B) Use Kruskal’s algorithm to find a minimum spanning tree for the weighted graph in the Figure
below.
Answer:-
To find the Minimum Spanning Tree (MST) using Kruskal’s algorithm, follow these steps:
Kruskal’s algorithm works by sorting edges in ascending order and adding them to the MST while ensuring
no cycles form.
Edge Weight
(a, b) 1
(c, d) 1
(e, f) 1
(g, h) 1
(i, j) 1
(k, l) 1
(m, n) 1
Edge Weight
(o, p) 1
(a, e) 2
(d, h) 2
(m, i) 2
(p, l) 2
(b, c) 3
(f, g) 3
(j, k) 3
(n, o) 3
(b, f) 3
(c, g) 3
(f, j) 3
(g, k) 3
(j, n) 3
(k, o) 3
1. Add (a, b), (c, d), (e, f), (g, h), (i, j), (k, l), (m, n), (o, p) (all weight 1)
2. Add (a, e), (d, h), (m, i), (p, l) (all weight 2)
3. Add (b, c), (f, g), (j, k), (n, o) (all weight 3)
The MST consists of the selected edges forming a minimum cost structure while avoiding cycles.
Step 4: Calculate Total Weight
1×8+2×4+3×4=8+8+12=24
---------------------------------------------------------------------------------------------------------------------------------------------------
C) (i) What is the value of each of the prefix expressions + − ↑ 3 2 ↑ 2 3 / 6 − 4 2? (ii) What is the
value of each of the postfix expressions 3 2 ∗ 2 ↑ 5 3 − 8 4 / ∗ −?
Answer:-
Expression:
+−↑32↑23/6−42
1. Evaluate Exponentiation:
o ↑32=32=9
o ↑23=23=8
2. Evaluate Subtraction:
o −98=9−8=1
3. Evaluate Division:
o −42=4−2=2
o /62=6/2=3
4. Evaluate Final Addition:
o +13=1+3=4
Final Answer: 4
Expression:
32∗2↑53−84/*-
* represents multiplication.
↑ represents exponentiation (**).
- represents subtraction.
/ represents division.
1. Evaluate Exponentiation:
o 2↑5=25=32
2. Evaluate Multiplication:
o 3∗2=6
3. Evaluate Subtraction:
o 3−32=−29
4. Evaluate Division:
o 8/4=2
5. Evaluate Multiplication:
o −29∗2=−58
6. Evaluate Final Subtraction:
o 6−(−58)=6+58=64
Final Answer: 64
--------------------------------------------------------------------------------------------------------------------------------------
A) Consider the binary operation defined on the set A = {a, b, c, d} by following table. Find:
(i) c * d and d * c
(ii) b * d and d * b
(iii) a * (b * c) and (a * b) * c
Answer:-
The table represents a binary operation on the set A = {a, b, c, d}. The rows represent the first
operand, and the columns represent the second operand.
For example:
b * c = b (row) and c (column) → b
Answer:
b*d = c
d*b = b
So a*(b*c) = c.
Answer:
a*(b*c) = c
(a+b)*c = d
Final Answers:
1. c*d = a, d*c = a
2. b*d = c, d*b =b
3. a*(b*c) = c, (a*b)*c = d.
--------------------------------------------------------------------------------------------------------------------------------------
B) Consider the group G = {1, 2, 4, 7, 8, 11, 13, 14} under multiplication modulo 15.
Answer:-
We are given the group G={1,2,4,7,8,11,13,14} under multiplication modulo 15. Let's solve each
part step by step.
The operation is multiplication modulo 15, meaning that for any elements a,b∈G we compute
(a⋅b)mod15.
Multiplication Table
⋅ 1 2 4 7 8 11 13 14
1 1 2 4 7 8 11 13 14
2 2 4 8 14 1 7 11 13
4 4 8 1 13 2 14 7 11
7 7 14 13 4 11 2 8 1
8 8 1 2 11 4 13 14 7
11 11 7 14 2 13 8 1 4
13 13 11 7 8 14 1 4 2
14 14 13 11 1 7 4 2 8
(x×y)mod 15=1
Finding 2−1
(2×y)mod 15=1
2−1=8
Finding 7−1
(7×y)mod 15=1
7−1=13
The order of an element aaa in G is the smallest integer nnn such that:
an≡1mod 15
Order and Subgroup of 7:
71≡7mod 15
72≡49≡4mod 15
73≡7×4=28≡13mod 15
74≡7×13=91≡1mod 15
⟨7⟩={1,7,4,13}
111≡11mod 15
112≡121≡1mod 15
⟨11⟩={1,11}
Final Answers
--------------------------------------------------------------------------------------------------------------------------------------
BEST OF LUCK….