The problem in brief
The theory section of the 2025 Indian AI Olympiad (Stage 2) has three problems of 8 points each.
- Exam scores as random variables. A student's score and an AI assistant's score are correlated Gaussians, is a uniform adjustment and a discrete triangular bonus. You must reason about the distributions of their combinations.
- Debt resolution on a graph. A person in debt receives from each of their friends, which leaves them with . Solve a chain example, prove that chains and trees can always be cleared when the total is non-negative, and find a counterexample on complete graphs.
- Social-media response times. Model them with Gamma distributions: maximum-likelihood estimates, whether K-means suits the data, a Bayes classifier between two groups, and the meaning of the Gamma parameters.
How you are scored
Answers are typed into a form. Numeric answers must match the key (integers rounded down, decimals to two places), and justifications earn separate points; expressions are graded generously. No answer key is published, so all answers below are derived here and checked numerically in solution.py. Throughout we assume that and are independent of each other and of , and that is jointly Gaussian; the statement only says "correlated".
The key idea
- Problem 1: variances add over independent terms, with a correction for correlated ones; adding a discrete variable to a Gaussian gives a finite Gaussian mixture.
- Problem 2: total wealth is preserved by every donation. On trees, a leaf can be merged into its neighbour: induction on the number of nodes. On complete graphs, pairwise differences modulo are invariant, which blocks some configurations forever.
- Problem 3: a Bayes decision boundary is where . For Gamma densities this is linear in and in , so it is a straight line exactly when the shapes are equal.
The full solution
Problem 1: score distributions
Q1(a). The ideal family. With problems scoring (correct), (skipped) or (wrong), , where and count correct and wrong answers. If the problems are i.i.d. with probabilities , then , so is an affine function of a multinomial vector. It is discrete, bounded in , with mean and variance . With problems of unequal difficulty it becomes a sum of independent non-identical categorical variables (Poisson-multinomial type).
Q1(b). Is the Gaussian appropriate? As an approximation, yes, when is large and the probabilities are not extreme: is a sum of independent bounded terms, so the central limit theorem applies. But it is only an approximation: the true score is discrete and bounded, and it is skewed for very strong or very weak students (near the ceiling or the floor), where a Gaussian puts mass on impossible scores.
Q2(a). For jointly Gaussian , any linear combination is Gaussian:
Q2(b). Replace by and by , with unchanged. The standard deviations become and , so their product, and hence the covariance term, does not change. The variance of is unchanged if and only if
that is (no change) or (the two variances swap). It does not depend on , because the term is the same before and after.
Q2(c).
(23 in the integer format). The means play no role; a simulation of draws gives 23.23.
Q3(a). . The convolution of the Gaussian density with the uniform density on gives
a "smoothed box", with mean and variance (the uniform on an interval of length has variance ).
Q3(b). Increasing leaves the mean unchanged and increases the variance quadratically, by ; the density becomes flatter and wider.
Q3(c). . Write . The probabilities are for ; the two end points have weight 0, and the weights sum to 1. Conditioning on :
with mean and variance , because
Q3(d). It is a finite mixture of Gaussians: components with the same variance , means and triangular weights. It is a single Gaussian only in the degenerate case , where is constant.
Q3(e). By independence, (simulated: 4.326 against 4.333 for , ).
Q4. Final score with . Let and . Combining the two previous results, is a triangular mixture of "smoothed boxes":
with mean and variance .
Problem 2: debt resolution
A donation at (debt , friends) adds to and removes from each friend, so the total is invariant. A configuration with negative total can therefore never be cleared, which is why the statement requires total .
Q1. The chain (Anu, Ben, Cam, Dan, Eva), total . A breadth-first search over all legal sequences gives a shortest solution of 8 donations:
| donation at | Anu | Ben | Cam | Dan | Eva |
|---|---|---|---|---|---|
| start | 3 | -4 | -2 | 5 | -1 |
| Ben | -1 | 4 | -6 | 5 | -1 |
| Anu | 0 | 3 | -6 | 5 | -1 |
| Cam | 0 | -3 | 6 | -1 | -1 |
| Ben | -3 | 3 | 3 | -1 | -1 |
| Anu | 0 | 0 | 3 | -1 | -1 |
| Eva | 0 | 0 | 3 | -2 | 0 |
| Dan | 0 | 0 | 1 | 2 | -2 |
| Eva | 0 | 0 | 1 | 0 | 0 |
Q2 and Q3. Chains and trees. A chain is a tree, so we prove the tree statement; for a chain, "leaf" simply means "end node". The proof is by induction on , for any configuration with total .
Base case. For , the single value equals : nothing to do.
Inductive step. Take a leaf (it exists for ) with its unique neighbour , and let , again a tree, with nodes. In , give the merged value ; the total of is still .
Case A: . If , donate at : becomes and loses , so now and . By induction there is a finite sequence clearing . Replay it in :
- a donation at a node other than is identical in and (the leaf is not its friend);
- a donation at (debt , friends in ) becomes two moves in . First donate at , whose debt is also : gets , its -friends lose each, and goes to . Then donate at : returns to and loses . The result is , exactly as in , with .
So the replay keeps and ; when is cleared, all of is.
Case B: . Replay the sequence of as before; while never donates, stays equal to and . Two events can interrupt the replay.
- asks to donate. Do the same two moves as in case A ('s debt is now ). Afterwards : the new configuration of is not the planned one, but it still has total . We restart in case A, which terminates.
- The sequence of ends with but . Then donate at : its debt satisfies , so becomes , which is strictly smaller than . We restart case B with this smaller reserve.
The reserve is a non-negative integer that strictly decreases at each restart of the second kind, and a restart of the first kind leads to case A. So after finitely many rounds everything is debt-free.
solution.py implements exactly this recursive procedure and clears all debts on 3,000 random trees (up to 9 nodes, values in , total ).
Q4. A counterexample on . In the complete graph, every node is everyone's friend. A donation at with debt subtracts from every node and adds to . Hence every pairwise difference is invariant modulo . Take
The values are pairwise distinct modulo , and they stay so forever. A debt-free configuration with distinct residues has total at least , which is larger than . Since the total is preserved, the debts can never all be cleared, whatever the order of donations. An exhaustive search confirms that no sequence clears on , on , or on . The idea is the same as the "genus" of the graph in chip-firing: trees have none, complete graphs have cycles that create obstructions.
Problem 3: response times
Q1(a). Exponential case ().
the sample mean of the response times. It is a maximum, since .
Q1(b). Both parameters free. The log-likelihood is
Setting gives . Substituting into , i.e. , gives
where is the digamma function and the mean of . There is no closed form, but the left side decreases strictly from to , so there is a unique root (Newton's method; a good start is , with the right side). The right side is by Jensen's inequality. Then . On a simulated Gamma(2.5, 3) sample this recovers , .
Q2(a). Does vanilla K-means converge? Yes, to a local minimum (a fixed point) in a finite number of steps. Neither the assignment step nor the update step increases , and there are finitely many partitions, so with a fixed tie-breaking rule no partition repeats. The local minimum need not be global and depends on the initialisation (an empty cluster must be handled, for example by re-seeding it).
Q2(b). Should it be modified? Yes. Response times are positive and right-skewed, and the groups differ mainly in scale: GenX times are larger and more spread, since the variance grows with . Squared Euclidean distance assumes round clusters of similar spread, so the slow, dispersed group gets split while the fast groups merge. Reasonable fixes:
- log-transform the times (a scale change becomes a shift, and skewness drops), and standardise the two apps;
- use a Bregman divergence matched to the Gamma family. For a fixed shape this is the Itakura-Saito divergence , and the centroid is still the mean (Banerjee et al., 2005);
- or, best, fit a mixture of Gamma distributions with EM (soft assignments, a pair and a prior per group), which is exactly the model used in Q3.
Q3(a). Teen or GenX? Use the Bayes rule. Treat the two apps as independent given the group (the product form of the multivariate Gamma above), with log-density
Predict GenX when . The boundary is
where .
Q3(b). All shapes equal to 1. The terms vanish and the boundary is a straight line. Equal priors give one particular line; unequal priors only change the constant by , which yields a parallel line shifted towards the less likely group.
Q3(c). Equal priors, different shapes. The terms remain, so the boundary is curved (a level set of a sum of terms ). When the GenX group has both the larger shape and the larger rate (), each term is concave with a maximum at , and the GenX region becomes a bounded convex set enclosed by a closed curve.

Q4(a). Since the mean is and the variance , "much longer" WhatsApp replies for GenX mean . The natural reading is a larger scale (slower and more spread out), with comparable shapes; a larger would also raise the mean, but it would make the GenX times relatively more regular.
Q4(b). On Instagram, Teens are faster (smaller mean ) and more consistent. The coefficient of variation of a Gamma is , so more consistency means a larger shape , and a much smaller scale to bring the mean down to seconds or minutes. On WhatsApp the Teen distribution is closer to exponential (, coefficient of variation near 1, heavy right tail) with a large .
Results
| question | answer |
|---|---|
| P1 Q1 | multinomial (affine), Gaussian only as a large- approximation |
| P1 Q2 | ; unchanged iff , independent of ; |
| P1 Q3 | : Gaussian convolved with a uniform, variance ; : mixture of Gaussians, variance ; |
| P1 Q4 | triangular mixture of smoothed boxes, mean , variance |
| P2 Q1 | Ben, Anu, Cam, Ben, Anu, Eva, Dan, Eva (8 donations, final ) |
| P2 Q2-Q3 | induction by merging a leaf into its neighbour (verified on 3,000 random trees) |
| P2 Q4 | : residues mod are invariant |
| P3 Q1 | ; , |
| P3 Q2 | converges to a local minimum; modify (log scale, Itakura-Saito, or Gamma-mixture EM) |
| P3 Q3 | Bayes log-ratio boundary; linear when (priors shift it), curved otherwise |
| P3 Q4 | GenX on WhatsApp: larger ; Teens on Instagram: larger , much smaller |
What to remember
- Look for invariants first. Total wealth (always) and differences modulo (on ) instantly tell you what is impossible.
- Induction on trees: remove a leaf. Merging a leaf into its neighbour, and simulating each of the neighbour's moves with one extra move at the leaf, is a reusable proof template.
- Correlated sums need the covariance term, and rescaling two variances by and leaves their covariance unchanged.
- Discrete plus Gaussian gives a Gaussian mixture; uniform plus Gaussian gives a smoothed box. Means and variances simply add for independent terms.
- Match the algorithm to the data's geometry. Skewed, scale-driven data calls for log transforms, the right divergence or a generative mixture, rather than plain Euclidean K-means; the Bayes boundary between exponential families is linear in their sufficient statistics ( and for the Gamma).