Organised by IISc Bengaluru

GATE 2024 DA (Data Science & AI) question paper with solutions

59 questions with the official answer key and a worked solution for each. Try a question before opening its answer.

Practise this paper with instant checking
Q1MCQ1 mark · -1/3· Moderate

If '→' denotes increasing order of intensity, then the meaning of the words [sick → infirm → moribund] is analogous to [silly → _______ → daft]. Which one of the given options is appropriate to fill the blank?

  1. (A)frown
  2. (B)fawn
  3. (C)vein
  4. (D)vain
Answer: D - show solution

The first triple moves from mildly unwell (sick) to weak (infirm) to near death (moribund). The second triple must move from mildly foolish (silly) to more foolish to utterly foolish (daft). The middle word must be an adjective on the foolishness scale. 'Frown' is a facial expression, 'fawn' means to flatter (or a young deer) and 'vein' is a blood vessel; none describes foolishness. 'Vain' carries the sense of empty, futile or foolishly conceited, which sits between silly and daft. Answer: (D) vain.

Concept: Tests word meaning along an intensity scale. The trap is the near-homophones: 'vein' and 'vain' sound alike, and 'fawn' looks like a plausible adjective, but only 'vain' is an adjective related to foolishness.

Q3MCQ1 mark · -1/3· Easy

How many 4-digit positive integers divisible by 3 can be formed using only the digits {1, 3, 4, 6, 7}, such that no digit appears more than once in a number?

  1. (A)24
  2. (B)48
  3. (C)72
  4. (D)12
Answer: B - show solution

A number is divisible by 3 when its digit sum is. The five digits sum to 1+3+4+6+7 = 21. Using four distinct digits means leaving one digit out, so the digit sum is 21 - d, which is divisible by 3 only when the omitted digit d is divisible by 3, i.e. d = 3 or d = 6. That gives two digit sets, {1,4,6,7} and {1,3,4,7}. Each set of 4 distinct digits can be arranged in 4! = 24 ways (no zero, so every arrangement is a valid 4-digit number). Total = 2 × 24 = 48. Answer: (B) 48.

Concept: Divisibility by 3 via digit sum, plus permutations. The trap is trying to enumerate numbers directly instead of noticing that only the omitted digit matters.

Q4MCQ1 mark · -1/3· Easy

The sum of the following infinite series is 2 + 1/2 + 1/3 + 1/4 + 1/8 + 1/9 + 1/16 + 1/27 + ...

  1. (A)11/3
  2. (B)7/2
  3. (C)13/4
  4. (D)9/2
Answer: B - show solution

Split the series into two geometric series after the leading 2. Powers of 2: 1/2 + 1/4 + 1/8 + 1/16 + ... = (1/2)/(1 - 1/2) = 1. Powers of 3: 1/3 + 1/9 + 1/27 + ... = (1/3)/(1 - 1/3) = 1/2. Sum = 2 + 1 + 1/2 = 7/2. Answer: (B) 7/2.

Concept: Recognising two interleaved geometric progressions. The trap is treating the terms as a single pattern or forgetting the leading 2.

Q5MCQ1 mark · -1/3· Easy

In an election, the share of valid votes received by the four candidates A, B, C, and D is represented by the pie chart shown (Share of valid votes: A 40%, B 25%, C 20%, D 15%). The total number of votes cast in the election were 1,15,000, out of which 5,000 were invalid. Based on the data provided, the total number of valid votes received by the candidates B and C is

  1. (A)45,000
  2. (B)49,500
  3. (C)51,750
  4. (D)54,000
Answer: B - show solution

Valid votes = 1,15,000 - 5,000 = 1,10,000. B and C together have 25% + 20% = 45% of the valid votes. 45% of 1,10,000 = 49,500. Answer: (B) 49,500.

Concept: Percentages from a pie chart. The trap is applying the percentages to all votes cast (1,15,000 gives 51,750) instead of only the valid votes.

Q6MCQ2 marks · -2/3· Easy

Thousands of years ago, some people began dairy farming. This coincided with a number of mutations in a particular gene that resulted in these people developing the ability to digest dairy milk. Based on the given passage, which of the following can be inferred?

  1. (A)All human beings can digest dairy milk.
  2. (B)No human being can digest dairy milk.
  3. (C)Digestion of dairy milk is essential for human beings.
  4. (D)In human beings, digestion of dairy milk resulted from a mutated gene.
Answer: D - show solution

The passage says that gene mutations resulted in some people developing the ability to digest dairy milk. (A) overreaches: only some people developed it. (B) contradicts the passage. (C) says nothing the passage supports; it never claims the ability is essential. (D) restates the passage: the ability to digest milk came from a mutated gene. Answer: (D).

Concept: Inference from a short passage: choose what the text directly supports. The trap is universal claims such as 'all' or 'essential' that go beyond the text.

Q7MCQ2 marks · -2/3· Easy

The probability of a boy or a girl being born is 1/2. For a family having only three children, what is the probability of having two girls and one boy?

  1. (A)3/8
  2. (B)1/8
  3. (C)1/4
  4. (D)1/2
Answer: A - show solution

Three independent births give 2³ = 8 equally likely outcomes. Exactly two girls and one boy can occur as GGB, GBG or BGG: C(3,2) = 3 outcomes. Probability = 3/8. Answer: (A) 3/8.

Concept: Binomial counting. The trap is answering 1/8 by counting only one ordering of the children.

Q8MCQ2 marks · -2/3· Easy

Person 1 and Person 2 invest in three mutual funds A, B, and C. The amounts they invest in each of these mutual funds are given in the table. Mutual fund A Mutual fund B Mutual fund C Person 1 10,000 20,000 20,000 Person 2 20,000 15,000 15,000 At the end of one year, the total amount that Person 1 gets is 500 more than Person 2. The annual rate of return for the mutual funds B and C is 15% each. What is the annual rate of return for the mutual fund A?

  1. (A)7.5%
  2. (B)10%
  3. (C)15%
  4. (D)20%
Answer: B - show solution

Let the return of A be r. Person 1 gets 10,000(1 + r) + 40,000(1.15) = 56,000 + 10,000r. Person 2 gets 20,000(1 + r) + 30,000(1.15) = 54,500 + 20,000r. Given Person 1 - Person 2 = 500: 1,500 - 10,000r = 500, so r = 0.10. Answer: (B) 10%.

Concept: Setting up a linear equation from percentage returns. The trap is comparing only the gains and forgetting that both invested the same total (50,000), or mixing up which person holds more of fund A.

Q9MCQ2 marks · -2/3· Moderate

Three different views of a dice are shown in the figure below (each view shows the top face and the two visible side faces, left and right): View 1: top 5, left 4, right 1 View 2: top 4, left 6, right 3 View 3: top 2, left 6, right 5 The piece of paper that can be folded to make this dice is (each net is drawn as a grid of faces; '.' is an empty cell)

  1. (A)5 1 . . 4 . . 6 . . 2 3
  2. (B)5 1 . . 4 . . 2 . . 6 3
  3. (C)5 1 . . 3 . . 2 . . 4 6
  4. (D)5 1 . . 4 . . 6 . . 3 2
Answer: A - show solution

From the views, faces adjacent to 5 are 4, 1 (view 1), 6 and 2 (view 3), so 3 is opposite 5. Faces adjacent to 4 are 5, 1 (view 1), 6, 3 (view 2), so 2 is opposite 4. The remaining pair 1 and 6 are opposite. In each net the middle column is a strip of four faces that wraps round the cube, so alternate faces in it are opposite, and the two side flaps (one at the top-left, one at the bottom-right) are opposite each other. (A): column 1,4,6,2 gives 1-6 and 4-2 opposite, flaps 5 and 3 opposite - all three pairs match. (B): column 1,4,2,6 puts 1 opposite 2 - wrong. (C): column 1,3,2,4 puts 1 opposite 2 - wrong. (D): column 1,4,6,3 puts 4 opposite 3 - wrong. Answer: (A).

