Henry Ernest Dudeney/Puzzles and Curious Problems/27 - Buying Tobacco/Solution

by : $27$

 * Buying Tobacco
 * A box of $50$ cigarettes cost the same in shillings and pence as some tobacco bought in pence and shillings.
 * The change out of a $10 \shillings$ note was the same as the cost of the cigarettes.
 * What did the cigarettes cost?

Solution
The cigarettes cost $2 \shillings 5 \oldpence$, while the tobacco cost $5 \shillings 2 \oldpence$

Proof
Recall that $1 \shillings$ is worth $12 \oldpence$

Suppose the cigarettes cost $x \shillings y \oldpence$

Then the tobacco would cost $y \shillings x \oldpence$

In pence, the cigarettes cost $\paren {12 x + y} \oldpence$ while the tobacco cost $\paren {12 y + x} \oldpence$

We are given that:
 * $10 \times 12 - \paren {12 x + y} - \paren {12 y + x} = \paren {12 x + y}$

which can be rewritten as:
 * $25 x + 14 y = 120$

Taking $\bmod 5$, we have:
 * $14 y \equiv 0 \pmod 5$

which by Euclid's Lemma implies that $y$ is divisible by $5$.

$y \ne 0$ as $120$ is not divisible by $25$.

$y < 10$ as $14 y > 120$ otherwise.

Therefore $y = 5$, and $x = 2$ follows.