Here's the problem. I just don't know how to approach it. If the 'one error tolerance' were removed, then this would be a simple binomial distribution problem. But now I can't figure it out.
In the game of n-bit Binary Lottery players try to correctly guess a randomly selected sequence of n zeros and ones. Players purchase lottery tickets, and for each ticket purchased, the player can select an n-bit sequence of zeros and ones. Then a sequence of n zeros and ones is selected at random. A prize is awarded to each player whose ticket is either an exact match of the randomly selected one, or differs from the randomly selected sequence in only one place. For example in 4-bit Binary Lottery, if the randomly selected sequence is 0100 then the following tickets win prizes: 0100 (the randomly selected sequence itself) as well as 1100, 0000, 0110, and 0101 (the four sequences obtained by changing the randomly selected sequence in one place).
(a) In terms of n, what is the smallest number of tickets you need to purchase in n-bit Binary Lottery in order to guarantee that you match the randomly selected sequence exactly.
(b) In terms of n, how many different winning tickets are there in n-bit Binary Lottery?
(c) What is the smallest number of tickets you need to purchase to guarantee that you win in 4-bit binary lottery? Justify your answer.
(d) What is the smallest number of tickets you need to purchase to guarantee that you win in 5-bit binary lottery? Justify your answer.