Concept: Cube nets: first derive opposite-face pairs from the views (a face adjacent to four others is opposite the fifth), then check which net places those pairs opposite. The trap is checking adjacency by eye instead of opposites.

Q10MCQ2 marks · -2/3· Easy

Visualize two identical right circular cones such that one is inverted over the other and they share a common circular base. If a cutting plane passes through the vertices of the assembled cones, what shape does the outer boundary of the resulting cross-section make?

  1. (A)A rhombus
  2. (B)A triangle
  3. (C)An ellipse
  4. (D)A hexagon
Answer: A - show solution

A plane through both apexes contains the common axis. Each cone is cut along its axis into an isosceles triangle whose base is a diameter of the shared circle. The two congruent isosceles triangles share that diameter as base, pointing in opposite directions, so the outline has four equal sides (the slant heights). That quadrilateral is a rhombus. Answer: (A) A rhombus.

Concept: 3D visualisation: an axial section of a cone is an isosceles triangle. The trap is picturing a slanted cut, which would give an ellipse, rather than a cut through both vertices.

Q11MCQ1 mark · -1/3· Easy

Consider the following statements: (i) The mean and variance of a Poisson random variable are equal. (ii) For a standard normal random variable, the mean is zero and the variance is one. Which ONE of the following options is correct?

  1. (A)Both (i) and (ii) are true
  2. (B)(i) is true and (ii) is false
  3. (C)(ii) is true and (i) is false
  4. (D)Both (i) and (ii) are false
Answer: A - show solution

(i) For a Poisson random variable with parameter λ, E[X] = λ and Var(X) = λ, so they are equal: true. (ii) The standard normal N(0, 1) has mean 0 and variance 1 by definition: true. Answer: (A) Both (i) and (ii) are true.

Concept: Basic moments of standard distributions. The trap is confusing the Poisson with the exponential, whose standard deviation (not variance) equals its mean.

Q12MCQ1 mark · -1/3· Easy

Three fair coins are tossed independently. T is the event that two or more tosses result in heads. S is the event that two or more tosses result in tails. What is the probability of the event T ∩ S ?

  1. (A)0
  2. (B)0.5
  3. (C)0.25
  4. (D)1
Answer: A - show solution

T ∩ S would need at least 2 heads and at least 2 tails, i.e. at least 4 tosses. With only 3 tosses this is impossible, so T and S are mutually exclusive and P(T ∩ S) = 0. Answer: (A) 0.

Concept: Mutually exclusive events. The trap is multiplying P(T) × P(S) = 0.25 as if the events were independent.

Q13MCQ1 mark · -1/3· Easy

Consider the matrix M = [[2, -1], [3, 1]] (rows written in order). Which ONE of the following statements is TRUE?

  1. (A)The eigenvalues of M are non-negative and real.
  2. (B)The eigenvalues of M are complex conjugate pairs.
  3. (C)One eigenvalue of M is positive and real, and another eigenvalue of M is zero.
  4. (D)One eigenvalue of M is non-negative and real, and another eigenvalue of M is negative and real.
Answer: B - show solution

Characteristic equation: λ² - (trace)λ + det = 0, with trace = 2 + 1 = 3 and det = 2·1 - (-1)·3 = 5. So λ² - 3λ + 5 = 0. Discriminant = 9 - 20 = -11 < 0, so λ = (3 ± i√11)/2, a complex conjugate pair. Answer: (B).

Concept: Eigenvalues of a 2 × 2 real matrix from trace and determinant. The trap is the sign of the off-diagonal product: det = 2 + 3, not 2 - 3.

Q15MCQ1 mark · -1/3· Easy

For any twice differentiable function f : ℝ → ℝ, if at some x* ∈ ℝ, f′(x*) = 0 and f″(x*) > 0, then the function f necessarily has a ______ at x = x*. Note: ℝ denotes the set of real numbers.

  1. (A)local minimum
  2. (B)global minimum
  3. (C)local maximum
  4. (D)global maximum
Answer: A - show solution

This is the second derivative test. f′(x*) = 0 makes x* a stationary point; f″(x*) > 0 means f is locally convex there, so f(x) ≥ f(x*) in some neighbourhood of x*: a local minimum. It need not be global, e.g. f(x) = x³ - 3x has f′(1) = 0, f″(1) = 6 > 0, yet f(x) → -∞ as x → -∞. Answer: (A) local minimum.

Concept: Second derivative test gives only local information. The trap is choosing 'global minimum', which holds only for convex functions.

Q16MCQ1 mark · -1/3· Easy

Match the items in Column 1 with the items in Column 2 in the following table: Column 1 Column 2 (p) First In First Out (i) Stacks (q) Lookup Operation (ii) Queues (r) Last In First Out (iii) Hash Tables

  1. (A)(p) - (ii), (q) - (iii), (r) - (i)
  2. (B)(p) - (ii), (q) - (i), (r) - (iii)
  3. (C)(p) - (i), (q) - (ii), (r) - (iii)
  4. (D)(p) - (i), (q) - (iii), (r) - (ii)
Answer: A - show solution

A queue removes elements in the order they arrived: FIFO, so (p) - (ii). A hash table is built for fast key lookup: (q) - (iii). A stack removes the most recently added element: LIFO, so (r) - (i). Answer: (A).

Concept: Defining property of basic data structures. The trap is swapping stack and queue.

Q17MCQ1 mark · -1/3· Moderate

Consider the dataset with six datapoints: {(x₁, y₁), (x₂, y₂), ..., (x₆, y₆)}, where x₁ = (1, 0), x₂ = (0, 1), x₃ = (0, -1), x₄ = (-1, 0), x₅ = (2, 2), x₆ = (-2, -2) (column vectors), and the labels are given by y₁ = y₂ = y₅ = 1, and y₃ = y₄ = y₆ = -1. A hard margin linear support vector machine is trained on the above dataset. Which ONE of the following sets is a possible set of support vectors?

  1. (A){x₁, x₂, x₅}
  2. (B){x₃, x₄, x₅}
  3. (C){x₄, x₅}
  4. (D){x₁, x₂, x₃, x₄}
Answer: D - show solution

The positive points (1,0), (0,1), (2,2) and negative points (0,-1), (-1,0), (-2,-2) are mirror images through the origin. The closest parts of the two convex hulls are the parallel segments x₁x₂ (on x + y = 1) and x₃x₄ (on x + y = -1), which are √2 apart. The maximum-margin hyperplane is therefore x + y = 0 (w ∝ (1, 1)), with margin 1/√2 on each side. Points on the margin lines x + y = ±1 are x₁, x₂, x₃, x₄; x₅ and x₆ lie farther away (x + y = ±4), so they can never be support vectors, ruling out (A), (B), (C). Answer: (D) {x₁, x₂, x₃, x₄}.

Concept: Support vectors are the points lying on the margin of the maximum-margin separator. The trap is picking the extreme points x₅, x₆, which are far from the boundary and do not affect it.

Q18MCQ1 mark · -1/3· Easy

Match the items in Column 1 with the items in Column 2 in the following table: Column 1 Column 2 (p) Principal Component Analysis (i) Discriminative Model (q) Naïve Bayes Classification (ii) Dimensionality Reduction (r) Logistic Regression (iii) Generative Model

  1. (A)(p) - (iii), (q) - (i), (r) - (ii)
  2. (B)(p) - (ii), (q) - (i), (r) - (iii)
  3. (C)(p) - (ii), (q) - (iii), (r) - (i)
  4. (D)(p) - (iii), (q) - (ii), (r) - (i)
Answer: C - show solution

