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 41

MCQ · 2 marks · −0.66

For \(x \in \mathbb{R}\), the floor function is denoted by \(f(x) = \lfloor x \rfloor\) and defined as follows

\[\lfloor x \rfloor = k, \;\; k \le x \lt k + 1,\]

where \(k\) is an integer. Let \(Y = \lfloor X \rfloor\), where \(X\) is an exponentially distributed random variable with mean \(\frac{1}{\ln 10}\), where \(\ln\) denotes natural logarithm. For any positive integer \(\ell\), one can write the probability of the event \(Y = \ell\) as follows

\[P(Y = \ell) = q^{\ell}(1 - q)\]

The value of \(q\) is

Options for Question 41

Explanation

Answer: (A)

A mean of \(\frac{1}{\ln 10}\) means the rate is \(\lambda = \ln 10\), so \(P(X \ge t) = e^{-t \ln 10} = 10^{-t}\) for \(t \ge 0\).

\(Y = \ell\) happens exactly when \(\ell \le X \lt \ell + 1\), so

\[P(Y = \ell) = 10^{-\ell} - 10^{-(\ell + 1)} = (0.1)^{\ell}\,(1 - 0.1).\]

This has the form \(q^{\ell}(1 - q)\) with \(q = 0.1\), so the floor of an exponential variable is geometric. Option D, \(0.434 \approx \frac{1}{\ln 10}\), is the mean of \(X\), not \(q\).

Answer: A

Question 42

MCQ · 2 marks · −0.66

Consider the neural network shown in the figure with
inputs: \(u, v\)
weights: \(a, b, c, d, e, f\)
output: \(y\)
\(R\) denotes the ReLU function, \(R(x) = \max(0, x)\).

Network diagram: input u connects to the upper ReLU node R with weight a and to the lower ReLU node R with weight c, and input v connects to the upper node with weight b and to the lower node with weight d. The upper and lower nodes feed an output ReLU node R with weights e and f, and that node outputs y.

Given \(u = 2, v = 3\),
\(a = 1, b = 1, c = 1, d = -1, e = 4, f = -1\),
which one of the following is correct?

Options for Question 42

Explanation

Answer: (A)

Forward pass, with \(h_1\) and \(h_2\) the outputs of the upper and lower hidden nodes:

  • \(h_1 = R(au + bv) = R(2 + 3) = 5\)
  • \(h_2 = R(cu + dv) = R(2 - 3) = R(-1) = 0\)
  • \(y = R(eh_1 + fh_2) = R(20 + 0) = 20\)

The output node and the upper node have positive inputs, so their ReLU slopes are 1. By the chain rule,

\[\frac{\partial y}{\partial a} = 1 \cdot e \cdot 1 \cdot u = 4 \times 2 = 8, \qquad \frac{\partial y}{\partial f} = 1 \cdot h_2 = 0.\]

The gradient for \(f\) is 0 because \(f\) only multiplies \(h_2\), and the lower ReLU outputs 0 here.

Answer: A

Question 43

MCQ · 2 marks · −0.66

Consider game trees Tree-1 and Tree-2 as shown. The first level is a MAX agent and the second level is a MIN agent. The value in the square node is the output of the utility function.

Tree-1 (left): MAX root A has a square leaf 2 and a MIN child B, whose square leaves are x and 1, with the edge from B to 1 drawn dotted. Tree-2 (right): MAX root C has MIN children D (square leaves 5 and y) and E (a square leaf 2 and, by a dotted edge, a subtree drawn as a triangle).

For what ranges of \(x\) and \(y\), the right child of node \(B\) and the right child of node \(E\) will be pruned by alpha-beta pruning algorithm?

Options for Question 43

Explanation

Answer: (C)

Alpha-beta pruning skips the remaining children of a MIN node once its value \(\beta\) can no longer beat the value \(\alpha\) that MAX is already sure of, that is, once \(\beta \le \alpha\).

  • Tree-1: after the leaf 2, MAX at A has \(\alpha = 2\). At B, the leaf \(x\) gives \(\beta = x\). The leaf 1 is pruned when \(x \le 2\), because B is then worth at most 2 and cannot raise A above 2. So \(x \in (-\infty, 2]\).
  • Tree-2: D is searched fully, so \(\alpha = \min(5, y)\) at C. At E, the leaf 2 gives \(\beta = 2\), and the triangle is pruned when \(2 \le \min(5, y)\), i.e. \(y \ge 2\). So \(y \in [2, \infty)\).

