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?
-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]
[small](He's back)[/small]
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
[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]
[small](He's back)[/small]