PCA projects data onto the directions of largest variance: dimensionality reduction, (p) - (ii). Naïve Bayes models P(x | y) and P(y), i.e. the joint distribution, and classifies via Bayes' rule: a generative model, (q) - (iii). Logistic regression models P(y | x) directly: a discriminative model, (r) - (i). Answer: (C).

Concept: Generative models learn P(x, y); discriminative models learn P(y | x) or a boundary directly. The trap is calling Naïve Bayes discriminative because it is used for classification.

Q20MCQ1 mark · -1/3· Easy

Given a dataset with K binary-valued attributes (where K > 2) for a two-class classification task, the number of parameters to be estimated for learning a naïve Bayes classifier is

  1. (A)2ᴷ + 1
  2. (B)2K + 1
  3. (C)2ᴷ⁺¹ + 1
  4. (D)K² + 1
Answer: B - show solution

Naïve Bayes assumes the attributes are conditionally independent given the class. Class prior: P(y = 1) is 1 parameter (P(y = 0) = 1 - P(y = 1)). For each of the K binary attributes and each of the 2 classes we need P(xᵢ = 1 | y): 2K parameters. Total = 2K + 1. Answer: (B) 2K + 1.

Concept: The conditional independence assumption reduces the exponential 2ᴷ-sized joint table to a linear number of parameters. The trap is counting the full joint distribution (2ᴷ⁺¹ + 1).

Q21MCQ1 mark · -1/3· Easy

Consider performing uniform hashing on an open address hash table with load factor α = 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 1/(1 - α). Inserting an element in this hash table requires at most ______ probes, on average.

  1. (A)ln(1/(1 - α))
  2. (B)1/(1 - α)
  3. (C)1 + α/2
  4. (D)1/(1 + α)
Answer: B - show solution

To insert a key with open addressing we probe until an empty slot is found, which is exactly the probe sequence of an unsuccessful search for that key. Hence the expected number of probes for insertion is at most 1/(1 - α). Answer: (B) 1/(1 - α).

Concept: Insertion in open addressing equals an unsuccessful search. The trap is the expression (1/α) ln(1/(1 - α)), which bounds a successful search, not an insertion.

Q22MCQ1 mark · -1/3· Moderate

For any binary classification dataset, let S_B ∈ ℝ^(d×d) and S_W ∈ ℝ^(d×d) be the between-class and within-class scatter (covariance) matrices, respectively. The Fisher linear discriminant is defined by u* ∈ ℝ^d, that maximizes J(u) = (uᵀ S_B u) / (uᵀ S_W u) If λ = J(u*), S_W is non-singular and S_B ≠ 0, then (u*, λ) must satisfy which ONE of the following equations? Note: ℝ denotes the set of real numbers.

  1. (A)S_W⁻¹ S_B u* = λ u*
  2. (B)S_W u* = λ S_B u*
  3. (C)S_B S_W u* = λ u*
  4. (D)u*ᵀ u* = λ²
Answer: A - show solution

Set the gradient of J(u) to zero. With N = uᵀS_Bu and D = uᵀS_Wu, ∇J = (2S_Bu·D - 2S_Wu·N)/D² = 0, so S_B u = (N/D) S_W u = J(u) S_W u. At the maximiser, S_B u* = λ S_W u*. Since S_W is invertible, multiply by S_W⁻¹: S_W⁻¹ S_B u* = λ u*. Answer: (A).

Concept: Fisher LDA reduces to a generalised eigenvalue problem; the optimal direction is the top eigenvector of S_W⁻¹S_B. The trap is option (B), which puts λ on the wrong side.

Q23MCQ1 mark · -1/3· Moderate

Let h₁ and h₂ be two admissible heuristics used in A* search. Which ONE of the following expressions is always an admissible heuristic?

  1. (A)h₁ + h₂
  2. (B)h₁ × h₂
  3. (C)h₁/h₂, (h₂ ≠ 0)
  4. (D)|h₁ - h₂|
Answer: D - show solution

Admissible means 0 ≤ h(n) ≤ h*(n) for every node n. Since h₁, h₂ are both non-negative and at most h*, |h₁ - h₂| ≤ max(h₁, h₂) ≤ h*, and it is non-negative, so it is admissible. The others can overestimate: with h₁ = h₂ = h* = 3, h₁ + h₂ = 6 and h₁ × h₂ = 9; with h₁ = 2, h₂ = 0.5, h* = 2, h₁/h₂ = 4 > 2. Answer: (D) |h₁ - h₂|.

Concept: Admissibility is about never overestimating the true cost. The trap is assuming the sum of admissible heuristics stays admissible; max(h₁, h₂) is the usual safe combination.

Q24MCQ1 mark · -1/3· Moderate

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|U, V)P(X|W)P(Y|W) Which ONE of the following statements is FALSE?

  1. (A)Y is conditionally independent of V given W
  2. (B)X is conditionally independent of U given W
  3. (C)U and V are conditionally independent given W
  4. (D)Y and X are conditionally independent given W
Answer: C - show solution

The factorisation is the Bayesian network U → W ← V, W → X, W → Y. (A) Path V → W → Y is a chain; observing W blocks it, so Y ⊥ V | W: true. (B) Similarly U → W → X is blocked by W: true. (D) X ← W → Y is a common cause; observing W blocks it: true. (C) U → W ← V is a collider (v-structure); U and V are marginally independent, but observing W unblocks the path and makes them dependent in general. So (C) is false. Answer: (C).

Concept: d-separation: chains and forks are blocked by conditioning on the middle node, colliders are opened by it. The trap is thinking independent parents stay independent once their common child is observed (explaining away).

Q25MCQ1 mark · -1/3· Easy

Consider the following statement: In adversarial search, α-β pruning can be applied to game trees of any depth where α is the (m) value choice we have formed so far at any choice point along the path for the MAX player and β 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?

  1. (A)(m) = highest, (n) = highest
  2. (B)(m) = lowest, (n) = highest
  3. (C)(m) = highest, (n) = lowest
  4. (D)(m) = lowest, (n) = lowest
Answer: C - show solution

MAX wants the largest value, so α records the best (highest) value MAX is already guaranteed along the path. MIN wants the smallest value, so β records the best (lowest) value MIN is guaranteed. A branch is pruned when α ≥ β. Answer: (C) (m) = highest, (n) = lowest.

Concept: Definitions of α and β in alpha-beta pruning. The trap is reversing them by thinking of bounds on the opponent instead of the player's own guarantee.

Q26MCQ1 mark · -1/3· Easy

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 ϕ denotes the empty set?

  1. (A)Π_name(Team) \ (Π_name(Defender) ∩ Π_name(Forward)) = ϕ
  2. (B)(Π_name(Defender) ∩ Π_name(Forward)) \ Π_name(Team) = ϕ
  3. (C)Π_name(Team) \ (Π_name(Defender) ∪ Π_name(Forward)) = ϕ
  4. (D)(Π_name(Defender) ∪ Π_name(Forward)) \ Π_name(Team) = ϕ
Answer: C - show solution

'Every Team name is in Defender or Forward' means Π_name(Team) ⊆ Π_name(Defender) ∪ Π_name(Forward). A subset test A ⊆ B is written A \ B = ϕ. So Π_name(Team) \ (Π_name(Defender) ∪ Π_name(Forward)) = ϕ. Option (A) uses ∩ (would demand both), and (B), (D) test the reverse inclusion. Answer: (C).

Concept: Expressing set containment with difference. The traps are 'either...or' mapped to intersection and getting the direction of the difference backwards.

Q27MCQ1 mark · -1/3· Easy

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?

  1. (A)0.217
  2. (B)0.476
  3. (C)0.623
  4. (D)2.304
Answer: B - show solution

z-score normalisation: z = (x - mean)/standard deviation = (106000 - 96000)/21000 = 10000/21000 ≈ 0.476. The minimum and maximum are not used. Answer: (B) 0.476.

