# Four Decision Trees: Solution

*English translation by SOTA – AI Community of the Russian original. Organisers who would like this translation removed can email sota.ai.community@gmail.com.*

*Task 4 of the school stage of the All-Russian School Olympiad (VsOSh) 2025/26 in artificial intelligence (region group I), grades 9–11. Answer and official solution.*

**Answer:** $A = 0$, $B$ = square, $C = 3$

**Solution.**

Let us write all the trees using logical operations.

$$
\begin{aligned}
T_1 &: \ (B = \text{circle} \ \wedge\ C < 3) \ \vee\ (B \ne \text{circle} \ \wedge\ A = 0),\\
T_2 &: \ (B = \text{square} \ \wedge\ A = 0) \ \vee\ (B \ne \text{square} \ \wedge\ C \ge 4),\\
T_3 &: \ (A = 1 \ \wedge\ B \ne \text{triangle}) \ \vee\ (A = 0 \ \wedge\ C = 3),\\
T_4 &: \ (C \ge 2 \ \wedge\ B = \text{square}) \ \vee\ (C < 2 \ \wedge\ A = 1).
\end{aligned}
$$

**Step 1 (crossing $T_2$ with $T_4$).** If the right-hand alternative fired in $T_2$ ($B \ne \text{square} \wedge C \ge 4$), then in $T_4$, with $C \ge 4$, the left-hand one ($C \ge 2 \ \wedge\ B = \text{square}$) must fire — a contradiction. Hence only the left-hand alternative remains in $T_2$:

$$\boxed{B = \text{square}, \quad A = 0}.$$

Then in $T_4$, with $B = \text{square}$, the branch $C < 2$ is impossible (it requires $A = 1$); therefore

$$\boxed{C \ge 2}.$$

**Step 2 (fixing $C$ via $T_3$).** With $A = 0$, tree $T_3$ outputs 1 if and only if $C = 3$. Hence

$$\boxed{C = 3}.$$

**Step 3 (checking $T_1$ and $T_4$).** In $T_1$: $B = \text{square} \ne \text{circle}$ and $A = 0$ — the right-hand branch gives 1.<br>
In $T_4$: $C = 3 \ge 2$ and $B = \text{square}$ — the left-hand branch gives 1.

**Result and uniqueness.** The unique solution is:

$$\boxed{A = 0, \quad B = \text{square}, \quad C = 3}.$$

Uniqueness is guaranteed because (i) the pair $T_2 + T_4$ rigidly fixes $B = \text{square}, A = 0$; (ii) $T_3$ then rigidly fixes $C = 3$; (iii) after that, $T_1$ and $T_4$ are satisfied automatically.
