No hanging chads here, we promise! Login and vote now.
By kbilsted
via firstclassthoughts.co.uk
Published: Jul 16 2008 / 07:13
By kbilsted
via firstclassthoughts.co.uk
Published: Jul 16 2008 / 07:13
Comments
philpill replied ago:
I bet the reason most people get it wrong (me included) is 'cos they assume you can only fit one ball per bowl ...
kbilsted replied ago:
point taken. I've just changed the text. But just reading the first subsequent section should tell you that that was possible.
Thierry.Lefort replied ago:
hum ... my guess is that most CS student already know the answer as it is a basic logic problem and a great programming exercise ...
But I prefer the other harder version which is : you have the same equipment as earlier but you have 12 balls and one of them is either lighter or heavier, you only can use the balance 3 times and you have to tell which ball is different AND if it is lighter or heavier.
First, try to find a solution(there are more than one), then write the program that will find all the solutions ! (It was my Prolog final exam!)
Have a lot of fun ;-)
kbilsted replied ago:
WOW the idea with the prolog program sounds fun. But I guess it's easily doable in any programming language. I know of the 12 ball problem, but I was saving it for a later post... if you want to send me any prolog code or other code, please email me LOL
Thierry.Lefort replied ago:
héhé ... it was 10 years ago while I was a CS student ...
But it would be fun to try again I guess ;-)
tanesha.net replied ago:
And, I got it wrong because I did not assume that the remaining 7 balls are of equal weight (8 are identical looking, but one is heavier, why would the 7 then be identical weight? :) )
Cheers,
Soren
ADanto6840 replied ago:
,tanesha.net hit the nail on the head - you *MUST* make it clear that 7 balls are equally weighted and an 8th ball is heavier, otherwise if the other 7 'identical' looking balls are different weights your answer changes.
kbilsted replied ago:
thanks for pointing this out. I'll fix it ASAP. Hope you had fun with it despite that flaw :)
stugots replied ago:
"Pick any 2 balls and compare these against each other, e.g. {1} against {2}. If the scale balances, you know it is ball 3 is the heavier."
WRONG. Ball 3 could be heavier than either ball 1 or ball 2, but NOT heavier than ball 1 and 2 combined. This quiz is flawed.
stugots replied ago:
Sorry, never mind, I misread the quiz! I'm flawed!
kbilsted replied ago:
LOL glad to hear.. self searching has never hurt anyone :)
tgautier replied ago:
Agree with Thierry - this problem is often called "12 coins" where the challenge is a bit harder. Took me two days to solve 12 coins the first time I saw it years ago. Of course you can google it for a solution - I think there are about three total solutions.
thetoolman replied ago:
The site is down for me, but I found the question in google cache:
This is one of my favorite questions to ask people. Primarily computer science people, as they always get this one wrong :-)
The problem is quite simple. You are given 8 identical-looking balls, one of which is heavier than the other 7. Using an old-fashioned mechanical scale you must identify the heavier ball using the scale as few times as possible. The scale is constructed using two bowls and an arm enabling the bowls to either balance or have one bowl rising while the other (and heavier bowl) falling. You can't just add one ball at a time thinking its one weighing, however, you may put any number of balls in each bowl... All you need to solve the puzzle is to use a bit of common sense.
How many weighings are required to identify the heavier ball?
Figure caption: How many weighings are required to identify the heavier ball?
kenallen999 replied ago:
Are you joking - this takes about 10 seconds of thought.
Weigh 3 balls against 3 balls - if they are equal - weight the two remaining balls against each other
- or - if one set of three balls is heavier select two of the three and weigh them against each other, if they are equal it is the 3rd ball of that set.,
,
Voters For This Link (63)
Voters Against This Link (7)