Concept: z-score versus min-max normalisation. The trap is using min and max: (106000 - 46000)/(170000 - 46000) ≈ 0.484 is min-max scaling, not a z-score.

Q28MSQ1 mark · no negative· Moderate

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?

  1. (A)(i) and (ii)
  2. (B)(ii) and (iii)
  3. (C)(i) and (iii)
  4. (D)(ii) only
Answer: A, B, C - show solution

Assume distinct node labels. Inorder together with preorder (or postorder) reconstructs any binary tree: the root comes from the first preorder (last postorder) element, and its position in the inorder splits the left and right subtrees; recurse. So (A) and (B) work. Preorder with postorder is ambiguous in general only when a node has a single child (it cannot tell left from right); in a full binary tree every internal node has exactly two children, so the element after the root in preorder is the left child, which splits the postorder: (C) works too. Inorder alone does not fix the root, so (D) fails. Answer: (A), (B), (C).

Concept: Pre + post fails for general binary trees but succeeds for full binary trees. The trap is forgetting that the word 'full' removes the one-child ambiguity.

Q29MSQ1 mark · no negative· Easy

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

  1. (A)(¬x ∧ y) ⇒ (y ⇒ x)
  2. (B)(x ∧ ¬y) ⇒ (¬x ⇒ y)
  3. (C)(¬x ∧ y) ⇒ (¬x ⇒ y)
  4. (D)(x ∧ ¬y) ⇒ (y ⇒ x)
Answer: B, C, D - show solution

An implication fails only when the premise is true and the conclusion false. (A) Premise true means x = F, y = T; then y ⇒ x is T ⇒ F = F. Not a tautology. (B) Premise true means x = T, y = F; ¬x ⇒ y has false antecedent, so true. Tautology. (C) Premise true means x = F, y = T; ¬x ⇒ y is T ⇒ T = T. Tautology. (D) Premise true means x = T, y = F; y ⇒ x has false antecedent, so true. Tautology. Answer: (B), (C), (D).

Concept: Check only the rows where the premise is true. The trap is building full truth tables and making sign errors with the negations.

Q31NAT1 mark · no negative· Easy

Consider the following two tables named Raider and Team in a relational database maintained by a Kabaddi league. The attribute ID in table Team references the primary key of the Raider table, ID. Raider ID Name Raids RaidPoints 1 Arjun 200 250 2 Ankush 190 219 3 Sunil 150 200 4 Reza 150 190 5 Pratham 175 220 6 Gopal 193 215 Team City ID BidPoints Jaipur 2 200 Patna 3 195 Hyderabad 5 175 Jaipur 1 250 Patna 4 200 Jaipur 6 200 The SQL query described below is executed on this database. The number of rows returned by this query is ______.

SELECT *
FROM Raider, Team
WHERE Raider.ID=Team.ID AND City="Jaipur" AND
RaidPoints > 200;
Answer: 3 - show solution

The join condition pairs each Team row with its Raider. Jaipur rows have IDs 2, 1 and 6. Their RaidPoints are 219 (Ankush), 250 (Arjun) and 215 (Gopal), all greater than 200. So 3 rows are returned. Answer: 3.

Concept: Evaluating a join with selection predicates. The trap is filtering on BidPoints instead of RaidPoints, or treating > 200 as ≥ 200 (Sunil has exactly 200 but plays for Patna anyway).

Q32NAT1 mark · no negative· Easy

The fundamental operations in a double-ended queue D are: insertFirst(e) - Insert a new element e at the beginning of D. insertLast(e) - Insert a new element e at the end of D. removeFirst() - Remove and return the first element of D. removeLast() - Remove and return the last element of D. In an empty double-ended queue, the following operations are performed (shown below). The value of a is ______.

insertFirst(10)
insertLast(32)
a ← removeFirst()
insertLast(28)
insertLast(17)
a ← removeFirst()
a ← removeLast()
Answer: 17 - show solution

Trace the deque (front on the left): insertFirst(10) → [10]; insertLast(32) → [10, 32]; removeFirst() → a = 10, [32]; insertLast(28) → [32, 28]; insertLast(17) → [32, 28, 17]; removeFirst() → a = 32, [28, 17]; removeLast() → a = 17, [28]. The final value of a is 17. Answer: 17.

Concept: Simulating a deque. The trap is reporting an earlier value of a; only the last assignment counts.

Q33NAT1 mark · no negative· Easy

Let f : ℝ → ℝ be the function f(x) = 1/(1 + e^(-x)). The value of the derivative of f at x where f(x) = 0.4 is ______ (rounded off to two decimal places). Note: ℝ denotes the set of real numbers.

Answer: 0.24 - show solution

For the sigmoid, f′(x) = e^(-x)/(1 + e^(-x))² = f(x)(1 - f(x)). With f(x) = 0.4: f′(x) = 0.4 × 0.6 = 0.24. Answer: 0.24.

Concept: The sigmoid's derivative identity σ′ = σ(1 - σ), used throughout logistic regression and neural networks. The trap is solving for x first, which is unnecessary.

Q34NAT1 mark · no negative· Easy

The sample average of 50 data points is 40. The updated sample average after including a new data point taking the value of 142 is ______.

Answer: 42 - show solution

Sum of the 50 points = 50 × 40 = 2000. Adding 142 gives 2142 over 51 points. New average = 2142/51 = 42. Answer: 42.

Concept: Updating a mean via the running total. The trap is averaging 40 and 142 directly, ignoring that the old mean carries weight 50.

Q35NAT1 mark · no negative· Easy

Consider the 3 × 3 matrix M = [[1, 2, 3], [3, 1, 3], [4, 3, 6]] (rows written in order). The determinant of (M² + 12M) is ______.

Answer: 0 - show solution

M² + 12M = M(M + 12I), so det(M² + 12M) = det(M) · det(M + 12I). det(M) = 1(1·6 - 3·3) - 2(3·6 - 3·4) + 3(3·3 - 1·4) = -3 - 12 + 15 = 0. (Indeed row 3 = row 1 + row 2.) Hence the determinant is 0. Answer: 0.

Concept: Factorising a matrix polynomial and using det(AB) = det(A)det(B). The trap is computing M² + 12M entry by entry instead of noticing M is singular.

Q36MCQ2 marks · -2/3· Moderate

A fair six-sided die (with faces numbered 1, 2, 3, 4, 5, 6) is repeatedly thrown independently. What is the expected number of times the die is thrown until two consecutive throws of even numbers are seen?

  1. (A)2
  2. (B)4
  3. (C)6
  4. (D)8
Answer: C - show solution

Each throw is even with probability p = 1/2. Let E be the expected throws from the start and E₁ the expected remaining throws after one even. From the start: one throw, then with 1/2 we are in state 1, with 1/2 back to start: E = 1 + (1/2)E₁ + (1/2)E. From state 1: one throw, with 1/2 we finish, with 1/2 back to start: E₁ = 1 + (1/2)E. Substituting: E = 1 + (1/2)(1 + E/2) + E/2, so E/4 = 3/2 and E = 6. (General formula 1/p + 1/p² = 2 + 4.) Answer: (C) 6.

Concept: First-step analysis (conditioning on the next throw) for waiting times of patterns. The trap is answering 4 = 1/p², which ignores that a failure after one success resets the run.

Q37MCQ2 marks · -2/3· Moderate

Let f : ℝ → ℝ be a function. Note: ℝ denotes the set of real numbers. f(x) = -x, if x < -2 f(x) = ax² + bx + c, if x ∈ [-2, 2] f(x) = x, if x > 2 Which ONE of the following choices gives the values of a, b, c that make the function f continuous and differentiable?

  1. (A)a = 1/4, b = 0, c = 1
  2. (B)a = 1/2, b = 0, c = 0
  3. (C)a = 0, b = 0, c = 0
  4. (D)a = 1, b = 1, c = -4
