# The Flower-Shop Intern: 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 2 of the school stage of the All-Russian School Olympiad (VsOSh) 2025/26 in artificial intelligence (region group III), grades 9–11. Answer and official solution.*

**Answer:** 2

**Solution.**

Denote by $E$ the mathematical expectation of the number of bouquets assembled correctly today.

The first order today is for roses with probability $q = \frac{2}{3}$ and for daisies with probability $p = \frac{1}{3}$. By the law of total probability for the expectation, we obtain the recurrence equation:

$$E = q \cdot (1 + E) \ + \ p \cdot 0.$$

Indeed, if roses were ordered (with probability $q$), Petya assembled one bouquet correctly and the process starts “from scratch” ($E$ more are still expected); if daisies were ordered (with probability $p$), he is fired at once and there will be no more correct bouquets.

We solve:

$$E = q + qE \implies E(1 - q) = q \implies E = \frac{q}{1 - q} = \frac{\frac{2}{3}}{\frac{1}{3}} = 2.$$
