The problem in brief
This is the written paper of the 2025 Indonesian IOAI selection exhibition round. It has seven independent exercises, in Indonesian: a logic puzzle (two robots locating a star on a 6 by 6 board), reading a rule-based decision plot, gradient descent on the squared hinge loss, bigram probabilities, hand-made features for 5 by 5 binary images, choosing a metric for a rare disease, and eigenvectors with diagonalisation. Every answer below is derived from scratch and checked numerically by solution.py. No official answer key is published. Exercise 5 prints a "Key" label for each test image, and we compare our rule with it.
How you are scored
The paper is marked by hand, exercise by exercise, with partial credit for correct reasoning. Exercise 1 explicitly gives partial credit for eliminating some of the stars, even without the final answer. No points table or pass mark is published.
The full solution
1. The two robots and Aoi's star
The stars sit at C1, E1, B2, D2, A3, E3, B4, D4, F4, C5, A6, D6, F6. ROBOBAR knows the row, ROBOKOL knows the column, and each line of the dialogue is public, so both robots (and we) can delete candidates as they go.
The rule for "I don't know": a robot that knows the row would know the star if its row contained a single remaining candidate. So "I don't know" from ROBOBAR deletes every candidate that is alone in its row, and the same from ROBOKOL deletes every candidate alone in its column.
- ROBOBAR, "I don't know". Row 5 has a single star, so C5 goes.
- ROBOKOL, "I don't know". Column C now holds only C1, so C1 goes.
- ROBOBAR, "I don't know". Row 1 now holds only E1, so E1 goes.
- ROBOKOL, "I don't know". Column E now holds only E3, so E3 goes.
That leaves B2, D2, A3, B4, D4, F4, A6, D6, F6.
- ROBOBAR, "we could go on forever". Imagine the dialogue going on. Row 3 now has only A3, so a further "I don't know" would delete it. Then column A has only A6, which goes next. After that, no row or column holds a single candidate any more. The stuck set, where the conversation really would go on forever, is therefore . ROBOBAR can only claim "forever" if every candidate in his row lies in . Row 6 contains A6, which would eventually be found. If his row were 3, he would already know. So his row is 2 or 4, and the candidates become B2, D2, B4, D4, F4.
- ROBOKOL, "now I know". Column B holds B2 and B4, and column D holds D2 and D4, so in either case he could not decide. Column F holds only F4.
Aoi's star is F4.

The pattern to remember: each public statement of ignorance is information. The "forever" statement is a statement about a fixed point of the elimination process, so you have to run that process to its end.
2. Decision plot
Measuring the figure's pixels (the colour changes fall exactly on the grid lines at 2, 6 and 8) gives these rules:
- if : class 0 when , class 2 otherwise;
- if : class 0 when , class 1 when , class 2 when .
-
has and , so it is class 1.
-
Classes 1 and 2 are separated by (for ).
-
Applying the rules to the 8 points: , , , and are class 0. and are class 1. is class 2. So (a) 5, (b) 2, (c) 1. Watch : , but it falls in the blue strip under .
-
For a uniform point, probability is area divided by 100:
- class 0 covers , so 0.56;
- class 1 covers , so 0.16;
- class 2 covers , so 0.28.
They add up to 1, as they must.
3. Squared hinge loss
With and margin deficit , the loss is .
Q1. At , every , so .
Q2. Where , and . Where , the term is flat. At the kink both one-sided derivatives of are 0, so the squared hinge is differentiable everywhere. That is its advantage over the plain hinge. Hence:
Q3. At the origin, all . We have and , so
and one step with gives , . The new margins are , so . The loss went up: is too large for this problem. A second step gives , and if you keep going, the iterates diverge.
Q4. No. would need and but . A linear evaluated at , which lies between and , is a convex combination of the two end values, so it is at least 1. Contradiction. The dangerous cars are on both sides of the safe ones, so no single threshold on separates them. The best achievable loss, with a small learning rate, is about . Gradient descent can at best converge to that minimum, never to 0.
Q5. Yes. With , the dangerous points have and the safe ones . These are separated by a threshold, with room for margin 1. For example, and give for every point. Squaring the feature turned a two-sided rule ("too far left OR too far right") into a one-sided one.
Q6. On , with :
- : , so and . This gives , and . The two dangerous points now have margin above 1, but the safe ones are pushed to the wrong side.
- : only the three safe points still contribute. and . This gives , and : every point now has . For instance gives , and gives .

