Questions 51–60 of 65. Imported answers require independent review unless marked reviewed.

Topic practice 65 questionsPage 6 of 7

Question 41

Open question
CSMCQ2 marksNeeds review
Consider the relations r(A, B) and s(B, C), where s.B is a primary key and r.B is a foreign key referencing s.B. Consider the query

Let LOJ denote the natural left outer-join operation. Assume that r and s contain no null values.
Which one of the following queries is NOT equivalent to Q?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 42

Open question
CSMCQ2 marksNeeds review
Consider the following four relational schemas. For each schema, all non-trivial functional dependencies are listed. The underlined attributes are the respective primary keys.
Schema I: Registration (rollno, courses)  Field ‘courses’ is a set-valued attribute containing the set of courses a student has registered for.  Non-trivial functional dependency:  rollno → courses
Schema II: Registration (rollno, courseid, email)  Non-trivial functional dependencies:  rollno, courseid → email  email → rollno
Schema III: Registration (rollno, courseid, marks, grade)  Non-trivial functional dependencies:  rollno, courseid → marks, grade  marks → grade
Schema IV: Registration (rollno, courseid, credit)  Non-trivial functional dependencies:  rollno, courseid → credit  courseid → credit
Which one of the relational schemas above is in 3NF but not in BCNF?
Your answerChoose one option.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 43

Open question
CSNAT2 marksNeeds review
Let G be a graph with

vertices, with each vertex labelled by a distinct permutation of the numbers 1, 2, ..., 100. There is an edge between vertices

and

if and only if the label of

can be obtained by swapping two adjacent numbers in the label of

. Let y denote the degree of a vertex in G, and z denote the number of connected components in G. Then,

_____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 44

Open question
CSNAT2 marksNeeds review
Consider Guahati (G) and Delhi (D) whose temperatures can be classified as high (H), medium (M) and low (L). Let

denote the probability that Guahati has high temperature. Similarly,

and

denote the probability of Guahati having medium and low temperatures respectively. Similarly, we use

,

and

for Delhi.
The following table gives the conditional probabilities for Delhi’s temperature given Guwahati’s temperature.





0.40
0.48
0.12

0.10
0.65
0.25

0.01
0.50
0.49
Consider the first row in the table above. The first entry denotes that if Guwahati has high temperature (

) then the probability of Delhi also having a high temperature (

) is 0.40; i.e.,

. Similarly, the next two entries are

and

. Similarly for the other rows.
If it is known that

,

, and

, then the probability (correct to two decimal places) that Guwahati has high temperature given that Delhi has high temperature is _____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 45

Open question
CSNAT2 marksNeeds review
Consider the following program written in pseudo-code. Assume that x and y are integer.
Count(x, y) {
if (y != 1) {
if (x != 1) {
print("*");
Count(x/2, y);
}
else {
y = y-1;
Count(1024, y);
}
}
}
The number of times that the print statement is executed by the call Count(1024,1024) is _____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 46

Open question
CSNAT2 marksNeeds review
The number of possible min-heaps containing each value from exactly once is _____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 47

Open question
CSNAT2 marksNeeds review
Consider the following directed graph G:
Diagram for Computer Science and Information Technology question 47

Choose a value for x that will maximize the number of minimum weight spanning trees (MWSTs) of G. The number of MWSTs of G for this value of x is _____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 48

Open question
CSNAT2 marksNeeds review
Consider the weights and values of items listed below. Note that there is only one unit of each item.
Item number
Weight (in Kgs)
Value (in Rupees)
1
10
60
2
7
28
3
4
20
4
2
24
The task is to pick a subset of these items such that their total weight is no more than 11 Kgs and their total value is maximized. Moreover, no item may be split. The total value of items picked by an optimal algorithm is denoted by

. A greedy algorithm sorts the items by their value-to-weight ratios in descending order and packs them greedily, starting from the first item in the ordered list. The total value of items picked by the greedy algorithm is denoted by

.
The value of

is __________.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 49

Open question
CSNAT2 marksNeeds review
Consider the minterm list form of a Boolean function

given below.

Here,

denotes a minterm and

denotes a don't care term. The number of essential prime implicants of the function

is _____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer

Question 50

Open question
CSNAT2 marksNeeds review
The instruction pipeline of a RISC processor has the following stages: Instruction Fetch (IF), Instruction Decode (ID), Operand Fetch (OF), Perform Operation (PO) and Writeback (WB). The IF, ID, OF and WB stages take 1 clock cycle each for every instruction. Consider a sequence of 100 instructions. In the PO stage, 40 instructions take 3 clock cycles each, 35 instructions take 2 clock cycles each, and the remaining 25 instructions take 1 clock cycle each. Assume that there are no data hazards and no control hazards.
The number of clock cycles required for completion of execution of the sequence of instructions is _____.

Log in to check the answer

You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer