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?
To transmit messages by telegraph, each letter of the Russian alphabet () ( and are counted as identical) is represented as a five-digit combination of zeros and ones corresponding to the binary number of the given letter in the alphabet (letter numbering starts from zero). For example, the letter is represented in the form 00000, letter -00001, letter -10111, letter -11111. Transmission of the five-digit combination is made via a cable containing five wires. Each bit is transmitted on a separate wire. When you receive a message, Cryptos has confused the wires, so instead of the transmitted word, a set of letters is received. Find the word you sent.
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.