# 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.

justaguide | Certified Educator

Micheal needs exactly 833 lollies for the ceremony. He can buy three kinds of lollies for the ceremony, which are "Smarties," "Jelly Beans," and "Jelly Snakes." 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, and packets of "Jelly Snakes" with 44 lollies for the price of 60 cents.

If he buys x number of packets of Smarties, y of Jelly Beans and z of Jelly Snakes, the total number of lollies is given by N = x*63 + y*91 + z*44. As he needs a total of 833 lollies,  x*63 + y*91 + z*44 = 833. The total price of the lollies is P = x*1.28 + y*0.81 + z*0.6. This has to be kept as low as possible.

Here, it is only possible to determine the values of x, y, and z that ensures the lowest value of P using trial and error. x, y, and z are non-negative whole numbers.

A packet of Jelly Beans has the largest number of lollies at 91. The largest value that y can be is 9 because if y = 10, the other variables, x and z, will have to be negative for the total number of lollipops to be 833.

x*63 + y*91 + z*44 = 833

=> x = (833 - 44z)/63

The value of (833 - 44z)/63 is not a positive whole number for any value of z.

Moving on to y = 1,

Now, x = (742 - 44z)/63

Trying different values of z, at z = 14 it is seen that x = 2

One solution of the equation x*63 + y*91 + z*44 = 833 is (2, 1, 14)

For y = 2,

x = (651 - 44z)/63

There is no positive whole number solution for x.

For y = 3,

x = (560 - 44z)/63

Here, for z = 7, x = 4

The solution of the equation x*63 + y*91 + z*44 = 833 is (4 , 3, 7).

For y = 4,

x = (469 - 44z)/63

There are no positive whole number values of x and z that satisfy this.

For y = 5,

x = (378-44z)/63

When z = 0, x = 6

This gives another solution of the equation x*63 + y*91 + z*44 = 833 as (6, 5, 0).

For y = 6,

x = (287-44z)/63

There are no positive whole number values of x and z that satisfy this.

For y = 7,

x = (196-44z)/63

There are no positive whole number values of x and z that satisfy this.

For y = 8,

x = (105-44z)/63

There are no positive whole number values of x and z that satisfy this.

For y = 9,

x = (14-44z)/63

There are no positive whole number values of x and z that satisfy this.

As all possible values of y have been covered, we see that the equation x*63 + y*91 + z*44 = 833 has three solutions (2, 1, 14), (4 , 3, 7), and (6, 5, 0).

The cost of buying lollies is P = x*1.28 + y*0.81 + z*0.6

For (2, 1, 14), P =11.77

For (4 , 3, 7), P = 11.75

Additionally, for (6, 5, 0), P = 11.73

Therefore, to buy the required 833 lollies at the lowest price, Micheal should buy 6 packets of  "Smarties" and 5 packets of "Jelly Beans."

embizze | Certified Educator

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

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

jake31609 | Student

But you can't have a negative amount of lollies.

manupazn | Student

embizze, integer can also mean negative numbers