Answer: A - show solution

Continuity at x = 2: 4a + 2b + c = 2. Continuity at x = -2: 4a - 2b + c = 2. Subtracting gives b = 0, so 4a + c = 2. Differentiability at x = 2: 2a(2) + b = 1, so 4a = 1 and a = 1/4. (At x = -2: -4a + b = -1, consistent.) Then c = 2 - 1 = 1. Answer: (A) a = 1/4, b = 0, c = 1.

Concept: Matching values and slopes at the join points of a piecewise function. The trap is enforcing only continuity, which (B) and (D) partly satisfy, without matching derivatives.

Q38MCQ2 marks · -2/3· Easy

Consider the following Python code. Which ONE of the following is the output of this code?

def count(child_dict, i):
    if i not in child_dict.keys():
        return 1
    ans = 1
    for j in child_dict[i]:
        ans += count(child_dict, j)
    return ans

child_dict = dict()
child_dict[0] = [1,2]
child_dict[1] = [3,4,5]
child_dict[2] = [6,7,8]
print(count(child_dict,0))
  1. (A)6
  2. (B)1
  3. (C)8
  4. (D)9
Answer: D - show solution

count(d, i) returns 1 for a node with no children, and otherwise 1 plus the counts of its children, i.e. the number of nodes in the subtree rooted at i. Nodes 3 to 8 are leaves, so each returns 1. count(1) = 1 + 3 = 4, count(2) = 1 + 3 = 4, count(0) = 1 + 4 + 4 = 9. Answer: (D) 9.

Concept: Recursive subtree-size computation over a dictionary-encoded tree. The trap is counting only the leaves (6) or only the non-root nodes (8).

Q39MCQ2 marks · -2/3· Easy

Consider the function computeS(X) whose pseudocode is given below. Which ONE of the following values is returned by the function computeS(X) for X = [6, 3, 5, 4, 10]?

computeS(X)
S[1] ← 1
for i ← 2 to length(X)
    S[i] ← 1
    if X[i - 1] ≤ X[i]
        S[i] ← S[i] + S[i - 1]
    end if
end for
return S
  1. (A)[1, 1, 2, 3, 4]
  2. (B)[1, 1, 2, 3, 3]
  3. (C)[1, 1, 2, 1, 2]
  4. (D)[1, 1, 2, 1, 5]
Answer: C - show solution

S[i] is the length of the non-decreasing run ending at i. S[1] = 1. i = 2: 6 ≤ 3 false, S[2] = 1. i = 3: 3 ≤ 5 true, S[3] = 1 + S[2] = 2. i = 4: 5 ≤ 4 false, S[4] = 1. i = 5: 4 ≤ 10 true, S[5] = 1 + S[4] = 2. Result [1, 1, 2, 1, 2]. Answer: (C).

Concept: Tracing a loop that compares only adjacent elements. The trap is reading it as a stock-span computation (which would give 5 for the last element, option D); here only the immediate predecessor is compared.

Q40MCQ2 marks · -2/3· Easy

Let F(n) denote the maximum number of comparisons made while searching for an entry in a sorted array of size n using binary search. Which ONE of the following options is TRUE?

  1. (A)F(n) = F(⌊n/2⌋) + 1
  2. (B)F(n) = F(⌊n/2⌋) + F(⌈n/2⌉)
  3. (C)F(n) = F(⌊n/2⌋)
  4. (D)F(n) = F(n - 1) + 1
Answer: A - show solution

Binary search compares the target with the middle element (1 comparison) and then continues in one half; excluding the middle, the larger half has ⌊n/2⌋ elements. So the worst case satisfies F(n) = F(⌊n/2⌋) + 1, giving F(n) = ⌊log₂ n⌋ + 1. (B) would search both halves, (C) has no cost per step, (D) describes linear search. Answer: (A).

Concept: Recurrence for binary search. The trap is (B), the shape of a divide-and-conquer that recurses into both halves, like merge sort.

Q41MCQ2 marks · -2/3· Easy

Consider the following Python function. What does this Python function fun() do? Select the ONE appropriate option below.

def fun(D, s1, s2):
    if s1 < s2:
        D[s1], D[s2] = D[s2], D[s1]
        fun(D, s1+1, s2-1)
  1. (A)It finds the smallest element in D from index s1 to s2, both inclusive.
  2. (B)It performs a merge sort in-place on this list D between indices s1 and s2, both inclusive.
  3. (C)It reverses the list D between indices s1 and s2, both inclusive.
  4. (D)It swaps the elements in D at indices s1 and s2, and leaves the remaining elements unchanged.
Answer: C - show solution

Each call swaps the outermost pair D[s1], D[s2] and recurses on the inner range s1+1 .. s2-1, stopping when the indices meet or cross. Swapping successive outer pairs moving inward reverses the segment. E.g. D = [1, 2, 3, 4], fun(D, 0, 3) gives [4, 2, 3, 1] then [4, 3, 2, 1]. Answer: (C).

Concept: Recognising the two-pointer reversal pattern written recursively. The trap is (D): reading only the first swap and missing the recursive call.

Q42MCQ2 marks · -2/3· Moderate

Consider the table below, where the (i, j)th element of the table is the distance between points xᵢ and xⱼ. Single linkage clustering is performed on data points, x₁, x₂, x₃, x₄, x₅. x₁ x₂ x₃ x₄ x₅ x₁ 0 1 4 3 6 x₂ 1 0 3 5 3 x₃ 4 3 0 2 5 x₄ 3 5 2 0 1 x₅ 6 3 5 1 0 Which ONE of the following is the correct representation of the clusters produced? (Each dendrogram is written as its nested merge structure; inner brackets merge first.)

  1. (A)((x₁, x₂), (x₃, (x₄, x₅)))
  2. (B)(((x₁, x₂), x₃), (x₄, x₅))
  3. (C)((x₁, x₂), ((x₃, x₄), x₅))
  4. (D)(((x₁, x₂), (x₃, x₄)), x₅)
Answer: A - show solution

Single linkage merges the two clusters with the smallest minimum pairwise distance. Step 1: smallest distances are d(x₁, x₂) = 1 and d(x₄, x₅) = 1, giving {x₁, x₂} and {x₄, x₅}. Step 2: distances now: {x₁x₂}-x₃ = min(4, 3) = 3; x₃-{x₄x₅} = min(2, 5) = 2; {x₁x₂}-{x₄x₅} = min(3, 6, 5, 3) = 3. Merge x₃ with {x₄, x₅} at 2. Step 3: merge {x₁, x₂} with {x₃, x₄, x₅} at 3. Structure: ((x₁, x₂), (x₃, (x₄, x₅))). Answer: (A).

Concept: Single linkage uses the closest pair between clusters. The trap is merging x₃ with x₄ alone before x₄ joins x₅ (option C), ignoring that d(x₄, x₅) = 1 is smaller than d(x₃, x₄) = 2.

Q43MCQ2 marks · -2/3· Moderate

Consider the two neural networks (NNs) shown in Figures 1 and 2, with ReLU activation (ReLU(z) = max{0, z}, ∀z ∈ ℝ). ℝ denotes the set of real numbers. The connections and their corresponding weights are shown in the Figures. The biases at every neuron are set to 0. For what values of p, q, r in Figure 2 are the two NNs equivalent, when x₁, x₂, x₃ are positive? Figure 1: inputs x₁, x₂, x₃; first hidden layer h₁, h₂, h₃; second hidden layer g₁, g₂; one output neuron o. - Input to first hidden layer, every weight 1: x₁ → h₁, x₁ → h₂, x₁ → h₃; x₂ → h₁, x₂ → h₃; x₃ → h₂, x₃ → h₃. - First to second hidden layer, every weight 2: each of h₁, h₂, h₃ connects to both g₁ and g₂. - Second hidden layer to output, weight 3: g₁ → o, g₂ → o. Figure 2: inputs x₁, x₂, x₃ connect directly to one output neuron with weights p (from x₁), q (from x₂), r (from x₃).

  1. (A)p = 36, q = 24, r = 24
  2. (B)p = 24, q = 24, r = 36
  3. (C)p = 18, q = 36, r = 24
  4. (D)p = 36, q = 36, r = 36
