# Word problem with multiple variables

I have the following word problem:

Bob received 21 gifts in total for his birthday. He got video games, CDs, snack bars, and sudoku books. He received 3 times as many CDs as video games, and twice as many sudoku books as snack bars. How many of each gift did he receive?

The problem can easily be solved by testing numbers, but is there any formulaic way to do so?

EDIT: Question mark

## 2 Answers

You can set up 3 equations from the word problem.

$$V+C+A+U=21\\C=3V\\U=2A$$So we can say $$V+3V+A+2A=21\\4V+3A=21$$

From here, you cannot directly solve this without an additional piece of information, but you can guess and check how many sums of a multiple of 4 and a multiple of 3 equal 21. One such sum is, $12+9$. $$4(3)+3(3)=21\\9+3+3+6=21$$

Pile the CDs and video games together. The number of items in the pile must be a multiple if what? Pile the others together. The number must be a multiple of what? You can write a Diaphontine equation for this, adding to $21$ Now if you consider divisibility by $3$ you will be guided. There are two solutions (if you don't insist that he got at least one of each thing).

• We do also have that Bob definitely received all these items, though. No zeros. – Joffan Jan 14 '15 at 0:01
• @Joffan: Good point. I have edited in a comment to that effect. – Ross Millikan Jan 14 '15 at 4:31