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?
- (A)frown
- (B)fawn
- (C)vein
- (D)vain
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.
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?
- (A)24
- (B)48
- (C)72
- (D)12
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.
The sum of the following infinite series is
2 + 1/2 + 1/3 + 1/4 + 1/8 + 1/9 + 1/16 + 1/27 + ...
- (A)11/3
- (B)7/2
- (C)13/4
- (D)9/2
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.
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
- (A)45,000
- (B)49,500
- (C)51,750
- (D)54,000
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.
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?
- (A)All human beings can digest dairy milk.
- (B)No human being can digest dairy milk.
- (C)Digestion of dairy milk is essential for human beings.
- (D)In human beings, digestion of dairy milk resulted from a mutated gene.
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.
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?
- (A)3/8
- (B)1/8
- (C)1/4
- (D)1/2
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.
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?
- (A)7.5%
- (B)10%
- (C)15%
- (D)20%
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.
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)
- (A)5 1 .
. 4 .
. 6 .
. 2 3
- (B)5 1 .
. 4 .
. 2 .
. 6 3
- (C)5 1 .
. 3 .
. 2 .
. 4 6
- (D)5 1 .
. 4 .
. 6 .
. 3 2
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.
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?
- (A)A rhombus
- (B)A triangle
- (C)An ellipse
- (D)A hexagon
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.
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?
- (A)Both (i) and (ii) are true
- (B)(i) is true and (ii) is false
- (C)(ii) is true and (i) is false
- (D)Both (i) and (ii) are false
(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.
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 ?
- (A)0
- (B)0.5
- (C)0.25
- (D)1
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.
Consider the matrix M = [[2, -1], [3, 1]] (rows written in order).
Which ONE of the following statements is TRUE?
- (A)The eigenvalues of M are non-negative and real.
- (B)The eigenvalues of M are complex conjugate pairs.
- (C)One eigenvalue of M is positive and real, and another eigenvalue of M is zero.
- (D)One eigenvalue of M is non-negative and real, and another eigenvalue of M is negative and real.
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.
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.
- (A)local minimum
- (B)global minimum
- (C)local maximum
- (D)global maximum
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.
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
- (A)(p) - (ii), (q) - (iii), (r) - (i)
- (B)(p) - (ii), (q) - (i), (r) - (iii)
- (C)(p) - (i), (q) - (ii), (r) - (iii)
- (D)(p) - (i), (q) - (iii), (r) - (ii)
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.
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?
- (A){x₁, x₂, x₅}
- (B){x₃, x₄, x₅}
- (C){x₄, x₅}
- (D){x₁, x₂, x₃, x₄}
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.
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
- (A)(p) - (iii), (q) - (i), (r) - (ii)
- (B)(p) - (ii), (q) - (i), (r) - (iii)
- (C)(p) - (ii), (q) - (iii), (r) - (i)
- (D)(p) - (iii), (q) - (ii), (r) - (i)
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.
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
- (A)2ᴷ + 1
- (B)2K + 1
- (C)2ᴷ⁺¹ + 1
- (D)K² + 1
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).
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.
- (A)ln(1/(1 - α))
- (B)1/(1 - α)
- (C)1 + α/2
- (D)1/(1 + α)
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.
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.
- (A)S_W⁻¹ S_B u* = λ u*
- (B)S_W u* = λ S_B u*
- (C)S_B S_W u* = λ u*
- (D)u*ᵀ u* = λ²
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.
Let h₁ and h₂ be two admissible heuristics used in A* search.
Which ONE of the following expressions is always an admissible heuristic?
- (A)h₁ + h₂
- (B)h₁ × h₂
- (C)h₁/h₂, (h₂ ≠ 0)
- (D)|h₁ - h₂|
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.
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?
- (A)Y is conditionally independent of V given W
- (B)X is conditionally independent of U given W
- (C)U and V are conditionally independent given W
- (D)Y and X are conditionally independent given W
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).
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?
- (A)(m) = highest, (n) = highest
- (B)(m) = lowest, (n) = highest
- (C)(m) = highest, (n) = lowest
- (D)(m) = lowest, (n) = lowest
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.
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?
- (A)Π_name(Team) \ (Π_name(Defender) ∩ Π_name(Forward)) = ϕ
- (B)(Π_name(Defender) ∩ Π_name(Forward)) \ Π_name(Team) = ϕ
- (C)Π_name(Team) \ (Π_name(Defender) ∪ Π_name(Forward)) = ϕ
- (D)(Π_name(Defender) ∪ Π_name(Forward)) \ Π_name(Team) = ϕ
'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.
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?
- (A)0.217
- (B)0.476
- (C)0.623
- (D)2.304
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.
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?
- (A)(i) and (ii)
- (B)(ii) and (iii)
- (C)(i) and (iii)
- (D)(ii) only
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.
Let x and y be two propositions. Which of the following statements is a tautology /are tautologies?
- (A)(¬x ∧ y) ⇒ (y ⇒ x)
- (B)(x ∧ ¬y) ⇒ (¬x ⇒ y)
- (C)(¬x ∧ y) ⇒ (¬x ⇒ y)
- (D)(x ∧ ¬y) ⇒ (y ⇒ x)
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.
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;
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).
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()
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.
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.
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.
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 ______.
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.
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 ______.
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.
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?
- (A)2
- (B)4
- (C)6
- (D)8
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.
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?
- (A)a = 1/4, b = 0, c = 1
- (B)a = 1/2, b = 0, c = 0
- (C)a = 0, b = 0, c = 0
- (D)a = 1, b = 1, c = -4
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.
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))- (A)6
- (B)1
- (C)8
- (D)9
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).
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- (A)[1, 1, 2, 3, 4]
- (B)[1, 1, 2, 3, 3]
- (C)[1, 1, 2, 1, 2]
- (D)[1, 1, 2, 1, 5]
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.
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?
- (A)F(n) = F(⌊n/2⌋) + 1
- (B)F(n) = F(⌊n/2⌋) + F(⌈n/2⌉)
- (C)F(n) = F(⌊n/2⌋)
- (D)F(n) = F(n - 1) + 1
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.
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)- (A)It finds the smallest element in D from index s1 to s2, both inclusive.
- (B)It performs a merge sort in-place on this list D between indices s1 and s2, both inclusive.
- (C)It reverses the list D between indices s1 and s2, both inclusive.
- (D)It swaps the elements in D at indices s1 and s2, and leaves the remaining elements unchanged.
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.
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.)
- (A)((x₁, x₂), (x₃, (x₄, x₅)))
- (B)(((x₁, x₂), x₃), (x₄, x₅))
- (C)((x₁, x₂), ((x₃, x₄), x₅))
- (D)(((x₁, x₂), (x₃, x₄)), x₅)
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.
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₃).
- (A)p = 36, q = 24, r = 24
- (B)p = 24, q = 24, r = 36
- (C)p = 18, q = 36, r = 24
- (D)p = 36, q = 36, r = 36
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.
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?
- (A)BFS expands more states than DFS.
- (B)DFS expands more states than BFS.
- (C)Both BFS and DFS expand equal number of states.
- (D)Both BFS and DFS do not reach the goal state number 6.
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.
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?
- (A)(i) only
- (B)(iii) only
- (C)(i) and (iii) only
- (D)(ii) and (iii) only
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.
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?
- (A)VW → YZ
- (B)WX → YZ
- (C)VW → U
- (D)VW → Y
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.
Select all choices that are subspaces of ℝ³.
Note: ℝ denotes the set of real numbers.
- (A){x = (x₁, x₂, x₃) ∈ ℝ³ : x = α(1, 1, 0) + β(1, 0, 0), α, β ∈ ℝ}
- (B){x = (x₁, x₂, x₃) ∈ ℝ³ : x = α²(1, 2, 0) + β²(1, 0, 1), α, β ∈ ℝ}
- (C){x = (x₁, x₂, x₃) ∈ ℝ³ : 5x₁ + 2x₃ = 0, 4x₁ - 2x₂ + 3x₃ = 0}
- (D){x = (x₁, x₂, x₃) ∈ ℝ³ : 5x₁ + 2x₃ + 4 = 0}
(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.
Which of the following statements is/are TRUE?
Note: ℝ denotes the set of real numbers.
- (A)There exist M ∈ ℝ^(3×3), p ∈ ℝ³, and q ∈ ℝ³ such that Mx = p has a unique solution and Mx = q has infinite solutions.
- (B)There exist M ∈ ℝ^(3×3), p ∈ ℝ³, and q ∈ ℝ³ such that Mx = p has no solutions and Mx = q has infinite solutions.
- (C)There exist M ∈ ℝ^(2×3), p ∈ ℝ², and q ∈ ℝ² such that Mx = p has a unique solution and Mx = q has infinite solutions.
- (D)There exist M ∈ ℝ^(3×2), p ∈ ℝ³, and q ∈ ℝ³ such that Mx = p has a unique solution and Mx = q has no solutions.
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.
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?
- (A)If U is a 1-dimensional subspace of ℝ³, then the null space of M is a 1-dimensional subspace.
- (B)If U is a 2-dimensional subspace of ℝ³, then the null space of M is a 1-dimensional subspace.
- (C)M² = M
- (D)M³ = M
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.
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?
- (A)x = 0 is a local maximum of f
- (B)x = 3 is a local minimum of f
- (C)x = -1 is a local maximum of f
- (D)x = 0 is a local minimum of f
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.
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?
- (A)P Q R S T U V
- (B)P R Q V S U T
- (C)P Q R S V U T
- (D)P R Q S V T U
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.
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?
- (A)L ≤ I + 1
- (B)H + 1 ≤ N ≤ 2^(H+1) - 1
- (C)H ≤ I ≤ 2^H - 1
- (D)H ≤ L ≤ 2^(H-1)
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.
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?
- (A)(i) is linearly separable.
- (B)(ii) is linearly separable.
- (C)(iii) is linearly separable.
- (D)(iv) is linearly separable.
(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).
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"?
- (A)s1 ∧ s3
- (B)s1 ∧ s2
- (C)s2 ∧ s3
- (D)s3 ∧ s4
'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.
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).
(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.
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).
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.
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).
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).
Evaluate the following limit:
lim (x → 0) ln((x² + 1) cos x) / x² = ______.
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.
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 ______.
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).
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
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.
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).
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.
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).
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.
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).
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.