Answer: A - show solution

With positive inputs and positive weights and zero biases, every pre-activation is positive, so each ReLU acts as the identity and the network is linear. First layer: h₁ = x₁ + x₂, h₂ = x₁ + x₃, h₃ = x₁ + x₂ + x₃, so h₁ + h₂ + h₃ = 3x₁ + 2x₂ + 2x₃. Second layer: g₁ = g₂ = 2(h₁ + h₂ + h₃). Output: o = 3g₁ + 3g₂ = 12(h₁ + h₂ + h₃) = 36x₁ + 24x₂ + 24x₃. Figure 2 gives px₁ + qx₂ + rx₃, so p = 36, q = 24, r = 24. Answer: (A).

Concept: When all ReLUs operate in their linear region, a deep network collapses to a single linear map whose weights are sums of path-weight products. The trap is miscounting how many first-layer neurons each input feeds.

Q44MCQ2 marks · -2/3· Moderate

Consider a state space where the start state is number 1. The successor function for the state numbered n returns two states numbered n+1 and n+2. Assume that the states in the unexpanded state list are expanded in the ascending order of numbers and the previously expanded states are not added to the unexpanded state list. Which ONE of the following statements about breadth-first search (BFS) and depth-first search (DFS) is true, when reaching the goal state number 6?

  1. (A)BFS expands more states than DFS.
  2. (B)DFS expands more states than BFS.
  3. (C)Both BFS and DFS expand equal number of states.
  4. (D)Both BFS and DFS do not reach the goal state number 6.
Answer: C - show solution

BFS: expand 1 (adds 2, 3); expand 2 (adds 4; 3 already listed); expand 3 (adds 5); expand 4 (adds 6); expand 5 (adds 7); then 6 is reached. Expansion order 1, 2, 3, 4, 5. DFS with ascending order: expand 1 (2, 3), take the smallest, 2 (adds 4), then the smallest unexpanded 3 (adds 5), then 4 (adds 6), then 5, then 6. Because every new child is n+1 or n+2 and the smallest unexpanded number is always the next integer, both strategies expand states in the order 1, 2, 3, 4, 5 before the goal 6. They expand the same number of states. Answer: (C).

Concept: Here ascending-order tie-breaking makes BFS and DFS follow the identical sequence. The trap is assuming DFS dives deep along n+2 and so expands fewer states.

Q45MCQ2 marks · -2/3· Moderate

Consider the following sorting algorithms: (i) Bubble sort (ii) Insertion sort (iii) Selection sort Which ONE among the following choices of sorting algorithms sorts the numbers in the array [4, 3, 2, 1, 5] in increasing order after exactly two passes over the array?

  1. (A)(i) only
  2. (B)(iii) only
  3. (C)(i) and (iii) only
  4. (D)(ii) and (iii) only
Answer: B - show solution

Bubble sort: pass 1 gives [3, 2, 1, 4, 5], pass 2 gives [2, 1, 3, 4, 5]: not sorted. Insertion sort: pass 1 inserts 3 giving [3, 4, 2, 1, 5], pass 2 inserts 2 giving [2, 3, 4, 1, 5]: not sorted. Selection sort: pass 1 swaps the minimum 1 into position 1 giving [1, 3, 2, 4, 5], pass 2 swaps the minimum of the rest, 2, into position 2 giving [1, 2, 3, 4, 5]: sorted. Answer: (B) (iii) only.

Concept: Tracing what one pass of each elementary sort achieves. The trap is assuming bubble sort finishes quickly because 5 is already in place; it moves the small values left only one step per pass.

Q46MSQ2 marks · no negative· Easy

Given the relational schema R = (U, V, W, X, Y, Z) and the set of functional dependencies: {U → V, U → W, WX → Y, WX → Z, V → X} Which of the following functional dependencies can be derived from the above set?

  1. (A)VW → YZ
  2. (B)WX → YZ
  3. (C)VW → U
  4. (D)VW → Y
Answer: A, B, D - show solution

Compute closures. (VW)⁺: start {V, W}; V → X adds X; WX → Y and WX → Z add Y, Z. So (VW)⁺ = {V, W, X, Y, Z}, which contains Y and Z but not U. Hence VW → YZ (A) and VW → Y (D) hold, VW → U (C) does not (no FD has U on the right). (B) WX → YZ follows from WX → Y and WX → Z by the union rule. Answer: (A), (B), (D).

Concept: Attribute closure decides FD implication. The trap is (C): nothing determines U, so U must be in every key.

Q47MSQ2 marks · no negative· Easy

Select all choices that are subspaces of ℝ³. Note: ℝ denotes the set of real numbers.

  1. (A){x = (x₁, x₂, x₃) ∈ ℝ³ : x = α(1, 1, 0) + β(1, 0, 0), α, β ∈ ℝ}
  2. (B){x = (x₁, x₂, x₃) ∈ ℝ³ : x = α²(1, 2, 0) + β²(1, 0, 1), α, β ∈ ℝ}
  3. (C){x = (x₁, x₂, x₃) ∈ ℝ³ : 5x₁ + 2x₃ = 0, 4x₁ - 2x₂ + 3x₃ = 0}
  4. (D){x = (x₁, x₂, x₃) ∈ ℝ³ : 5x₁ + 2x₃ + 4 = 0}
Answer: A, C - show solution

(A) is the span of two vectors (all real α, β): a subspace (the x₁x₂-plane). (B) The coefficients α², β² are never negative, so the set is a cone: (1, 2, 0) is in it but -(1, 2, 0) is not (its third coordinate forces β = 0 and then α² = -1). Not closed under scalar multiplication. (C) is the solution set of a homogeneous linear system, i.e. a null space: a subspace. (D) does not contain the zero vector (0 + 0 + 4 ≠ 0); it is an affine plane. Answer: (A), (C).

Concept: A subspace must contain 0 and be closed under addition and all scalar multiples. The traps are (B), which looks like a span but has squared coefficients, and (D), a shifted plane.

Q48MSQ2 marks · no negative· Moderate

Which of the following statements is/are TRUE? Note: ℝ denotes the set of real numbers.

  1. (A)There exist M ∈ ℝ^(3×3), p ∈ ℝ³, and q ∈ ℝ³ such that Mx = p has a unique solution and Mx = q has infinite solutions.
  2. (B)There exist M ∈ ℝ^(3×3), p ∈ ℝ³, and q ∈ ℝ³ such that Mx = p has no solutions and Mx = q has infinite solutions.
  3. (C)There exist M ∈ ℝ^(2×3), p ∈ ℝ², and q ∈ ℝ² such that Mx = p has a unique solution and Mx = q has infinite solutions.
  4. (D)There exist M ∈ ℝ^(3×2), p ∈ ℝ³, and q ∈ ℝ³ such that Mx = p has a unique solution and Mx = q has no solutions.
Answer: B, D - show solution

A solution, when one exists, is unique exactly when the null space of M is {0}. (A) A unique solution for a square M means M is invertible, so Mx = q is also unique: false. (B) Take a singular M, e.g. diag(1, 1, 0): p = (0, 0, 1) is outside the column space (no solution) and q = 0 gives infinitely many: true. (C) A 2 × 3 matrix has rank ≤ 2, so its null space has dimension ≥ 1; any consistent system has infinitely many solutions, never a unique one: false. (D) A 3 × 2 matrix of rank 2 has trivial null space; its column space is a plane in ℝ³, so p in the plane gives a unique solution and q outside gives none: true. Answer: (B), (D).

