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 21

MCQ · 1 mark · −0.33

Consider performing uniform hashing on an open address hash table with load factor \(\alpha = \frac{n}{m} < 1\), where \(n\) elements are stored in the table with \(m\) slots. The expected number of probes in an unsuccessful search is at most \(\frac{1}{1-\alpha}\).

Inserting an element in this hash table requires at most ______ probes, on average.

Options for Question 21

Explanation

Answer: (B)

To insert a key with open addressing, we follow the key's probe sequence until we reach an empty slot and store the key there. An unsuccessful search for the same key follows the same sequence and also stops at the first empty slot, so an insertion makes exactly the probes of an unsuccessful search. Its average cost therefore has the same bound, at most \(\frac{1}{1-\alpha}\) probes.

Options A and C are smaller than this bound for every \(0 < \alpha < 1\), so they understate the cost; they resemble formulas for successful searches. Option D is even below 1, although every insertion probes at least one slot.

Answer: B

Question 22

MCQ · 1 mark · −0.33

For any binary classification dataset, let \(S_{B} \in \mathbb{R}^{d \times d}\) and \(S_{W} \in \mathbb{R}^{d \times d}\) be the between-class and within-class scatter (covariance) matrices, respectively. The Fisher linear discriminant is defined by \(u^{*} \in \mathbb{R}^{d}\), that maximizes

\[J(u) = \frac{u^{T} S_{B} u}{u^{T} S_{W} u}\]

If \(\lambda = J(u^{*})\), \(S_{W}\) is non-singular and \(S_{B} \neq 0\), then \((u^{*}, \lambda)\) must satisfy which ONE of the following equations?

Note: \(\mathbb{R}\) denotes the set of real numbers.

Options for Question 22

Explanation

Answer: (A)

At the maximum the gradient of \(J\) is zero. Both matrices are symmetric, so by the quotient rule

\[\nabla J(u) = \frac{2 S_{B} u \,(u^{T} S_{W} u) - 2 S_{W} u \,(u^{T} S_{B} u)}{(u^{T} S_{W} u)^{2}} = 0 \;\Rightarrow\; S_{B} u^{*} = J(u^{*})\, S_{W} u^{*} = \lambda S_{W} u^{*}.\]

Since \(S_{W}\) is non-singular, multiplying by \(S_{W}^{-1}\) gives \(S_{W}^{-1} S_{B} u^{*} = \lambda u^{*}\): \(u^{*}\) is an eigenvector of \(S_{W}^{-1} S_{B}\) for its largest eigenvalue \(\lambda\).

Option B has \(\lambda\) on the wrong side (it would hold with \(1/\lambda\)), C multiplies by \(S_{W}\) instead of its inverse, and D fails because \(J\) does not depend on the length of \(u\), so \(u^{*}\) can be rescaled freely.

Answer: A

Question 23

MCQ · 1 mark · −0.33

Let \(h_{1}\) and \(h_{2}\) be two admissible heuristics used in \(A^{*}\) search.

Which ONE of the following expressions is always an admissible heuristic?

Options for Question 23

Explanation

Answer: (D)

A heuristic is admissible when \(0 \leq h(n) \leq h^{*}(n)\) for every node \(n\), where \(h^{*}(n)\) is the true cost of reaching the goal. Because both values are non-negative,

\[|h_{1}(n) - h_{2}(n)| \leq \max(h_{1}(n), h_{2}(n)) \leq h^{*}(n),\]

so option D never overestimates.

The other expressions can overestimate. With \(h^{*}(n) = 5\) and \(h_{1}(n) = h_{2}(n) = 5\), both admissible, the sum is 10 and the product is 25. With \(h_{1}(n) = 5\) and \(h_{2}(n) = 0.1\), the ratio is 50.

Answer: D

Question 24

MCQ · 1 mark · −0.33

Consider five random variables \(U, V, W, X\), and \(Y\) whose joint distribution satisfies:

\[P(U, V, W, X, Y) = P(U)P(V)P(W \mid U, V)P(X \mid W)P(Y \mid W)\]

Which ONE of the following statements is FALSE?

Options for Question 24

Explanation

Answer: (C)

The factorisation is the Bayesian network \(U \rightarrow W \leftarrow V\), \(W \rightarrow X\), \(W \rightarrow Y\).

  • A and B: \(U\) and \(V\) reach \(X\) and \(Y\) only through chains such as \(V \rightarrow W \rightarrow Y\), and observing \(W\) blocks a chain. Both are true.
  • D: \(X \leftarrow W \rightarrow Y\) has \(W\) as a common cause, so \(X\) and \(Y\) are independent once \(W\) is known. True.
  • C: \(U\) and \(V\) are independent on their own (the factor \(P(U)P(V)\)), but \(W\) is their common effect. Observing a common effect couples its causes (explaining away): once \(W\) is known, learning \(U\) changes what \(V\) is likely to be. So C does not hold in general.

Answer: C

Question 25

MCQ · 1 mark · −0.33

Consider the following statement:

In adversarial search, \(\alpha\)–\(\beta\) pruning can be applied to game trees of any depth where \(\alpha\) is the (m) value choice we have formed so far at any choice point along the path for the MAX player and \(\beta\) is the (n) value choice we have formed so far at any choice point along the path for the MIN player.

