If you know the fake coin is lighter, then you can do it more efficiently than this: think groups of 3.
Dennis Deems wrote:Divide and conquer. If n is even, divide the coins into two equal stacks and put them on each side of the balance. One stack will be heavier than the other.
Mike Simmons wrote:Even if you don't know the fake coin is lighter, you can do it more efficiently than that. And perhaps "groups of 3" should be "3 groups"?
Greg Charles wrote:I knew that math looked wrong. It's:
c = (3^n-2)/2
Greg Charles wrote:Drat. Murprhey's law strikes again.
Ryan McGuire wrote:If the number of coins, c = (n^3 - 3)/2 for some positive integer value of n, then the solution can be found here.
To find the fake coin out of 3 coins in 2 weightings...
1 <--> 2
1 <--> 3
From there, you can develop the algorithm for 12 coins in 3 weightings using the method on the site mentioned above.
Ryan McGuire wrote:
Warning: The following post gets into just one little detail of this already-solved puzzle. If you're already bored with the thread up to this point, this post will only make matters worse.
World domination requires a hollowed out volcano with good submarine access. Tiny ads are optional.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton