8.4. Three pirates divided the diamonds they had obtained during the day in the evening: twelve each for Bill and Sam, and the rest went to John, who couldn't count. At night, Bill stole one diamond from Sam, Sam stole one from John, and John stole one from Bill. As a result, the average weight of Bill's diamonds decreased by one carat, Sam's decreased by two carats, and John's increased by four carats. How many diamonds did John get?
Answer: 9 diamonds.

Solution. The first method (arithmetic). Note that the number of diamonds each pirate has did not change overnight. Since Bill has 12 diamonds, and their average weight decreased by 1 carat, the total weight of his diamonds decreased by 12 carats. Similarly, Sam also has 12 diamonds, and their average weight decreased by 2 carats, so the total weight of his diamonds decreased by 24 carats. Since the total weight of the diamonds of Bill and Sam decreased by 36 carats, the total weight of John's diamonds increased by the same 36 carats. Since the average weight of John's diamonds increased by 4 carats, he had $36: 4=9$ diamonds.

The second method (algebraic). Let John have $x$ diamonds. Let the average weight of the diamonds that Bill received be denoted by $b$, Sam's by $s$, and John's by $d$. Then the total weight of the diamonds that Bill had was $12 b$, Sam's was $-12 s$, and John's was $-x d$.

In the morning, the number of diamonds each had did not change, but the average weight of the diamonds became: for Bill - $(b-1)$, for Sam - $(s-2)$, for John - $(d+4)$. The total weight of the diamonds became: for Bill $12(b-1)$, for Sam $-12(s-2)$, for John $-x(d+4)$. Since the total weight of the diamonds of the three pirates did not change, we have $12 b+12 s+x d=12(b-1)+12(s-2)+x(d+4)$. Expanding the brackets and combining like terms, we get: $4 x-36=0$, so $x=9$.

## Grading criteria:

+ a complete and well-reasoned solution is provided

$\pm$ a generally correct solution is provided, but an arithmetic error is made

干 the equation is correctly set up, but not solved or solved incorrectly

干 the correct answer is obtained from a specific example

- only the answer is provided
- the problem is not solved or solved incorrectly