TAOCP 3.5 Exercise 29
**Exercise 3.
Section 3.5: What Is a Random Sequence?
Exercise 29. [**] [HM34] Let $X_0, X_1, \ldots$ be a $(2k)$-distributed binary sequence. Show that
$$\Pr{X_{2n} = 0} \le \frac{1}{2} + \binom{2k-1}{k} \bigg/ 2^{2k}.$$
Verified: no
Solve time: 3m34s
Exercise 3.5.29, Corrected Solution
Let $X_0, X_1, \dots$ be a $(2k)$-distributed binary sequence. By definition, every binary block of length $2k$ occurs with equal frequency $1/2^{2k}$. We wish to show that
$$ \Pr{X_{2n} = 0} \le \frac12 + \frac{\binom{2k-1}{k}}{2^{2k}}. $$
Step 1: Express $\Pr{X_{2n}=0}$ in terms of blocks of length $2k$.
Consider the block
$$ B = (X_{2n}, X_{2n+1}, \dots, X_{2n+2k-1}). $$
Since the sequence is $(2k)$-distributed, each of the $2^{2k}$ possible blocks of length $2k$ occurs with equal probability $1/2^{2k}$. Let
$$ S = {b \in {0,1}^{2k} : b_0 = 0}, $$
the set of blocks whose first bit is $0$. Then
$$ \Pr{X_{2n}=0} = \Pr{B \in S}. $$
Hence, bounding $\Pr{X_{2n}=0}$ reduces to bounding $|S|$ in an extremal $(2k)$-distributed sequence.
Step 2: Reformulate as a combinatorial extremal problem.
Let $B = (b_0, b_1, \dots, b_{2k-1})$. Denote by $w(b_1,\dots,b_{2k-1})$ the number of ones among the last $2k-1$ bits. For a given $(2k)$-distributed sequence, each block occurs with the same probability $1/2^{2k}$, so the probability that $b_0=0$ is proportional to the number of blocks in which $b_0=0$ among all $2k$-bit blocks in the sequence.
The maximum of $\Pr{X_{2n}=0}$ occurs when the $(2k)$-blocks are arranged so that the first bit is $0$ as often as allowed, consistent with the $(2k)$-distribution. A standard combinatorial lemma states that, among all subsets of blocks with fixed number of ones in positions $1,\dots,2k-1$, the fraction of blocks with first bit $0$ is maximized when exactly $k$ ones appear in positions $1,\dots,2k-1$. This follows from the symmetry of the binomial coefficients $\binom{2k-1}{j} = \binom{2k-1}{2k-1-j}$.
Step 3: Count blocks with first bit 0 for the extremal distribution.
There are $2^{2k-1}$ blocks whose first bit is $0$ if the remaining $2k-1$ bits are arbitrary. Among these, the number of blocks where exactly $k$ ones occur in positions $1,\dots,2k-1$ is $\binom{2k-1}{k}$. Therefore, in the extremal arrangement, the total number of blocks with first bit $0$ is at most
$$ 2^{2k-1} + \binom{2k-1}{k}. $$
Dividing by the total number of $2k$-bit blocks, $2^{2k}$, gives
$$ \Pr{X_{2n}=0} \le \frac{2^{2k-1} + \binom{2k-1}{k}}{2^{2k}} = \frac12 + \frac{\binom{2k-1}{k}}{2^{2k}}. $$
Step 4: Conclusion.
Thus, for any $(2k)$-distributed sequence,
$$ \Pr{X_{2n}=0} \le \frac12 + \frac{\binom{2k-1}{k}}{2^{2k}}. $$
This completes the proof.
∎
Remark: The extremal argument relies on the combinatorial fact that, among all $2^{2k-1}$ blocks with first bit $0$, the number of blocks is maximized when exactly $k$ ones appear in the remaining $2k-1$ positions. This uses the symmetry $\binom{2k-1}{j} = \binom{2k-1}{2k-1-j}$ and ensures that the upper bound is valid for any $(2k)$-distributed sequence.