books and pens totally $2008

Nekkamath

New member
Joined
Nov 19, 2007
Messages
42
Gordan buys pens for $3 each and books for $5 each, totally exactly $2008. What is the largest number of items (pens plus books) he could have bought?

I worked the problem logically.
I divided 2008 by 5 to come up with a number that would leave the remainder divisible by 3. So I got 398 x $5 = 1990. 2008 - 1990 = 18. 18/3=6.

So 398 books at $5 each plus 6 pens at $3 each equals $2008. I don't know if there is another breakdown or if I should try to get more pens because they are cheaper.
 
Nekkamath said:
Gordan buys pens for $3 each and books for $5 each, totally exactly $2008. What is the largest number of items (pens plus books) he could have bought?
Try using variables:

. . . . .number of pens: p
. . . . .number of books: b

. . . . .cost of pens: 3p
. . . . .cost of books: 5b

. . . . .total cost: 3p + 5b = 2008

Solving for one of the variables (the choice is arbitrary), we get:

. . . . .p = (2008 - 5b) / 3

We want the sum, p + b, to be maximized, under the condition that b and p be whole numbers.

. . . . .b + p = b + (2008 - 5b) / 3 = (3b + 2008 - 5b) / 3 = (2008 - 2b) / 3

Clearly, this number will be largest when b is smallest. So find the least value of b such that 2008 - 2b is a multiple of 3! :D

Nekkamath said:
So 398 books at $5 each plus 6 pens at $3 each equals $2008.
This gives you 398 + 6 = 404 items. You can do better! :wink:

Eliz.
 
Gordan buys pens for $3 each and books for $5 each, totally exactly $2008. What is the largest number of items (pens plus books) he could have bought?

We need to solve
1--3p + 5b = 2008
2--Dividing through by the lowest coefficient yields p + 1b + 2b/3 = 669 + 1/3
3--(2b - 1)/3 must be an integer as does (4b - 2)/3
4--Dividing by 3 again yields b + b/3 - 2/3
5--((b - 2)/3 must be an integer k making b =3k + 2
6--Substituting back into (1) yields p = 666 - 5k
7--k.....0.....1.....2.....3.....4...
...p....666...661...656...651...646...
...b.....2.....5.....8....11....14...
Sum.....668...666...664..662....660...


Looks like 2 books and 666 pens for 668 items.
 
Top