Browse · MathNet
Print66th Czech and Slovak Mathematical Olympiad
Czech Republic counting and probability
Problem
To a sequence of zeros and ones, we assign the number of maximal contiguous runs of equal digits in it. (For instance, sequence has four such runs: , , , and .) For a given we sum up all the numbers assigned to all such sequences. Prove that the resulting sum is equal to
Solution
Consider one such sequence and let us count (from left to right) how many maximal contiguous runs (from now on, just runs) it contains. We count a new run when it ends, that is when we hit a different digit or the right end. The number of runs is thus one more than the number of digits that follow a different digit (we say that the run changes at these positions). Instead of counting runs in different sequences, let us count sequences that change run at a given position.
There are possible positions to change the run (all the positions but the first one). There are two options for the digit at this position and this uniquely determines the digit at the preceding position. All the remaining positions can be arbitrarily filled with remaining zeros and ones. Altogether, we get changes of runs in all the sequences. Since in each of the sequences there is one more run than there are changes, in total we obtain where we used an obvious identity
There are possible positions to change the run (all the positions but the first one). There are two options for the digit at this position and this uniquely determines the digit at the preceding position. All the remaining positions can be arbitrarily filled with remaining zeros and ones. Altogether, we get changes of runs in all the sequences. Since in each of the sequences there is one more run than there are changes, in total we obtain where we used an obvious identity
Final answer
(n + 1) * C(2n, n)
Techniques
Counting two waysAlgebraic properties of binomial coefficients