## Where's the missing dollar?

## Where's the missing dollar?

(OP)

I was hesitant to ask this question earlier because it didn't really have a whole lot to do with programming. But after the question about the lottery turned into more of a math discussion I figured this would be fair game.

Before I ask the question let me add that it doesn't really have an answer because the logic in the question is flawed. When I was in high school I did get my physics teacher to blow a whole class period trying to figure it out though, so it's always stuck in my head

[The question]

3 businessmen are on a trip and share a hotel room for the evening. The bill comes to 30 dollars (it's a cheap hotel) so each businessman pays his even share - 10 dollars. They head up to their room and the cashier realizes he's made a mistake. He forgot that there's a special rate for the evening and that he should have only charged the businessmen 25 dollars (it's a REALLY cheap hotel). The cashier then instructs the bellboy to run up to the room and refund the 5 dollars to the businessmen. With his incredible insight, the bellboy realizes that the businessmen cannot easily split the 5 dollars between the 3 of them. So instead he pockets 2 dollars and returns 3 dollars to the businessmen. The 3 dollars is returned and each businessman gets a dollar back.

At this point each businessman has payed 9 dollars out of his own pocket, making a grand total of 27 dollars paid for the room. Combine that with the 2 dollars that the bellboy kept yields 29 dollars. So, where's the missing dollar?

Before I ask the question let me add that it doesn't really have an answer because the logic in the question is flawed. When I was in high school I did get my physics teacher to blow a whole class period trying to figure it out though, so it's always stuck in my head

[The question]

3 businessmen are on a trip and share a hotel room for the evening. The bill comes to 30 dollars (it's a cheap hotel) so each businessman pays his even share - 10 dollars. They head up to their room and the cashier realizes he's made a mistake. He forgot that there's a special rate for the evening and that he should have only charged the businessmen 25 dollars (it's a REALLY cheap hotel). The cashier then instructs the bellboy to run up to the room and refund the 5 dollars to the businessmen. With his incredible insight, the bellboy realizes that the businessmen cannot easily split the 5 dollars between the 3 of them. So instead he pockets 2 dollars and returns 3 dollars to the businessmen. The 3 dollars is returned and each businessman gets a dollar back.

At this point each businessman has payed 9 dollars out of his own pocket, making a grand total of 27 dollars paid for the room. Combine that with the 2 dollars that the bellboy kept yields 29 dollars. So, where's the missing dollar?

-kaht

<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>

*(He's back)*

## RE: Where's the missing dollar?

Each bussiness man did pay 10 dollars = 30

The actual cost of the room ended up at 25 = 5 dollars left

Bell boy keeps 2 and returns the other 3 = nothing left.

It was however, an interesting read. :)

Wow, i'm having amnesia and deja vu at the same time.I think I've forgotten this before.

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom

## RE: Where's the missing dollar?

The answer is "42"

## RE: Where's the missing dollar?

No missing dollar.

____________________________________

Just Imagine.

http://www.imajinarts.com

## RE: Where's the missing dollar?

Your reasoning is a little flawed I think. The Businessmen paid $27. The Frontdesk got $25 and the bellhop got $2. $25 + $2 = $27

All,

Here is an object-oriented approach to solving this in Visual FoxPro.

## CODE

LOCAL loBellhop, loFrontDesk, loBusinessman, colBusinessmen as collection, ;

lnTotalCashWas, lnTotalCashIs, lnCount, lnTotalBusinessmen

colBusinessmen = CREATEOBJECT("Collection")

lnTotalBusinessmen = 3

lnTotalCashWas = 0

*!* Before the businessmen walk into the hotel

*!* they each put $10 in their pocket

FOR lnCount = 1 TO lnTotalBusinessmen

colBusinessmen.Add(CREATEOBJECT("Person"))

colBusinessmen.Item(lnCount).TakeCash(10)

lnTotalCashWas = lnTotalCashWas + 10

ENDFOR

*!* At the frontdesk paying for their rooms

