GATE DA 2025 question paper with solutions
All 65 questions of the GATE 2025 Data Science and Artificial Intelligence paper, in order, with the official answer key from IIT Roorkee. 55 have a full solution.
- questions · 100 marks
- 65questions · 100 marks
- with a full solution
- 55with a full solution
- question types
- 35 MCQ · 18 MSQ · 12 NATquestion types
GATE DA 2025 answer key
| Question | Type | Marks | Answer |
|---|---|---|---|
| Q.1 | MCQ | 1 | A |
| Q.2 | MCQ | 1 | B |
| Q.3 | MCQ | 1 | C |
| Q.4 | MCQ | 1 | A |
| Q.5 | MCQ | 1 | C |
| Q.6 | MCQ | 2 | B |
| Q.7 | MCQ | 2 | B |
| Q.8 | MCQ | 2 | A |
| Q.9 | MCQ | 2 | C |
| Q.10 | MCQ | 2 | A |
| Q.11 | MCQ | 1 | C |
| Q.12 | MCQ | 1 | B |
| Q.13 | MCQ | 1 | C |
| Q.14 | MCQ | 1 | A |
| Q.15 | MCQ | 1 | A |
| Q.16 | MCQ | 1 | C |
| Q.17 | MCQ | 1 | C |
| Q.18 | MCQ | 1 | D |
| Q.19 | MCQ | 1 | A |
| Q.20 | MCQ | 1 | A |
| Q.21 | MCQ | 1 | A |
| Q.22 | MCQ | 1 | A |
| Q.23 | MCQ | 1 | A |
| Q.24 | MSQ | 1 | A, B, C |
| Q.25 | MSQ | 1 | B, D |
| Q.26 | MSQ | 1 | C, D |
| Q.27 | MSQ | 1 | C |
| Q.28 | MSQ | 1 | A, B |
| Q.29 | MSQ | 1 | A, C |
| Q.30 | MSQ | 1 | B, D |
| Q.31 | NAT | 1 | 0.25 |
| Q.32 | NAT | 1 | 0.5 |
| Q.33 | NAT | 1 | 3 |
| Q.34 | NAT | 1 | 0.285 to 0.287 |
| Q.35 | NAT | 1 | 0.39 to 0.41 |
| Q.36 | MCQ | 2 | B |
| Q.37 | MCQ | 2 | D |
| Q.38 | MCQ | 2 | A |
| Q.39 | MCQ | 2 | C |
| Q.40 | MCQ | 2 | A |
| Q.41 | MCQ | 2 | A |
| Q.42 | MCQ | 2 | A |
| Q.43 | MCQ | 2 | C |
| Q.44 | MCQ | 2 | C |
| Q.45 | MCQ | 2 | C |
| Q.46 | MCQ | 2 | D |
| Q.47 | MCQ | 2 | B |
| Q.48 | MSQ | 2 | A, C |
| Q.49 | MSQ | 2 | C, D |
| Q.50 | MSQ | 2 | A, B |
| Q.51 | MSQ | 2 | B, C, D |
| Q.52 | MSQ | 2 | A, D |
| Q.53 | MSQ | 2 | B, C |
| Q.54 | MSQ | 2 | A, C |
| Q.55 | MSQ | 2 | B, C |
| Q.56 | MSQ | 2 | B, C |
| Q.57 | MSQ | 2 | B, D |
| Q.58 | MSQ | 2 | A, C, D |
| Q.59 | NAT | 2 | 0 |
| Q.60 | NAT | 2 | 100 |
| Q.61 | NAT | 2 | 66.6 to 66.7 |
| Q.62 | NAT | 2 | 1 |
| Q.63 | NAT | 2 | 160 |
| Q.64 | NAT | 2 | 24 |
| Q.65 | NAT | 2 | 75 |
General Aptitude Q.1 to Q.10
- Q.1MCQ · 1 markOfficial answer: A
- Q.2MCQ · 1 markOfficial answer: B
- Q.3MCQ · 1 markOfficial answer: C
- Q.4MCQ · 1 markOfficial answer: A
- Q.5MCQ · 1 markOfficial answer: C
- Q.6MCQ · 2 marksOfficial answer: B
- Q.7MCQ · 2 marksOfficial answer: B
- Q.8MCQ · 2 marksOfficial answer: A
- Q.9MCQ · 2 marksOfficial answer: C
- Q.10MCQ · 2 marksOfficial answer: A
Data Science and Artificial Intelligence Q.11 to Q.65
- Q.11MCQ · 1 markOfficial answer: C
Probability and Statistics › Random variables
Law of iterated expectations (tower property): averaging the conditional mean over the distribution of gives back the unconditional mean .
WATCH OUT FORFull solutionTreating as if it were already a number and picking (A), or confusing the outer expectation with a ratio or with . The inner expectation is a function of , and the outer one averages it over .
- Q.12MCQ · 1 markOfficial answer: B
Linear Algebra › Linear systems
An upper triangular matrix needs no elimination. The only work left is back substitution, which costs about multiplications and as many additions, so .
WATCH OUT FORFull solutionQuoting the dense-matrix cost for Gaussian elimination without noticing that this matrix is already triangular and the elimination cost vanishes.
- Q.13MCQ · 1 markOfficial answer: C
A matrix whose rows each sum to 1 has eigenvalue 1 with eigenvector . The polynomial vanishes at , so has a zero eigenvalue. A square matrix with a zero eigenvalue is singular, and a homogeneous system with a singular matrix has infinitely many solutions.
WATCH OUT FORFull solutionAssuming must have only the trivial solution, or that it has no solution. A homogeneous system always has as a solution. Also, a linear system over the reals never has exactly two solutions: it has 0, 1 or infinitely many.
- Q.14MCQ · 1 markOfficial answer: A
Calculus and Optimization › Taylor series
is an odd function, so its Maclaurin series has only odd powers. Every even-order derivative at is therefore . Equivalently, and .
WATCH OUT FORFull solutionUsing for every and picking , or confusing the coefficient with the derivative. The even-power coefficients of are zero. Another slip is treating like the derivative of , whose value at is .
- Q.15MCQ · 1 markOfficial answer: A
Artificial Intelligence › Logic
An implication is equivalent to a disjunction: . To refute a claimed equivalence, find one assignment where the two statements differ.
WATCH OUT FORFull solutionConfusing (which equals ) with . Another slip is to read as the negation of the implication. The negation of is .
- Q.16MCQ · 1 markOfficial answer: C
Database Management and Warehousing › Normal forms
Dependency preservation means each functional dependency can be checked inside one decomposed table. If it is not preserved, checking a spanning dependency needs the tables recombined, which is a join.
WATCH OUT FORFull solutionChoosing projection because decomposition itself is done by projection. Projection is used to create the decomposition. Checking a dependency that spans relations needs the pieces joined back together.
- Q.17MCQ · 1 markOfficial answer: C
Database Management and Warehousing › Relational algebra
Read a nested relational-algebra expression from the inside out. Nested selections compose as an AND, and a natural join pairs tuples on the common attributes (
modelfor Car and Make,serialfor Own and Car). The final projection ontoownerreturns owners, not cars.WATCH OUT FORFull solutionChoosing (D) because the red-and-ABC cars are what the inner part computes, and forgetting that the outer join with Own and the projection on
ownerturn the result into a set of owners. Another slip is reading the nested selections as an OR, which gives (A). - Q.18MCQ · 1 markOfficial answer: D
Data Structures and Algorithms › Sorting & hashing
With linear probing, insert keys in the given order. A key goes to its home slot if that slot is free. Otherwise it goes to the next free slot, checking modulo the table size.
WATCH OUT FORFull solutionUsing instead of . Also stopping after one probe: key 14's home slot 2 is full, and slot 3 is full too, so it must go on to slot 4.
- Q.19MCQ · 1 markOfficial answer: A
Probability and Statistics › Continuous distributions
For a continuous random variable the median is the point where the CDF equals . Solve using the piece of the CDF that contains 3.
WATCH OUT FORFull solutionSetting the median to the midpoint of and , or using the wrong piece of the CDF. Another slip is cross-multiplying incorrectly and getting from treated as . Always substitute the answer back and check that .
- Q.20MCQ · 1 markOfficial answer: A
Probability and Statistics › Random variables
Write . Then because for a standard normal. The mean gives and the covariance condition gives with its sign.
WATCH OUT FORFull solutionUsing only gives , so option (A) and option (B) both look possible. Option (B) has , which contradicts , and contradicts the covariance condition. Another slip is to write by confusing it with .
- Q.21MCQ · 1 markOfficial answer: A
Probability and Statistics › Continuous distributions
For an exponential variable with rate , the tail probability is . Set this equal to the given value and take natural logs to solve for .
WATCH OUT FORFull solutionUsing the mean as if it were the rate, or writing (the CDF) instead of . That gives and , which is not an option. Choosing by forgetting to divide by 2 is also common.
- Q.22MCQ · 1 markOfficial answer: A
Machine Learning › Neural networks
A perceptron update on a mistake always moves the score at that sample toward the correct side. For the score changes by . In general, the change in is .
WATCH OUT FORFull solutionAssuming one update must fix the misclassification, or confusing the increase with . The score increases by , but the new score may still be negative. Another slip is forgetting the bias update, which contributes the extra , or choosing (D), which wrongly asserts a margin condition on the old score.
- Q.23MCQ · 1 markOfficial answer: A
Data Structures and Algorithms › Python
list.extend(iterable)adds each element of the iterable to the end of the list, in place.list.append(x)addsxas a single element.WATCH OUT FORFull solutionChoosing
A.append(B). It looks like it joins the lists, but it nestsBas one element and gives[1, 2, 3, [4, 5, 6]]. - Q.24MSQ · 1 markOfficial answer: A, B, C
Calculus and Optimization › Limits & continuity
Sum, product and quotient rules need differentiability only at (with a non-zero denominator, guaranteed here because ). The chain rule for a composition needs the outer function to be differentiable at the inner function's value, which is not given.
WATCH OUT FORFull solutionAssuming a composition of differentiable-at- functions is differentiable at . The chain rule requires the outer function to be differentiable at (or ), not at . Another slip is forgetting that the range is what keeps the denominator of non-zero.
- Q.25MSQ · 1 markOfficial answer: B, D
Linear Algebra › Vector spaces
Orthonormal vectors always satisfy , so taking the inner product of any zero combination with forces . This gives linear independence. The converse is false, and an orthonormal basis can be rotated by any orthogonal matrix, so it is never unique.
WATCH OUT FORFull solutionTreating linear independence and orthonormality as equivalent (picking C), or assuming the standard basis is the only orthonormal basis of (picking A).
- Q.26MSQ · 1 markOfficial answer: C, D
Artificial Intelligence › Uncertainty
Variable elimination is an exact inference method that answers conditional-probability queries. Sampling methods such as rejection sampling and Gibbs sampling are approximate, because their estimates carry sampling error.
WATCH OUT FORFull solutionCalling variable elimination approximate because it looks like a computational shortcut. It is exact, and it is only the sampling methods (rejection, likelihood weighting, Gibbs) that are approximate. Another slip is to take Gibbs sampling as exact because it is guaranteed to converge in the limit.
- Q.27MSQ · 1 markOfficial answer: C
Data Structures and Algorithms › Sorting & hashing
Binary search needs sorted data and O(1) random access to the middle element. Only a sorted array provides both.
WATCH OUT FORFull solutionChoosing (D) because a sorted linked list needs only O(log n) comparisons. Reaching each middle node costs O(n) traversal in total, so the running time is O(n).
- Q.28MSQ · 1 markOfficial answer: A, B
A rank-one matrix with has eigenvalues and . Adding shifts these to and , so is positive definite, invertible and of full rank.
WATCH OUT FORFull solutionForgetting that is singular, with zero eigenvalues, and then assuming is also an eigenvalue of . The identity shifts every eigenvalue by . Another slip is to take the eigenvalues of as negative.
- Q.29MSQ · 1 markOfficial answer: A, C
Data Structures and Algorithms › Sorting & hashing
With adjacent swaps, insertion sort performs exactly one swap per inversion. Count the inversions in the array and set the total equal to .
WATCH OUT FORFull solutionCounting only the inversion that creates and forgetting that is already an inversion. That leads to wanting inversions with , which gives instead of and .
- Q.30MSQ · 1 markOfficial answer: B, D
Single linkage measures the distance between clusters by their closest pair (a minimum, DIS-2). Complete linkage measures it by their farthest pair (a maximum, DIS-1). Average linkage uses the mean of all pairwise distances.
WATCH OUT FORFull solutionMixing up the two names, for example reading "single" as "the single farthest point". Single linkage is the nearest-neighbour rule (min) and complete linkage is the farthest-neighbour rule (max).
- Q.31NAT · 1 markOfficial answer: 0.25
Probability and Statistics › Conditional & Bayes
The box is the hidden cause and the white ball is the evidence. Weight each box's chance of giving white by its prior, add these to get , then take Box-2's share of that total (Bayes' theorem).
WATCH OUT FORFull solutionUsing the prior directly, or leaving out the prior and comparing only the likelihoods . That gives . The unequal box probabilities must be included in both the numerator and the denominator.
- Q.32NAT · 1 markOfficial answer: 0.5
Calculus and Optimization › Limits & continuity
A difference of two large square-root terms () is resolved by multiplying by the conjugate, which turns it into a ratio whose limit can be read off after dividing by .
WATCH OUT FORFull solutionSubstituting and concluding the limit is . The neglected term is exactly the answer, since for large .
- Q.33NAT · 1 markOfficial answer: 3
Database Management and Warehousing › SQL
An uncorrelated subquery with an aggregate is evaluated once and gives a single value. Here that value is the SR Nagar maximum, 65000. The outer
>comparison against it is strict and applies to all branches.WATCH OUT FORFull solutionTwo slips are common. One is to count only SR Nagar rows in the outer query, which has no branch filter. The other is to count L19, whose amount equals the maximum, even though
>is strict. - Q.34NAT · 1 markOfficial answer: 0.285 to 0.287
With no intercept, least squares in one parameter gives , which is the projection of the vector onto the vector.
WATCH OUT FORFull solutionFitting a line with an intercept, , or using the mean-centred formula . The question fixes the model as , so no centring applies.
- Q.35NAT · 1 markOfficial answer: 0.39 to 0.41
Machine Learning › Logistic, k-NN, naive Bayes
The error probability of a Bayes classifier at a given is . Compute the posteriors by normalising the products of prior and likelihood, then take the smaller one.
WATCH OUT FORFull solutionUsing the likelihood (or the unnormalised value ) as the error probability. The likelihoods and the unnormalised posteriors do not sum to 1, so the evidence must be divided out.
- Q.36MCQ · 2 marksOfficial answer: B
Probability and Statistics › Random variables
A standardised normal has and , so . Equivalently, is chi-square with 1 degree of freedom, whose variance is .
WATCH OUT FORFull solutionTaking or treating like a variable with variance (option A). The fourth moment of a standard normal is 3, not 1, so .
- Q.37MCQ · 2 marksOfficial answer: D
For an ALWAYS-correct statement, test the extreme cases and to knock out the false options. Then prove the survivor in general. Here and squeeze the ranks together, because a product never has larger rank than either factor.
WATCH OUT FORFull solutionAssuming forces to be invertible (cancelling to get ) or to have a particular determinant or trace. Cancelling is illegal when is singular. The matrix and the matrix both satisfy the condition and give different invertibility, determinant and trace.
- Q.38MCQ · 2 marksOfficial answer: A
Linear Algebra › Special matrices
The matrix with entries is the Gram matrix . When the columns of are linearly independent, is invertible, so is symmetric positive definite and in particular invertible.
WATCH OUT FORFull solutionTreating "Gram matrix" as automatically singular, or mixing up positive semidefinite with positive definite. A Gram matrix is only semidefinite in general. It is singular exactly when the vectors are linearly dependent, and here they are independent.
- Q.39MCQ · 2 marksOfficial answer: C
Probability and Statistics › Continuous distributions
Turn the event on into an interval for , then subtract CDF values at the two ends: when has no point mass at .
WATCH OUT FORFull solutionUsing only (option D) and forgetting that also needs , so the lower tail must be subtracted.
- Q.40MCQ · 2 marksOfficial answer: A
Probability and Statistics › CLT & tests
A sum of i.i.d. Bernoulli() variables has mean and variance . The CLT lets you standardise with these and read the probability as a difference of standard normal CDF values.
WATCH OUT FORFull solutionUsing the Bernoulli variance instead of the variance of the sum . Another slip is forgetting to standardise, which gives option (D), or dividing by the variance 56.25 instead of the standard deviation 7.5.
- Q.41MCQ · 2 marksOfficial answer: A
Probability and Statistics › Continuous distributions
The floor of an exponential variable is geometric. , so the ratio is , where is the rate (the reciprocal of the mean).
WATCH OUT FORFull solutionTaking the stated mean as the rate or as itself (option D). The mean is , so and .
- Q.42MCQ · 2 marksOfficial answer: A
Machine Learning › Neural networks
Run the forward pass to see which ReLUs are active. Then apply the chain rule through the active path only. A ReLU with a negative pre-activation has slope 0 and outputs 0, so it blocks the gradient and contributes nothing to the next layer.
WATCH OUT FORFull solutionForgetting the ReLU slopes and taking or (the weight's value) instead of the bottom unit's output, which is . Another slip is to give or by leaving out the factor from the downstream weight.
- Q.43MCQ · 2 marksOfficial answer: C
Artificial Intelligence › Search
A MIN node stops searching its remaining children as soon as its running value drops to or below, where is the best value MAX has already secured from earlier siblings. Pruning therefore needs the first child to be .
WATCH OUT FORFull solutionComparing with the pruned leaf instead of with , which gives . Another slip is forgetting that in Tree-2 is , not , and writing or .
- Q.44MCQ · 2 marksOfficial answer: C
Artificial Intelligence › Search
A* orders the frontier by , not by alone and not by alone. Keep, for each node, the cheapest found so far, and discard a later path that is costlier.
WATCH OUT FORFull solutionExpanding before because is cheaper to reach ( against ). That ignores : is larger than . Another slip is expanding before . is reached early through , but its is larger than .
- Q.45MCQ · 2 marksOfficial answer: C
Probability and Statistics › Counting & axioms
For an "at least one" event over independent trials, use the complement: P(at least one) = 1 − P(none), and P(none) is the product of the per-trial "none" probabilities.
WATCH OUT FORFull solutionChoosing (D), which is the probability that no die shows a 1 (the complement), or trying to add probabilities such as 100 × 1/6, which overcounts outcomes where several dice show a 1.
- Q.46MCQ · 2 marksOfficial answer: D
Database Management and Warehousing › Data warehousing
CUBEover attributes is the union of all group-bys. When every combination of values is present, its size is , because each attribute is either kept (n_i values) or rolled up into NULL (1 extra).WATCH OUT FORFull solutionCounting only the finest grouping () as in a plain
GROUP BY. Another slip is to forget the grand-total row, or to write something instead of adding the four group-by sizes (6 + 3 + 2 + 1). - Q.47MCQ · 2 marksOfficial answer: B
Data Structures and Algorithms › Python
In a tuple assignment, every expression on the right is computed from the old values before any name is rebound. Trace the three sets pass by pass and re-test each
ifand thewhilecondition against the current sets.WATCH OUT FORFull solutionForgetting that the second
ifis tested against the already-updatedB. After pass 2's firstif,Bis {this}, so "that" is no longer in it and the second assignment is skipped. Another slip is updating the names one at a time instead of all together. - Q.48MSQ · 2 marksOfficial answer: A, C
Machine Learning › Neural networks
ReLU is continuous everywhere, but it has a corner at where the left slope is and the right slope is , so it is not differentiable there. It is positively homogeneous, so only for .
WATCH OUT FORFull solutionTreating ReLU as differentiable everywhere because it is piecewise linear, or assuming for every real . Negative flips the sign of the input and changes the output.
- Q.49MSQ · 2 marksOfficial answer: C, D
Calculus and Optimization › Maxima & minima
On a closed interval the absolute maximum and minimum are found by comparing the function at the critical points and at both endpoints. A local maximum or minimum is not automatically the absolute one. The derivative's own minimum comes from setting the second derivative to zero.
WATCH OUT FORFull solutionStopping at the critical points and and calling them the maximum and minimum, which gives (A) and (B). This ignores the endpoints and , where the function is actually largest and smallest.
- Q.50MSQ · 2 marksOfficial answer: A, B
Linear Algebra › Special matrices
A sum of over orthonormal vectors is the orthogonal projection onto their span. It is symmetric and idempotent, so its eigenvalues are 0 or 1. Being positive semidefinite, its singular values equal its eigenvalues.
WATCH OUT FORFull solutionAssuming the matrix is invertible or has determinant 1 because the vectors are orthonormal. That holds only when is built from a full set of 10 orthonormal vectors. With only 5 vectors in the rank is 5, so is singular and .
- Q.51MSQ · 2 marksOfficial answer: B, C, D
Calculus and Optimization › Maxima & minima
everywhere makes strictly increasing, so has at most one zero. That gives at most one stationary point, hence at most one local (and global) minimum. It does not guarantee that a minimum exists.
WATCH OUT FORFull solutionChoosing (A) because a convex function "looks like a bowl". Strict convexity gives uniqueness of a minimum if one exists, not existence. is strictly convex yet has no minimum.
- Q.52MSQ · 2 marksOfficial answer: A, D
Linear Algebra › Special matrices
for all forces (a symmetric matrix whose quadratic form vanishes for every is zero). So is orthogonal, hence invertible with . Eigenvalues of an orthogonal matrix have modulus 1 but can be complex.
WATCH OUT FORFull solutionChoosing (C) because orthogonal matrices have eigenvalues of absolute value 1. Over the reals they can be complex, as for a rotation with eigenvalues . Another slip is choosing (B) by reading the property as 'A leaves every vector unchanged'. It only says that lengths are preserved.
- Q.53MSQ · 2 marksOfficial answer: B, C
Machine Learning › LDA, SVM & trees
Write the four margin constraints. The point forces , which forces , so the smallest norm is at with . Support vectors are the points whose constraint holds with equality, and the margin width is .
WATCH OUT FORFull solutionCounting as a support vector because it is in Class-1, or taking the margin as instead of the full width . Another slip is trusting option (A) without checking feasibility at .
- Q.54MSQ · 2 marksOfficial answer: A, C
Probability and Statistics › Random variables
The sample proportion is the mean of independent Bernoulli() variables. Its mean is (unbiased), and its variance is , which shrinks as grows.
WATCH OUT FORFull solutionConfusing the mean of the average with the mean of the sum. , but dividing by gives , not . Another slip is forgetting that is squared in the variance, which gives instead of .
- Q.55MSQ · 2 marksOfficial answer: B, C
Machine Learning › LDA, SVM & trees
The nearest-mean classifier with squared Euclidean distance has a linear decision rule: the terms cancel in the difference, leaving a hyperplane boundary .
WATCH OUT FORFull solutionSeeing squared distances and concluding is quadratic in . The quadratic term is identical in both distances and cancels. Another slip is reading as green, when negative means red.
- Q.56MSQ · 2 marksOfficial answer: B, C
Database Management and Warehousing › Normal forms
A primary key is a candidate key and is automatically unique and NOT NULL. A foreign key column gives neither uniqueness nor non-nullness, so it is a candidate key only if something else makes it unique.
WATCH OUT FORFull solutionTreating the foreign key
Customer.aadhaaras a candidate key because it refers to a primary key. The reference makes values inCustomer.aadhaarmatch values inPerson, but it does not stop two customers from sharing a value. - Q.57MSQ · 2 marksOfficial answer: B, D
Database Management and Warehousing › Normal forms
Find candidate keys by computing attribute closures. Then check every non-trivial FD for a superkey on its left side to test BCNF. Any key not containing A must contain BC, since BC → A is the only way to derive A.
WATCH OUT FORFull solutionStopping at the key A and calling it the only candidate key, which misses that BC → A makes BC a key too. Another slip is treating E as a key because it determines D and G, when E+ = {E, D, G} does not include A, B, C or F.
- Q.58MSQ · 2 marksOfficial answer: A, C, D
Data Structures and Algorithms › Graph algorithms
In an unweighted graph a path is shortest only if no edge of the graph creates a shorter route between its end points. Each given shortest path therefore forbids every chord that would shorten it.
WATCH OUT FORFull solutionMarking as a non-edge because it looks like a chord. It creates the route of length 3, which only ties and does not shorten any of the three given shortest paths, so it is allowed. Also forgetting that comes from the third path, which is what rules out .
- Q.59NAT · 2 marksOfficial answer: 0
Calculus and Optimization › Limits & continuity
A bound of the form with forces to be constant, because the difference quotient is squeezed to and so the derivative is everywhere.
WATCH OUT FORFull solutionTreating as an arbitrary function and guessing a value such as from the right-hand side . That bound only says . It becomes only after splitting the interval into many small steps, or by showing the derivative is .
- Q.60NAT · 2 marksOfficial answer: 100
For centred data, the mean squared projection on a unit vector equals , the variance along . The direction of maximum variance (the first principal component) gives the largest eigenvalue of .
WATCH OUT FORFull solutionReading with the wrong index and taking or instead of . Another slip is to report the sum of all the eigenvalues, which is the total variance, not the variance along the single top direction.
- Q.61NAT · 2 marksOfficial answer: 66.6 to 66.7
Probability and Statistics › Discrete distributions
With replacement, every draw is an independent trial with the same success probability . So is Binomial and . Linearity of expectation gives this directly, without needing independence.
WATCH OUT FORFull solutionUsing , or counting black balls out of 10 instead of out of 15 (total balls). Another slip is treating the draws as without replacement, which does not change the expectation but is a wrong model for this question.
- Q.62NAT · 2 marksOfficial answer: 1
Database Management and Warehousing › Relational algebra
Division keeps the customers whose set of branches (after the join) contains every branch of the divisor. Build the joined (branch, customer) pairs, group them by customer, and compare each group with the full branch set.
WATCH OUT FORFull solutionTaking the divisor to be the branches of one particular customer, or counting the branch list with duplicates instead of as a set. Another slip is missing that Karteek reaches SR Nagar through L22 and Balanagar through L23, so he really does cover all four branches.
- Q.63NAT · 2 marksOfficial answer: 160
Data Structures and Algorithms › Python
Trace the recursion and watch the parity of the first argument. 15, 7, 3 and 1 are all odd, so each call just doubles the result of the next, down to the base case
f(0,b) = b. The answer is , where is the number of halvings from 15 to 0. Python 3's/makes the arguments floats, but7.0 % 2 == 1and0.0 == 0still behave as for integers.WATCH OUT FORFull solutionTaking the final line
b+f(a-1,b)as if it runs at every level, which gives a sum instead of a product. Another slip is to worry that the float arguments (7.0, and so on) break thea%2==1ora==0tests. They do not, because float values compare equal to the matching integers. - Q.64NAT · 2 marksOfficial answer: 24
Data Structures and Algorithms › Linear structures
Split the run into two phases. First, with , the stack fills with . Then with , each pass pops one element and also discards the next one whenever the popped value is odd. Note that the pass in which reaches 8 also performs the first pop, because the
flag equals 1test comes afterflagis set in the same pass.WATCH OUT FORFull solutionTreating the pass that sets
flag=1as a pure push pass and so skipping the pop of 8. That leaves 8 out of the sum and gives 16 instead of 24. Another slip is to forget that the second pop after an odd value discards the next element without adding it to the sum. - Q.65NAT · 2 marksOfficial answer: 75
Data Structures and Algorithms › Graph algorithms
With adjacency lists in decreasing order, DFS first runs straight down the even chain to 100, then discovers each odd vertex while backtracking, so the discovery order is fixed by 'always take the largest neighbour first'.
WATCH OUT FORFull solutionCounting only the even vertices 52 to 100 (25), or forgetting that the odd vertices below 50 (1 to 49) are also discovered after 50, because they are only reached during backtracking, long after the descent passed 50.