Gate 2024 Da Sample Question Paper Final
Gate 2024 Da Sample Question Paper Final
(This subject-specific section will be preceded by General Aptitude section in GATE 2024).
Q.1 Let 𝑏 be the branching factor of a search tree. If the optimal goal is reached
after 𝑑 actions from the initial state, in the worst case, how many times will the
initial state be expanded for iterative deepening depth first search (IDDFS) and
iterative Deepening A* search (IDA*)?
Q.2 Given 3 literals 𝐴, 𝐵, and 𝐶, the number of models for the sentence 𝐴 ∨ ¬𝐵 ∨ 𝐶
is ________ .
DA
Page 1 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.3 Which one of the following first order logic sentences matches closest with the
sentence “All students are not equal”?
Q.4 The mean of the observations of the first 50 observations of a process is 12. If
the 51st observation is 18, then, the mean of the first 51 observations of the
process, rounded off to two decimal places is ______ .
(A) 12.01
(B) 12.12
(C) 12.36
(D) 18.18
DA
Page 2 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
(A) 0
(B)
√2
(C)
√
(D)
√
(A) i and ii
DA
Page 3 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.7 A fair coin is flipped twice, and it is given that at least one tail has been
observed. The probability of getting two tails is
(A)
(B)
(C)
(D)
Q.8 Given n particles and m (> n) boxes, we place each particle in one of the boxes
uniformly at random. What is the probability that no box receives more than
one particle?
(A) 𝑛!
(𝑚 − 𝑛)! 𝑚
(B) 𝑚!
(𝑚 − 𝑛)! 𝑚
(C) 1
𝑚
(D) (𝑚 − 𝑛)!
𝑚!
DA
Page 4 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.9 For two events 𝐴 and 𝐵, 𝐵 ⊂ 𝐴, which one of the following is correct?
(D) 𝑃(𝐴 | 𝐵) = 0
(B) fixed training and test sets, area under the ROC curve
DA
Page 5 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.12 Increasing the regularisation coefficient value in ridge regression will typically
DA
Page 6 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.13 A decision tree classifier learned from a fixed training set achieves 100%
accuracy on the test set. Which of the following algorithms trained using the
same training set is guaranteed to give a model with 100% accuracy?
i) Logistic regression.
ii) An SVM with a polynomial kernel.
iii) k-Nearest neighbours.
iv) Naïve Bayes classifier.
(A) i only
(D) iv only
DA
Page 7 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Consider two relations R(x, y) and S(x,z). Relation R has 100 records, and
Q.14 relation S has 200 records. What will be the number of attributes and records of
the following query?
Q.15 Consider two relations R(x, y) and S(y), and perform the following operation
DA
Page 8 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.16
Which of the following statements is/are TRUE?
9 −2
For matrix 𝐻 = , one of the eigenvalues is 5. The other eigenvalue is
Q.17 −2 6
(A) 12
(B) 10
(C) 8
(D) 6
DA
Page 9 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
(A) xT y = 0
(B) xT y > 0
(C) xT y < 0
(D) xT y ≠ 0
DA
Page 10 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
What is the Pearson’s correlation coefficient between x and y for the data in the
Q. 20 table below? (rounded off to the first decimal place)
x y
‒6 6.4
2 4.7
0.2 8
7 2
‒4 3.4
(A) ‒0.5
(B) 0.5
(C) 0.3
(D) ‒0.3
Q.21 The worst-case running times of Insertion sort, Merge sort and Quick sort
respectively are
DA
Page 11 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Consider the following program.
Q.22
def func(n):
if n <= 1:
return n
else:
return 3 * func(n - 3) - 3 * func(n - 2)
(A) O(n)
(B) O(𝑛 )
(D) O(2 )
Which one of the following equations correctly describes the recurrence relation
Q.23 for the standard binary search algorithm on a sorted array of n numbers where c
is a constant?
DA
Page 12 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Consider the following python program
Q.24
def func(A, n, m):
s = A[0]
for i in range(1, n-1):
m = m * s + A[i]
return m
Let Z be an array of 10 elements with Z[i] = 2 for all i such that 0<=i<=9.
The value returned by func(Z,10,2) is ________.
1 4 2
1 5 3
1 4 3
1 5 2
3 2 1
(A) XY → Z and Z → Y
(B) YZ → X and X → Y
(C) Y → X and X → Y
(D) XZ → Y and Y → X
DA
Page 13 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
S is the initial state. G1 and G2 are two states that satisfy the goal test. The cost
of traversing from one state to another is depicted by the numerical value close
to the edge connecting the two states. The estimated cost to the goal is reported
inside the states. Use alphabetical order of nodes to break ties. Which goal state
is reached if you perform A* (graph) search? What is the largest value that the
heuristic function can take for node A while still being admissible?
(A) G1 and 16
(B) G1 and 15
(C) G2 and 16
(D) G2 and 15
DA
Page 14 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.28 Given a 𝐾-class dataset containing 𝑁 points, where sample points are described
using 𝐷 discrete features with each feature capable of taking 𝑉 values, how
many parameters need to be estimated for Naïve Bayes Classifier?
(A) 𝑉 𝐾
(B) 𝐾
(C) 𝑉𝐷𝐾 + K
(D) 𝐾(𝑉 + 𝐷)
Q.29 A maximum margin linear SVM (SVM1) is learned for a binary classification
task. Another maximum margin linear SVM (SVM2) is trained for the same
task using the same training set but with one of the non-support vectors of
SVM1 removed. Which one of the following statements is TRUE?
(D) No conclusion can be drawn between the margins of SVM1 and SVM2
DA
Page 15 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.30 For perfectly spherical 2D data centered at the origin, which all of the following
pairs of vectors are possible pairs of principal components?
(A) i only
DA
Page 16 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
The value below each node is the output of the utility function. The subtrees
rooted at which of these nodes will be pruned because of alpha-beta pruning?
(A) m and j
(B) r and j
(C) h and p
DA
Page 17 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.32 Consider the Bayes Net containing four Boolean random variables (𝐴, 𝐵, 𝐶 , 𝐷),
with the following convention:
𝐴 = 𝑇𝑟𝑢𝑒 ⇒ 𝐴 = 𝑎, 𝑎𝑛𝑑 𝐴 = 𝐹𝑎𝑙𝑠𝑒 ⇒ 𝐴 = ¬𝑎
and similarly for the other variables. The conditional probability tables for the
nodes in the network are also indicated in the figure. The following samples
were generated through likelihood weighting:
𝑠 : (¬𝑎, ¬𝑏, ¬𝑐, ¬𝑑); 𝑠 : (¬𝑎, 𝑏, ¬𝑐, ¬𝑑); 𝑠 : (¬𝑎, ¬ 𝑏, ¬𝑐, 𝑑); 𝑠 : (¬𝑎, 𝑏, ¬𝑐, 𝑑)
Estimate the likelihood weight of each sample and thereby estimate
𝑃(𝑏|¬𝑎, ¬𝑐)
DA
Page 18 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
1, 0 ≤ 𝑥 ≤ 1
𝑓(𝑥) =
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
The variance of X is
(A)
(B)
(C)
(D)
DA
Page 19 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
(A)
(B)
(C)
(D)
DA
Page 20 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
(A) [1 − 1 ]
(B) [1 1 ]
(C) [1 0 ]
(D) [0 1 ]
DA
Page 21 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.39 0 1 0
Consider a matrix 𝑎 2 𝑑 . The matrix cannot have rank
𝑏 3 𝑐
(A) 0
(B) 1
(C) 2
(D) 3
Q.40 A file with 100,000 records is indexed with B+ tree. If the size of a memory
block is 2K bytes, the size of a key is 4 bytes, the size of a pointer is 4 bytes,
the minimum possible height of the B+ tree index is ______. Height is always
greater than or equal to 1.
Hints: No records are stored in the nodes, only keys are stored. The sizes of the
pointers are same, irrespective of whether they point to a node or a record.
DA
Page 22 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.42 Given the dataset: (1, 1), (3, 3), (4, 4), (5, 5), (6, 6), (9, 9), (0, 3), (3, 0) and
assuming the initial centroids for (𝐾 = 3 – means clustering) to be
𝐶 = (3, 3), 𝐶 = (5, 5) 𝑎𝑛𝑑 𝐶 = (6, 6). One iteration of the Expectation
Maximization Algorithm for 𝐾-means clustering, will update 𝐶 to (a, a). The
value of a is ____ .
Q.43 Consider a Multi-Layer Perceptron (MLP) model with one hidden layer and one
output layer. The hidden layer has 10 neurons, and the output layer has 3 neurons.
The input to the MLP is a 5-dimensional vector. Each neuron is connected to
every neuron in the previous layer, and a bias term is included for each neuron.
The activation function used is the sigmoid function. The total number of
trainable parameters in this MLP model is ______.
Q.44 A company is manufacturing a product at the rate of P units per day. The cost
per unit in Rs is 𝐶 = 230 + 0.1𝑃 + 9000/𝑃. The selling prices per unit is Rs.
300. The production level minimizing the cost per unit and the total profit per
day, respectively, are
DA
Page 23 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
A class contains 60% of students who are incapable of changing their opinions
Q.45 about anything, and 40% of students are changing their minds at random, with
probability 0.3, between subsequent votes on the same issue. Then, the
probability of a student randomly chosen voted twice in the same way is
_______.
− ℎ assumes the obstacles are the smallest circles circumscribing the triangles.
− ℎ assumes the obstacles are smallest rectangles circumscribing the triangles.
− ℎ ′ assumes the obstacles are largest circles inscribed in the triangles.
− ℎ ′ assumes the obstacles are largest rectangles inscribed the triangles.
DA
Page 24 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Let {O1, O2, O3, O4} represent the possible outcomes of a random experiment,
Q.47 with Pr({O1}) = Pr({O2}) = Pr({O3}) = Pr({O4}). Consider the following
events: P = {O1,O2}, Q = {O2,O3}, R = {O3,O4}, S = {O1,O2,O3}.
Then, which of the following statements are true?
(A) P and Q are independent
i=1
j=1
for i in range(1, 11):
if i % 3 != 0:
j += 2
continue
if j % 3 == 0:
break
print(i + j)
(A) 3
(B) 5
(C) 12
(D) 15
DA
Page 25 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Assume that S is a stack and Q1 and Q2 are two Queues which support the
Q.50 Enqueue and Dequeue operations. Consider the following pseudo code for
implementing the Pop and Push operation on S. [Note: Swap(x,y) exchanges
the two queues x and y.]
Push(S,x)
A(Q2,x)
while(Q1 not empty)
B(Q2, C(Q1));
Swap(Q1, Q2)
Pop(S)
return(D(Q1))
Which of the following options for the functions A, B, C, and D correspond to
correctly implementing the Push and Pop operations on the stack S?
DA
Page 26 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Consider the following python program.
Q.51 import math
def fun(a, b, d):
n1 = 0
n2 = 0
flag = 1
for i in range(d):
n1 = n1 + (a[i] * a[i])
n2 = n2 + (b[i] * b[i])
for i in range(d):
a[i] = a[i]/math.sqrt(n1)
b[i] = b[i]/math.sqrt(n2)
for i in range(d):
if a[i] != b[i]:
flag = 0
break
return flag
For which of the following inputs does the above algorithm produce 1 as an
output?
(P) a = [1,2,3,4]; b = [3,4,5,6], d = 4
(Q) a = [1,2,3,4]; b = [2,4,6,8], d = 4
(R) a = [1,2,3,4]; b = [10,20,30,40], d = 4
(S) a = [1,2,3,4]; b = [1.1,2.1,3.1,4.1], d = 4
(A) P, Q, R, S
(B) Q, R, S only
(C) Q, R only
(D) R, S only
DA
Page 27 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Consider the following undirected graph on 5 nodes
Q.52
Assume you are performing breadth first search on this graph using a queue
data structure. How many unique breadth first orderings are possible?
(A) 9
(B) 24
(C) 48
(D) 120
𝑛−1
(II) (n-1/n) S2 is a maximum likelihood estimator of 𝜎2, and 𝑛
𝑆 is a
DA
Page 28 of 29
GATE 2024 -- Data Science and Artificial Intelligence (DA) -- Sample Question Paper
Q.54 The value of the real variable x ≥ 0, which maximizes the function
𝑓(𝑥) = 𝑥 𝑒 is_____. (rounded off to two decimal places)
customer(custId,custName,salesRepId,rating)
SELECT empName
FROM employee E
FROM customer C
(A) Names of all the employees with at least one of their customers having a
‘GOOD’ rating.
(B) Names of all the employees with at most one of their customers having a
‘GOOD’ rating.
(C) Names of all the employees with none of their customers having a ‘GOOD’
rating.
(D) Names of all the employees with all their customers having a ‘GOOD’ rating.