loFrontDesk = CREATEOBJECT("Person")

FOR EACH loBusinessman IN colBusinessmen

loFrontDesk.TakeCash(loBusinessman.GiveCash(ROOMRATE))

NEXT

*!* When special rate is realized

*!* Frontdesk gives bellhop $5 to give to

*!* the businessmen

loBellhop = CREATEOBJECT("Person")

loBellhop.TakeCash(loFrontDesk.GiveCash(5))

*!* Up at the room(s) each businessman is given $1

*!* by the bellhop

FOR EACH loBusinessman IN colBusinessmen

loBusinessman.TakeCash(loBellhop.GiveCash(1))

NEXT

*!* Check to make sure that total still is $30

lnTotalCashIs = 0

*!* Add what the Businessmen still have

FOR EACH loBusinessman IN colBusinessmen

lnTotalCashIs = lnTotalCashIs + loBusinessman.CashOnHand

NEXT

CLEAR

? "Businessmen Cash: " + TRANSFORM(lnTotalCashIs)

lnTotalCashIs = lnTotalCashIs + loFrontDesk.CashOnHand

? "Frontdesk Cash: " + TRANSFORM(loFrontDesk.CashOnHand)

lnTotalCashIs = lnTotalCashIs + loBellhop.CashOnHand

? "Bellhop Cash: " + TRANSFORM(loBellhop.CashOnHand)

?

?"Total Cash Was: " + TRANSFORM(lnTotalCashWas)

?"Total Cash Is: " + TRANSFORM(lnTotalCashIs)

?

?"Are they Equal? " + IIF(lnTotalCashWas == lnTotalCashIs, "YES", "NO")

DEFINE CLASS Person as Custom

CashOnHand = 0

PROCEDURE GiveCash(tnAmount)

LOCAL lnReturn

lnReturn = 0

IF tnAmount <= This.CashOnHand

This.CashOnHand = This.CashOnHand - tnAmount

lnReturn = tnAmount

ENDIF

RETURN tnAmount

ENDPROC

PROCEDURE TakeCash(tnAmount)

This.CashOnHand = This.CashOnHand + tnAmount

ENDPROC

ENDDEFINE

SweetPotato Software Website

My Blog

## RE: Where's the missing dollar?

________________________________________________________

Zameer Abdulla

Help to find Missing people

Sharp acids corrode their own containers.

## RE: Where's the missing dollar?

Imagine that the bellboy had stolen all five dollars - hard to explain why he didn't, in fact. Then the 'false sum' doesn't work, they have each paid 10 dollars and the bellboy has 5, no 'missing dollar'.

All down to misdirection.

------------------------------

An old man who lives in the UK

## RE: Where's the missing dollar?

Sure it does.

I'll replace the last line of the puzzle with your new numbers:

Of course, in this scenario it's not as difficult because we know that it's in the bellboy's pocket but that's besides the point.

The main "trick" about this puzzle is to ignore the magic number 30. We're not concerned with that figure anymore. The ultimate number we're trying to get to now is 25, because that is now the price of the room. And simple logic in either case shows us that 27 - 2 (or 30 - 5 using the modified numbers) is equal to the new magic number of 25. The puzzle just yields a number so close to 30 that it confuses the readers into thinking that it's the number you're striving to achieve - when in fact it's 25.

-kaht

<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>

