Jump to content
BrainDen.com - Brain Teasers
  • 0

7-11 store, 4 items to buy


Guest
 Share

Question

I did not write this. In fact, I haven't figured out the solution yet as I just read the question and thought it was a good one. See if anyone wants to race me to the answer. Did a search, don't think it's here. Here's the question:

In a "seven-eleven" (7-11) store, a customer selected four items to buy. The check-out clerk says that he multiplied the costs of the items and obtained exactly $7.11, the very name of the store! The customer calmly tells the clerk that the costs of the items should be added, not multiplied. The clerk then informs the customer that the correct total is also $7.11. What are the exact costs of the 4 items?

Reasoning is welcome as I am certainly not going to find the elegant solution. I see some brute force in my future.

Edit to add a dollar sign and italics

Edited by ChuckJerry
Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
In a "seven-eleven" (7-11) store, a customer selected four items to buy. The check-out clerk says that he multiplied the costs of the items and obtained exactly $7.11, the very name of the store! The customer calmly tells the clerk that the costs of the items should be added, not multiplied. The clerk then informs the customer that the correct total is also $7.11. What are the exact costs of the 4 items?

I'm not yet convinced there is a solution to this, but if there is, something needs to be made clearer.

When multiplying the values of the items, it must be clear that you are multiplying decimal dollars, and not whole number cents. In other words, if there are two items that cost .20 and .30, the multiplied total would be .06, not 6.00.

The reason this must be true is that the number 711 is factorable by 3^2*79, and there is no solution by that method.

Link to comment
Share on other sites

  • 0

Cost of the 4 items are 2.41, 2.37, 1.50 and 0.83.

These four numbers have a sum of exactly 7.11

These four numbers have a product of 7.1110665, which would round to 7.11 to the nearest hundreth.

I'm not certain, but I believe that there is no 4 numbers that will work exactly. I'm working on a proof of it, and will post that when I'm done or when I find a real solution without a rounding situation.

Link to comment
Share on other sites

  • 0

The prices all must be whole numbers when multiplied by 100...

So 100a * 100b * 100c * 100d = 711000000

where 100a etc are all whole numbers.

the prime factors of 711000000 are

79, 3, 3, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2

Then I wrote some code to put those in 4 bins....eventually it spit out the answer. The code was quite easy to write (recursive depth first search).


#include <iostream>

using namespace std;

int values[15] = {79,5,5,5,5,5,5,3,3,2,2,2,2,2,2};
int num = 15;
int numbers[4] = {1,1,1,1};

int rec(int);

int done = 0;
int i;

int _tmain(int argc, _TCHAR* argv[])
{
rec(0);
system("pause");
return 0;
}

int rec(int in)
{
if (in == 15)//all prime factors placed
{
int sum = 0;
for(i = 0; i < 4; i++) sum += numbers[i];
if (sum == 711)
{
done = 1;
cout << "answer!" << endl;
for(int i = 0; i < 4; i++)
cout << numbers[i] << endl;
}
return 0;
}
else
{
for(int i = 0; i < 4; i++)
{
numbers[i] *= values[in];
if (numbers[i] < 711)
{
rec(in+1);
if (done) return 0;
}
numbers[i] /= values[in];
if (in == i) return 0;//some shortcutting (79 only in the first bin, etc)
}
}
return 0;
}
#include "stdafx.h"

Link to comment
Share on other sites

  • 0

Well, 711 e-kudos to Event Horizon as well as an anonymous user who also got the answer. I don't think I ever would have found that solution. I was trying to add and subtract pennies and nickels from 2.37 and 0.79 and so forth.

After googling this problem
http://geeki.wordpress.com/2008/01/04/7-11-riddle/
home.att.net/~numericana/answer/recreational.htm#7-11
and looking at the solutions found by the smart people here, it seems as if a program is the only real feasible solution, the logic in the second page is possible, I guess, but doesn't really seem feasible. Maybe I'm wrong.

The system is no help:

a+b+c+d=7.11
abcd=7.11

Too many variables, not enough equations.

Anyway, thanks for reading and for giving it a shot if you happened to.

