Skip to main content

Challenge 478: The Faulty Computer

A hard logic puzzle about a guessing game!

You are playing a guessing game with a computer. It thinks of an integer from 1 to n, and you type in a sequence of yes/no questions about the number. After you have typed in your questions, it gives you yes/no answers to all of them. You then win the game if you can correctly identify the number.

Let N be the highest value of n such that you can always win the game with Q questions.

(a) Suppose the computer always tells the truth. If Q = 5, what is N?

Now suppose the computer will tell exactly one lie, i.e. for exactly one of your questions it will give the wrong yes/no answer.

(b) If Q = 3, explain why N = 2.

(c) If Q = 4, what is N?

(d) Something difficult to explore - if Q = 5, what is N?

Submit your solution

Please do send in your solution to this problem to weeklymaths@kcl.ac.uk You can scan or photograph your written work, or type your solutions. If this is your first weekly maths challenge solution, please include your year group and the name of the school you attend. We'll be happy to provide feedback on your solution, assuming that you are in year 11 or below. If you are older than this, we hope you enjoy trying the problems and reviewing your solutions against those we publish on the website.