Problema Solution
Carl needs to buy exactly 100 pieces of candy and only spend $9.00 The following is the cost of the candy:
Jawbreakers 2 for .5 cents
Lollipops .10 cents each
Chocolate bars .20 cents each
How many pieces of each candy does Carl need to buy?
Answer provided by our tutors
let
2x = the number of Jawbreakers since they are sold in a pair, x>0
y = the number of lollipops, y>0
z = the number of chocolate bars, z>0
2x + y + z = 100 => x<=50, y <= 100, z<=100
he can only spend $9 = 900 cents
0.5*x + 0.10*y + 0.20*z = 900
since x<=50, y <= 100, z<=100 we have
0.5*x + 0.10*y + 0.20*z <= 0.5*50 + 0.10*100 + 0.20*100 = 55 < 900
thus the system
2x + y + z = 100
0.5*x + 0.10*y + 0.20*z = 900
where x, y and z are non-negative integers has no solutions
Carl can not buy 100 candies and spend $9.