WallStreetOasis.com » Forums » Site Specific » Monkeying Around
Anonymous Monkey's picture

Post your favorite brainteaser!

Let's play a game. I'll post my favorite brainteaser. The next person solves my problem and then posts his/her favorite. So on and so forth. This thread will indubitably get sidetracked by people arguing over the answer to some particular problem, but try to stay focused. =)

Brainteasers need not be from IB interviews. I think IB candidates/employees think in a manner where brainteasers are fun anyway... so let's enjoy!

Question:
Three men check into a B&B, sharing a room for the night. The receptionist tells the men that the room costs $30, so each man ponies up $10. Later, the manger informs the receptionist that there was a special going on that night; the room rate was only $25. The receptionist gives the bellboy $5 to return to the three men. The bellboy, however, concludes that the three men could not evenly split $5, so he pockets $2 and returns each man $1. In total, each man paid $9 ($10 minus the $1 refund). $9 times three men is $27... plus the $2 the bellboy took comes out to $29. The men initially paid $30; what happened to the missing dollar?

Average: 3.7 (3 votes)
baloogafish's picture

Nothing- Since the room rate

I have the general idea- just my wording wasn't the greatest in the world.

mass_banker's picture

no you idiot... they paid a

no you idiot... they paid a total of 27 and that includes the $2 that the bell boy got. So the room rate 25 + bell boy $ 2 is equal to 27, and the rest 3 dollars are the ones that they got back.

smuguy97's picture

I might be missing something

I might be missing something (since I have almost no brainteaser experience), but I don't think baloogafish's explanation makes sense.

The room rate at this incredibly shitty hotel was $30.00 (which is equivalent to the hourly cost of a weeknight hotel stay at a low-end hotel in Manhatten), so each paid $10.00 . Since the actual rate should have been $25.00, each man should have paid $8.33 (not $10.00) and were thus each entitled to a $1.67 refund. However, the bellboy only distributed $1 to each of the men, thus stiffing each by the residual amount ($9.00 - $8.33 = $0.67) and pocketing the additional $2.00 ($0.67 x 3 = $2.00) in change. The brainteaser portion of this question, as I see it, comes from the assumption that distributions should sum to $30, which I do not believe to be correct. Rather, the cash distributions should sum to the post-adjustment hotel room rate of $25. Each man paid $9.00 for a grand total of $27. Because the bellboy stiffed them, he pocketed their residual "true-up" on the room rate adjustment for a total of $2. Once distributed, total net proceeds sum to the adjusted room rate of $25.00 ($9.00 x 3 - $2 = $25).

Perhaps I'm way off on this, so people should feel free to correct me. In any case - nice brain teaser b. I've never really done these but it is a very nice break from the painful LBO deal that I've been working on for more than 20 straight hours at this point (waiting on feedback from the Latham guys on a few things, and they are slow as usual in responding).

aachimp's picture

Mass_banker, you forgot to

Mass_banker, you forgot to post a brainteaser.

neutralnuke's picture

mass_banker is right

