GATE DA 2025

65 questions · Previous year paper

The GATE 2025 Data Science and Artificial Intelligence paper: 65 questions for 100 marks in 180 minutes, with General Aptitude (15 marks) and the technical section (85 marks). Answers follow the official final answer key; every question has a short explanation.

Take it as a timed test: ₹49

Data Science and Artificial Intelligence

Question 21

MCQ · 1 mark · −0.33

It is given that \(P(X \geq 2) = 0.25\) for an exponentially distributed random variable \(X\) with \(E[X] = \frac{1}{\lambda}\), where \(E[X]\) denotes the expectation of \(X\). What is the value of \(\lambda\)?
(\(\ln\) denotes natural logarithm)

Options for Question 21

Explanation

Answer: (A)

An exponential random variable with mean \(\frac{1}{\lambda}\) has rate \(\lambda\) and tail probability \(P(X \geq x) = e^{-\lambda x}\) for \(x \geq 0\). So

\[e^{-2\lambda} = 0.25 = \frac{1}{4} \;\Rightarrow\; 2\lambda = \ln 4 = 2\ln 2 \;\Rightarrow\; \lambda = \ln 2.\]

Check: \(e^{-2\ln 2} = 2^{-2} = 0.25\). Option B is the value of \(2\lambda\), not \(\lambda\), and option D is negative (\(\ln 0.25 = -\ln 4\)), which is impossible for a rate.

Answer: A

Question 22

MCQ · 1 mark · −0.33

Consider designing a linear classifier

\[y = \operatorname{sign}(f(x; w, b)), \quad f(x; w, b) = w^{\top}x + b\]

on a dataset \(D = \{(x_{1}, y_{1}), (x_{2}, y_{2}), \ldots, (x_{N}, y_{N})\}\), \(x_{i} \in \mathbb{R}^{d}, y_{i} \in \{+1, -1\}, i = 1, 2, \ldots, N\). Recall that the sign function outputs +1 if the argument is positive, and \(-1\) if the argument is non-positive. The parameters \(w\) and \(b\) are updated as per the following training algorithm:

\[w_{new} = w_{old} + y_{n}x_{n}, \quad b_{new} = b_{old} + y_{n}\]

whenever \(\operatorname{sign}(f(x_{n}; w_{old}, b_{old})) \neq y_{n}\). In other words, whenever the classifier wrongly predicts a sample \((x_{n}, y_{n})\) from the dataset, \(w_{old}\) gets updated to \(w_{new}\), and likewise \(b_{old}\) gets updated to \(b_{new}\). Consider the case \((x_{n}, +1)\), \(f(x_{n}; w_{old}, b_{old}) < 0\). Then

Options for Question 22

Explanation

Answer: (A)

Here \(y_{n} = +1\), so the update adds the sample: \(w_{new} = w_{old} + x_{n}\) and \(b_{new} = b_{old} + 1\). Evaluate the new score on the same point:

\[f(x_{n}; w_{new}, b_{new}) = (w_{old} + x_{n})^{\top}x_{n} + b_{old} + 1 = f(x_{n}; w_{old}, b_{old}) + \lVert x_{n} \rVert^{2} + 1.\]

Since \(\lVert x_{n} \rVert^{2} + 1 \geq 1\), the score strictly increases, moving towards the correct positive side, so B and C are false. Option D fails because \(y_{n}f(x_{n}; w_{old}, b_{old}) = f(x_{n}; w_{old}, b_{old}) < 0\).

Answer: A

Question 23

MCQ · 1 mark · −0.33

Consider the following Python declarations of two lists.

A=[1,2,3]
B=[4,5,6]

Which one of the following statements results in A= \([1, 2, 3, 4, 5, 6]\)?

Options for Question 23

Explanation

Answer: (A)

A.extend(B) adds each element of B to the end of A in place, so A becomes [1, 2, 3, 4, 5, 6].

  • A.append(B) adds the whole list as a single element, giving [1, 2, 3, [4, 5, 6]].
  • Lists have no update method (dictionaries and sets do), so option C raises AttributeError.
  • insert needs two arguments, an index and a value, so A.insert(B) raises TypeError.

Answer: A

Question 24

MSQ · 1 mark

Consider two functions \(f : \mathbb{R} \to \mathbb{R}\) and \(g : \mathbb{R} \to (1, \infty)\). Both functions are differentiable at a point \(c\). Which of the following functions is/are ALWAYS differentiable at \(c\)? The symbol \(\cdot\) denotes product and the symbol \(\circ\) denotes composition of functions.

Options for Question 24

Explanation

Answer: (A), (B), (C)

Options A, B and C use only the values and derivatives of \(f\) and \(g\) at \(c\):

  • sums, differences and products of functions differentiable at \(c\) are differentiable at \(c\);
  • the quotient rule for \(\frac{f}{g}\) also needs \(g(c) \neq 0\), which holds because \(g\) takes values in \((1, \infty)\).

Option D is different: \(f \circ g\) needs \(f\) to be differentiable at \(g(c)\), and \(g \circ f\) needs \(g\) to be differentiable at \(f(c)\). Neither is given. For example, take \(c = 0\), \(f(x) = |x - 2|\) and \(g(x) = 1 + e^{x}\) (both differentiable at 0, and \(g > 1\)). Then \(f(g(x)) = |e^{x} - 1|\) has a corner at 0 while \(g(f(x))\) is smooth there, so the sum is not differentiable at 0.

