Bigboypyq Merged
Bigboypyq Merged
1. Formal Logic
a.
b.
c.
d.
e.
2. Proof, Rela on and Analysis of Algorithm
a.
b.
c.
d. Recurrence Rela on
i.
e.
3. Sets and Combina ons
a.
b.
c.
4. Rela ons, Func ons and Matrices
a.
b.
c.
d.
e.
f.
g.
h.
i.
j.
k.
5. La ces and Boolean Algebra
a.
b.
c.
6. Graph Theory
a. Isomorphism
i.
b. Euler’s Formula
i.
ii.
iii.
c. Warshall’s Algorithm
i.
ii.
d. Spanning Trees
i.
ii.
e. BFS, DFS
i.
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Compiled by Madhav Gupta (2K21/CO/262)
Scanned by CamScanner
Scanned by CamScanner
Tetal No. of Page -3 Roll No.
SecondSemester Bock (CSE
EndTerm Examination May-2024
CS102: DISCRETE STRUCTURES
Time: 3:00 Hours Mox. Matks: 50
Note: Anser any fiv qwstions, All questions corry eqal marks. Assme xnitahle
missing data. if any:
W Test the validity of the tollowing argument relating to the students of lO|
Department of Computer Scienee and Engineering (CSE) using Rules of
Interence:
i) Astudent of the CSE will graduate this semester only i' the student has
passed the subject programming fundanentals.
(i) If Raju does not study the subject programming fundanentals for l0
hours aweck, then he will notpass in programming fundanmentals.
(i) lf students study programming fundamentals for 10 hours a weck, then
they cannot play volleyball.
Therefore, it can be concluded that at least one student will not graduate this
sémester unless the student does not play volleyball.
B Convert the statement (x ’ (yA w)) ^(z’ (y Aw)) into PDNF fornN (CO#1|
Q. No. 2 |Sx2|
A Show that among any n + 1 positive integers not exceeding 2n there must (COW2|
be an integer that divides one of the other integers.
B If the computational complexity of adivide and conquer algorithm is (COw2]
determined using recurrence relation f(n) = 2f(Vn) +1, (1) =1,
where n is a perfect square, what is the big theta (0) estimate for the
complexity of the algorithms?
Q.Ao. 3 |Sx2|
ALet A={a, b, c, d} and R a relation on A defined as CO#M
R={(a, b),(b, a). (b,c), (c, d)}. Is Ra transitive relation? If not, find the
ransitive closure of R.
2 3 4 5 ICOW)
BIf A= {1,2,3,4, 5, 6) ,P, =( 4 1 2 6
2 3 4 5 2 3 4 5
P22 3 11 5 4 6P: 3 2 5 4
Find (p, op,)"p, . Is the resulttng permutation odd or even?'
Page I of 3
9Ao. 4 [5x2]
Let A =(a, b, c, d, e, f, g, h} and R be the relation defined by |CO#3|
(1 1 1 1 1 1 1 17
1 0 0 1 1 0 1
0 0 1 0 1 0 1 1
00 1 0 1 1 1
M¡ = 00 0 1 0 0 1
00 0 0 1 0 1
|0 0 0 0 0 0 1 1
0 0 0 0 0 0 1!
H/Show that (A, R) is a poset.
sá) Does the poset (A, R) have a least element and a greatest element? If
s0,fdentify them.
i) Show that the poset (A,R) is complemented and list all pairs of
complements.
Kivy Prove or disprove that (A, R) is a Boolean aigebra.
B Let * be a binary cperation on a set A, and suppose that * satisfies the (CO*3|
idermpotent, Commutative and Associative Properties Va, b, cE A. Define
a relation S on Aby asbif and only if a= a+b. Show that (A,S) is a
set, and for all a, bin A, GLB(a, b) = a*b. (Note: GLB(a, b)=anb)
No.5
ACompare isomorphism and homomorphism of semigroups. If Zis the s.i of iCO#3)
integers, T the set of even numbers and x is the multiplication operator,
prove or disprove that the semigroups (Z, x) and (T, x) are isomorphic.
BState the Boolean polynomial for the function, f: B4 ’ B given by logic |CO#3|
diagrarn show in the
figure.
Ce the properties of
BBolean alzebra (or
any graphical rnethod)
to refine the
polynonial to use
minimal number of
variables and
operaor.
Drawgic diayrarn for the new Boolean polynomial.
Page 2 of 3
|5x2)
of the possible spanning trees for |CO#4|
Drawthe digraphs graph is given
the symmctric relation whose trees arce there?
spanning
alongside. How many
codes E01 to E08) for 2nd |CO#4]
offers 8 elective subjects (with of the number of students
BA collegestudents to choose from. The data tabulated below:.
Semester
Subject, and Subject is as
registeredfor both Subject, Subject
Subject, | Subject, E05 E08
E04 e) E03 8
E01 E08
E07 6 E06
E04 E03
b)
E07
E02 g) E06 E01 11
4 h)
of two subjects,
C EOS
E02 examination
d) the not
will occur in the timetable if time-slot results in astudent
Aclash same the
conducted during the of the subjects for which
which are of one
able to take the examination
being
student is registered. examination per day, in how
only one examination be
Assuming that a student takes can the end-semester
) numbers of days elective subjects?
minimum for these
many in the timetable
conducted without any clash time-tables can be generated for
the
different clash-free elective subjects? (Hint:
(i) How many End-Sem Examination
for the
of
conduct ofgraph colouring)
Application |5x2)
Q. No. 7 fully parenthesized [CO#4]
tree for the
Construct a labelled positional binary (e+(f*g)). Assuming that
A
algebraic expression ((a +b) - c) x show the result of'performing a
the label of v,
visiting a vertex v printsconstructed binary tree.
post-order search on the wished to send out a
[CO#5|
formed entrepreneurship
B The CEO of a newly major clients across 5 towns, T = (t, tz, tg, t4, tg.
sales1man to visit all these towns is
The travel cost between 7 50 1 1
=nifthe
givenby the matrix C, where Ci 0 3 50 8
cost of travel from town i ioj is (7 X C=so 3 0 6 2
7
1000). If the headquarters of this 1 50 6
2 7
establish1ment is located at ti, write a
l1 8
round
program to find the most economical minimum cost of the trip?
strip for the salesman. What willbe the
Page 3 of3
Recommended Marking Scheme End-Term Examination December–2024: CO205 Discrete Structures
(The solutions provided are suggestive in nature)
Correct construction of predicate statements for 3 premises and presumed conclusion ( *4=1.0)
𝑃 : ∀𝑥 𝑃(𝑥) → 𝑄(𝑥) ; 𝑃 : ∀𝑥 𝑅(𝑥) → ¬𝑆(𝑥) ; 𝑃 : ∀𝑥 𝑄(𝑥) → 𝑆(𝑥) ;
𝑃 : ∃𝑥 ¬𝑃(𝑥) ; 𝑃𝑟𝑒𝑠𝑢𝑚𝑒𝑑 𝐶𝑜𝑛𝑐𝑙𝑢𝑠𝑖𝑜𝑛 ∴ ∃𝑥 (¬𝑅(𝑥))
Application of rules of inferences to reach presumed conclusion using each of the three premises ( *9=2.25)
# Step Reason
1. 𝑃(𝑎) → 𝑄(𝑎) Universal instantiation of 𝑃 , where 𝑎 ∈ set of students of CSE Department
2. 𝑅(𝑎) → ¬𝑆(𝑎) Universal instantiation of 𝑃
3. 𝑄(𝑎) → 𝑆(𝑎) Universal instantiation of 𝑃
4. ¬𝑃(𝑎) Universal instantiation of 𝑃
5. 𝑃(𝑎) → 𝑆(𝑎) Hypothetical Syllogism 1 and 3.
6. 𝑆(𝑎) → ¬𝑅(𝑎) Contrapositive of 2.
7. 𝑃(𝑎) → ¬𝑅(𝑎) Hypothetical Syllogism 5 and 6.
8. ¬𝑅(𝑎) Modus Tollens 7 and 𝑃 .
9. ∃𝑥 ¬𝑅(𝑥) Existential generalisation of 8, which is the presumed conclusion
Page 1 of 6
Note: Question 2B has a misprint, the recurrence relation was printed as 𝑎 = 5𝑎 − 𝟔𝒂𝒏 − 𝟐 for
𝑛 ≥ 2, 𝑎 = 1, 𝑎 = 2.5 instead of 𝑎 = 5𝑎 − 𝟔𝒂𝒏 𝟐 for 𝑛 ≥ 2, 𝑎 = 1, 𝑎 = 2.5 . Some
students may have not received the correction to this question. It is recommended that the benefit of doubt
be provided to the students.
Q. No. 2B: Aspects to be evaluated [5]
Thus 𝑎 = 2 + 3 = (2 + 3 ) 1
𝟏 1
𝒂𝟐𝟓 = 𝟐𝟐𝟓 + 𝟑𝟐𝟓 = (33,554,432 + 847,288,609,443) = 423,661,081,937.5
𝟐
Page 2 of 6
OR Using Warshall’s Algorithm
0 1 0 0
1 0 1 0
𝑀 =𝑊 = Examine 𝑊 for 𝑘 = 1 to generate 𝑊 :
0 0 0 1
0 0 0 0
Column : 1 in position 2 ∴ add 1 in position 2,2 if not existing, and
Row : 1 in position 2 𝑤 = 1 𝑖𝑓 𝑤 = 1, to generate 𝑊
0 1 0 0
1 1 1 0
𝑊 = Examine 𝑊 for 𝑘 = 2 to generate 𝑊 :
0 0 0 1
0 0 0 0
Column : 1 in positions 1,2 ∴ add 1 in positions 1,1; 1,2; 1,3; 2,1; 2,2; 2,3 if not
Row : 1 in positions 1,2,3 existing, and 𝑤 = 1 𝑖𝑓 𝑤 = 1, to generate 𝑊
1 1 1 0
1 1 1 0
𝑊 = Examine 𝑊 for 𝑘 = 3 to generate 𝑊 :
0 0 0 1
0 0 0 0
Page 3 of 6
Q. No. 4A: Aspects to be evaluated [5]
Understanding of the definition of partial order set and drawing the Hasse Diagram for the poset
Understanding of the definition of isomorphic posets
Given 𝐴 = {1,2,3,5,6,10,15,30} with the partial order ≤ of (2+2)
divisibility on A, the Hasse Diagram of the poset (𝐴, ≤) is
shown in Fig. 1.
∴ B = { { }, {𝑒}, {𝑓}, {𝑔}, {𝑒, 𝑓}, {𝑒, 𝑔}, {𝑓. 𝑔}, {𝑒, 𝑓, 𝑔} }
OR
The Hasse Diagrams of posets (𝐴, ≤) and (𝐵, ⊆) are of the same form except for the labels of
the vertices. ∴ posets (𝐴, ≤) and (𝐵, ⊆) are isomorphic
This shows that 𝐻𝐶𝐹(𝑝, 𝑝𝑞) = 1, which is not possible ( ∵ 𝑝 is the common divisor of 𝑝 and 𝑝𝑞) ,
Thus resulting in a contradiction. Hence proved that 𝐷 cannot be a Boolean Algebra.
Page 4 of 6
Q. No. 5B: Aspects to be evaluated [5]
Understanding of Boolean polynomial (2.5)
Application of properties of Boolean algebra / application of Karnaugh-Map (2.5)
(2.5)
(𝑦 ∧ 𝑥 ) ∨ (𝑦 ∧ 𝑤 ) ∨ (𝑦 ∧ 𝑤) ∨ 𝑧 O Using K-Map
≡ (𝑦 ∧ 𝑥 ) ∨ [𝑦 ∧ (𝑤 ∨ 𝑤)] ∨ 𝑧 R
≡ (𝑦 ∧ 𝑥 ) ∨ 𝑦 ∨ 𝑧′ 𝑦 ∨ 𝑧′
≡ 𝑦 ∨ 𝑧′ (2.5)
Q. No. 6A: Aspects to be evaluated – Understanding of Spanning Tree of a undirected graph [5]
Page 5 of 6
Q. No. 7A: Aspects to be evaluated [5]
Understanding and application of Euler’s path
The graph with each display hall / stand as a vertex and an edge between 2.5
two vertices if the corresponding room/stand is connected by a door is
given in Graph G.
It can be observed that vertices, 𝐻 , 𝐻 , 𝐻 and 𝐻 have odd-degrees. Also, if a graph has more 2.5
than two vertices of odd degree, then there can be no Euler path in that graph. Graph G has more
than two vertices with odd degree. Hence, there is no Euler path in Graph G.
Thus, it is NOT possible to visit every exhibit hall / stand in the museum by passing through each
door exactly once.
∑ 𝑤𝑖𝑒𝑔ℎ𝑡𝑠 𝑜𝑓 𝑡ℎ𝑒 𝑒𝑑𝑔𝑒𝑠 𝑜𝑓 𝑡ℎ𝑒 𝑀𝑆𝑇 = (2.4 + 1.8 + 1.7 + 2.1 + 2.6 + 2.8 + 2.5 + 2.1 + 2.2)
= ₹20.2 𝐿𝑎𝑘ℎ𝑠
Page 6 of 6