Concept: Existence depends on whether the right side is in the column space; uniqueness depends only on the null space. The trap is thinking uniqueness can vary with the right-hand side.

Q49MSQ2 marks · no negative· Moderate

Let ℝ be the set of real numbers, U be a subspace of ℝ³ and M ∈ ℝ^(3×3) be the matrix corresponding to the projection on to the subspace U. Which of the following statements is/are TRUE?

  1. (A)If U is a 1-dimensional subspace of ℝ³, then the null space of M is a 1-dimensional subspace.
  2. (B)If U is a 2-dimensional subspace of ℝ³, then the null space of M is a 1-dimensional subspace.
  3. (C)M² = M
  4. (D)M³ = M
Answer: B, C, D - show solution

The range of a projection onto U is U, so rank(M) = dim U and, by rank-nullity, nullity = 3 - dim U. (A) dim U = 1 gives a 2-dimensional null space: false. (B) dim U = 2 gives a 1-dimensional null space: true. (C) Projecting a vector already in U leaves it unchanged, so M(Mx) = Mx for all x: M² = M (idempotent): true. (D) M³ = M·M² = M·M = M: true. Answer: (B), (C), (D).

Concept: Projection matrices are idempotent and their rank equals the dimension of the target subspace. The trap is (A): the null space is the complement, of dimension 3 - dim U.

Q50MSQ2 marks · no negative· Easy

Consider the function f : ℝ → ℝ where ℝ is the set of all real numbers. f(x) = x⁴/4 - 2x³/3 - 3x²/2 + 1 Which of the following statements is/are TRUE?

  1. (A)x = 0 is a local maximum of f
  2. (B)x = 3 is a local minimum of f
  3. (C)x = -1 is a local maximum of f
  4. (D)x = 0 is a local minimum of f
Answer: A, B - show solution

f′(x) = x³ - 2x² - 3x = x(x - 3)(x + 1), so the stationary points are x = -1, 0, 3. f″(x) = 3x² - 4x - 3. f″(0) = -3 < 0: local maximum. f″(3) = 27 - 12 - 3 = 12 > 0: local minimum. f″(-1) = 3 + 4 - 3 = 4 > 0: local minimum, not maximum. Answer: (A), (B).

Concept: Second derivative test at each stationary point. The trap is assuming the stationary points simply alternate max/min in the order listed in the options; check each one.

Q51MSQ2 marks · no negative· Easy

Consider the directed acyclic graph (DAG) with vertices P, Q, R, S, T, U, V and edges P → Q, R → Q, Q → S, Q → V, S → U, V → T. Which of the following is/are valid vertex orderings that can be obtained from a topological sort of the DAG?

  1. (A)P Q R S T U V
  2. (B)P R Q V S U T
  3. (C)P Q R S V U T
  4. (D)P R Q S V T U
Answer: B, D - show solution

A valid order must put each edge's tail before its head: P and R before Q; Q before S and V; S before U; V before T. (A) Q comes before R: invalid (also T before V). (B) P, R, Q, then V, S, U, T: every constraint holds: valid. (C) Q before R: invalid. (D) P, R, Q, S, V, T, U: S before U, V before T: valid. Answer: (B), (D).

Concept: Topological order respects every edge direction. The trap is overlooking that Q has two predecessors, so both P and R must precede it.

Q52MSQ2 marks · no negative· Moderate

Let H, I, L, and N represent height, number of internal nodes, number of leaf nodes, and the total number of nodes respectively in a rooted binary tree. Which of the following statements is/are always TRUE?

  1. (A)L ≤ I + 1
  2. (B)H + 1 ≤ N ≤ 2^(H+1) - 1
  3. (C)H ≤ I ≤ 2^H - 1
  4. (D)H ≤ L ≤ 2^(H-1)
Answer: A, B, C - show solution

Height H = edges on the longest root-to-leaf path, so levels 0..H exist. (A) In a binary tree, L = (number of nodes with 2 children) + 1 ≤ I + 1: true. (B) The longest path has H + 1 nodes, and at most 2⁰ + ... + 2^H = 2^(H+1) - 1 nodes fit: true. (C) The H nodes above the deepest leaf on that path are internal, so I ≥ H; internal nodes lie on levels 0..H-1, at most 2^H - 1: true. (D) A path-shaped tree has L = 1 < H for H ≥ 2, so H ≤ L fails (and the upper bound is 2^H, not 2^(H-1)): false. Answer: (A), (B), (C).

Concept: Counting bounds for binary trees. The trap is (D): a skewed tree has many levels but only one leaf.

Q53MSQ2 marks · no negative· Easy

Consider the following figures representing datasets consisting of two-dimensional features with two classes denoted by circles and squares. (i) Circles: (1, 3), (2, 3), (1, 2). Squares: (2, 1), (3, 1), (2, 0). (ii) Circle: (2, 2). Squares: (2, 3), (1, 2), (3, 2), (2, 1). (iii) Circles: (1, 1), (3, 3). Squares: (1, 3), (3, 1). (iv) (approximate positions as drawn) Squares: (1, 2.2), (1, 1.2), (2, 2.6). Circles: (2, 0.5), (3, 1.6), (3, 0.5). Which of the following is/are TRUE?

  1. (A)(i) is linearly separable.
  2. (B)(ii) is linearly separable.
  3. (C)(iii) is linearly separable.
  4. (D)(iv) is linearly separable.
Answer: A, D - show solution

(i) All circles have y ≥ 2, all squares y ≤ 1: the line y = 1.5 separates them: separable. (ii) The circle (2, 2) is the centre of the four squares, inside their convex hull, so no line can separate it: not separable. (iii) The classes sit on opposite diagonals (XOR pattern); the segments joining each class cross, so the convex hulls intersect: not separable. (iv) The squares lie upper-left and the circles lower-right; e.g. the line y = 2x - 3 has all three squares above it (at x = 1 it is -1, at x = 2 it is 1) and all circles below it (at x = 2 it is 1 > 0.5, at x = 3 it is 3 > 1.6): separable. Answer: (A), (D).

Concept: Two classes are linearly separable exactly when their convex hulls do not intersect. The traps are the point enclosed by the other class (ii) and the XOR layout (iii).

Q54MSQ2 marks · no negative· Moderate

Let game(ball, rugby) be true if the ball is used in rugby and false otherwise. Let shape(ball, round) be true if the ball is round and false otherwise. Consider the following logical sentences: s1: ∀ball ¬game(ball, rugby) ⇒ shape(ball, round) s2: ∀ball ¬shape(ball, round) ⇒ game(ball, rugby) s3: ∀ball game(ball, rugby) ⇒ ¬shape(ball, round) s4: ∀ball shape(ball, round) ⇒ ¬game(ball, rugby) Which of the following choices is/are logical representations of the assertion, "All balls are round except balls used in rugby"?

  1. (A)s1 ∧ s3
  2. (B)s1 ∧ s2
  3. (C)s2 ∧ s3
  4. (D)s3 ∧ s4
Answer: A, C - show solution

'All balls are round except rugby balls' says two things: a ball not used in rugby is round (s1), and a rugby ball is not round (s3). s2 is the contrapositive of s1 (¬round ⇒ rugby is equivalent to ¬rugby ⇒ round), and s4 is the contrapositive of s3. So s1 ∧ s3 and s2 ∧ s3 both express the assertion. s1 ∧ s2 is just s1 twice (says nothing about rugby balls), and s3 ∧ s4 is just s3 twice (says nothing about non-rugby balls). Answer: (A), (C).

Concept: Reading 'except' as a two-way statement and recognising contrapositives as equivalent. The trap is choosing (B) or (D), which pair a sentence with its own contrapositive.

Q56NAT2 marks · no negative· Moderate

