Weekly Problem 48 - 2009
Suppose Dan gives Ann $x$ £$2$ coins and Ann gives Dan
$y$ £$5$ coins. Then Dan has £$(18-2x+5y)$
and Ann has £$(40-5y+2x)$.
We need $18-2x+5y=40-5y+2x\Rightarrow 10y-4x=22\Rightarrow
5y-2x=11$. The solution to this equation which minimises $x+y$ is
$x=2$, $y=3$, so the smallest number of coins that must change
hands is $5$.