4. Probability (bigrams)
Both first words were seen in 100 sentences, so they are equally likely a priori, and Bayes reduces to a ratio of counts.
- (a) . (b) .
- The 10 sentences are independent, and each has first word "lura" with probability , so the count is binomial:
5. Feature extraction
is a pattern of stripes (columns all 1 or all 0). is a checkerboard. Allowed distortions are rotation, shift and noise. A rotation by 90 degrees turns vertical stripes into horizontal ones and leaves a checkerboard unchanged. A one-pixel shift swaps the phase. So each class is a small family of perfect patterns: 4 stripe patterns (vertical or horizontal, 2 phases each) and 2 checkerboards.
Features (Q2).
- is the smallest number of pixels that differ from one of the 4 perfect stripe patterns.
- is the same count for the 2 checkerboards.
Both are computed directly from the entries, e.g. . They generalise the statement's example feature "full column of ones": a perfect has because its columns are uniform.
| image | nearest pattern | rule | printed key | ||
|---|---|---|---|---|---|
| T1 | 0 | 10 | A1 | A1 | A1 |
| T2 | 0 | 10 | A1 | A1 | A1 |
| T3 | 4 | 6 | A1 | A1 | A1 |
| T4 | 6 | 4 | A2 | A2 | A2 |
| T5 | 7 | 5 | A2 | A2 | A2 |
| T6 | 10 | 0 | A2 | A2 | A2 |
| T7 | 3 | 11 | A1 | A1 | A1 |
| T8 | 6 | 12 | A1 | A2 | A2 |
| T9 | 2 | 8 | A1 | A1 | A1 |
| T10 | 6 | 12 | A1 | A2 | A2 |
Decision rule (Q1 and Q3). The natural rule, "pick the class whose nearest perfect pattern is closer", reproduces 8 of the 10 printed keys. T8 and T10 disagree with the key: both are 6 flips from horizontal stripes but 12 from any checkerboard, so the stated generation process (rotation + shift + noise) makes A1 the more plausible origin. The single rule that reproduces all ten printed keys is
meaning: call it stripes only if at most 4 of the 25 pixels (16 %) break a stripe pattern. Because the threshold 4 was read off the keys themselves, we present it as the rule consistent with the answer sheet, and the nearest-pattern rule as the more principled one. T3 is worth a look: it is with rows 2 and 4 painted white. Painting the same rows white on gives exactly the same image, so T3 is ambiguous by construction. Only noise counts (4 versus 6 flips) favour A1.
6. Confusion matrix: choosing the metric
With 10 sick patients out of 1000, a system that always answers "healthy" scores 99 % accuracy while missing every patient, so accuracy is useless here. The two errors map onto two metrics:
- a missed diagnosis is a false negative, which lowers recall ;
- a false alarm is a false positive, which lowers precision .
To weigh both in a balanced way, use the F1-score of the positive (sick) class:
The second form shows the point: F1 counts FP and FN symmetrically and ignores the 990 true negatives that make accuracy look good. The harmonic mean is high only if both precision and recall are high. F1-micro is not the right choice: in binary classification it equals accuracy. F1-macro is not either: it averages in the F1 of the healthy class, which is close to 1 for any model and hides the failures. In practice you would also choose the decision threshold on a validation set, and use with if the hospital later decides that misses are worse than false alarms.
7. Matrices
Q1. For :
- : the first row of gives , so (any nonzero multiple). Check: .
- : , so . Check: .
Q2. Suppose with and invertible. Multiply on the right by : . Write by columns. The -th column of is . The -th column of is times the -th column of , that is . Hence
Since is invertible, its columns are nonzero (a zero column would make ). So each is an eigenvector of with eigenvalue . In coordinates, the first column reads and , and the same holds for the second column. With the example of Q1: and satisfy .
Results
| exercise | answer |
|---|---|
| 1. Logic | the star is at F4 |
| 2. Decision plot | class 1; boundary ; counts 5 / 2 / 1; probabilities 0.56 / 0.16 / 0.28 |
| 3. Squared hinge | ; step to with ; impossible on (best 0.960); possible on ; with , then with |
| 4. Probability | ; ; |
| 5. Features | nearest-pattern rule: 8 of 10 printed keys (T8, T10 differ); rule matches all 10 |
| 6. Metric | F1-score of the positive class |
| 7. Matrices | with , with ; proof via |
What to remember
- Statements of ignorance carry information, and "forever" means "in the fixed point of the elimination". Run the process to the end before reasoning about it.
- A feature map can make a problem linearly separable. On , the two-sided rule "too far left or too far right" defeats any linear model. On , one threshold is enough, and that is the idea behind kernels.
- Gradient descent is not guaranteed to decrease the loss. With , the very first step increased it. Always check the loss after a step.
- On rare classes, use F1 (or precision and recall), not accuracy. F1 equals : it treats both errors alike and ignores the many easy negatives.
- Hand-made features should encode the invariances you are told about (here rotation and shift). When a rule is tuned to match a given answer key, say so, and keep the principled version next to it.