13. Salvo-control. The artillery system of a missile cruiser fires at a target. If the target is not hit, the system automatically makes a second shot at the same target. A third shot at this target is not made. The cruiser has 10 missiles on board. During exercises, it conducts firings at several targets under identical conditions. The probability of hitting with each single shot is $p$.

a) (from 8th grade, 2 points). If there are only five targets, what is the probability that exactly three unused missiles will remain after firing?

b) (from 9th grade, 3 points). Find the expected number of targets hit if there are nine targets in total.
Solution. a) Exactly three missiles will remain only in one case: the cruiser fired twice at two targets, and exactly three out of five targets were hit by the first salvo. Thus, the desired probability is that in 5 trials with a success probability of $p$, exactly 3 successes occur:

$$
C_{5}^{3} p^{3}(1-p)^{2}
$$

b) Let's imagine adding one more target. Then there are ten targets in total: nine real ones and one imaginary tenth target. The random variable $Y$ "the total number of targets hit out of all ten" then has the expected value $\mathrm{E} Y=10 p$, since the cruiser fires exactly ten times.

Let $I$ be a random variable defined as follows: $I=1$ if the cruiser destroys the tenth target, and $I=0$ if it does not. Then the random variable $X$ "the number of real targets hit" is equal to $Y-I$.

It remains to find $\mathrm{E} I$. The cruiser will hit the tenth target in the only case: exactly 9 missiles were used on 9 targets, and the tenth missile destroyed the imaginary target. The probability of this is $p^{10}$. Therefore, $\mathrm{E} I=0 \cdot\left(1-p^{10}\right)+1 \cdot p^{10}=p^{10}$.

Then $\mathrm{E} X=\mathrm{E} Y-\mathrm{E} I=10 p-p^{10}$.

Answer: a) $10 p^{3}(1-p)^{2}$; b) $10 p-p^{10}$.