# Essay Paper

*English translation by SOTA – AI Community of the Indonesian original, [Ekshibisi_Essay_Final_AI.pdf](https://ioai.toki.id/assets/soal2025/Ekshibisi_Essay_Final_AI.pdf) (essay paper of the final of the OSN 2025 AI Exhibition). Figures are linked to the original; the star board in Problem 1 is also transcribed as a table. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

**Ekshibisi Kecerdasan Artifisial 2025** (Artificial Intelligence Exhibition 2025)<br>
Ekshibisi Kompetisi Kecerdasan Artifisial (Artificial Intelligence Competition Exhibition)

Prepared by: Tim Pembina International Olympiad in Artificial Intelligence (IOAI) (the IOAI coaching team)

17 May 2025

Name: ______________________________<br>
School: ______________________________

---

## 1. Problem Solving

Aoi has succeeded in designing two robots that are clever at logic games, named **ROBOBAR** and **ROBOKOL**. To test the logical intelligence of both, Aoi asks the two robots to play the following puzzle.

Aoi has a board of $6 \times 6$ squares. The board consists of 6 rows labelled 1, 2, 3, 4, 5 and 6, and 6 columns labelled A, B, C, D, E and F. There are also several stars placed on the board as follows.

*[Figure 1: see the original statement, page 2.]* ([PDF](https://ioai.toki.id/assets/soal2025/Ekshibisi_Essay_Final_AI.pdf))

Figure 1: The $6 \times 6$ board with the star positions. Transcription of the figure (★ = star):

|   | A | B | C | D | E | F |
|---|---|---|---|---|---|---|
| **1** |   |   | ★ |   | ★ |   |
| **2** |   | ★ |   | ★ |   |   |
| **3** | ★ |   |   |   | ★ |   |
| **4** |   | ★ |   | ★ |   | ★ |
| **5** |   |   | ★ |   |   |   |
| **6** | ★ |   |   | ★ |   | ★ |

Aoi has chosen exactly one of the stars in *secret*; it is called **Aoi's Star**. Aoi wants the two robots to find where Aoi's Star is. To help them, Aoi will give the following information separately (*in secret*):

- To **ROBOBAR**, Aoi reveals *which row* Aoi's Star is in.
- To **ROBOKOL**, Aoi reveals *which column* Aoi's Star is in.

After that, the following conversation takes place between the two robots, in order:

> **ROBOBAR:** “I do not know where Aoi's Star is.”<br>
> **ROBOKOL:** “I do not know where Aoi's Star is.”<br>
> **ROBOBAR:** “I do not know where Aoi's Star is.”<br>
> **ROBOKOL:** “I do not know where Aoi's Star is.”<br>
> **ROBOBAR:** “We could carry on this conversation forever (taking turns to say ‘I do not know where Aoi's Star is’), and neither of us could ever find out where Aoi's Star really is.”<br>
> **ROBOKOL:** “Now I know where Aoi's Star is.”

Assuming that both of Aoi's robots can think perfectly logically, in which square is Aoi's Star actually located? Explain!

*Note:* You will still receive partial marks even if in the end you do not manage to find exactly where Aoi's Star is, provided that you manage to eliminate some options that cannot be Aoi's Star.

---

## 2. Decision Plot

Below is the visualisation of a simple *rule-based classifier* with three classes (0, 1 and 2) based on two features $(x_1, x_2)$.

*[Figure: see the original statement, page 3.]* ([PDF](https://ioai.toki.id/assets/soal2025/Ekshibisi_Essay_Final_AI.pdf)) The plot is titled “Klasifikasi Sederhana (3 Kelas)” (Simple Classification (3 Classes)); its axes are x1 (horizontal, 0 to 10) and x2 (vertical, 0 to 10), and its legend shows Kelas 0, Kelas 1 and Kelas 2 (Class 0, Class 1 and Class 2).

### Questions

1. Determine the class of the data point located at the coordinates $(x_1 = 8, x_2 = 3)$.
2. Determine the value of $\mathbf{x_2}$ that acts as the separating boundary between class 1 and class 2 (format: two digits after the decimal point).
3. You are given the following list `data` of size $N = 8$ (values rounded to two decimal places):

   | $\mathbf{x_1}$ | $\mathbf{x_2}$ |
   |---|---|
   | 5.86 | 3.62 |
   | 0.53 | 6.51 |
   | 9.50 | 5.93 |
   | 5.69 | 7.46 |
   | 6.28 | 6.20 |
   | 2.53 | 1.52 |
   | 6.42 | 0.85 |
   | 9.29 | 4.36 |

   Determine:

   (a) The number of points in the data that fall into class 0.<br>
   (b) The number of points in the data that fall into class 1.<br>
   (c) The number of points in the data that fall into class 2.

4. If a point is chosen at random from the area $[0, 10] \times [0, 10]$, calculate the probability that the point lies in (format: two digits after the decimal point):

   (a) Class 0.<br>
   (b) Class 1.<br>
   (c) Class 2.

---

## 3. Squared Hinge Loss

The racing team *DeltaRacing* is analysing the **lateral deviation** of a car from the *racing line* at five corners.

*Lateral deviation* is the horizontal distance by which the car strays from the ideal line (racing line). A positive value means that the car is too far to the right, a negative value means that it is too far to the left, and a value of zero means that the car is exactly on the ideal line.

We call the deviation value (in metres) $x$ (negative = too far to the left, positive = too far to the right). The engineer assigns binary labels as follows:

$$
y = \begin{cases} +1, & \text{dangerous situation (deviation too large)},\\ -1, & \text{safe situation (small deviation)}. \end{cases}
$$

In short, **a dangerous situation can occur if the car is too far to the left *or* too far to the right**.

### Data

Use the following data:

| $\mathbf{x}$ | $\mathbf{y}$ |
|---|---|
| $-2.1$ | $+1$ |
| $-0.7$ | $-1$ |
| $+0.2$ | $-1$ |
| $+0.8$ | $-1$ |
| $+2.2$ | $+1$ |

### Notation and Definitions

One-dimensional linear model:

$$
f(x) = wx + b, \qquad w, b \in \mathbb{R},\ y \in \{-1, +1\}.
$$

Per-sample **squared hinge loss**:

$$
\ell_i(w, b) = \big(\max\{0,\, 1 - y_i f(x_i)\}\big)^2.
$$

Average loss over $n = 5$ data points:

$$
L(w, b) = \frac{1}{5} \sum_{i=1}^{5} \ell_i(w, b).
$$

**Gradient descent** update rule with learning rate $\eta$:

$$
w' = w - \eta \frac{\partial L}{\partial w}, \qquad b' = b - \eta \frac{\partial L}{\partial b}.
$$

### Questions

1. With $w = 0$ and $b = 0$, calculate the loss value $L(w, b)$ on the data above.
2. Derive $\dfrac{\partial L}{\partial w}$ and $\dfrac{\partial L}{\partial b}$ for the squared hinge loss on the model $f(x) = wx + b$. Explain the calculation.
3. Perform **one step** of *gradient descent* (with $\eta = 1$) from $w = 0$, $b = 0$. State the updated parameters $(w, b)$ and the loss value after the update.
4. The loss of the current model is still $> 0$. If the *gradient descent* steps are continued many times (still on the feature $x$), can $L = 0$ be reached? Explain your reasoning conceptually.
5. Now change the feature to $z = x^2$ and the model to $f(z) = wz + b$. Is it possible to reach $L = 0$? Explain your reasoning briefly.
6. **Iteration notation.** Use the notation $w^{(t)}$ and $b^{(t)}$ for the parameters *after* $t$ *gradient descent* updates (for example, $w^{(1)}$ is after one update).

   Starting from $w^{(0)} = 0$, $b^{(0)} = 0$ in the feature space $z = x^2$ as in question 5, and using $\eta = 1$, perform 2 iterations of *gradient descent* and calculate $(w^{(t)}, b^{(t)})$ as well as $L(w^{(t)}, b^{(t)})$ for $t = 1, 2$.

---

## 4. Probability

In the field of *Artificial Intelligence*, a model can predict the next word in a sentence based on probability patterns. The basic principle is the same as in probability theory: calculating the likelihood of an event based on previous data.

For example, if in many Indonesian sentences the word “saya” (“I”) is often followed by the word “makan” (“eat”), then the probability of “makan” appearing after “saya” will be higher than that of other words. This concept is similar to word-frequency statistics, which can be analysed with the rules of conditional probability (*conditional probability*).

An archaeologist has found a manuscript in an ancient language whose patterns are to be analysed with a model. The archaeologist also found that the occurrence of a word depends only on the previous word, and not on any earlier words. The archaeologist recorded the frequencies of word sequences as follows:

- The word **“lura”** is followed by:
  - “domi” in 48 sentences,
  - “salu” in 27 sentences,
  - “tano” in 25 sentences.
- The word **“kira”** is followed by:
  - “domi” in 42 sentences,
  - “raka” in 33 sentences,
  - “salu” in 25 sentences.

### Questions

1. In a manuscript, there is a sentence in which the first word is hidden and only the second word is visible.

   (a) If the second word is “domi”, what is the probability that the hidden first word is “lura”?<br>
   (b) If the second word is “salu”, what is the probability that the hidden first word is “kira”?

2. The archaeologist then randomly takes 10 sentences from the manuscript. It is known that each of these sentences has “domi” as its second word. What is the probability that exactly 6 of the sentences have “lura” as their first word?

---

## 5. Feature Extraction

In a *computer vision* experiment, each image is stored as a binary matrix of size $5 \times 5$, where the value “1” marks a white pixel and “0” marks the black background.

In the experiment, two images were chosen as reference images (*anchor*), namely $A_1$ and $A_2$. In addition, the experiment also has ten test images, $T_1, T_2, \ldots, T_{10}$, where each test image certainly comes from one of the anchor classes, $A_1$ or $A_2$. Note that the test images may have undergone rotation, shifting, or errors caused by *noise*.

You have been given the task by the lead researcher of designing simple numerical features from the matrices and using them to determine which anchor best matches each test image.

### Example of Simple Feature Extraction

A simple feature called **full column of ones** indicates that all five entries in that column have the value 1. Formally, the $j$-th column is called full if

$$
\sum_{i=1}^{5} M_{ij} = 5.
$$

Analogously, a **full row of zeros** can be computed using the formula

$$
\sum_{j=1}^{5} M_{ij} = 0.
$$

You are free to define other useful simple features, as long as they are computed directly from the entries of the matrix.

### Questions

1. For each test image $T_i$, decide whether it belongs to class $A_1$ or $A_2$.
2. List the features that you actually used when making your decision.
3. Write down your decision rule precisely, in a sentence or a short formula. Explain how the label $A_1$ or $A_2$ is chosen for each $T_i$, given the values of the features you have constructed.

### Anchors

$$
A_1 = \begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix}
\qquad
A_2 = \begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 1 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix}
$$

### Tests

**Test 1 Key: A1**

$$
T_{1} = \begin{bmatrix} 0 & 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 1 & 0 \end{bmatrix}
$$

**Test 2 Key: A1**

$$
T_{2} = \begin{bmatrix} 1 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 \end{bmatrix}
$$

**Test 3 Key: A1**

$$
T_{3} = \begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix}
$$

**Test 4 Key: A2**

$$
T_{4} = \begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 0 \\ 1 & 0 & 1 & 0 & 1 \\ 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix}
$$

**Test 5 Key: A2**

$$
T_{5} = \begin{bmatrix} 1 & 1 & 0 & 1 & 0 \\ 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 0 & 1 & 0 \end{bmatrix}
$$

**Test 6 Key: A2**

$$
T_{6} = \begin{bmatrix} 0 & 1 & 0 & 1 & 0 \\ 1 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \\ 1 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 1 & 0 \end{bmatrix}
$$

**Test 7 Key: A1**

$$
T_{7} = \begin{bmatrix} 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 \end{bmatrix}
$$

**Test 8 Key: A2**

$$
T_{8} = \begin{bmatrix} 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 \\ 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 1 & 0 \\ 1 & 1 & 1 & 1 & 1 \end{bmatrix}
$$

**Test 9 Key: A1**

$$
T_{9} = \begin{bmatrix} 1 & 0 & 1 & 0 & 1 \\ 1 & 1 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 \end{bmatrix}
$$

**Test 10 Key: A2**

$$
T_{10} = \begin{bmatrix} 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 0 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 0 & 0 \end{bmatrix}
$$

---

## 6. Confusion Matrix

> **Binary Classification Overview**
>
> In a binary classification problem, an AI model gives a score between 0 and 1 for each data point. This score indicates how likely it is that the data point belongs to the **positive** class (for example: a sick patient). To make a decision, we set a **threshold**. If threshold = 0.5, then data points with a score > 0.5 are classified as positive and the rest as negative. The choice of threshold must be adapted to the real-world context, especially when the data are imbalanced. The model is evaluated using the following metrics:
>
> **Confusion Matrix Structure**
>
> |  | **Predicted Positive** | **Predicted Negative** |
> |---|---|---|
> | **Actual Positive** | True Positive (TP) | False Negative (FN) |
> | **Actual Negative** | False Positive (FP) | True Negative (TN) |
>
> **Evaluation Metrics**
>
> - **Accuracy:** The proportion of correct predictions overall.
>
>   $$\text{Accuracy} = \frac{TP + TN}{TP + TN + FP + FN}$$
>
> - **Precision:** The proportion of positive predictions that are truly correct.
>
>   $$\text{Precision} = \frac{TP}{TP + FP}$$
>
> - **Recall (Sensitivity):** The ability of the model to recognise all the actual positive cases.
>
>   $$\text{Recall} = \frac{TP}{TP + FN}$$
>
> - **F1-score:** The harmonic mean of precision and recall. Useful when we want to balance the two metrics, precision and recall.
>
>   $$\text{F1} = 2 \times \frac{\text{Precision} \times \text{Recall}}{\text{Precision} + \text{Recall}}$$
>
> - **F1-macro:** The arithmetic mean of the F1 scores for each class individually in a multi-class classification task, giving equal weight to all classes.
>
>   $$\text{F1}_{\text{macro}} = \frac{F1_{\text{positive}} + F1_{\text{negative}}}{2}$$
>
> - **F1-micro:** Computes F1 globally from the total TP, FP and FN over all classes, so that it takes into account each class's contribution according to its amount of data.
>
>   $$\text{F1}_{\text{micro}} = \frac{2 \times TP_{\text{total}}}{2 \times TP_{\text{total}} + FP_{\text{total}} + FN_{\text{total}}}$$

### Question

A hospital is developing an **Artificial Intelligence** system to help doctors detect a rare but dangerous disease based on blood test results. This AI system gives an initial diagnosis with two possible outcomes:

- **Sick (Positive):** Indicated as having the disease.
- **Healthy (Negative):** Not indicated as having the disease.

This disease is very rare. Statistically, out of 1,000 patients examined:

- Only about **10 patients** actually have the disease.
- The other **990 patients** are healthy.

#### Challenges Faced

After initial testing of the AI system, two critical problems were found:

1. **Missed Diagnosis (Fatal):** Some patients who are actually *Sick* were diagnosed as *Healthy* by the AI system. This is very dangerous because the patients will not receive the treatment they need, so their disease may progress further.
2. **Wrong Diagnosis (Costly):** Conversely, there are also patients who are actually *Healthy* but were diagnosed as *Sick*. This error can cause emotional stress, high follow-up costs (for example, further tests such as a biopsy), and the risk of side effects from unnecessary treatment.

The hospital now needs a way to **measure the performance of the AI system fairly**, so that both types of error above are given balanced attention. Which evaluation metric is most appropriate for measuring the performance of this AI system so that both problems can be minimised? Explain your reasoning.

---

## 7. Matrices

Consider the following concepts and definitions related to matrices.

**Eigenvectors & Eigenvalues.** Suppose there is a square $n \times n$ matrix, denoted by $A$, and also a non-empty vector $\mathbf{v}$ of length $n$. If the following equation holds,

$$
A\mathbf{v} = \lambda \mathbf{v}\,,
$$

where $\lambda$ is a scalar, then $\mathbf{v}$ is called an **eigenvector** and $\lambda$ is called an **eigenvalue** of the matrix $A$. For example, for the following matrix:

$$
A = \begin{bmatrix} -6 & 3 \\ 4 & 5 \end{bmatrix}.
$$

There are two pairs of eigenvectors and eigenvalues of $A$, namely:

$$
\mathbf{v}_1 = \begin{bmatrix} 1 \\ 4 \end{bmatrix}, \quad \text{and} \quad \lambda_1 = 6\,,
$$

$$
\mathbf{v}_2 = \begin{bmatrix} -3 \\ 1 \end{bmatrix}, \quad \text{and} \quad \lambda_2 = -7\,.
$$

So the eigenvectors and eigenvalues of a matrix are not unique, i.e. there can be more than one pair. In Linear Algebra, the process of multiplying a matrix by a vector, such as $A\mathbf{v}$, is in fact called a **linear transformation**, i.e. “moving” the vector $\mathbf{v}$ into another vector space while preserving its linear structure. In the context of eigenvectors, an eigenvector is a vector which, when linearly transformed by the matrix $A$, **does not change direction** and only “lengthens” or “shortens”.

**Diagonal Matrix.** A square matrix $A$ is a diagonal matrix if its entries are 0 except on the main diagonal. Here are some examples of diagonal matrices:

$$
I = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}, \qquad
A = \begin{bmatrix} 6 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 3 \end{bmatrix}, \qquad
B = \begin{bmatrix} 1 & 0 & 0 & 0 \\ 0 & 9 & 0 & 0 \\ 0 & 0 & 3 & 0 \\ 0 & 0 & 0 & 5 \end{bmatrix}.
$$

**Matrix Diagonalisation.** A square matrix $A$ of size $n \times n$ is said to be “**diagonalisable**” if there exists an invertible matrix $P$ such that:

$$
A = PDP^{-1}\,,
$$

where $D$ is a diagonal matrix.

### Questions

**1.** Find the eigenvectors and eigenvalues of the matrix:

$$
\begin{bmatrix} 1 & 2 \\ 5 & 4 \end{bmatrix}.
$$

Hint:

$$
\begin{aligned}
A\mathbf{v} &= \lambda \mathbf{v} \\
A\mathbf{v} - \lambda \mathbf{v} &= 0 \\
(A - I\lambda)\mathbf{v} &= 0 \\
\text{Determinant}(A - I\lambda) &= 0
\end{aligned}
$$

**2.** Prove that if a $2 \times 2$ matrix $A$ can be diagonalised as:

$$
A = P.D.P^{-1} \quad \text{or, written out:}
$$

$$
\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}
=
\begin{bmatrix} p_{11} & p_{12} \\ p_{21} & p_{22} \end{bmatrix}
.
\begin{bmatrix} d_1 & 0 \\ 0 & d_2 \end{bmatrix}
.
\begin{bmatrix} p_{11} & p_{12} \\ p_{21} & p_{22} \end{bmatrix}^{-1},
$$

then the columns of the matrix $P$ are eigenvectors of the matrix $A$, and the diagonal values $d_1$ and $d_2$ are the corresponding eigenvalues.
