# Michael is in charge of organizing a drawing competition. How many packets of each kind does he have to buy? Find all solutions.The main part is, of course, the ceremony where he will announce the...

Michael is in charge of organizing a drawing competition. How many packets of each kind does he have to buy? Find all solutions.

The main part is, of course, the ceremony where he will announce the winners and give away prizes. Michael knows he needs exactly 833 lollies for the ceremony and the three most popular kinds of lollies are "Smarties", "Jelly Beans" and "Jelly Snakes". He has also learnt that he can buy packets of "Smarties" with 63 lollies for the price of \$1.28, packets of "Jelly Beans" with 91 lollies for the price of 81 cents snd packets of "Jelly Snakes" with 44 lollies for the price of 60 cents. Michael intends to buy precisely the amount he needs and to spend as little money as possible. How many packets of each kind does he have to buy? Find all solutions.

Asked on by tazzyd

### 3 Answers |Add Yours

Top Answer

embizze | High School Teacher | (Level 1) Educator Emeritus

Posted on

Let x be the number of packets of Smarties, y be the number of packets of Jelly Beans, and z the number of packets of Jelly Snakes.

We assume that he must buy integral numbers of packets (all whole numbers) that are non-negative. Then we must find solutions to:

`63x+91y+44z=833` and we want to minimize the cost C which is given by `C=1.28x+.81y+.60z`

`63x+91y+44z=833` is one equation with three unknowns, thus there are an infinite number of solutions. However, since we are restricted to nonnegative integers, we can find all of these solutions.

We will use a form of guess and check by assuming that we know the number of packets of Smarties that we will buy, and finding the number of possible packets for the others.

(1) If x=0, then `91y+44z=833 ==> z=(833-91y)/44` . If we plug in different values for y starting at 0, we find that z is always a fraction until y=10 when z becomes negative. Thus x=0 is not a possible part of the solution.

(2) If x=1 then `z=(770-91y)/44` (`< ==63+91y+44z=833 ` ) Again trying values for y starting at 0 we find no integer value for z.

(3) If x=2 then `z=(707-91y)/44` (`< == 126+91y+44z=833` ) Now we find that if y=1, then z=14. No other values for y work.

Our first possible solution is (x,y,z)=(2,1,14)

Proceeding in a like manner, we find that when x=4 we have y=3 and z=7. Also when x=6 we have y=5 and z=0.

Checking higher values for x we find no values that work until x=12, which forces z to be negative which is impossible.

---------------------------------------------------------------

The three possible solutions are (x,y,z)=(2,1,14),(4,3,7),and (6,5,0)

Computing the cost by plugging into C=1.28x+.81y+.60z yields:

`C_(2,1,14)=1.28(2)+.81(1)+.6(14)=11.77`

`C_(4,3,7)=1.28(4)+.81(3)+.6(7)=11.75`

`C_(6,5,0)=1.28(6)+.81(5)=11.73`

Thus the cheapest cost is to buy 6 Smarties and 5 Jelly Beans for 11.73

------------------------------------------------------------------

manupazn | Student, Grade 9 | (Level 1) eNoter

Posted on

embizze, integer can also mean negative numbers

We’ve answered 319,195 questions. We can answer yours, too.