Questions 121–130 of 195. Imported answers require independent review unless marked reviewed.

Topic practice 195 questionsPage 13 of 20

Question 56

Open question
daMSQ2 marksNeeds review
Consider the following two relations, named Customer and Person, in a database:
Person ( aadhaar CHAR(12) PRIMARY KEY, name VARCHAR(32));
Customer ( name VARCHAR(32), email VARCHAR(32) PRIMARY KEY, phone CHAR(10), aadhaar CHAR(12), FOREIGN KEY (aadhaar) REFERENCES Person(aadhaar));
Which of the following statements is/are correct?
Your answerSelect all correct options. You can choose more than one.

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 57

Open question
daMSQ2 marksNeeds review
Consider a database relation R with attributes ABCDEFG, and having the following functional dependencies:
A → BCE  E → DG  BC → A
Which of the following statements is/are correct?
Your answerSelect all correct options. You can choose more than one.

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 58

Open question
daMSQ2 marksNeeds review
Let

be a simple, unweighted, and undirected graph. A subset of the vertices and edges of

are shown below.
Diagram for Data Science and Artificial Intelligence question 58

It is given that

is a shortest path between

and

;

is a shortest path between

and

;

is a shortest path between

and

. Which of the following is/are NOT the edges of

?
Your answerSelect all correct options. You can choose more than one.

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 59

Open question
daNAT2 marksNeeds review
Let

be such that

for all

. Then

______ (Answer in integer)

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 60

Open question
daNAT2 marksNeeds review
Let

be a dataset of

observations where each

. It is given that

. The covariance matrix computed from

has eigenvalues

,

. Let

be the direction of maximum variance with

.
The value of

(Answer in integer)

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 61

Open question
daNAT2 marksNeeds review
A bag contains 5 white balls and 10 black balls. In a random experiment,

balls are drawn from the bag one at a time with replacement. Let

denote the total number of black balls drawn in the experiment.
The expectation of

denoted by

______ (Round off to one decimal place)

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 62

Open question
daNAT2 marksNeeds review
Consider the following tables, Loan and Borrower, of a bank.
Loan:
loan_num
branch_name
amount
L11
Banjara Hills
9000
L14
Kondapur
5000
L15
SR Nagar
4000
L22
SR Nagar
2500
L23
Balanagar
8000
L25
Kondapur
7000
L19
SR Nagar
6500
Borrower:
customer_name
loan_num
And
L11
Karteek
L11
Karteek
L14
Ankita
L15
Gopal
L19
Karteek
L22
Karteek
L23
Sunil
L23
Sunil
L25
Query:

where

denotes natural join.
The number of tuples returned by the above relational algebra query is ______ (Answer in integer)

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 63

Open question
daNAT2 marksNeeds review
Consider the following Python code snippet.
def f(a,b):
if (a==0):
return b
if (a%2==1):
return 2*f((a-1)/2,b)
return b+f(a-1,b)

print(f(15,10))
The value printed by the code snippet is ______ (Answer in integer)

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 64

Open question
daNAT2 marksNeeds review
Consider the following pseudocode.
Create empty stack S
Set x=0, flag=0, sum=0
Push x onto S
while (S is not empty){
if (flag equals 0){
Set x = x+1
Push x onto S}
if (x equals 8):
Set flag=1
if (flag equals 1){
x = Pop(S)
if (x is odd):
Pop(S)
Set sum = sum + x}
}
Output sum
The value of sum output by a program executing the above pseudocode is ______ (Answer in integer)

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 65

Open question
daNAT2 marksNeeds review
Consider a directed graph

, where

and

. Suppose the adjacency list of each vertex is in decreasing order of vertex number, and depth-first search (DFS) is performed at vertex 0. The number of vertices that will be discovered after vertex 50 is ______ (Answer in integer)

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