Answer: A, B, C

Question 25

MSQ · 1 mark

Which of the following statements is/are correct?

Options for Question 25

Explanation

Answer: (B), (D)

  • A and B: orthonormal bases are not unique. Rotating the standard basis gives another one; in \(\mathbb{R}^{2}\), \(\frac{1}{\sqrt{2}}(1, 1)\) and \(\frac{1}{\sqrt{2}}(1, -1)\) also form an orthonormal basis. Even changing the sign of one vector gives a new basis. So A is false and B is true.
  • C is false: \((1, 0)\) and \((1, 1)\) are linearly independent, but they are not orthogonal and \((1, 1)\) is not a unit vector.
  • D is true: if \(\sum_{i} c_{i}v_{i} = 0\) for orthonormal \(v_{i}\), taking the dot product with \(v_{j}\) leaves \(c_{j} = 0\), so every coefficient is zero.

Answer: B, D

Question 26

MSQ · 1 mark

Which of the following statements is/are correct in a Bayesian network?

Options for Question 26

Explanation

Answer: (C), (D)

  • Variable elimination is an exact method. It multiplies the relevant conditional probability tables and sums out the hidden variables one at a time, so A is false.
  • What it returns is a conditional probability such as \(P(Q \mid e)\) for a query \(Q\) given evidence \(e\), so C is true.
  • Gibbs sampling and rejection sampling both estimate probabilities from random samples. Their answers are approximate and improve as more samples are drawn, so B is false and D is true.

Answer: C, D

Question 27

MSQ · 1 mark

For which of the following inputs does binary search take time \(O(\log n)\) in the worst case?

Options for Question 27

Explanation

Answer: (C)

Binary search compares the target with the middle element and discards half of the remaining range. It needs two things to be correct and \(O(\log n)\):

  • Sorted data. Discarding a half is justified only when the elements are in order. On unsorted input the search can throw away the half that holds the target, so binary search does not work for A or B.
  • Constant-time access to the middle. A linked list must be walked node by node to reach its middle, costing \(\frac{n}{2} + \frac{n}{4} + \cdots = O(n)\) in total, so D is not \(O(\log n)\) even though the list is sorted.

Only the sorted array (C) meets both conditions.

Answer: C

Question 28

MSQ · 1 mark

Let \(A = I_{n} + xx^{\top}\), where \(I_{n}\) is the \(n \times n\) identity matrix and \(x \in \mathbb{R}^{n}\), \(x^{\top}x = 1\). Which of the following options is/are correct?

Options for Question 28

Explanation

Answer: (A), (B)

Find the eigenvalues of \(A\) using \(x^{\top}x = 1\):

  • \(Ax = x + x(x^{\top}x) = 2x\), so 2 is an eigenvalue.
  • Any \(v\) orthogonal to \(x\) has \(x^{\top}v = 0\), so \(Av = v\). These vectors fill an \((n - 1)\)-dimensional subspace, so 1 is an eigenvalue of multiplicity \(n - 1\).

No eigenvalue is 0, so \(A\) is invertible with rank \(n\): A and B are true and C is false. The eigenvalues of \(A^{-1}\) are the reciprocals \(\frac{1}{2}\) and 1, all positive, so D is false.

Answer: A, B

Question 29

MSQ · 1 mark

Suppose that insertion sort is applied to the array \([1, 3, 5, 7, 9, 11, x, 15, 13]\) and it takes exactly two swaps to sort the array. Select all possible values of \(x\).

Options for Question 29

Explanation

Answer: (A), (C)

Each swap in insertion sort exchanges two adjacent elements that are out of order, removing exactly one inversion. So the number of swaps equals the number of inversions.

Without \(x\), the only inversion is the pair (15, 13), so \(x\) must add exactly one more:

  • \(x = 10\): only 11, placed before it, is larger. Total 2.
  • \(x = 12\): no element is out of order with it. Total 1.
  • \(x = 14\): only 13, placed after it, is smaller. Total 2.
  • \(x = 16\): both 15 and 13, placed after it, are smaller. Total 3.

Answer: A, C

Question 30

MSQ · 1 mark

Let \(C_{1}\) and \(C_{2}\) be two sets of objects. Let \(D(x, y)\) be a measure of dissimilarity between two objects \(x\) and \(y\). Consider the following definitions of dissimilarity between \(C_{1}\) and \(C_{2}\).

\[\begin{aligned} \textbf{DIS-1}(C_{1}, C_{2}) &= \max_{x \in C_{1},\, y \in C_{2}} D(x, y) \\ \textbf{DIS-2}(C_{1}, C_{2}) &= \min_{x \in C_{1},\, y \in C_{2}} D(x, y) \end{aligned}\]

Which of the following statements is/are correct?

Options for Question 30

Explanation

Answer: (B), (D)

In hierarchical clustering, the linkage rule sets the distance between two clusters from the distances between their members.

  • Single linkage uses the closest pair, one object from each cluster. That is the minimum of \(D(x, y)\), which is DIS-2.
  • Complete linkage uses the farthest pair. That is the maximum of \(D(x, y)\), which is DIS-1.

Options A and C swap the two rules.

Answer: B, D

Questions 21 to 30 of 65