Thursday, 23 October 2025

Exercise (1.4).6

Assume there are one hundred pence in the pound (£). Using just 5p (£0.05) and 10p (£0.10) pieces, how many of each do you need in order to pay a parking meter charge of £3.10.


We encode the problem as followed with $f$ being the number of 5p coins and $t$ the 10p coins

$$ 5f + 10t = 310 $$


The $gcd(5,10)=5$ divides 310, so the equation has integer solutions.

In fact, by inspection we can see 310 is a multiple of 10, so 31 10p coins is a solution. 


Let's find other solutions. We already have one solution $f_0 = 0, t_0 = 31$. The general solution is

$$ f = 0 + \frac{10}{5}n = 2n, \quad t = 31 - \frac{5}{5}n = 31-n$$

for any integer $n$.

So need $f$ and $t$ to be non-negative, which gives us the following inequalities

$$ 2n \ge 0 $$

$$ 31 - n \ge 0$$

That is

$$ 0 \leq n \leq 31 $$

This creates 32 different solutions.

nf=2nt=31-n5f+10t




0031310
1230310
2429310
3628310
4827310
51026310
61225310
71424310
81623310
91822310
102021310
112220310
122419310
132618310
142817310
153016310
163215310
173414310
183613310
193812310
204011310
214210310
22449310
23468310
24487310
25506310
26525310
27544310
28563310
29582310
30601310
31620310