I'm no expert but his logic is correct. But I didn't get it :(

nystateofmind's picture

One I had in an interview a

One I had in an interview a while back:

You've got a hose and 2 buckets - one a 3 gallon bucket and one a 5 gallon bucket. How do you get exactly 4 gallons of water?

junkbondswap's picture

I had this one in high

I had this one in high school but its pretty intuitive...

You fill the 3 gallon bucket and pour it into the 5 gallon bucket. You then re-fill the 3 gallon bucket and pour it into the 5 gallon bucket (which already has 3 gallons in it)until it is completely full. You now have 1 gallon of water in the 3 gallon bucket. You pour out the 5-gallon bucket and then pour in the the 1 gallon of water from the 3 gallon bucket into the 5 gallon bucket. Then you fill the 3 gallon bucket completely and pour into the 5 gallon bucket (which already has 1 gallon of water) giving you exactly 4 gallons of water.

meehgs's picture

Eek... that is the exact

Eek... that is the exact wording of the brainteaser, not b's conclusion that there was actually a missing dollar. Unnecessarily strong wording...

captk's picture

Here's one I got in an

Here's one I got in an interview -

You have two pieces of fuse - each burns end to end for exactly one hour. How can you time EXACTLY 45 minutes?

junkbondswap's picture

Sticking with volume... If

Sticking with volume...

If you have a 1 gallon jug and it is half full (50% full of liquid) with Jack and coke plus 4 ice cubes (1 cubic inch each). What percentage of the 1 gallon jug will be full when all 4 ice cubes melt?

gunboatdiplomat's picture

Got asked this the other day...

captk wrote:

Here's one I got in an interview -

You have two pieces of fuse - each burns end to end for exactly one hour. How can you time EXACTLY 45 minutes?

Light both ends of one fuse and one end of the other and then light the second end of the second piece just as the first piece burns away completely. (Assuming the fuses burn at uneven rates along their length).

HedgeHog's picture

Here's one I always used to give:

You have 9 identitical looking marbles and one balance scale. 8 weigh the same, 1 weighs slightly more than the rest. What is the minimum # of weighings needed to find the one marble that is different (example - if u weighed one marble vs. all the rest one by one, it would take 8 weighings of 1 vs. 1 to ensure that you find the heavier one)

Will1220's picture

2 for 1...a Classic, and a REALLY hard one.

The Classic: 9 weights, each identical looking, 8 weigh the same, 1 weighs a different amount then the others. Using only twice a "balance scale" (think statue of justice) how can you determine which of the 9 balls is the abnormal one?

The impossible:

There are ten gnomes. They are in the dungeon. Their captor has given the gnomes a chance of survival. Here is the offer:

He lines the gnomes up in a single-file row. This means that the tenth gnome sees the back of the person in front of him, and there is no gnome behind the tenth gnome. The ninth gnome has the tenth gnome behind him and the eighth gnome directly in front of him, and so on. Finally, the first gnome has the second gnome directly behind him, but there is no one in front of the first gnome.

The captor has a bag full of many black hats and many white hats. There is not necessarily the same number of black hats as white hats. (important) He randomly reaches into his bag and places a hat on each of the gnomes. This means that the tenth gnome can see everyone's hat except his own, the ninth gnome can see everyone's hat except his own and the tenth gnome's hat, and so on. The first gnome can see no one's hat.

The captor then takes out his gun and puts it to the temple of the tenth gnome. He asks the gnome, "What color is your hat?" If the gnome answers correctly, he lives and gets freed from the dungeon. If he does not, he dies. He continues up the line in this progression.

However, before placing the hats on the gnomes, he allows the gnomes to meet as a group and discuss a strategy to save as many of the gnomes as possible. How many gnomes can you guarantee to save, and with what strategy?

REMEMBER: When it is your turn to say the color of your hat you must ONLY say "white" or "black." If you say anything else, the king will shoot you and all of the remaining gnomes.

HedgeHog's picture

arg!!

wow, two in a row of the same one - but it's a lot better if you don't tell that it's two!!!

Will1220's picture

o sorry.

i think that guy posted as i was typing mine! haha.

anyway...the second one i posted is for real.

captk's picture

I can't solve it, but here's

I can't solve it, but here's a start on the gnomes -

Because there are an unknown number of black vs. white hats, without any extra information (or even with information about the proportion in the random sample of hats on the gnomes heads), a guess about your own hat color is a toss up.

Therefore, the 10th gnome needs to use his "guess" (white or black) to convey some kind of information to the other nine gnomes. If the "guess" matches his hat color, he's lucky and lives. If not, he dies, but has communicated some kind of important info to the other nine.

This probably isn't the best solution but here it is - the 10th gnome guesses the color that he sees the most of in front of him (ie. if there are 5 white and 4 black, he guesses white). That way, you are assured that at least 5 gnomes survive.

Can anyone do better than 5?

captk's picture

I should clarify - the 10th

I should clarify - the 10th gnome guesses white, so all the other 9 know that there is higher than a 50% chance they are wearing a white hat, so they will all guess white as well.

icecold's picture

Assuming..

that the gnomes cannot attempt to communicate with each other outside of the words "black" or "white," (i.e. hitting the person in front of you to signal to them that they are wearing a black hat) the gnomes could use the pitch of their voice to signal in a similar manner. For example, using an extremely high pitched voice to signal "black" and low pitch to signal "white" to the next person. This would guarantee 9 and give a 50/50 at 10. (assuming there is a notable difference in pitch between high and low)

jfahnbul's picture

I agree with five, but my

I agree with five, but my method is a little different...I would have the tenth gnome call out the hat color of the first, and the ninth call out the color of the 2nd, all the way through to the sixth gnome. Then the fifth through first would be guaranteed to know their colors.

icecold's picture

assuming...

that the gnomes cannot attempt to communicate with each other outside of the words "black" or "white," (i.e. hitting the person in front of you to signal to them that they are wearing a black hat) the gnomes could use the pitch of their voice to signal in a similar manner. For example, using an extremely high pitched voice to signal "black" and low pitch to signal "white" to the next person. This would guarantee 9 and give a 50/50 at 10. (assuming there is a notable difference in pitch between high and low)

*sorry if this posted twice

Buyside Noob's picture

I think that the path will

I think that the path will be the 10th gnome should say the color on the 1st gnome, 9th say the color on the 2nd, and etc. In this fashion, the first 5 gnomes will be saved.

as for gnomes 6~10, I'm going to assume that black and white are proportional to each other, so theoretically 2.5 will survive on random odds. So my answer saves 5 + any number between 0 and 5 with the long run average of 7.5 gnomes saved...

make sense? or am i totally off

b's picture

Please keep with the system

Please keep with the system to ensure that all brain teasers get answered and there are not a bunch of unanswered questions floating around. Posting a brainteaser is a privilege obtained from answering the previous one. =)