Only option C has both ranges.

Answer: C

Question 44

MCQ · 2 marks · −0.66

The state graph shows the action cost along the edges and the heuristic function h associated with each state.

Directed state graph with edges S to A (cost 4), S to E (cost 1), A to B (cost 2), B to C (cost 2), E to C (cost 2), C to D (cost 3) and D to G (cost 3). The heuristic values are h=2 for A, h=2 for B, h=6 for C, h=2 for D, h=6 for E and h=0 for G, and no value is shown for S.

Suppose \(A^{*}\) algorithm is applied on this state graph using priority queue to store the frontier. In what sequence are the nodes expanded?

Options for Question 44

Explanation

Answer: (C)

A* always expands the frontier node with the smallest \(f = g + h\), where \(g\) is the path cost from S.

  • Expand S: frontier A (\(4 + 2 = 6\)) and E (\(1 + 6 = 7\)).
  • Expand A (6): add B (\(6 + 2 = 8\)).
  • Expand E (7): add C (\(3 + 6 = 9\)).
  • Expand B (8): reaching C through B costs 8, worse than 3, so C keeps \(f = 9\).
  • Expand C (9): add D (\(6 + 2 = 8\)).
  • Expand D (8): add G (\(9 + 0 = 9\)), and finally expand G.

The order is S, A, E, B, C, D, G. Option A expands C (9) before B (8), and ordering by \(h\) alone would put B before E, as in option D.

Answer: C

Question 45

MCQ · 2 marks · −0.66

A random experiment consists of throwing 100 fair dice, each die having six faces numbered 1 to 6. An event \(A\) represents the set of all outcomes where at least one of the dice shows a 1. Then, \(P(A) =\)

Options for Question 45

Explanation

Answer: (C)

Use the complement: the event fails only when no die shows a 1.

Each die avoids 1 with probability \(\frac{5}{6}\), and the 100 throws are independent, so \(P(\text{no 1 at all}) = \left(\frac{5}{6}\right)^{100}\). Therefore

\[P(A) = 1 - \left(\frac{5}{6}\right)^{100}.\]

Option D is the probability of the complement. Options A and B fail because both \(A\) and its complement can happen, so \(P(A)\) lies strictly between 0 and 1, though very close to 1.

Answer: C

Question 46

MCQ · 2 marks · −0.66

Consider a fact table in an OLAP application: Facts(D1, D2, val), where D1 and D2 are its dimension attributes and val is a dependent attribute. Suppose attribute D1 takes 3 values and D2 takes 2 values, and all combinations of these values are present in the table Facts. How many tuples are there in the result of the following query?

SELECT D1, D2, sum(val)
FROM Facts
GROUP BY CUBE (D1, D2);
Options for Question 46

Explanation

Answer: (D)

GROUP BY CUBE (D1, D2) produces one group of rows for every subset of the grouping attributes:

  • (D1, D2): one row per combination, \(3 \times 2 = 6\);
  • (D1): one subtotal per value of D1, 3 rows;
  • (D2): one subtotal per value of D2, 2 rows;
  • (): the grand total, 1 row.

That gives \(6 + 3 + 2 + 1 = 12\) tuples. Equivalently, each dimension is either one of its values or ALL, so \((3 + 1)(2 + 1) = 12\). The value 6 is a plain GROUP BY D1, D2, which leaves out the subtotal and total rows.

Answer: D

Question 47

MCQ · 2 marks · −0.66

Consider the following Python code snippet.

A={"this","that"}
B={"that","other"}
C={"other","this"}
while "other" in C:
    if "this" in A:
        A,B,C=A-B,B-C,C-A
    if "that" in B:
        A,B,C=C|A,A|B,B|C

When the above program is executed, at the end, which of the following sets contains "this"?

Options for Question 47