Link to comment
Share on other sites

  • 0

The prices all must be whole numbers when multiplied by 100...

So 100a * 100b * 100c * 100d = 711000000

where 100a etc are all whole numbers.

the prime factors of 711000000 are

79, 3, 3, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2

Then I wrote some code to put those in 4 bins....eventually it spit out the answer. The code was quite easy to write (recursive depth first search).


#include <iostream>

using namespace std;

int values[15] = {79,5,5,5,5,5,5,3,3,2,2,2,2,2,2};
int num = 15;
int numbers[4] = {1,1,1,1};

int rec(int);

int done = 0;
int i;

int _tmain(int argc, _TCHAR* argv[])
{
rec(0);
system("pause");
return 0;
}

int rec(int in)
{
if (in == 15)//all prime factors placed
{
int sum = 0;
for(i = 0; i < 4; i++) sum += numbers[i];
if (sum == 711)
{
done = 1;
cout << "answer!" << endl;
for(int i = 0; i < 4; i++)
cout << numbers[i] << endl;
}
return 0;
}
else
{
for(int i = 0; i < 4; i++)
{
numbers[i] *= values[in];
if (numbers[i] < 711)
{
rec(in+1);
if (done) return 0;
}
numbers[i] /= values[in];
if (in == i) return 0;//some shortcutting (79 only in the first bin, etc)
}
}
return 0;
}
#include "stdafx.h"

Very nicely done, EventHorizon. I wasn't sure if this could come out exact (I figured the multiplication would involve rounding), but I guess it can... and being a Computer Science major, I can always appreciate a good program to take the load off of your brain ;)

Link to comment
Share on other sites

  • 0

The prices all must be whole numbers when multiplied by 100...

So 100a * 100b * 100c * 100d = 711000000

where 100a etc are all whole numbers.

the prime factors of 711000000 are

79, 3, 3, 5, 5, 5, 5, 5, 5, 2, 2, 2, 2, 2, 2

Then I wrote some code to put those in 4 bins....eventually it spit out the answer. The code was quite easy to write (recursive depth first search).


#include <iostream>

using namespace std;

int values[15] = {79,5,5,5,5,5,5,3,3,2,2,2,2,2,2};
int num = 15;
int numbers[4] = {1,1,1,1};

int rec(int);

int done = 0;
int i;

int _tmain(int argc, _TCHAR* argv[])
{
rec(0);
system("pause");
return 0;
}

int rec(int in)
{
if (in == 15)//all prime factors placed
{
int sum = 0;
for(i = 0; i < 4; i++) sum += numbers[i];
if (sum == 711)
{
done = 1;
cout << "answer!" << endl;
for(int i = 0; i < 4; i++)
cout << numbers[i] << endl;
}
return 0;
}
else
{
for(int i = 0; i < 4; i++)
{
numbers[i] *= values[in];
if (numbers[i] < 711)
{
rec(in+1);
if (done) return 0;
}
numbers[i] /= values[in];
if (in == i) return 0;//some shortcutting (79 only in the first bin, etc)
}
}
return 0;
}
#include "stdafx.h"

Yeah EventHorizon, really well done! Too bad I can't think of a way to do this with a written formula (I'm guessing there is none, but would love to be wrong). Programming is not my forte. Though I was forced to take a course in Java, I forcefully forgot it all the second I handed in the final ;)

Link to comment
Share on other sites

  • 0

I had seen this brainteaser back in 2003 and  was able to solve it with a little deductive reasoning. The reason I am posting this now is because this teaser had recently come back up again with a few friends.

My first deduction came when I looked at the prime roots of 711 , which were 3,3,and 79. I realized that one of the solution numbers had to be a whole multiple of .79 because any non-whole multiple of .79 could not satisfy the multiplicative side of the answer (eg leaving a long tail decimal). My second deduction came when thinking of combinations of numbers that would add to a number ending with 1, while not trying to spin the multiplicative side of the answer out of control.  Well, 5 and 6 add to 11 and multiple to 30, ending in ZERO, which is just what I wanted to see. 

