June 21, 2024

Discrete Strut For Computer Science MCQ Question and Answer

Share :

Q.1. a). Consider the given Graphs G and H

ANSWER:-

 

Q.2.A.Solve the recurrence relation an = -3a(n-1) – 3a (n-2)-a(n-3) with a = 5,a1 = -9 and a2 = 15 and find the value of a3.
Answer :

B. To find ∑�=50100�2 using a recurrence relation

Q.3.

 

Q.4. a). Determine whether the following graph is bipartite or not.

ANSWER:- The graph is not bipartite. A bipartite graph is a graph whose vertices can be partitioned into two disjoint sets such that no two vertices in the same set are adjacent. In the graph you sent me, there is no way to partition the vertices into two disjoint sets such that no two vertices in the same set are adjacent. For example, if you put vertex a in one set and vertex b in the other set, then vertex f must be in the same set as vertex a, and vertex d must be in the same set as vertex b. This means that there is an edge between two vertices in the same set, which contradicts the definition of a bipartite graph.

b).

 

Q.5. A & B Answer in Below PDF.

Spanning tree

 


Q.6. This is a subjective question, hence you have to write your answer in the Text-Field given below.

a) In BITS, there are 40 distinct time periods available for scheduling classes. If there are 500 unique BITS classes, what is the minimum number of distinct rooms needed to accommodate all of these classes?

ANSWER:-

(b) Encrypt the message “EASY COME EASY GO” using the RSA system with n = 17 * 13 and e = 11 by translating each letter into integers

ANSWER:-

 

b) Construct a Huffman code for the following data: Character Frequency A 0.5 B 0.35 C 0.5 D 0.1 E 0.4 .

ANSWER:-

To construct a Huffman code, we start by building a Huffman tree based on the given frequencies. Then, we assign codes to each character based on the path taken to reach it in the tree, with ‘0’ for left and ‘1’ for right.

(4)
/\
0.2/     \0.8
/           \
(1)            0.6
/ \              / \
0.1/      \0.5   /     \0.4
/          \     /          \
(D)            (2)           (3)
/ \
0.35/      \0.5
/          \
(B)          (C)
|
0.5
/
(A)

 


Q.7.This is a subjective question, hence you have to write your answer in the Text-Field given below

a) Construct Binary search tree from the below values 7, 5, 1, 8, 3, 6, 0,9.4, 2

ANSWER1:-
Certainly! Here’s the binary search tree constructed from the given values: 7, 5, 1, 8, 3, 6, 0, 9, 4, 2.

7
/ \
5 8
/ \  \
1  6 9
/ \   /
0  3  4
/
2


b) For the given POSET R- {{2,3,6,12,24,36},/}

(i) Construct Hasse diagram

ANSWER:- {2,3,6,12,24,36}
/        |           \
{2,6,12,24} {3,12,36}
/          \             |       /
{2,12,24} {6,12,24} {3,12,36}
|               \           /
{2,24}       {12,24}
|                    |
{24}

(ii) Find all upper bounds of (2.3).

ANSWER:-

All upper bounds are sets that contain both 2 and 3. For example, {2, 3, 6, 12, 24, 36} is one such upper bound.

(iii) Find the least upper bound of (2,3), if it exists.

ANSWER:- The least upper bound (or the join) of {2, 3} is the smallest set that is an upper bound of both. In this case, it is {2, 3, 6, 12, 24, 36}.

(iv) Find all lower bounds of (24,36).

ANSWER:- All lower bounds are sets that are subsets of both 24 and 36. For example, {24} is a lower bound

(v) Find the greatest lower bound of (24,36) if it exists

ANSWER:- The greatest lower bound (or the meet) of {24, 36} is the largest set that is a lower bound of both. In this case, it is {24}.


For More Updates Join Our Channels :