Jump to content
BrainDen.com - Brain Teasers
  • 0

7-11 store, 4 items to buy


Guest

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 post
Share on other sites

8 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 post
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 post
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 post
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 post
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 post
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 post
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...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...