I got the gnome question in a comp sci interview once.

They discuss a strategy. The gnome in the very back counts to see whether there is an even or odd number of black hats. If even, he will say black, if odd, he will say white. He has a 50/50 chance of getting it right.

From this, the 9th gnome can deduce the color of his own hat. For example, if the 10th gnome saw an even number of black hats, and the 9th gnome sees an odd number, he knows that his own hat is black. If he sees an even number, he knows his own hat is white. After each "black" is called out, the system switches, as "black" now represents odd and "white" represents even number of black hats. So on and so forth.

This ensures a 9/10 survival rate; the 10th gnome has a 50% chance at survival.
----------------------------

Question:
A zebra has a stack of 300 bananas. He wants to transport as many bananas as possible across a field 100 miles long. He can carry at most 100 bananas at a time. He has to eat 1 banana for each mile he walks (both backwards and forwards). Assume that unattended bananas will not get stolen, lost, or otherwise affected. What is the maximum number of bananas he can get across the field?

Jimbo's picture

I have a string which

I have a string which stretches all the way around the world. I want to raise it off the ground by 1 foot. how much longer does the string need to be?

there is a rail track 1 mile long, and bolted down at the ends. one particularly hot day the track expands by 1 foot. assuming it can only bend upwards (not sideways at all) how far will the track raise off the ground after the expansion.

HedgeHog's picture

Re: String

Isn't it x = 2pi(r+1) - 2pi*r, x=2pi feet?

Jimbo's picture

good work hoya

good work hoya

smuguy97's picture

For Jimbo's rail track

For Jimbo's rail track question, I would think you can simply derive this using basic geometry, but I'm probably missing something.

If the track length is 5280 ft (1 mile) long and expands by 1 ft to 5281 ft, it seems like the height would be:

(((5280 + 1)/2)^2 - ((1/4)*(5280)^2)))^(1/2) = ~51.4 feet

This does not seem intuitive to me, and I was most certainly not a math major, so any corrections or comments would be welcome here.

Jimbo's picture

yup that's close enough...i

yup that's close enough...i like the counterintuitive nature....

sherminator's picture

If you have a 1 gallon jug

If you have a 1 gallon jug and it is half full (50% full of liquid) with Jack and coke plus 4 ice cubes (1 cubic inch each). What percentage of the 1 gallon jug will be full when all 4 ice cubes melt?

Anyone know the answer?

Jimbo's picture

231 cubic inches to a gallon

231 cubic inches to a gallon

deadjackal's picture

-ice cubes are only about

-ice cubes are only about half under surface level
-1 gal= 231 in3
-before: 115.5 in3
-after: 115.5+2=117.2 in3

50.736%

In reality most ice cubes are much more than just half under surface level,
so it would be even less. Pretty much stay at 50%

that was not a brainteaser though

b's picture

It doesn't matter whether,

It doesn't matter whether, and to what degree, the ice cubes are submerged. You already know that there is 1/2 gallon of liquid and 4 in^3 of ice. Submerging the ice cubes will simply displace the volume of the liquid -- not replace it.

b's picture

In my previous post, I'm

In my previous post, I'm assuming that the jug is "(half of liquid) plus four ice cubes" and not "half full of (liquid plus four ice cubes)".

Confusing wording to the question.

Jimbo's picture

it is an exercise in obscure

it is an exercise in obscure weights and measures.

how many cubits to the mile?

deadjackal's picture

here's a real teaser. It

here's a real teaser. It should make you think:

You are imprisoned in a chamber with two doors as the only exit. One door leads to death by cancer, filled with complications and malpractice; the other door leads to riches of jewelry, money and fine clothing for the rest of your life. There are two guards standing before you: one guard always lies; the other always tells the truth. Of course, you don’t know their identities. You can ask only one question to save your life. WHAT WOULD YOU ASK?

