Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Where's the missing dollar? 1

Status
Not open for further replies.

kaht

Programmer
Aug 18, 2003
4,156
0
0
US
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 [lol]


[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

[small] <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>[/small]
[banghead] [small](He's back)[/small]
 
The Bell Boys money was included in the 27 they payed. So you cannot add it again to the 27 dollars.

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

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


 
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.
That accounts for the "outgo" -- the "income" is shared by the hotel and the bellboy: 25 dollars to the hotel, 2 dollars to the boy, accounting for the total of 27 dollars.

 
So in reality 1 guy paid an extra dollar to the room, and the other 2 tipped the bell boy
 
I wouldn't call it tipping in this case. The money wasn't freely given by the business men to the bellboy. [wink]

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
So in reality 1 guy paid an extra dollar to the room, and the other 2 tipped the bell boy
See that's the trap of this puzzle. Each paid th same (9 dollars) and the bellboy stole two. 30 - 25 - 3 - 2 = 0

The answer is "42
 
The businessman paid $25, the bellhop gave back 3 dollars, so 25+3 = $28. The bellhop kept $2, so $28+2 = 30

No missing dollar.


____________________________________
Just Imagine.
 
GUJUm0deL,

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:
[COLOR=white]#DEFINE ROOMRATE 10 && per person
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
[/color]

boyd.gif

SweetPotato Software Website
My Blog
 
I don't know how many times this question took round the world. We had to answer the same question when we were in the school.(1970-1980)[wink]

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
As others have said, the businessmen pay 27 dollars, the hotel gets 25 and the bellboy steals 2.

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 [tiger] who lives in the UK
 
Then the 'false sum' doesn't work, they have each paid 10 dollars and the bellboy has 5, no 'missing dollar'.

Sure it does.

I'll replace the last line of the puzzle with your new numbers:
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?

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

[small] <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>[/small]
[banghead] [small](He's back)[/small]
 
I like kaht's approach with the five but would like to modify it slightly.

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?



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


 
Errr... yeah, that's what I meant [lol]

Too much copy/pasting from above, heh.

-kaht

[small] <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>[/small]
[banghead] [small](He's back)[/small]
 
I have a quick eye for spotting easy money, unfortunatly as in your example it's always missing in the end.

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


 
I remember this same puzzle in AsiaMagazine way back in the early 60s.
 
This little brainteaser is making its rounds once again.

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!
 
But the answer is easy, just non-obvious. Most of the answers here explain it quite happily, there's no disagreement (unlike the Monty Hall problem ...)
 
It's definitely a good way to blow off a lot of time if you tell it in a room of a bunch of people that have never heard it before. Everybody has their own explanation.

-kaht

Looking for a puppy?

[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
 
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.
Get past that and you can frustrate some of the deepest thinkers.
 
Ehh... I didn't say anything about it being perverted..... however, I did say it was a cheap hotel - so I guess that's pretty much the same thing [lol]

-kaht

Looking for a puppy?

[small]Silky Terriers are small, relatively odorless dogs that shed no fur and make great indoor pets.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top