Problems

Age
Difficulty
Found: 3

Ramanujan thinks of a number between \(1\) and \(1000\) (inclusive). Hardy is only allowed to ask questions to which Ramanujan can answer yes or no (and he always tells the truth).

Can Hardy always figure out Ramanujan’s number after asking \(10\) questions?

Suppose you have 127 1p coins. How can you distribute them among 7 coin pouches such that you can give out any amount from 1p to 127p without opening the coin pouches?

When we write \(137\) in decimal, we mean \(1 \times 10^2 + 3 \times 10 + 7 \times 1\). If we write using powers of \(2\) instead of powers of \(10\), we have \(137 = 1 \times 2^7 + 0 \times 2^6 + 0 \times 2^5 + 0 \times 2^4 + 1 \times 2^3 + 0 \times 2^2 + 0 \times 2^1 + 1 \times 2^0\). This is called its binary representation. To tell apart binary representation from decimals, we can use the following notation: \(137 = (10001001)_2\).

What is the number \(273\) in binary? In the next few problems, we will see that using the binary representation of a number is a very useful tool to finding whether a particular Nim game is a winning position or a losing position.