Which ONE of the following choices of (m) and (n) makes the above statement valid?

Options for Question 25

Explanation

Answer: (C)

Alpha–beta pruning carries two bounds down the game tree:

  • \(\alpha\) is the value MAX can already guarantee along the path. MAX wants large values, so \(\alpha\) is the highest value found so far.
  • \(\beta\) is the value MIN can already guarantee. MIN wants small values, so \(\beta\) is the lowest value found so far.

A branch is pruned as soon as \(\alpha \geq \beta\), because the player choosing above it already has a better alternative and would never let play reach it. The other options give MAX, MIN or both the preference of the opponent, so the bounds would no longer be values that player can guarantee.

Answer: C

Question 26

MCQ · 1 mark · −0.33

Consider a database that includes the following relations:

Defender(name, rating, side, goals)

Forward(name, rating, assists, goals)

Team(name, club, price)

Which ONE of the following relational algebra expressions checks that every name occurring in Team appears in either Defender or Forward, where \(\phi\) denotes the empty set?

Options for Question 26

Explanation

Answer: (C)

The condition says that the set of Team names is contained in the set of names that occur in Defender or Forward:

\[\Pi_{\mathit{name}}(\text{Team}) \subseteq \Pi_{\mathit{name}}(\text{Defender}) \cup \Pi_{\mathit{name}}(\text{Forward}).\]

A set \(A\) is a subset of \(B\) exactly when \(A \setminus B = \phi\): nothing in \(A\) is left over after removing the members of \(B\). That is option C.

  • A uses \(\cap\), so it would demand that every Team name occur in both Defender and Forward.
  • B and D test the opposite inclusion, that the players' names all occur in Team.

Answer: C

Question 27

MCQ · 1 mark · −0.33

Let the minimum, maximum, mean and standard deviation values for the attribute income of data scientists be ₹46000, ₹170000, ₹96000, and ₹21000, respectively. The z-score normalized income value of ₹106000 is closest to which ONE of the following options?

Options for Question 27

Explanation

Answer: (B)

z-score normalization subtracts the mean and divides by the standard deviation:

\[z = \frac{x - \mu}{\sigma} = \frac{106000 - 96000}{21000} = \frac{10000}{21000} \approx 0.476.\]

The minimum and maximum play no part here. They are what min-max normalization uses, and that would give \(\frac{106000 - 46000}{170000 - 46000} \approx 0.484\), which is not an option either. Option A divides the difference from the mean by the minimum instead of the standard deviation, and D divides the income itself by the minimum.

Answer: B

Question 28

MSQ · 1 mark

Consider the following tree traversals on a full binary tree:

(i) Preorder
(ii) Inorder
(iii) Postorder

Which of the following traversal options is/are sufficient to uniquely reconstruct the full binary tree?

Options for Question 28

Explanation

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

Take the node labels to be distinct. In a full binary tree every node has 0 or 2 children.

  • With inorder (A, B): the root is the first node in preorder or the last in postorder, and its position in inorder splits the other nodes into the left and right subtrees. Repeating this rebuilds any binary tree.
  • Preorder and postorder (C): for general trees a lone child could be left or right, but here an internal node always has two children. The node after the root in preorder is the left child, and its place in postorder marks where the left subtree ends, so the split is again unique.
  • Inorder only (D): the full trees with root 2 (children 1 and 4, where 4 has children 3 and 5) and root 4 (children 2 and 5, where 2 has children 1 and 3) both give 1 2 3 4 5.

Answer: A, B, C

Question 29

MSQ · 1 mark

Let \(x\) and \(y\) be two propositions. Which of the following statements is a tautology /are tautologies?

Options for Question 29

Explanation

Answer: (B), (C), (D)

An implication is false only when its premise is true and its conclusion is false. Each premise here is true in exactly one row of the truth table, so check the conclusion in that row.

  • A: \(\neg x \land y\) needs \(x\) false and \(y\) true. Then \(y \Longrightarrow x\) is true \(\Longrightarrow\) false, which is false. Not a tautology.
  • B: \(x \land \neg y\) needs \(x\) true and \(y\) false. Then \(\neg x\) is false, so \(\neg x \Longrightarrow y\) is true. Tautology.
  • C: \(x\) false and \(y\) true make \(\neg x \Longrightarrow y\) true \(\Longrightarrow\) true, which is true. Tautology.
  • D: \(x\) true and \(y\) false make \(y \Longrightarrow x\) false \(\Longrightarrow\) true, which is true. Tautology.

Answer: B, C, D

Question 30

NAT · 1 mark

Consider sorting the following array of integers in ascending order using an in-place Quicksort algorithm that uses the last element as the pivot.

60708090100

The minimum number of swaps performed during this Quicksort is ______.

Explanation

Answer: 0

The array is already sorted. In the first partition the pivot is 100 and every other element is smaller, so they all already sit on the left side and the pivot is already in its final place. Each later call looks the same: on 60 70 80 90 the pivot 90 is the largest, then 80, then 70.

A Lomuto-style partition would only ever swap an element with itself here, because its two indices are always equal, and such a step moves nothing and can be skipped. No element ever has to change place, so the minimum number of swaps is 0.

Answer: 0

Questions 21 to 30 of 65