(He's back)## RE: Where's the missing dollar?

At this point each businessman has payed 10 dollars out of his own pocket, making a grand total of 30 dollars paid for the room. Combine that with the 5 dollars that the bellboy kept yields 35 dollars. So, where's the missing 5 dollars?

SB

At this point each businessman has payed 10 dollars out of his own pocket, making a grand total of 30 dollars paid for the room. Combine that with the 5 dollars that the bellboy kept yields 35 dollars. So, where did the extra five dollars come from?

Wow, i'm having amnesia and deja vu at the same time.I think I've forgotten this before.

## RE: Where's the missing dollar?

Too much copy/pasting from above, heh.

-kaht

<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B>

(He's back)## RE: Where's the missing dollar?

Wow, i'm having amnesia and deja vu at the same time.I think I've forgotten this before.

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

My son & I had the manager and over 100 people in a Bonanza restaurant ready to hang us last night. They were yelling answers at us as we made a hasty retreat to the car.

All these posted "answers" remind me of 'a dog chasing his tail.' This age-old classic wouldn't still be alive if an answer was this easy.

Changing the way the original question is asked, or looking at it from the different characters' viewpoints is like changing the rules during a game because you're losing.

Face it...there is no answer when asked the original way. That's why it's a classic!

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

-kaht

Looking for a puppy?

Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.

## RE: Where's the missing dollar?

Get past that and you can frustrate some of the deepest thinkers.

## RE: Where's the missing dollar?

-kaht

Looking for a puppy?

Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.

## RE: Where's the missing dollar?

I guess that the saddest twist to this story in the 21st century is that the story-teller has to preface the story-riddle, explaining that "3 men in 1 motel room" has nothing to do with a perverted lifestyle.Just start it like this:

"Three very cheap businessmen are on a trip and, in order to save some money, share a very cheap hotel room for the evening."

## RE: Where's the missing dollar?

The answer is "42"## RE: Where's the missing dollar?

Each businessman has paid 100 dollars and got 10 back, net payment of 90, times three equals 270.

The hotel got 250. The cashier stole 20, that accounts for the 270.

Or if he'd refunded 48 dollars, 16 each, they would each have paid 84 dollars, total 252. Adding this to the 2 dollars that this alternative cashier stole gives you 254, way out. Adding the 250 dollars received by the hotel to the 2 stolen is also 252, no missing dollars.

------------------------------

An old man who lives in the UK

## RE: Where's the missing dollar?

Is the $30 an

hourlyrate?--just wondering--

Gooser

## RE: Where's the missing dollar?

I thought, Pgould1 had a problem not with the prices being low, but with the fact that "in the 21st century ... the story-teller has to preface the story-riddle, explaining that "3 men in 1 motel room" has nothing to do with a perverted lifestyle"?

## RE: Where's the missing dollar?

-kaht

Looking for a puppy?

Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

Just use the "extremes" technique. By pushing the number to an extreme it simplifies the problem.

There are a million boxes, one of which randomly contains a prize. You are allowed to choose one and do so. The contents of the remaining boxes you did not choose then get combined into one big box.

Now, you can keep your original box (1 in a million chance) or you can switch to the big box (999,999 in a million chance). What do you do?

A little thought shows that "combining n boxes into one big box" is the same as "removing n-1 boxes known to be empty."

There's a gigantic wikipedia page on this which could really use a simpler explanation like the above.

## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

The answer is "42"## RE: Where's the missing dollar?

## RE: Where's the missing dollar?

The answer is "42"## RE: Where's the missing dollar?

As for the original topic: although I am NOT an accountant, nor do I pretend to any skill in the subject, it strikes me that it's the sort of thing that accountants deal with all the time. I would say that the puzzle is attempting to introduce confusion between assets and liabilities, debits and credits. The way to introduce the confusion is to suggest that the boy's $2 credit goes also to the hotel as a $2 credit, which is of course wrong. The fact that the boy is a representative of the hotel is a compelling reason to perceive them as one entity. It's also irrelevant...a master touch! So, in fact, the boy's $2 credit is of course a $2 debit to the hotel.

So, the transactions appear to be:

1. credit hotel 30, debit businessmen 30.

2. debit hotel 5, credit bellboy 5.

3. debit bellboy 3, credit businessmen 3.

Total assets to hotel, 25. Total assets to bellboy, 2. Totall assets overall, 27. Total liabilities to businessmen, 27.

All in balance, all in harmony....thanks to Amatino Manucci.

Bob

## RE: Where's the missing dollar?

Greg

"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill