Question 150
Let $n, k$ be positive integers with $n \gt k$. There are two people, A and B:
1. A first secretly writes an $n$-digit 0-1 sequence on a slip of paper, and writes on the blackboard all 0-1 sequences of length $n$ that differ from this sequence in exactly $k$ positions. For example, if $n=3, k=1$ and the sequence on the slip is 101, then A must write 001, 111 and 100 on the blackboard.
2. Next, B looks at all the sequences on the blackboard and tries to guess the sequence on the slip. Each time he may guess an $n$-digit 0-1 sequence, and A must answer truthfully whether the guess is correct.
For each pair $(n, k)$, find the smallest positive integer $m$ such that B has a guessing strategy that guarantees guessing the correct answer within $m$ guesses.
1. A first secretly writes an $n$-digit 0-1 sequence on a slip of paper, and writes on the blackboard all 0-1 sequences of length $n$ that differ from this sequence in exactly $k$ positions. For example, if $n=3, k=1$ and the sequence on the slip is 101, then A must write 001, 111 and 100 on the blackboard.
2. Next, B looks at all the sequences on the blackboard and tries to guess the sequence on the slip. Each time he may guess an $n$-digit 0-1 sequence, and A must answer truthfully whether the guess is correct.
For each pair $(n, k)$, find the smallest positive integer $m$ such that B has a guessing strategy that guarantees guessing the correct answer within $m$ guesses.