b's picture

"Which way would the other

"Which way would the other guy tell me to go?" -- And then go the opposite way.

... quite an old puzzle.

deadjackal's picture

Sorry it is old, how about

Sorry it is old,
how about this one, hopefully its not as known:

You leave your camp and travel a 100 miles south, then a 100 miles east, then a 100 miles north. You find yourself back at your camp site and tell your colleague that you saw a bear on your travels. What is its color?

Buyside Noob's picture

White, Your coordinates

White,

Your coordinates would only make sense if you're in the north pole. Given only polar bears live in the northpole, it has to be white.

net worth or nothing's picture

When I hear a

When I hear a brainteaser...I just start reciting poetry "Two paths diverged.... " until the interviewer laughs and forgets he asked me the initial question.

b's picture

As no one seems to be

As no one seems to be following the system that I laid out (and people seem to be posting brain teasers that I've heard 10 years ago) I'm going to go ahead and post some of my favorites. Have fun... I enjoyed these:

1.) There are 100 people in line to board a train. Each person is holding a ticket corresponding to both his place in line and his seat (i.e. Person 1 is supposed to sit in Seat 1, Person 2 is supposed to sit in Seat 2, etc.). All of the people in line are normal, except for Person 1, who is "crazy". When Person 1 boards the train, he will ignore his seat number and sit in a random seat. Following Person 1, each person will sit in his own seat, unless his seat is occupied. In this case, the Person who's seat is occupied becomes the new "crazy person" and will sit in a random seat. For example, if Person 1 sat in Seat 2, Person 2 will become the "crazy person" and sit in a random seat. What is the probability that Person 100 will end up in Seat 100?

2.) McNuggets come in boxes of 6, 9, and 20. What is the largest number of McNuggets that is not possible to obtain using some combination of these three box sizes?

3.) There are 100 closed windows and 100 people. The first person opens every window. The second person closes every 2nd window. The third person visits every 3rd window; if the window is closed, he opens it; if it is open, he closes it. So on and so forth. After the 100th person, how many windows are open?

4.) Three men are at a picnic. One man brought 3 loaves of bread, one man brought 4 loaves of bread. The third man did not bring any bread, but promised to pay the other 2 men the $14 he had in his pocket for a share of the bread. The men agreed, and each subsequently eats an equal share of the bread. Following the lunch, the men had a dispute as to how the $14 should be divided; what is the most fair way?

5.) Three men (A, B, C) are in a dual, where they take turns shooting. Person A gets to shoot first, Person B gets to shoot second, and Person C gets to shoot third. Person A and C are both amateur shots; Person A hits his target 1/3 of the time, person C hits his target 1/2 of the time. Person B is an expert and hits 100% of the time. Where should person A first shoot to maximize his chances of winning the game?

6.) There is a spider in the corner of a 10 ft x 10 ft x 10 ft room. The spider wants to get to the opposite corner of the room [i.e. he is in the bottom back left corner and wants to get to the top front right corner]. He can not fly; thus must stay along the wall at all times. What is the shortest distance to the opposite corner?

b's picture

Also, no one ever solved

Also, no one ever solved this one:

A zebra has a stack of 300 bananas. He wants to transport as many bananas as possible across a field 100 miles long. He can carry at most 100 bananas at a time. He has to eat 1 banana for each mile he walks (both backwards and forwards). Assume that unattended bananas will not get stolen, lost, or otherwise affected. What is the maximum number of bananas he can get across the field?

girlytrader's picture

deadjackal

I heard a similar one went something like this:

You are in a house, all four walls face south and all walls have a window, a bear walks by a window ...what color is the bear??

ChelseaFC85's picture

0

0

aadpepsi's picture

First, I don't think zebra's

First, I don't think zebra's eat bananas, do they?!?

Second, well, what's the zebra's intention? Does he intend to carry the bananas across the field because he's going to move to the other side and live there forever? Or does he have to carry bananas across the field to make a delivery to someone else?

If he is making a delivery for someone else he can only get 100 bananas across the field. After he eats 100 on the way there and 100 on the way back. Then he's finished. No more bananas.

If he's moving to the other side forever... well... the answer is still 100. He carries 100, but needs to eats 100... so the remaining 100... well he's shit out of luck and can't go back and get the remaining 100. So he donates that 100 to the zebra friends he sadly left behind :-(

Am I right?

