GATE DA 2024

65 questions · Previous year paper

The GATE 2024 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 61

NAT · 2 marks

Let \(\boldsymbol{u} = \begin{bmatrix} 1 \\ 2 \\ 3 \\ 4 \\ 5 \end{bmatrix}\), and let \(\sigma_{1}, \sigma_{2}, \sigma_{3}, \sigma_{4}, \sigma_{5}\) be the singular values of the matrix \(\boldsymbol{M} = \boldsymbol{u}\boldsymbol{u}^{\boldsymbol{T}}\) (where \(\boldsymbol{u}^{\boldsymbol{T}}\) is the transpose of \(\boldsymbol{u}\)). The value of \(\sum_{i=1}^{5} \sigma_{i}\) is ______.

Explanation

Answer: 55

\(\boldsymbol{M} = \boldsymbol{u}\boldsymbol{u}^{T}\) is a symmetric \(5 \times 5\) matrix of rank 1, since every column is a multiple of \(\boldsymbol{u}\). Moreover

\[ \boldsymbol{M}\boldsymbol{u} = \boldsymbol{u}(\boldsymbol{u}^{T}\boldsymbol{u}) = \|\boldsymbol{u}\|^{2}\,\boldsymbol{u}, \qquad \|\boldsymbol{u}\|^{2} = 1 + 4 + 9 + 16 + 25 = 55 \]

while every vector orthogonal to \(\boldsymbol{u}\) is sent to \(\boldsymbol{0}\). So the eigenvalues are 55 and 0 (four times). For a symmetric matrix the singular values are the absolute values of the eigenvalues, here 55, 0, 0, 0, 0.

Hence \(\sum_{i=1}^{5} \sigma_{i} = 55\), which is also the trace of \(\boldsymbol{M}\).

Answer: 55

Question 62

NAT · 2 marks

Details of ten international cricket games between two teams “Green” and “Blue” are given in Table C. This table consists of matches played on different pitches, across formats along with their winners. The attribute Pitch can take one of two values: spin-friendly (represented as \(S\)) or pace-friendly (represented as \(F\)). The attribute Format can take one of two values: one-day match (represented as \(O\)) or test match (represented as \(T\)).

A cricket organization would like to use the information given in Table C to develop a decision-tree model to predict outcomes of future games between these two teams.

To develop such a model, the computed InformationGain(C, Pitch) with respect to the Target is ______ (rounded off to two decimal places).

Table C
Match NumberPitchFormatWinner (Target)
1\(S\)\(T\)Green
2\(S\)\(T\)Blue
3\(F\)\(O\)Blue
4\(S\)\(O\)Blue
5\(F\)\(T\)Green
6\(F\)\(O\)Blue
7\(S\)\(O\)Green
8\(F\)\(T\)Blue
9\(F\)\(O\)Blue
10\(S\)\(O\)Green

Explanation

Answer: 0.12 to 0.13

Information gain is the entropy of the Target minus the weighted entropy left after splitting on Pitch (logarithms to base 2).

  • All 10 games: 4 Green and 6 Blue, so \(H(C) = -0.4\log_{2}0.4 - 0.6\log_{2}0.6 \approx 0.971\).
  • \(S\) pitches (games 1, 2, 4, 7, 10): 3 Green and 2 Blue, the same 0.6 / 0.4 split with the colours swapped, so the entropy is again \(\approx 0.971\).
  • \(F\) pitches (games 3, 5, 6, 8, 9): 1 Green and 4 Blue, so the entropy is \(-0.2\log_{2}0.2 - 0.8\log_{2}0.8 \approx 0.722\).

Each branch holds half of the games, so

\[ \text{Gain} = 0.971 - \left(\tfrac{1}{2} \times 0.971 + \tfrac{1}{2} \times 0.722\right) = \tfrac{1}{2}(0.971 - 0.722) \approx 0.1245 \]

which is 0.12 to two decimal places (the key accepts 0.12 to 0.13).

Answer: 0.12

Question 63

NAT · 2 marks

