## Le Monde puzzle [#934] Another Le Monde mathematical puzzle with no R code:

Given a collection of 2€ coins and 5€ bills that sum up to 120€, find the number of 5€ bills such that the collection cannot be divided into 5 even parts.

Indeed, as soon as one starts formalising the problem, it falls apart: if there are a 5€ bills and b 2€ coins, we have 5a+2b=120, hence 2b=120-5a=5(24-a), meaning that b must be a multiple of 5, b=5b’ and a must be even, a=2a’, with b’=12-a’.  Hence, 10 possible values for both pairs (a’,b’) and (a,b), since a>0 and b>0. If these 120 Euros can be evenly divided between 5 persons, each gets 24€. Now, 24€ can be decomposed in 5€ bills and 2€ coins in three ways:

24=2×2+4×5=7×2+2×5=12×2+0x5. Each of the five persons using any of the 3 above decompositions means there exist integers α, β, and γ such that

α(2×2+4×5)+β(12×2)+γ(7×2+2×5)=(2α+12β+7γ)x2+(4α+2γ)x5=bx2+ax5

with α+β+γ=5; therefore a=4α+2γ and b=2α+12β+7γ, which implies 2α+γ=a’ and 2α+12β+87γ=5×12-5a’=2α+5×12-12α-12γ+7γ, or 5a’=10α+5γ. That is, 2α+γ=a’ again… If a’=11, there is no solution with α+γ≤5, and this is the only such case. For any other value of a’, there is a way to divide the 120€ in 5 even parts. As often, I wonder at the point of the puzzle if this is the answer or at its phrasing if I have misunderstood the question.

Just to check the above by R means, I still wrote a short R code

```for (a in 1:11){
# find integer solutions to 2x+y=a
sum=0;z=-1
while ((z<a)&(z<6)&(sum<2)){
z=z+1;x=trunc((a-z)/2);y=5-x-z
sum=(2*a==4*x+2*z)+(5*(11-a)==x+11*y+6*z)}
print(c(2*a,5*(11-a),x,y,z))
}
```

which returned

```  2 50  0  4  1
  4 45  1  4  0
  6 40  1  3  1
  8 35  2  3  0
 10 30  2  2  1
 12 25  3  2  0
 14 20  3  1  1
 16 15  4  1  0
 18 10  4  0  1
 20  5  5  0  0
 22  0  5 -1  1
```

meaning that a’=11 does not produce a viable solution.

This site uses Akismet to reduce spam. Learn how your comment data is processed.