Explanation

Answer: (B)

Each tuple assignment evaluates its whole right-hand side with the old sets before assigning anything.

  • Pass 1, first if: A={"this"}, B={"that"}, C={"other"}.
  • Pass 1, second if ("that" is in B): A={"other","this"}, B={"this","that"}, C={"that","other"}.
  • Pass 2: "other" is still in C and "this" is in A, so A={"other"}, B={"this"}, C={"that"}. Now "that" is not in B, so the second if is skipped.

"other" is no longer in C, so the loop stops. Only B contains "this".

Answer: B

Question 48

MSQ · 2 marks

Which of the following statements is/are correct about the rectified linear unit (ReLU) activation function defined as \(\mathrm{ReLU}(x) = \max(x, 0)\), where \(x \in \mathbb{R}\)?

Options for Question 48

Explanation

Answer: (A), (C)

ReLU is 0 for \(x \lt 0\) and equals \(x\) for \(x \ge 0\).

  • A (correct): both pieces are continuous and meet at the value 0 when \(x = 0\), so there is no jump.
  • B (wrong), C (correct): at \(x = 0\) the left derivative is 0 and the right derivative is 1. They differ, so the graph has a corner there and ReLU is not differentiable at 0. (Training code simply uses 0 or 1 as the gradient at that point.)
  • D (wrong): with \(x = 1\) and \(a = 2\), \(\mathrm{ReLU}(1) = 1\) but \(\mathrm{ReLU}(2) = 2\). What does hold is \(\mathrm{ReLU}(ax) = a\,\mathrm{ReLU}(x)\) for \(a \ge 0\).

Answer: A, C

Question 49

MSQ · 2 marks

Consider the function \(f(x) = \frac{x^{3}}{3} + \frac{7}{2}x^{2} + 10x + \frac{133}{2}\), \(x \in [-8, 0]\). Which of the following statements is/are correct?

Options for Question 49

Explanation

Answer: (C), (D)

On a closed interval the extreme values occur at critical points or at the endpoints, so compare all of them.

\(f'(x) = x^{2} + 7x + 10 = (x + 2)(x + 5)\), so there is a local maximum at \(x = -5\) and a local minimum at \(x = -2\). The values are \(f(-8) = \frac{239}{6} \approx 39.83\), \(f(-5) = \frac{187}{3} \approx 62.33\), \(f(-2) = \frac{347}{6} \approx 57.83\) and \(f(0) = \frac{133}{2} = 66.5\).

  • The maximum is \(\frac{133}{2}\) at the endpoint \(x = 0\), not at \(x = -5\): C holds and A fails.
  • The minimum is at the endpoint \(x = -8\), not at \(x = -2\): B fails.
  • \(f'(x) = x^{2} + 7x + 10\) is an upward parabola with its vertex at \(x = -\frac{7}{2}\), which lies inside \([-8, 0]\): D holds.

Answer: C, D

Question 50

MSQ · 2 marks

Let \(x_{1}, x_{2}, x_{3}, x_{4}, x_{5}\) be a system of orthonormal vectors in \(\mathbb{R}^{10}\). Consider the matrix \(A = x_{1}x_{1}^{\top} + \ldots + x_{5}x_{5}^{\top}\). Which of the following statements is/are correct?

Options for Question 50

Explanation

Answer: (A), (B)

Because the \(x_{i}\) are orthonormal, \(Ax_{j} = \sum_{i} x_{i}(x_{i}^{\top}x_{j}) = x_{j}\) for \(j = 1, \ldots, 5\), while \(Av = 0\) for every \(v\) orthogonal to all five. So \(A\) is the orthogonal projection onto their 5-dimensional span: it is symmetric, \(A^{2} = A\), and its eigenvalues are 1 (five times) and 0 (five times).

  • A holds: the singular values of a symmetric matrix are the absolute values of its eigenvalues, and here the eigenvalues 0 and 1 are already non-negative.
  • B holds: so the singular values are 0 or 1.
  • C and D fail: 0 is an eigenvalue, so \(\det A = 0\) and \(A\) is not invertible.

Answer: A, B

Questions 41 to 50 of 65