Given the two-dimensional dataset consisting of 5 data points from two classes (circles and squares) and assume that the Euclidean distance is used to measure the distance between two points. The minimum odd value of \(k\) in \(k\)-nearest neighbor algorithm for which the diamond (\(\diamond\)) shaped data point is assigned the label square is ______.

Grid with both axes marked 1 to 3: filled circles at (1, 1) and (1, 2), filled squares at (2, 3), (3, 3) and (3, 2), and a hollow diamond at (2, 1), each point labelled with its coordinates.

Explanation

Answer: 5

Distances from the diamond at (2, 1):

  • circle (1, 1): 1
  • circle (1, 2) and square (3, 2): \(\sqrt{2} \approx 1.41\) each
  • square (2, 3): 2
  • square (3, 3): \(\sqrt{5} \approx 2.24\)

Now try the odd values of \(k\) in turn:

  • \(k = 1\): the nearest point is a circle, so the label is circle.
  • \(k = 3\): two circles and one square; the tie at \(\sqrt{2}\) does not matter because both tied points are among the three. The label is circle.
  • \(k = 5\): all five points vote, 3 squares to 2 circles, so the label is square.

Answer: 5

Question 64

NAT · 2 marks

Given the following Bayesian Network consisting of four Bernoulli random variables and the associated conditional probability tables:

Bayesian network with four nodes: U has arrows to V and to W, and V and W each have an arrow to Z.
\(P(\cdot)\)
\(U = 0\)0.5
\(U = 1\)0.5
\(P(V = 0 | \cdot)\)\(P(V = 1 | \cdot)\)
\(U = 0\)0.50.5
\(U = 1\)0.50.5
\(P(W = 0 | \cdot)\)\(P(W = 1 | \cdot)\)
\(U = 0\)10
\(U = 1\)01
\(P(Z = 0 | \cdot)\)\(P(Z = 1 | \cdot)\)
\(V = 0\)\(W = 0\)0.50.5
\(V = 0\)\(W = 1\)10
\(V = 1\)\(W = 0\)10
\(V = 1\)\(W = 1\)0.50.5

The value of \(P(U = 1, V = 1, W = 1, Z = 1) =\) ______ (rounded off to three decimal places).

Explanation

Answer: 0.13

A Bayesian network factorises the joint probability into one factor per node, each conditioned on that node's parents. Here U has no parents, V and W each have parent U, and Z has parents V and W:

\[ P(U, V, W, Z) = P(U)\,P(V|U)\,P(W|U)\,P(Z|V, W) \]

Reading the tables for \(U = 1, V = 1, W = 1, Z = 1\):

  • \(P(U = 1) = 0.5\)
  • \(P(V = 1|U = 1) = 0.5\)
  • \(P(W = 1|U = 1) = 1\)
  • \(P(Z = 1|V = 1, W = 1) = 0.5\)

So the joint probability is \(0.5 \times 0.5 \times 1 \times 0.5 = 0.125\).

Answer: 0.125

Question 65

NAT · 2 marks

Two fair coins are tossed independently. \(X\) is a random variable that takes a value of 1 if both tosses are heads and 0 otherwise. \(Y\) is a random variable that takes a value of 1 if at least one of the tosses is heads and 0 otherwise.

The value of the covariance of \(X\) and \(Y\) is ______ (rounded off to three decimal places).

Explanation

Answer: 0.06

Use \(\operatorname{Cov}(X, Y) = E[XY] - E[X]\,E[Y]\). The four outcomes HH, HT, TH, TT are equally likely.

  • \(X = 1\) only for HH, so \(E[X] = \frac{1}{4}\).
  • \(Y = 1\) for every outcome except TT, so \(E[Y] = \frac{3}{4}\).
  • Whenever \(X = 1\), also \(Y = 1\), so \(XY = X\) and \(E[XY] = \frac{1}{4}\).

\[ \operatorname{Cov}(X, Y) = \frac{1}{4} - \frac{1}{4} \cdot \frac{3}{4} = \frac{1}{16} = 0.0625 \]

The covariance is positive because two heads guarantee at least one head. As 0.0625 lies exactly halfway, the key accepts both 0.062 and 0.063.

Answer: 0.063

Questions 61 to 65 of 65