An ice cream shop sells 3 flavored scoops: lime, vanilla, and strawberry. Each customer may choose to buy single, double, or triple scoops, and no one orders repeated flavor on the same cone.
For the single scoop, the lime flavor costs 1 dollar each, vanilla 1.5 dollars each, and strawberry 2 dollars each. For double scoops, each order will get a discount of 31 cents off for any combination. For example, the double scoops of lime and strawberry flavors will cost dollars. Finally, for the triple scoops of 3 flavors, it will be discounted to 3.79 dollars.
At the end of the day, 63 lime, 61 vanilla, and 56 strawberry scoops are sold, and the shopkeeper collects 249.75 dollars in total from customers for these sales.
How many customers bought the ice cream? Assume each ice cream is sold to a different person.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Relevant wiki: Linear Diophantine Equations
With normal pricing, the total money should equal to 1 ⋅ 6 3 + 1 . 5 ⋅ 6 1 + 2 ⋅ 5 6 = 2 6 6 . 5 0 dollars.
Therefore, the discount incurred = 2 6 6 . 5 0 − 2 4 9 . 7 5 = 1 6 . 7 5 dollars = 1 6 7 5 cents
Now let a be the number of double scoop orders and b be the number of the triple ones. We will find out how many people order the double and triple scoops by setting the equation as shown below:
3 1 a + 7 1 b = 1 6 7 5
By using Euclidian Algorithm, we will find values of a and b :
7 1 = 2 ⋅ 3 1 + 9
3 1 = 3 ⋅ 9 + 4
9 = 2 ⋅ 4 + 1
Then 1 = 9 − 2 ⋅ 4 = ( 7 1 − 2 ⋅ 3 1 ) − 2 ( 3 1 − 3 ⋅ 9 ) = 7 1 − 4 ⋅ 3 1 + 6 ( 7 1 − 2 ⋅ 3 1 ) = 7 ⋅ 7 1 − 1 6 ⋅ 3 1 .
Hence, 1 6 7 5 = 1 1 7 2 5 ⋅ 7 1 − 2 6 8 0 0 ⋅ 3 1 .
Thus, a 0 = − 2 6 8 0 0 and b 0 = 1 1 7 2 5 . And, g c d ( 3 1 , 7 1 ) = 1 .
According to Diophantine Equation Theorem , if there exists such initial integer a 0 , b 0 , then the general solutions can be written as:
a = a 0 + g c d ( 3 1 , 7 1 ) 7 1 n = − 2 6 8 0 0 + 7 1 n
b = b 0 − g c d ( 3 1 , 7 1 ) 3 1 n = 1 1 7 2 5 − 3 1 n
Since our desired solutions are positive integers, then n > 7 1 2 6 8 0 0 ≈ 3 7 7 . 4 6 and 3 1 1 1 7 2 5 ≈ 3 7 8 . 2 3 > n .
Thus, only n = 3 7 8 works. Then a = − 2 6 8 0 0 + 7 1 ⋅ 3 7 8 = 3 8 and b = 1 1 7 2 5 − 3 1 ⋅ 3 7 8 = 7 .
Therefore, there are 3 8 people ordering double scoops and 7 people ordering triple scoops.
Now let us consider the Venn's diagram below:
Let x be the single lime buyers, y be the single vanilla buyers, and z be the single strawberry buyers. On the other hand, let p be the lime & vanilla buyers, q be the vanilla & strawberry buyers, and r be the lime & strawberry buyers, and there are 7 triple buyers in the middle. Then the number each flavor will cover as followed:
6 3 = x + p + r + 7
6 1 = y + p + q + 7
5 6 = z + q + r + 7
Adding up all equations: 1 8 0 = ( x + y + z + p + q + r + 7 ) + ( p + q + r ) + 1 4 .
From the previous evaluation, we know that p + q + r = 3 8 double scoop buyers.
Thus, total customers = x + y + z + p + q + r + 7 = 1 8 0 − 3 8 − 1 4 = 1 2 8 .