Let X be a random variable uniformly distributed in the interval [1, 3] and Y be a random variable uniformly distributed in the interval [2, 4]. If X and Y are independent of each other, the probability P(X ≥ Y) is ______ (rounded off to three decimal places).

Answer: 0.125 - show solution

(X, Y) is uniform on the square [1, 3] × [2, 4], of area 4, with density 1/4. X ≥ Y needs X ≥ 2 and Y between 2 and X: the triangle with vertices (2, 2), (3, 2), (3, 3), area 1/2. P(X ≥ Y) = (1/2)/4 = 1/8 = 0.125. Answer: 0.125.

Concept: Probabilities for two independent uniforms as areas in the joint rectangle. The trap is using the unit-square intuition P = 1/2, which only applies when both intervals coincide.

Q57NAT2 marks · no negative· Easy

Let X be a random variable exponentially distributed with parameter λ > 0. The probability density function of X is given by: f_X(x) = λe^(-λx), x ≥ 0; 0 otherwise. If 5E(X) = Var(X), where E(X) and Var(X) indicate the expectation and variance of X, respectively, the value of λ is ______ (rounded off to one decimal place).

Answer: 0.2 - show solution

For the exponential distribution, E(X) = 1/λ and Var(X) = 1/λ². The condition 5/λ = 1/λ² gives λ = 1/5 = 0.2. Answer: 0.2.

Concept: Moments of the exponential distribution. The trap is mixing up the variance 1/λ² with the standard deviation 1/λ, which makes the condition 5/λ = 1/λ impossible.

Q58NAT2 marks · no negative· Easy

Consider two events T and S. Let T̄ denote the complement of the event T. The probability associated with different events are given as follows: P(T̄) = 0.6, P(S|T) = 0.3, P(S|T̄) = 0.6 Then, P(T|S) is ______ (rounded off to two decimal places).

Answer: 0.25 - show solution

P(T) = 1 - 0.6 = 0.4. Total probability: P(S) = P(S|T)P(T) + P(S|T̄)P(T̄) = 0.3 × 0.4 + 0.6 × 0.6 = 0.12 + 0.36 = 0.48. Bayes: P(T|S) = 0.12/0.48 = 0.25. Answer: 0.25.

Concept: Bayes' theorem with the law of total probability. The trap is using P(T̄) = 0.6 as P(T).

Q60NAT2 marks · no negative· Easy

Evaluate the following limit: lim (x → 0) ln((x² + 1) cos x) / x² = ______.

Answer: 0.5 - show solution

ln((x² + 1) cos x) = ln(1 + x²) + ln(cos x). Near 0, ln(1 + x²) = x² + O(x⁴) and cos x = 1 - x²/2 + O(x⁴), so ln(cos x) = -x²/2 + O(x⁴). The numerator is x²/2 + O(x⁴); dividing by x² gives the limit 1/2 = 0.5. Answer: 0.5.

Concept: Series expansion (or L'Hospital twice) for a 0/0 limit. The trap is dropping the cos x factor and answering 1.

Q61NAT2 marks · no negative· Moderate

Let u = (1, 2, 3, 4, 5)ᵀ (a column vector), and let σ₁, σ₂, σ₃, σ₄, σ₅ be the singular values of the matrix M = uuᵀ (where uᵀ is the transpose of u). The value of Σᵢ₌₁⁵ σᵢ is ______.

Answer: 55 - show solution

M = uuᵀ is symmetric positive semidefinite of rank 1, so its singular values equal its eigenvalues. Mu = u(uᵀu) = ‖u‖²u, so the non-zero eigenvalue is ‖u‖² = 1 + 4 + 9 + 16 + 25 = 55, and the other four are 0. Sum = 55. Answer: 55.

Concept: A rank-one outer product has a single non-zero singular value ‖u‖². The trap is answering √55 (the norm) or 15 (the sum of entries).

Q62NAT2 marks · no negative· Moderate

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 Pitch Format Winner (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

Answer: 0.12 to 0.13 - show solution

Overall: 4 Green, 6 Blue. H(C) = -0.4 log₂ 0.4 - 0.6 log₂ 0.6 ≈ 0.971. Pitch = S (matches 1, 2, 4, 7, 10): 3 Green, 2 Blue, H ≈ 0.971. Pitch = F (matches 3, 5, 6, 8, 9): 1 Green, 4 Blue, H = -0.2 log₂ 0.2 - 0.8 log₂ 0.8 ≈ 0.722. Weighted entropy = 0.5 × 0.971 + 0.5 × 0.722 ≈ 0.846. Information gain = 0.971 - 0.846 ≈ 0.125, which rounds to 0.12 or 0.13 depending on intermediate rounding (key accepts 0.12 to 0.13). Answer: 0.12 to 0.13.

Concept: Information gain = parent entropy minus weighted child entropy, with base-2 logs. The trap is forgetting to weight each branch by its share of samples, or using natural logs.

Q63NAT2 marks · no negative· Easy

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 (◇) shaped data point is assigned the label square is ______. Data points: circles at (1, 1) and (1, 2); squares at (2, 3), (3, 3) and (3, 2). The diamond (query point) is at (2, 1).

Answer: 5 - show solution

Distances from (2, 1): circle (1, 1): 1; circle (1, 2): √2; square (3, 2): √2; square (2, 3): 2; square (3, 3): √5. k = 1: nearest is a circle, label circle. k = 3: the three nearest are (1, 1), (1, 2), (3, 2): 2 circles, 1 square, label circle. k = 5: all points, 2 circles and 3 squares, label square. Minimum odd k = 5. Answer: 5.

Concept: Majority vote among the k nearest points. The trap is stopping at k = 3, where the tie at distance √2 includes one point of each class but circles still win.

Q64NAT2 marks · no negative· Easy

Given the following Bayesian Network consisting of four Bernoulli random variables and the associated conditional probability tables. The network has edges U → V, U → W, V → Z, W → Z. P(U = 0) = 0.5, P(U = 1) = 0.5 P(V = 0 | U) P(V = 1 | U) U = 0 0.5 0.5 U = 1 0.5 0.5 P(W = 0 | U) P(W = 1 | U) U = 0 1 0 U = 1 0 1 P(Z = 0 | V, W) P(Z = 1 | V, W) V = 0, W = 0 0.5 0.5 V = 0, W = 1 1 0 V = 1, W = 0 1 0 V = 1, W = 1 0.5 0.5 The value of P(U = 1, V = 1, W = 1, Z = 1) = ______ (rounded off to three decimal places).

Answer: 0.125 - show solution

The network factorises as P(U, V, W, Z) = P(U) P(V | U) P(W | U) P(Z | V, W). So P(U = 1, V = 1, W = 1, Z = 1) = P(U = 1) × P(V = 1 | U = 1) × P(W = 1 | U = 1) × P(Z = 1 | V = 1, W = 1) = 0.5 × 0.5 × 1 × 0.5 = 0.125. Answer: 0.125.

Concept: A full joint assignment in a Bayesian network is the product of each node's CPT entry given its parents. The trap is looking up the wrong row of the Z table.

Q65NAT2 marks · no negative· Easy

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).

Answer: 0.062 to 0.063 - show solution

E[X] = P(HH) = 1/4. E[Y] = P(at least one head) = 3/4. If X = 1 then Y = 1, so XY = X and E[XY] = 1/4. Cov(X, Y) = E[XY] - E[X]E[Y] = 1/4 - 3/16 = 1/16 = 0.0625, i.e. 0.062 or 0.063 depending on rounding. Answer: 0.062 to 0.063.

Concept: Covariance of indicator variables via E[XY] - E[X]E[Y]. The trap is treating X and Y as independent (covariance 0), when X = 1 forces Y = 1.

Answers are the official GATE answer key. Questions that depend on a figure are left out until they can be shown faithfully.