27 marbles and a balancing scale

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

AntonT
Posts: 19
Joined: Tue Apr 10, 2007 7:04 pm UTC
Location: Bath, United Kingdom
Contact:

27 marbles and a balancing scale

Postby AntonT » Fri Apr 13, 2007 6:52 pm UTC

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?

User avatar
Yakk
Poster with most posts but no title.
Posts: 11058
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

Postby Yakk » Fri Apr 13, 2007 7:14 pm UTC

3^3 = 27. QED.

User avatar
skeptical scientist
closed-minded spiritualist
Posts: 6142
Joined: Tue Nov 28, 2006 6:09 am UTC
Location: San Francisco

Postby skeptical scientist » Fri Apr 13, 2007 7:18 pm UTC

Nice solution, Yakk. I approve.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.

"With math, all things are possible." —Rebecca Watson

User avatar
Strilanc
Posts: 646
Joined: Fri Dec 08, 2006 7:18 am UTC

Postby Strilanc » Fri Apr 13, 2007 7:31 pm UTC

You are given 3^n marbles - all identical looking. 1 is slightly heavier than the rest. Only using a balancing scale (one that only shows which side is heavier) n times, how would you determine the heaviest ball?

:P
Don't pay attention to this signature, it's contradictory.

User avatar
Drostie
Posts: 262
Joined: Fri Nov 03, 2006 6:17 am UTC

Postby Drostie » Sat Apr 14, 2007 7:32 pm UTC

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.

User avatar
gmalivuk
GNU Terry Pratchett
Posts: 25854
Joined: Wed Feb 28, 2007 6:02 pm UTC
Location: Here and There
Contact:

Postby gmalivuk » Sat Apr 14, 2007 9:29 pm UTC

A fairly quick search (for "weighing marbles") would show that this has already been solved in a far more general form here.
Unless stated otherwise, I do not care whether a statement, by itself, constitutes a persuasive political argument. I care whether it's true.
---
If this post has math that doesn't work for you, use TeX the World for Firefox or Chrome

(he/him/his)


Return to “Logic Puzzles”

Who is online

Users browsing this forum: Google Feedfetcher and 8 guests