A forum for good logic/math puzzles.
6 posts • Page 1 of 1
You are given 27 marbles - all identical looking. 26 are identical in mass, the 27th is slightly heavier than the rest. Only using a balancing scale (one that only shows which side is heavier) 3 times, how would you determine the heaviest ball?
- skeptical scientist
- closed-minded spiritualist
- Posts: 6142
- Joined: Tue Nov 28, 2006 6:09 am UTC
- Location: San Francisco
For people who have never seen the solution before, and want to know what it is:
Split your marbles into three groups A, B, and C. Measure A versus B. If the heavy marble is in A, then A>B. If the heavy marble is in B, then A<B. If the heavy marble is in C, then A=B. So one weighing will let you separate between 3 different options. More generally, if N is not divisible by 3, either leave C with one more marble if N ≡ 1 (mod 3), or one less marble if N ≡ 2 (mod 3). This will allow you to find the heavy marble in ceil( log3( N ) ) comparisons.
- GNU Terry Pratchett
- Posts: 26354
- Joined: Wed Feb 28, 2007 6:02 pm UTC
- Location: Here and There
A fairly quick search (for "weighing marbles") would show that this has already been solved in a far more general form here.
Who is online
Users browsing this forum: No registered users and 12 guests