Another Math Puzzle
Jul 26, 2005 at 9:53 PM Thread Starter Post #1 of 19

fante7

500+ Head-Fier
Joined
Jun 8, 2005
Posts
531
Likes
10
You know those chocolate bars made of smaller chocolate squares?

Suppose you have a chocolate bar made up of m rows and n columns of smaller squares of chocolate, and you want to break it up into each of its individual squares. A "break" consists of taking a piece of chocolate and splitting it along one of its natural break lines. You cannot stack multiple pieces of chocolate on top of each other and break them simultaneously, or do anything else that allows you to break multiple pieces of chocolate simultaneously. What is the minimum number of "breaks" needed to break up the chocolate bar completely, and what strategy did you employ to do so? Good luck
biggrin.gif


Edit: Go down a few posts for the better puzzle
cool.gif
 
Jul 26, 2005 at 10:07 PM Post #2 of 19
me, me, me, Mrs. Smith, pick ME!!!!!!!!!




the answer is: MN!!!!


*Happy Dance* *Happy Dance*
 
Jul 26, 2005 at 10:27 PM Post #3 of 19
Ok, had a brain fart. My quick guess is m*n-1. Everytime you make a cut, you increase the number of pieces by one. So when you start out, you have one piece and make a cut anywhere, you now have two pieces. It doesn't matter where you make the cut since you are trying to get m*n pieces in the end. Since you started with a single piece, you need m*n-1 cuts.
 
Jul 26, 2005 at 10:36 PM Post #4 of 19
Quote:

Originally Posted by Born2bwire
Ok, had a brain fart. My quick guess is m*n-1. Everytime you make a cut, you increase the number of pieces by one. So when you start out, you have one piece and make a cut anywhere, you now have two pieces. It doesn't matter where you make the cut since you are trying to get m*n pieces in the end. Since you started with a single piece, you need m*n-1 cuts.


Yes, that's correct. Nice job. I guess this thread isn't useful anymore
smily_headphones1.gif
 
Jul 26, 2005 at 10:45 PM Post #6 of 19
Alternatively, I could add another (harder) puzzle.

There is a game show where 100 contestants stand in a line single file, all facing the front of the line. Then, the host comes and places either a red, green, or blue hat on everybody's head. Each person in line can see the hat color of everybody in front of him but not his own or that of anybody behind him. The host begins at the back of the line and asks each person in turn to guess the color of his hat, and says whether the person was right or wrong after each guess. The contestants are allowed to devise any sort of mutual strategy before appearing on the show. What strategy guarantees the most correct guesses, and how many does it guarantee?

Edit: For clarification, the contestants are not allowed to speak at all, other than their guess when it is their turn, and the only word they are allowed to speak is the color itself. The only information conveyed can be the guess itself.. no variations in tone of voice or similar. Also, the contestants know fully the rules of the game before getting together and devising their strategy.
 
Jul 27, 2005 at 3:05 PM Post #8 of 19
I assume contestants are able to hear other guesses, right? Even the 100th contestant can hear what the first guess was, and whether it was right or wrong?
 
Jul 27, 2005 at 4:18 PM Post #9 of 19
I will put my solution in white text so if you want to see it highlight it with your mouse.


First we can all agree that one of situations will happen. Considering only the first 98 people (the ones we are going to save); there will either be an even number of all color hats (ie an even number of blue, green and red), or an even number of 1 color of hats (with the the other 2 colors being represented by an odd number of hats).
If is only one color with an even number, the first two guys call out that color. If all 3 colors have an even number of hats, then the two guys call out different colours.

Now its the 98th guys turn and he knows the how the colors are represented. However because he is missing knowlede of one of the hats (his own) he will see that one color is of a different parity then it should be. Thus he can deduce his color. The 97th guy knows everything but his own at because he knows the 98th hat. and can similarly deduce what color his own hat is.



Hope this isn unintelligible..
 
Jul 27, 2005 at 9:45 PM Post #10 of 19
Quote:

Originally Posted by toor
I will put my solution in white text so if you want to see it highlight it with your mouse.


