Brain Teasers Forum: Visit to the 7-11 - Brain Teasers Forum

Jump to content

Page 1 of 1

Visit to the 7-11 Rate Topic: ****- 3 Votes

#1 User is offline   ChuckJerry Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 106
  • Joined: 17-April 08
  • Location:NYC

Posted 28 May 2008 - 08:36 PM

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

This post has been edited by ChuckJerry: 28 May 2008 - 08:37 PM

One guy, two names. That's how I roll.
0

#2 User is offline   akaslickster Icon

  • aka The Crosser
  • PipPipPipPip
  • Group: Members
  • Posts: 4100
  • Joined: 04-April 08
  • Gender:Male
  • Location:AZ

Post icon  Posted 28 May 2008 - 08:39 PM


Spoiler for umb,:
7.11 is not the same as $7.11?

Visit this Website for exciting picture files and more awesome stuff.

The place where peace begins is within oneself. by Slick

0

#3 User is offline   rhapsodize Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 274
  • Joined: 01-April 08
  • Location:Chicago Area

Posted 28 May 2008 - 09:51 PM

View PostChuckJerry, on May 28 2008, 02:36 PM, said:

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?



Spoiler for Clarification of OP:
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.

"The irony of the Information Age is that it has given new respectability to uninformed opinion" --John Lawton
0

#4 User is offline   rhapsodize Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 274
  • Joined: 01-April 08
  • Location:Chicago Area

Posted 28 May 2008 - 10:12 PM


Spoiler for Solution that mostly satisfies the problem.:
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.

"The irony of the Information Age is that it has given new respectability to uninformed opinion" --John Lawton
0

#5 User is offline   EventHorizon Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 316
  • Joined: 17-January 08

Posted 29 May 2008 - 12:10 AM

did brute force...but slightly intelligent brute force (answer came in a split second)


Spoiler for answer!:
$3.16 + $1.25 + $1.50 + $1.20 = $7.11
3.16 * 1.25 * 1.5 * 1.2 = 7.11

Unsolved Puzzles:
Plutonians with the same birthday - Question 2
Maze Stopper - An old one, but nobody has posted a strategy as good as mine (and my scores are still on top for the flash game).
0

#6 User is offline   EventHorizon Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 316
  • Joined: 17-January 08

Posted 29 May 2008 - 12:20 AM


Spoiler for the method to my madness:

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).

Spoiler for code....:

#include "stdafx.h"
#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;
}


Unsolved Puzzles:
Plutonians with the same birthday - Question 2
Maze Stopper - An old one, but nobody has posted a strategy as good as mine (and my scores are still on top for the flash game).
0

#7 User is offline   ChuckJerry Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 106
  • Joined: 17-April 08
  • Location:NYC

Posted 29 May 2008 - 12:32 PM

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.wordpre...04/7-11-riddle/
http://home.att.net/...tional.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.
One guy, two names. That's how I roll.
0

#8 User is offline   frotorious Icon

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 64
  • Joined: 14-May 08
  • Location:Virginia

Posted 29 May 2008 - 01:06 PM

View PostEventHorizon, on May 28 2008, 07:20 PM, said:


Spoiler for the method to my madness:

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).

Spoiler for code....:

#include "stdafx.h"
#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;
}



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 ;)
0

#9 User is offline   itachi-san Icon

  • Senior Member
  • PipPipPipPip
  • Group: VIP
  • Posts: 3226
  • Joined: 19-March 08
  • Location:USA

Posted 29 May 2008 - 06:17 PM

View PostEventHorizon, on May 28 2008, 07:20 PM, said:


Spoiler for the method to my madness:

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).

Spoiler for code....:

#include "stdafx.h"
#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;
}


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 ;)
0

Page 1 of 1


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users