A Handley student walks into a 7-11 store and selects four items to buy.
The clerk at the counter informs the student that the total cost of the four items is $7.11.
The student was completely surprised that the cost was the same as the name of the store.
The clerk informed the student that he simply multiplied the cost of each item and arrived at the total.
The customer calmly informed the clerk that the items should be added and not multiplied.
The clerk then added the items together and informed the customer that the total was still exactly $7.11.
What are the exact costs of each item?
Solution to the Problem:
The prices are: $1.20, $1.25, $1.50, and $3.16
Let's begin by representing the problem with a pair of equations.
x y z w = 7.11
x + y + z + w = 7.11
If x,y,z,w represent the amounts of the four items in cents then we have
x y z w = 711000000
x + y + z + w = 711
What can we say so far?
The factors : 711 = (1)(3)(3)(79)
If there is to be an exact solution then the product xyzw must be divisible by 3, 9, 79.
The exact sum of the 4 items is 7.11 so the cost of each item is less than $7.11.
SOLUTION #1 (exact solution)
Suppose the customer purchased four items worth $3.16, $1.50, $1.20, and $1.25,
then the total cost and the product would be exactly $7.11 .
SOLUTION #2 (rounds correctly)
Suppose the customer selected four items which cost $.79, $1.75, $2.00, $2.57.
The total cost is $7.11. However, the product is 7.10605.
The clerk rounds correctly and quotes the amount $7.11.
SOLUTION #3 (rounds correctly)
Suppose the customer selected four items which cost $2.00, $2.07, $2.29, $.75.
The total cost is $7.11. However, the product is 7.11045.
The clerk rounds correctly and quotes the amount $7.11.
----------------------------------------------------------------
Mikael Wetterholm sent in the following:
I wrote a simple BASIC-program and in ten seconds I had the answer on my screen: $1.2 $1.25
$1.5 $3.16.
CLS sum = 711 'sum in cent product = 711000000 'product in cent a = 100' I suggested that the cost of an item was greater than 100 cent PRINT "wait..." DO WHILE a < sum b = 100 a = a + 1 DO WHILE b < sum c = 100 b = b + 1 DO c = c + 1 d = sum - (a + b + c) IF a * b * c * d = product THEN GOTO final LOOP WHILE d > 100 LOOP LOOP END final: a = a / 100 'convert to dollar b = b / 100 c = c / 100 d = d / 100 SOUND 1000, 10 PRINT "$"; a; "$"; b; "$"; c; "$"; d; END
Dave Smith also wrote a computer program to solve the problem.
Correctly solved by:
1. Jeffrey Gaither | Winchester, Virginia |
2. Richard Johnson | La Jolla, California |
3. James Alarie | University of Michigan -- Flint Flint, Michigan |
4. Mikael Wetterholm | Danderyd, Sweden |
5. Dave Smith | Toledo, Ohio |
6. Bella Patel | Harrisonburg, Virginia |
7. Helna Patel | Harrisonburg, Virginia |
8. Andrew Oliver | Winchester, Virginia |
9. Chris Maggiolo | Harrisonburg, Virginia |