Could someone elaborate more the formula of E(X)? I mean this was the formula for expected value:

E(000) = 1\cdot\frac{x_0}{x_0 + x_1 + x_2} + 2\cdot(\frac{x_1}{x_0 + x_1 + x_2}\cdot\frac{x_0}{x_0 + x_2} + \frac{x_2}{x_0 + x_1 + x_2}\cdot\frac{x_0}{x_0 + x_1}) + 3\cdot(\frac{x_1}{x_0 + x_1 + x_2}\cdot\frac{x_2}{x_0 + x_2}\cdot\frac{x_0}{x_0} + \frac{x_2}{x_0 + x_1 + x_2}\cdot\frac{x_1}{x_0 + x_1}\cdot\frac{x_0}{x_0})

How did this become the one in **subtask 1**? I don’t understand :\

The **initial** variant of the formula presented in subtask 1 was:

E(10010) = (\frac{x_0}{x_0 + x_2 + x_3})\cdot(1) + (\frac{x_2}{x_0 + x_2 + x_3})\cdot(1 + E(10110)) + (\frac{x_3}{x_0 + x_2 + x_3})\cdot(1 + E(11010))

I don’t understand why the two formulas are equal. When I try to use the latter with 000, I can’t receive the former.