Maths Olympiad Prep

Track / Stage 7 / 117 of 300 #2157 of 2604

Problem 2157

National Olympiad second round; IMO P1/P4
Combinatorics Difficulty 7.2 Prove it Iranian Mathematical Olympiad · Iran

Let n,kn, k be positive integers such that n≥kn \ge k. Find the maximum number of binary sequences of length nn such that by fixing any arbitrary kk bits, the achieved sequences do not produce all binary sequences of length kk. For example if k=1k = 1, we can only have one sequence, otherwise they will differ in at least one bit which means that fixing that bit produces all binary sequences of length 1.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Let the answer be f(n,k)f(n,k). We will prove by induction on n+kn+k that
f(n,k)=∑i=0k−1(ni). f(n,k) = \sum_{i=0}^{k-1} \binom{n}{i}.
Case n=k=1n=k=1 is obvious.

Assume that SS is the maximum set of the desired sequences and let TT be the set of all binary sequences of length n−1n-1. Define the sets A,B,CA, B, C as follows:
A={a∈T∣there exists b∈S with b=0a‾, but there is no c∈S with c=1a‾}B={a∈T∣there exists b∈S with b=1a‾, but there is no c∈S with c=0a‾}C={a∈T∣there exists b,c∈S with b=0a‾,c=1a‾}. \begin{align*} A &= \{a \in T \mid \text{there exists } b \in S \text{ with } b = \overline{0a}, \text{ but there is no } c \in S \text{ with } c = \overline{1a}\} \\ B &= \{a \in T \mid \text{there exists } b \in S \text{ with } b = \overline{1a}, \text{ but there is no } c \in S \text{ with } c = \overline{0a}\} \\ C &= \{a \in T \mid \text{there exists } b, c \in S \text{ with } b = \overline{0a}, c = \overline{1a}\}. \end{align*}
Clearly, f(n,k)=∣A∣+∣B∣+2∣C∣f(n,k) = |A| + |B| + 2|C|. Because we can't choose kk bits from the last n−1n-1 bits of the sequences that produce all the binary sequences of length kk, we have ∣A∣+∣B∣+∣C∣≤f(n−1,k)|A| + |B| + |C| \le f(n-1,k). Now consider the set CC. If ∣C∣≥f(n−1,k−1)|C| \ge f(n-1,k-1), we can fix k−1k-1 bits from the last n−1n-1 bits to produce all sequences of length k−1k-1. So because of the definition of CC, by fixing these k−1k-1 bits and the first bit, all sequences of length kk are produced, which is a contradiction. So we have
f(n,k)=∣A∣+∣B∣+2∣C∣≤f(n−1,k)+f(n−1,k−1). f(n,k) = |A| + |B| + 2|C| \le f(n-1,k) + f(n-1,k-1).
By induction and using Pascal's identity we get
f(n,k)≤∑i=0k−1(n−1i)+∑i=0k−2(n−1i)=1+∑i=1k−1(n−1i)+∑i=0k−2(n−1i)=1+∑i=1k−1((n−1i)+(n−1i−1))=(n0)+∑i=1k−1(ni)=∑i=0k−1(ni). \begin{align*} f(n,k) &\le \sum_{i=0}^{k-1} \binom{n-1}{i} + \sum_{i=0}^{k-2} \binom{n-1}{i} \\ &= 1 + \sum_{i=1}^{k-1} \binom{n-1}{i} + \sum_{i=0}^{k-2} \binom{n-1}{i} \\ &= 1 + \sum_{i=1}^{k-1} \left( \binom{n-1}{i} + \binom{n-1}{i-1} \right) \\ &= \binom{n}{0} + \sum_{i=1}^{k-1} \binom{n}{i} = \sum_{i=0}^{k-1} \binom{n}{i}. \end{align*}
For the equality example, simply choose all binary sequences with at most k−1k-1 zeros. This way, by fixing any kk bits, the sequence with kk zeros will never be produced and we're done. ■

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.