DSTL STs QP With Solution
DSTL STs QP With Solution
Printed Pages: 2
Session: 2023-24
Semester: 3rd
Course Code: BCS 303 Roll No.:
Course Name: Discrete Structure & Theory of Logic Time: 1.15 Hrs.
Maximum Marks: 30
Instructions:
1. Attempt All sections.
2. If require any missing data, then choose suitably.
▪ How many women like watching all the three movie genres?
▪ Find the number of women who like watching only one of the
three genres.
▪ Find the number of women who like watching at least two of the
given genres.
(GATE 2021)
3 Attempt ANY ONE part from the following Same K Levels Questions
Consider a set A = {1,2,3,4,5}
Define the relation '<' on A such that xRy if and only if
(x mod 3) <= (y mod 3)
4+4+1
a) 1. Prove that (A, <) is POSET. CO1 K3 1.1.4
2. Draw the Hash diagram. +1
3. What are the maximal elements?
4. What are minimal elements?
Prove that
b) (i) (A∩B) – C = (A-C) ∩ (B-C) 5+5 CO1 K3 1.1.4
(ii) A ∩ (B-C) = (A∩B)- (A∩C)
Section-B Total Marks : 10
4 Attempt ANY ONE part from the following Same K Levels Questions
(i) Define Ackermann Function and also solve A(2,2).
2.5 +
a) (ii) Composition of function is commutative. Prove or Disprove the CO2 K2 2.4.1
statement with the help of suitable example. 2.5
Prove that:
b) (i) F(n)= O g(n)where f(n)= n2 and g(n)= n2 + n+1 2.5+ CO2 K2 2.4.1
(ii) F(n)= Ω g(n) where f(n)= n-10 and g(n)= n+10 2.5
5 Attempt ANY ONE part from the following Same K Levels Questions
Consider A=B=C=R and let f:A→B and g: B→C be defined
by f(x)= x+9 and g(y)= y2 + 3. Find the following composition
functions:
(i) fof(3) 1+1+
a) 1+1+ CO2 K3 2.4.1
(ii) fog(5)
1
(iii) gof(4)
(iv) gog(6)
(v) fof(-2)
Let A= B=C=R. Consider the function f:A→B and g:B→C
b) 5 CO2 K3 2.4.1
defined by f(a)= 2a+1, g(b)= b/3. Verify (gof)-1 =f-1og-1
To prove that D36 forms a lattice, we need to show that every pair of elements in D36 has
a unique supremum and a unique infimum.
In this diagram, the elements are arranged vertically, and the line connecting two elements indicates
that the lower one divides the upper one. For example, 18 and 12 are connected by a line because
12 is divisible by 18.
Now, let’s consider a pair of elements in D36, say 4 and 6. The infimum of 4 and 6 is 2, since 2 is
the largest number that divides both 4 and 6. The supremum of 4 and 6 is 12, since 12 is the smallest
number that both 4 and 6 divide into. This can be seen from the Hasse diagram, as 2 is directly
below 4 and 6, and 12 is directly above them.
Similarly, we can consider any other pair of elements in D36, and we will find that it has a u nique
infimum and a unique supremum. Therefore, D36 forms a lattice.
1b). Let X= {1,2,3, 4,5,6,7} and R: {(x,y) I (x-y) is divisible by 3). Is R equivalence relation. Draw
the diagraph of R.
R={(4,1),(5,2),(6,3),(7,4),(1,4),(2,5),(3,6),(4,7),(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),
(7,7),(1,7),(7,1)}
Reflexive:
Clearly, {(1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7)}{(1,1),(2,2),(3,3),(4,4),(5,5),(6,6)
,(7,7)}
So, {(a,a)∈R,∀a∈A}
Hence, it is reflexive.
Symmetric:
Clearly, {(1,4),(4,1),(2,5),(5,2),(3,6),(6,3),(4,7),(7,4),(1,7),(7,1)} ∈R
So, {(a,b)∈R⇒(b,a)∈R,∀a∈A}
Hence, it is symmetric.
Transitive:
Clearly,
{(1,4),(4,1),(1,1),(2,5),(5,2),(2,2),(3,6),(6,3),(3,3),(4,7),(7,4),(4,4)}{(1,4),(4,1),(
1,1),(2,5),(5,2),(2,2),(3,6),(6,3),(3,3),(4,7),(7,4),(4,4),(1,7),(7,1)} ∈R
So, { a,b)∈R,(b,c)∈R⇒(a,c)∈R,∀a∈A}
Hence, it is transitive.
Thus, the given relation is an equivalence relation.
7 2 5 3 6
1
ii) S= {(1,2),(2,1)} is a binary relation on a set A= {1,2,3}. Is it irreflexive? Add the minimum
number of ordered pairs to S to make it an equivalence relation. Provide the modified S.
Solution
b) For the purposes of a marketing research, a survey of 1000 women is conducted in a town. The results show
that 52 % liked watching comedies, 45% liked watching fantasy movies and 60% liked watching romantic movies.
In addition, 25% liked watching comedy and fantasy both, 28% liked watching romantic and fantasy both and
30% liked watching comedy and romantic movies both. 6% liked watching none of these movie genres. Find The
number of women who like watching at least two of the given genres
Given:
n = 1000 women
52% liked comedies
45% liked watching fantasy movies
60% liked watching romantic movies
atleast 2 genres
25% liked watching comedy and fantasy both
28% liked watching romantic and fantasy both
30% liked watching comedy and romantic movies both
6% liked watching none of these movie genres = > thus, women who liked atleast 1 genre is 94%
Step-by-step explanation:
We will use venn diagram in this problem:
1. Calculate the percent of women who liked all three genres (n)
94% = 52% + 45% + 60% - 25% -28% - 30% + n
= > n = 94% - 52% - 45% - 60% + 25% + 28% + 30%
= > n = 20 %
2. number of woman who like watching only one of the genres
17% (like only comedy) + 12% (like only fantasy) + 22% (like only romantic)= 51% of 1000 = 510
3. find the percent of women who liked atleast 2 genres
25 % comedy and fantasy - 20 % = 5 %
28 % romantic and fantasy - 20 % = 8 % .
30 % comedy and romantic - 20 % = 10 %
The number of women who like watching at least two of the given genres = (number of women who like
watching only two of the genres) + (number of women who like watching all the three genres) = (10 + 5 + 8 +
20)% i.e. 43% of 1000 = 430.
3a Consider a set A = {1,2,3,4,5}
(b)
Prove that
(i) (A∩B) – C = (A-C) ∩ (B-C)
Solution: L.H.S. = (A-C) ∩ (B-C)
= (A∩C’) ∩(B∩C’) as A- B= A∩B’
= A∩C’∩B∩C’
= A∩B∩C’∩C’ acc. to communication law as, A∩B= B∩A
= A∩B∩C’
= (A∩B) ∩C’ acc. to associative law
= (A∩B)-C as A∩B’= A-B
= RH.S. Hence Prove
Section-B
Q4.a (i) Define Ackermann Function and also solve A(2,2).
f(n)<=g(n) n2<=c. n2+n+1 c=1 and n0=1 as n2+n+1 is already greater there is no need to
asymptotically increase g(n)
Printed Pages: 2
Session: 2023-24
Semester: 3rd
Course Code: BCS 303 Roll No.:
Course Name: DSTL Time: 1.15 Hrs.
Maximum Marks: 30
Instructions:
1. Attempt All sections.
2. If require any missing data, then choose suitably.
Section-A
Question 1: (a)
Find the Sum-of-product and Product-of-sum expansion of the boolean functions:
(i) F(x, y, z) = (x+z).(y’+z’)
(ii) F(a, b, c) = a’b+c (2.5 + 2.5 Marks)
Solution:
(i) F(x, y, z) = (x+z).(y’+z’)
POS:
F(x, y, z) = (x+z).(y’+z’)
F(x, y, z) = (x+z+y.y’).(y’+z’+xx’)
= (x+z+y).(x+z+y’).(y’+z’+x).(y’+z’+x’)
SOP:
F(x, y, z) = (x+z).(y’+z’)
F(x, y, z) = (x.y’)+(x.z’)+(y’.z)+(z.z’)
= (x.y’)+(x.z’)+(y’.z)+0
= (x.y’.(z+z’))+(x.z’.(y+y’))+(y’.z.(x+x’))
= (xy’z)+(xy’z’)+(xz’y)+(xz’y’)+(y’zx)+(y’zx’)
= (xy’z)+(xy’z’)+(xz’y)+(y’zx’)
= (xy’z)+(xy’z’)+(xyz’)+(x’y’z)
(ii) F(a, b, c) = a’b+c
POS:
SOP:
F(a, b, c) = a’b+c
= a’b(c+c’)+c(a+a’)(b+b’)
= a’bc+a’bc’+(ca+ca’)(b+b’)
= a’bc+a’bc’+abc+ab’c+a’bc+a’b’c
Question 1:(b)
Solve the following Boolean functions using K-map:
(i) F(A,B,C,D) = Π (0,1,2,4,5,6,8,9,11,13,14 )
(ii) F(A,B,C,D)=Σ(0,2,5,7,8,10,13,15) (2.5 + 2.5 Marks)
Solution:
Question 2: (a)
Consider the following Boolean expression:
F = (X+Y+Z)( X̄+Y)(Ȳ +Z)
Find the simplified form of given Boolean Expression and also draw the circuit
diagram. (3 + 2 Marks)
Solution:
Question 2: (b)
Consider the Boolean function z(a, b, c).
Find the minterm of the circuit given above? [GATE: 2020] (5 Marks)
Solution:
Question 3: (a)-(i)
Convert to DNF p → (( p → q) ^ ~(~q ν ~p)) (5 Marks)
Solution:
Question 3: (a)-(ii)
Show that: r → ~q, r v s, s → ~q, p → q ↔ ~p are inconsistent (5 Marks)
Solution:
Question 3: (b)
Prove the validity of the following argument. If Mary runs for office, She will be
elected. If Mary attends the meeting, she will run for office. Either Mary will
attend the meeting or she will go to India. But Mary cannot go to India. “Thus
Mary will be elected”. (10 Marks)
Solution:
Section-B
Question 4: (a)
Tautology
A compound proposition is called tautology if and only if it is true for all possible
truth values of its propositional variables.
It contains only T (Truth) in last column of its truth table.
Example: p v ¬p is a tautology.
Contradiction
A compound proposition is called contradiction if and only if it is false for all
possible truth values of its propositional variables.
It contains only F (False) in last column of its truth table.
Example: p ∧ ¬p is a contradiction.
Contingency
A compound proposition is called contingency if and only if it is neither a
tautology nor a contradiction.
It contains both T (True) and F (False) in last column of its truth table.
Example: ¬ (p v q) is a contingency.
Question 4: (b)
Check whether the following proportional logic assertion S is tautology,
contradiction and contingency:
S : ((P ∧ Q)→ R)→ ((P ∧ Q)→ (Q → R))
Also check whether Antecedent of S is equivalent to Consequent of S.
[GATE: 2021] (3 + 2 Marks)
Solution:
A tautology is a proposition that is always true for every value of its propositional
variables.
Logically equivalent: Compound propositions with the same truth value in all
possible cases are logically equivalent.
in another way, the compound propositions p and q are called logically equivalent
if p↔q is a tautology.
T T T T T T T T
T T F T F F F T
T F T F T T T T
T F F F T T T T
F T T F T T T T
F T F F T F T T
F F T F T T T T
F F F F T T T T
It’s clearly visible from the above truth table that S is a tautology as all its values are
true
From the above truth table, we can see that ((P∧Q)→R) ≡ ((P∧Q)→(Q→R)) as their
truth tables are the same and hence Antecedent of S is equivalent to Consequent of S.
Question 5: (a)
Explain all the rules of theory of inference.
Show that ((P˅Q)^~(~P^(~Q˅~R)))˅(~P^~Q)˅(~P^~R) is a tautology.
(3 + 2 Marks)
Solution:
Question 5: (b)
(i) Express Converse, Inverse and Contrapositive of the following statement “If
two angles are congruent, then they have the same measure.”
(ii) Show that the statements p↔q and (p ⋀ q) V (~p ⋀ ~q) are equivalent
(3 + 2 Marks)
Solution:
(i) p: two angles are congruent
q: two angles have the same measure.
p→q : If two angles are congruent, then they have the same measure.
Converse (q→p) : If two angles have the same measurement, then they are
congruent.
Inverse (~p→~q): If two angles are not congruent, then they don't have the same
measurement.
Contrapositive (~q→~p): If two angles don't have the same measurement, then
they are not congruent.
(ii)
T T T T F T
T F F F F F
F T F F F F
F F T F T T
From the above truth table, we can see that P↔Q ≡ ( P∧Q )V(~P∧~Q ) as their
truth tables are the same
ABES Engineering College, Ghaziabad
B. Tech Odd Semester Sessional Test-3
Printed Pages:
Session: 2023-24
Semester: III
Course Code: BCS303 Roll No.:
Course Name: DSTL Time: 1Hr
30 Min.
Maximum Marks: 40
Instructions:
1. Attempt all sections.
2. If require any missing data, then choose suitably.
2 Attempt ANY ONE part from the following Same K Levels Questions
(i). State Ring with example.
a) 2+3 CO4 K2 1.3.1
(ii). State and prove Lagrange’s Theorem.
What do you mean by Cosets of a subgroup? Consider the group Z
of integers under addition and the subgroup H = {…., -12, -6, 0, 6
b) 12, ……} considering of multiple of 6. Find the Left and right 5 CO4 K2 2.2.1
Cosets of H in Z.
3 Attempt ANY ONE part from the following Same K Levels Questions
When is a group said to be cyclic? Prove whether the group (G, +6) 4+6 CO4 K3 2.2.1
a) where G = { 0,1,2,3,4,5} is cyclic or not? If yes, then find all the
generators.
State Group with example. Prove that the set {0,1,2,3,4} is a
b) finite Abelian group of order 5 under addition modulo 5 as 4+6 CO4 K3 2.2.2
composition.
Section-B Total Marks : 20
4 Attempt ANY ONE part from the following Same K Levels Questions
Determine the chromatic number of the following graph.
GATE 2018
a) 5 CO5 K2 1.2.1
5 Attempt ANY ONE part from the following Same K Levels Questions
(i) Justify that “In an undirected graph the total number of
odd degree vertices is even”.
a) 2.5*2 CO5 K2 1.1.1
(ii) Justify that “In a graph, the sum of all the degrees of all
the vertices is equal to twice the number of edges”.
Explain Pigeonhole principle. Find the minimum number of
b) students in a class to be sure that 4 out of them are born in the 5 CO5 K2 1.1.1
same month.
6 Attempt ANY ONE part from the following Same K Levels Questions
Explain the following terms with suitable example graph
representation:
(i). Euler Graph and Hamiltonian Graph.
a) (ii). Regular Graph. 2*5 CO5 K2 1.1.1
(iii). Chromatic Number of a graph.
(iv). Walk and path.
(v). Bipartite Graph.
(i). Define Planer Graph. Is K5 planer or not? Justify your
answer with an example graph representation.
(ii). Define Isomorphic graphs. Are the two given graphs
isomorphic? Justify your answer.
b) 5*2 CO5 K2 1.1.2
CO Course Outcomes mapped with respective question
KL Bloom's knowledge Level (K1, K2, K3, K4, K5, K6)
K1-Remember, K2-Understand, K3-Apply, K4-Analyze, K5: Evaluate, K6-Create
DSTL BCS303 ST3 SOLUTION
1(a) Let G = {1,-1, 𝑖, -𝑖} be a group with the operation of ordinary multiplication on G be an
algebraic structure, where 𝑖=√-1.
Determine whether G is abelian.
since all elements in the composition table belong to the set G hence closure property holds
Associative Property holds:
Multiplication of complex numbers is always associative.
Hence associative axiom is true .
Identity element exist:
Clearly the identity element is 1 and
1∈G
. Inverse exist:
From the table,
Inverse of 1 is 1
Inverse of -1 is -1
Inverse of i is -i
Inverse of -i is i
since each element of G has unique inverse, Inverse exist for each element in group
Clearly multiplication of complex number is always commutative.
Hence commutative axiom is true.
Therefore, G is an abelian group under multiplication.
ii). Justify that “If a,b are the arbitrary elements of a group G then (ab) 2 = a2 b2 if and only if G
is Abelian
2(a) (i). State Ring with example.
The ring is a type of algebraic structure (R, +, .) or (R, *, .) which is used to contain non-empty
set R. Sometimes, we represent R as a ring. It usually contains two binary operations that are
multiplication and addition.
An algebraic system is used to contain a non-empty set R, operation o, and operators (+ or *) on
R such that
(R, 0) will be a semigroup, and (R, *) will be an algebraic group.
The operation o will be said a ring if it is distributive over operator *.
Properties satisfied by Ring .
(ii) State and prove Lagrange’s Theorem.
Lagrange theorem is one of the central theorems of abstract algebra. It states that in group
theory, for any finite group say G, the order of subgroup H of group G divides the order of G.
The order of the group represents the number of elements. This theorem was given by Joseph-
Louis Lagrange.
Proof of Lagrange Statement:
Let H be any subgroup of the order n of a finite group G of order m. Let us consider the cost
breakdown of G related to H.
Now let us consider each coset of aH comprises n different elements.
Let H = {h1,h2,…,hn}, then ah1,ah2,…,ahn are the n distinct members of aH.
Suppose, ahi=ahj⇒hi=hj be the cancellation law of G.
Since G is a finite group, the number of discrete left cosets will also be finite, say p. So, the total
number of elements of all cosets is np which is equal to the total number of elements of G.
Hence, m=np
p = m/n
This shows that n, the order of H, is a divisor of m, the order of the finite group G. We also see
that the index p is also a divisor of the order of the group.
Hence, proved, |G| = |H|
For example if oder of the group is 9 that is no of elements is 9 so the subgroups order will be
1.3 as they are divisor of 9
2(b )What do you mean by coset of subgroup? Find the left and right coset of the given group.
Group is Z and subgroup is H={....,-12,-6,0,6,12, .......} multiple of 6
Vertex c b a d e f
Degree 4 4 3 3 3 3
Color red blue green green blue red
4(b). K4 and Q3 are graphs with the following structures. Which one of the following
statements is TRUE in relation to these graphs. GATE
2015
(i). K4 is planer while Q3 is not.
(ii). Both K4 and Q3 are planar.
(iii). Q3 is planer while K4 is not.
(iv). Neither Q3 and K4 is planar.
5(a). Justify that “In an undirected graph the total number of odd degree vertices is even”.
(b). Justify that “In a graph, the sum of all the degrees of all the vertices is equal to twice the
number of edges”.
5(b). Explain Pigeonhole principle. Find the minimum number of students in a class to
be sure that 4 out of them are born in the same month.
Solution:
Pigeonhole principle : If n pigeonholes are occupied by n+1 or more pigeons, then at least
one pigeonhole is occupied by greater than one pigeon.
4 of them born in same month
There are 12 months in a year
Each month can have 3 students before having 4th student born in that month
Hence 12 x 3 = 36 Students
Now 37th students must be 4th student born on some day
Hence minimum number of students needed are 37 to guarantee that 4 of them were born in
the same month.
6(a). Explain the following terms with suitable example graph representation:
(i). Euler Graph and Hamiltonian Graph.
(ii). Regular Graph.
(iii). Chromatic Number of a graph.
(iv). Walk and path.
(v). Bipartite Graph.
Solution:
(i). Euler Graph
If all the vertices of any connected graph have an even degree, then this type of graph will be
known as the Euler graph. In other words, we can say that an Euler graph is a type of
connected graph which have the Euler circuit. The simple example of Euler graph is
described as follows:
The below graph is a connected graph, and the vertices of this graph contain the even degree.
Hence, we can say that this graph is an Euler graph.
In other words, we can say that this graph is an Euler graph because it has the Euler circuit
as BACEDCB.
Euler Circuit: If there is a connected graph, which has a walk that passes through each and
every edge of the graph only once, then that type of walk will be known as the Euler circuit.
In this walk, the starting vertex and ending vertex must be the same, and this walk can
contain the repeated vertex, but it is not compulsory.
Hamiltonian Graph
The graph will be known as a Hamiltonian graph if there is a closed walk in a connected
graph, which passes each and every vertex of the graph exactly once except the root vertex or
starting vertex. The Hamiltonian walk must not repeat any edge. One more definition of a
Hamiltonian graph says a graph will be known as a Hamiltonian graph if there is a connected
graph, which contains a Hamiltonian circuit.
In the below graph, there is a closed walk ABCDEFA.
Except for the starting vertex, it passed through every vertex of the graph exactly once.
At the time of walk, the edges are not repeating.
Due to all the reasons, we can say that this graph is a Hamiltonian graph.
(ii). Regular Graph: A graph is called regular graph if degree of each vertex is equal. A graph is
called K regular if degree of each vertex in the graph is K. Example: Consider the graph below:
(iii). Chromatic Number of a graph: The chromatic number can be described as the minimum
number of colors required to properly color any graph. In other words, the chromatic number can
be described as a minimum number of colors that are needed to color any graph in such a way
that no two adjacent vertices of a graph will be assigned the same color. Hence, in this graph, the
chromatic number = 3
(iv). Walk –
A walk is a sequence of vertices and edges of a graph i.e. if we traverse a graph then we get a
walk.
Edge and Vertices both can be repeated. Here, 1->2->3->4->2->1->3 is a walk.
Open walk- A walk is said to be an open walk if the starting and ending vertices are different
i.e. the origin vertex and terminal vertex are different.
Closed walk- A walk is said to be a closed walk if the starting and ending vertices are
identical i.e. if a walk starts and ends at the same vertex, then it is said to be a closed walk.
6(b). (i). Define Planer Graph. Is K5 planer or not? Justify your answer with an example
graph representation.
Solution: n graph theory, a planar graph is a graph that can be embedded in the plane, i.e., it
can be drawn on the plane in such a way that its edges intersect only at their endpoints. In
other words, it can be drawn in such a way that no edges cross each other.
6(b). (i). Define Planer Graph. Is K5 planer or not? Justify your answer with an example graph
representation.
Solution: In graph theory, a planar graph is a graph that can be embedded in the plane, i.e., it can
be drawn on the plane in such a way that its edges intersect only at their endpoints. In other
words, it can be drawn in such a way that no edges cross each other.
(ii). Define Isomorphic graphs. Are the two given graphs isomorphic? Justify your answer.
Solution: Two graphs G1 = (V1, E1) and G2 = (V2, E2) are isomorphic if there is an injective (one-
to-one) and surjective (onto) function f from V1 to V2 with the property that a and b are adjacent
in G1 if and only if f (a) and f (b) are adjacent in G 2, for all a and b in V1. Such a function f is
called an isomorphism.
In short, out of the two isomorphic graphs, one is a tweaked version of the other. An unlabelled
graph also can be thought of as an isomorphic graph.
If G1 ≅ G2 then −
1. |V(G1)| = |V(G2)|
2. |E(G1)| = |E(G2)|
3. Degree sequences of G1 and G2 are the same.
4. If the vertices {V1, V2, ...Vk} form a cycle of length k in G1, then the vertices {f(V1),
f(V2),… f(Vk)} should form a cycle of length k in G2.
1. |V(G1)| = |V(G2)|=5
2. |E(G1)| = |E(G2)| = 5
3. Degree sequences of G1 and G2 are not same. The graph on the right contains a vertex of
degree 4, while the graph on the left does not.