Buuretov A.i.

In front of Alyosha are 100 closed boxes, each containing either a red or a blue cube. Alyosha has one ruble on his account. He approaches any closed box, announces the color, and places any amount (it can be a non-integer number of kopecks, but not more than he has on his account at that moment). The box is opened, and Alyosha's account increases or decreases by the placed amount depending on whether the color was guessed correctly or not. The game continues until all the boxes are opened. What is the maximum amount Alyosha can guarantee on his account if he knows that

a) there is only one blue cube;

b) there are exactly $n$ blue cubes.

(Alyosha can also place 0, meaning he can open the box for free and see the color of the cube.)
a) Let $B_{m}$ denote the greatest "win" for Alexei in the case of $m$ boxes. Obviously, $B_{1}=2$.

If $m>1$, Alexei makes a bet on the color of the first box. Note that betting $x$ on red is the same as betting $-x$ on blue. Therefore, we can assume that Alexei always bets on blue, and $x \in [-1, 1]$.

If the first box contains a blue cube, Alexei's capital will become $1+x$, and at the end of the game, he can increase it to $(1+x) 2^{m-1}$. If the first box contains a red cube, Alexei's win will be $(1-x) B_{m-1}$. Thus,

$B_{m}=\max \{f(x) \mid x \in [-1,1]\}$, where $f(x)=\min \left\{(1+x) 2^{m-1},(1-x) B_{m-1}\right\}$. By plotting the graph, we see that $f(x)$ reaches its maximum at the point $x_{0}$ where

$\left(1+x_{0}\right) 2^{m-1}=\left(1-x_{0}\right) B_{m-1}$. Therefore, $B_{m}=\left(1+x_{0}\right) 2^{m-1}=\left(1-x_{0}\right) B_{m-1}$.

Setting $B_{m}=\frac{2^{m}}{P_{m}}$, we get $\left(1+x_{0}\right) P_{m}=2$, $\left(1-x_{0}\right) P_{m}=2 P_{m-1}$. Adding these equations, we have $P_{m}=1+P_{m-1}$. From this (since $P_{1}=1$),

$P_{m}=m$.

b) Let $B_{m, n}=\frac{2^{m}}{P_{m, n}}$ denote the greatest "win" for Alexei in the case of $m$ boxes and $n$ blue balls. Obviously, $B_{1,0}=B_{1,1}=2, B_{m, 0}=2^{m}$, so $P_{1,0}=P_{1,1}=P_{m, 0}=1$.

Reasoning similarly to part a), we first arrive at the system $B_{m, n}=\left(1+x_{0}\right) B_{m-1, n-1}=\left(1-x_{0}\right) B_{m-1, n}$, and then to the relation $P_{m, n}=P_{m-1, n-1}+P_{m-1, n}$.

This relation, obviously, allows us to uniquely reconstruct the numbers $P_{m, n}$ from the initial conditions given above. But these and the relation are also satisfied by the binomial coefficients $C_{m}^{n}$. Therefore, $P_{m, n}=C_{m}^{n}$.

## Answer

a) $\frac{2^{100}}{100}$
b) $\frac{2^{100}}{C_{100}^{m}}$ rubles.