8. Shortening. There is a sequence of 2015 digits. All digits were chosen randomly and independently from the set from 0 to 9. In the obtained sequence, the following operation is performed. If several identical digits occur consecutively, they are replaced by one such digit. For example, if there was a fragment ... $044566667 \ldots$, then it will become ... $04567 \ldots$.

a) (for 7th grade. 1 point). Find the probability that the sequence will be shortened by exactly one digit.

b) (for 8th grade. 1 point). Find the expected length of the new sequence.
Solution. The first digit does not change, and the transformation of each subsequent digit represents a Bernoulli trial. With a probability of 0.1, a digit disappears, and the sequence shortens by 1. We will consider this a success. With a probability of 0.9, the digit remains unchanged. This results in a series of 2014 independent and identical Bernoulli trials.

a) The probability that the sequence will shorten by one digit is equal to the probability of a single success:

$$
C_{2014}^{1} \cdot 0.1^{1} \cdot 0.9^{2013}=2014 \cdot 0.1 \cdot 0.9^{2013} \approx 1.564 \cdot 10^{-90}
$$

b) The expected number of successes is $2014 \cdot 0.1=201.4$. Therefore, the expected length of the new sequence is

$$
2015-201.4=1813.6 \text {. }
$$

Answer: a) approx. $1.564 \cdot 10^{-90} ;$ b) 1813.6 .