At this point, I was all-in that one number ended in 6, another number ended in 5, and the other two numbers ending in zero.  After that it was just a little plug and chugging. The whole multiples of .79 that end in the 6 or 5 are 3.95 or 3.16, as there are no whole number multiples of .79 ending in zero.  After testing 3.95 for possible solutions starting with 1.20 (as a possible solution number and testing for the other 2), it became quite evident 3.95 was too big of a number and that I was not going to find three numbers that added to 3.21 (7.11-3.95) and multipled to 1.8 (7.11/3.95). 

At this point, I turned my attention to 3.16 and started goal testing at 1.75, lowering my test number by increments of .05 each time. To my much delight, when I got down and tested 1.50, boom a hit and answer.   3.16, 1.50, 1.25, 1.20

Charlie O

 

 

Link to comment
Share on other sites

  • 0
Spoiler

You can optimize by grouping the prime factors. One price (at least) will have the factor 5*5 and the same for 2*2.

79 may not be multiplied by a large number, but it did not bring me very far, so I consulted internet:

https://groups.google.com/g/rec.puzzles/c/Sfeu4Ge3xVc

(Ctrl-F) "79 must be multiplied by 4" is a starting point, but why not by 3?

"This leaves only a few combinations" would need some more clarification, too.

 

&EventHorizon

Edited by harey
Link to comment
Share on other sites

  • 0

Just saw your post harey.

Spoiler

The person who posted this solution in your link said they copied it from "INGENIOUS
Mathematical Problems and Methods" by L.A. Graham, published by Dover
Publications, Inc., New York, 1959.

 

Converting the $7.11 to 711 cents, we are left with a massive
Diophantine problem of finding four factors of 711,000,000 that add up to
711. In order to produce the six zeros in the final product, the result of
any individual multiplication must end in zero. Since the other two figures
could not furnish more than 5 zeros, the first figure of such a product
then not being 2 or 5, and since the unit digits must add up to 1; the only
possibilities are 0, 0, 0, 1 or 0, 0, 5, 6. The factors of 711,000 are
(2)^6, (3)^2, (5)^6, and (79), and in order to fulfill the above conditions
79 must be multiplied by 4, since if multiplied by 5, the four factors
would have to add up to more than 711, because even if the other three
factors could be equal, which gives the smallest sum, they would add up to
more than 711 minus 395. This derives from the general relation that the
factors of a number add up to the least amount when they are equal. We
therefore know that one factor is 316 and the other three factors which end
in 5, 0, and 0 respectively add up to 395. Since the cube root of the
remaining product is 131, none of the three factors can depart much from
this average. This leaves only a few combinations to try before arriving at
the figures of 120, 125, and 150.
Therefore, the costs of the four items were $3.16, $1.50, $1.25, and
$1.20 which when added together total $7.11 and when multiplied together
total $7.11 also.

 

 

(Ctrl-F) "79 must be multiplied by 4" is a starting point, but why not by 3?

79 x 3 = 237.  A one's digit of 7 can't work with the two possibilities of 0,0,0,1 and 0,0,5,6 determined beforehand.

 


"This leaves only a few combinations" would need some more clarification, too.

"We therefore know that one factor is 316 and the other three factors which end in 5, 0, and 0 respectively add up to 395."  The product of the remaining factors is 2250000.

Lets determine the largest that the largest number of the remaining 3 can be.  I'll start counting up from 2250000^(1/3) = 131.0370697.

2250000/135 = 16666.66667, not an integer
2250000/140 = 16071.42857, not an integer
2250000/145 = 15517.2413, not an integer
2250000/150 = 15000.
2250000/155 = 14516.12903, not an integer
2250000/160 = 14062.5, not an integer
2250000/165 = 13636.36364, not an integer
2250000/170 = 13235.29412, not an integer
2250000/175 = 12857.14286, not an integer
2250000/180 = 12500.

If it is 180, the remaining sum is 215 and product 12500.  (215/2)^2 maximizes the possible product of the last two numbers at 11556.25.  So 180 is too large.  (155 is too large by this method, too)

The only possibility then is 150, leaving a remaining sum of 245 and product of 15000.  The final two are simple at this point.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...