ChelseaFC85's picture

if it can only carry 100 at

if it can only carry 100 at a time, and the field is 100 miles, and he eats 1 every mile...the zebra wont have any once he reaches each end of the field. hence, he can't get any all the way across the field.

50 white marbles in one jar, 50 black ones in another. how would you distribute the marbles in order to maximize your chances of pulling out a black one. what would be the chances you pull a black marble with that distribution?

b's picture

No, you're not right. He has

To aadpepsi (for some reason, her post is showing up below mine):

No, you're not right. He has to eat one banana for every mile he walks; I never said that he can walk 1 mile for each banana that he eats. Therefore, he can't fill up on 100 bananas at the start and walk across.

Answer is also not 0.

Anyone who's feeling intelligent want to give it a go?

smuguy97's picture

Any chance the answer is ~44

Any chance the answer is ~44 bananas (I highly doubt this is correct, but wanted to toss out a solution better than 0).

Seems to me that one strategy would involve taking 100 banans for the first 1/3 of the trip, dropping 1/3 off and then consuming the remaining 1/3 on the trip back. Do this once more and now you've got ~66 bananas that are 33 miles from the start point, and a zebra at the starting point with 100 bananas left. He burns 33 of these getting to the starting point, but is then sitting 33 miles from the start point with 133 bananas (166 - 33). Since he can only carry 100 at a time, he takes 100 bananas roughly 11 miles (1/3 * 1/3 = 1/9 of 100 miles), drops 78 of his remaining 89 (since he burned 11 getting there), then uses the remaining 11 bananas to get back to his remaining 33 bananas that are sitting 33 miles from his starting point. He'll burn another 11 bananas getting out to his 44 mile point (where he dropped 78 bananas), and will thus end up with 100 bananas 44 miles from where he started. He burns 56 of these bananas on the remaining 56 miles and ends up with 44 bananas.

b's picture

smuguy, very close, and

smuguy, very close, and proper approach, but answer is incorrect.

qwerty25's picture

Here are a couple answers

(1) Three men in a dual problem:
This is a classic quantum three person duel (truel). Each person will shoot that person who is the greatest threat to them. Thus, person A knows that person B and person C will target each other. If A tries to shoot C and hits, then he is dead because B will shoot him/her with 100% accuracy. If A tries to shoot B, there is a 1/3 probability of hitting B, in which case person C will then have one shot with 50% chance to hit A. Thus, the best option for person A is to:
shoot in the air (i.e. do not target either of the other two shooters). As a result, B will kill C with 100% probability, and A now has a 1/3 chance of killing B and being the last person standing - his highest probability.
This can be quantified probabilistically, just google search for quantum truel, and you should be able to find plenty of papers discussing the mathematical theory behind the issue (obviously it can be attacked with traditional probability as well)

(2) McNugget problem:
This is an application of what is known in probability as the "coin problem." If you are given 3 natural numbers whose greatest common divisor is 1 (which is the case for 6, 9 and 20), then there exists a largest natural number which can not be expressed as a linear combination of the other three. This number is known as the Frobenius number. For this problem, the answer is 43. It is interesting to note that this problem, for arbitrary n, this problem is np-hard (np-complete is a subset of np-hard)

(3) 100 Windows Problem:
This one is also a classic, although it is phrased in many different ways (lights, gym lockers, hotel room doors, etc.). The key here lies in the fact that each number that has an even number of unique factors will end up closed. Thus, the only windows that will be open are those numbers which have an odd number of unique factors. Thus, the only windows that will be open are those numbers who are perfect squares (1, 4, 9, 16, 25, 36, 49, 64, 81, 100). For example, the factors of 36 are: 1, 36, 2, 18, 3, 12, 4, 9, 6... Thus, only an odd number of people will open/close this window and it will be left open at the end (since it starts off closed).

b's picture

Chelsea, put 1 black marble

Chelsea, put 1 black marble in 1 jar and all the other marbles in the other jar.

If you reach into Jar #1, you have 1/1 or 100% chance of pulling a black marble.
If you reach into Jar #2, you have 49/99 chance of pulling a black marble.

Altogether, you have [99/99 + 49/99]/2 chance of pulling a black marble, or [148/99]/2 or 74/99 chance of pulling a black marble. Just under a 75% chance.

smuguy97's picture

''

b wrote:

smuguy, very close, and proper approach, but answer is incorrect.

I figured as much. There's got to be an underlying purely mathematical approach, but I have no legit background here beyond AP Calc in high school and the very basic math that comes with working in PE.