First we can all agree that one of situations will happen. Considering only the first 98 people (the ones we are going to save); there will either be an even number of all color hats (ie an even number of blue, green and red), or an even number of 1 color of hats (with the the other 2 colors being represented by an odd number of hats).
If is only one color with an even number, the first two guys call out that color. If all 3 colors have an even number of hats, then the two guys call out different colours.

Now its the 98th guys turn and he knows the how the colors are represented. However because he is missing knowlede of one of the hats (his own) he will see that one color is of a different parity then it should be. Thus he can deduce his color. The 97th guy knows everything but his own at because he knows the 98th hat. and can similarly deduce what color his own hat is.



Hope this isn unintelligible..




You can save 99 guaranteed, and have a 1/3 chance at the last one. It's an identical problem to the last one (with two coloured hats) in that it's an error-checking problem, but in a 3-valued system, you still only need a single digit to do the error checking. You only ever need one digit for an error-check.

Let's assign a value to each colour of hat, 0 for red, 1 for green, and 2 for blue. The last man adds the values for each hat he sees in front of him, and then calls out the colour corresponding to the parity bit. for example, if this is the sequence:

R G B R G R G R B G B R G R B B <----Last man in line, does not count his own
it would correspond to
0 1 2 0 1 0 1 0 2 1 2 0 1 0 2 which adds to 111 in trinary (or 13 in decimal). Thus the man at the back of the line will call out GREEN (or 1). He dies.

Then, the man in front of him adds up all the hats he can see, and gets 102 (or 11) and knows that since the last numeral for the previous total was 1, he must add 2 to achieve the proper total, and thus says BLUE and saves his own life. The rest of the chain is self-evident.

I'd prefer to sacrifice only one life.
 
Jul 27, 2005 at 9:58 PM Post #11 of 19
Except that solution assumes an equal distribution of hat color types among the contestants, which was not stated in the problem. It was also not stated that the doling out of the hats is done at random.

Since these conditions were never stated, really the only factor is the law of independant trials. Which would state a given hat in front or in back of you has no bearing on what hat was randomly selected for you.

All things considered, all hats could be green.

So mathmatically, there really is no strategy that can be devised, and the probabily of correct guesses is roughly 1/3rd.

So I'm not sure if this is a trick question, or merely relevant information neccesary to correctly solve the problem was left out. Never assume!
 
Jul 27, 2005 at 10:52 PM Post #12 of 19
The_Mac's solution would still take care of random distributions. In the case of all green, let's assign green to be 0 (for easy addition) and so the sum in front of you is going to be 0, the parity is 0, and so you say "Green." The guy in front sees a total of 0 and says "Green." And so on and so on.

But what I really wanted to post about is that I would like to know what kind of game shows The_Mac watches where the losers die.

EDIT: A better way to think about the parity problems is to start using base 10. If I have a number, say 38561, then the sum of that number is 23. So I say that the parity is 3. Now if you add all the digits but the units digit, you get 22. So the difference between the two sums is 1 and thus you regenerate the units place. And from here you can continue the process to recover the actual number.
 
Jul 27, 2005 at 11:12 PM Post #13 of 19
Quote:

Originally Posted by TWIFOSP
Except that solution assumes an equal distribution of hat color types among the contestants, which was not stated in the problem. It was also not stated that the doling out of the hats is done at random.

Since these conditions were never stated, really the only factor is the law of independant trials. Which would state a given hat in front or in back of you has no bearing on what hat was randomly selected for you.

All things considered, all hats could be green.

So mathmatically, there really is no strategy that can be devised, and the probabily of correct guesses is roughly 1/3rd.

So I'm not sure if this is a trick question, or merely relevant information neccesary to correctly solve the problem was left out. Never assume!



That is what I thought when I read it. You can only work with the data given you can make no assumtions. People make it too hard.
biggrin.gif
 
Jul 27, 2005 at 11:14 PM Post #14 of 19
Given a random distribution of colors, I don't think you could do better than 50%. Deciding in advance to work together, every other person says the color of the person in front of him/her.

edit: Tho it does look like the_mac's solution works, in thinking about it.
 
Jul 27, 2005 at 11:19 PM Post #15 of 19
I think The_Mac got it right...? It should work for whatever random distribution or number of hats.
 

Users who are viewing this thread

Back
Top