Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
An interesting brain teaser
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
smellycheeseboy
Apprentice
Apprentice


Joined: 15 May 2003
Posts: 263
Location: The Future

PostPosted: Tue Jun 28, 2005 12:16 am    Post subject: An interesting brain teaser Reply with quote

You have 12 coins, one of which is counterfeit. The counterfeit coin is either heavier or lighter than the other 11 coins.

You have to weigh the coins on a balance scale to determine which coin is the counterfeit coin.

What is the minimum number of weighings that you have to do in order to GUARANTEE that you have found the counterfeit coin and is it heavier or lighter?

I know the answer to this but I don't know how to get there so good luck.

Me
_________________
"No amount of fear can stop the rise of free media, or free software." --Jonathan Schwartz, Sun Microsystems
Back to top
View user's profile Send private message
xaenn
n00b
n00b


Joined: 21 Oct 2004
Posts: 23

PostPosted: Tue Jun 28, 2005 2:03 am    Post subject: Reply with quote

1. First put 6 on each side.

2. Take the lighter side of 6 and split it in half.

3. Assume the worst case scenario that it balances. and split the other pile of 6 in half.

4. See which pile of three is lighter.

5, Compare two of the coins

6. Compare two more of the three coins (one repeat). You now know if both balanced, that's the worst case scenario so assume they do.

7. Take two from the other stack of three and compare them.

8. Compare two more from that stack of three (one repeat)

It should now be clear which coin is different and if it is heavier or lighter.
Back to top
View user's profile Send private message
myuser
Apprentice
Apprentice


Joined: 31 Jan 2004
Posts: 218

PostPosted: Tue Jun 28, 2005 2:28 am    Post subject: Reply with quote

Place counterfeit detection apparatus in / on the scales.
Back to top
View user's profile Send private message
resolute
n00b
n00b


Joined: 23 Jan 2005
Posts: 29
Location: Texas, USA

PostPosted: Tue Jun 28, 2005 2:34 am    Post subject: Reply with quote

xaenn wrote:
1. First put 6 on each side.

2. Take the lighter side of 6 and split it in half.

3. Assume the worst case scenario that it balances. and split the other pile of 6 in half.

4. See which pile of three is lighter.

5, Compare two of the coins

6. Compare two more of the three coins (one repeat). You now know if both balanced, that's the worst case scenario so assume they do.

7. Take two from the other stack of three and compare them.

8. Compare two more from that stack of three (one repeat)

It should now be clear which coin is different and if it is heavier or lighter.

The minimum number of weighings is three. Back to the drawing board for you. :)

HINT: think about what you can do with three piles of four coins.
_________________
"Our Nation - this generation - will lift a dark threat of violence from our people and our future. We will rally the world to this cause by our efforts, by our courage. We will not tire, we will not falter, and we will not fail."
Back to top
View user's profile Send private message
Valhlalla
Apprentice
Apprentice


Joined: 22 Sep 2003
Posts: 161
Location: Sydney, Australia.

PostPosted: Tue Jun 28, 2005 3:21 am    Post subject: Reply with quote

I can get it to work with 3 but only if the first weighing is balanced.
_________________
Pork Chop Sandwiches, Oh Sh*t!
Back to top
View user's profile Send private message
smellycheeseboy
Apprentice
Apprentice


Joined: 15 May 2003
Posts: 263
Location: The Future

PostPosted: Tue Jun 28, 2005 4:12 am    Post subject: Reply with quote

Here is a link to a pretty good explanation of the answer:

http://home.att.net/~numericana/answer/recreational.htm#weighing

Its tougher than you think. I had to cheat to get it. :D

Me
_________________
"No amount of fear can stop the rise of free media, or free software." --Jonathan Schwartz, Sun Microsystems
Back to top
View user's profile Send private message
xaenn
n00b
n00b


Joined: 21 Oct 2004
Posts: 23

PostPosted: Tue Jun 28, 2005 4:54 am    Post subject: Reply with quote

Yeah, needless to say I would've never figured that out.
Back to top
View user's profile Send private message
doubleagent
Guru
Guru


Joined: 15 Apr 2005
Posts: 444
Location: 127.0.0.1

PostPosted: Tue Jun 28, 2005 5:48 am    Post subject: Reply with quote

Valhlalla wrote:
I can get it to work with 3 but only if the first weighing is balanced.
Same here. gonna read.
_________________
shickapooka wrote:
i think they programmed [otw] based on a right-wing jewish-nigger-nazi, his gay, retarded, left-wing love slave with webbed feet, and their three headed cat that poops uncontrollably. the cat is also an apple fanboy
Back to top
View user's profile Send private message
beu
Retired Dev
Retired Dev


Joined: 03 Mar 2004
Posts: 22
Location: London, UK

PostPosted: Tue Jun 28, 2005 8:18 am    Post subject: Re: An interesting brain teaser Reply with quote

Interesting ?! :evil: :evil: :evil:
Back to top
View user's profile Send private message
richardjames
n00b
n00b


Joined: 04 Jan 2005
Posts: 23
Location: Manchester, UK

PostPosted: Tue Jun 28, 2005 9:33 am    Post subject: Reply with quote

We once got a load of these as a University assignment to encourage lateral thinking or something, I will try and dig them out...
_________________
Love is a snowmobile racing across the tundra and then suddenly it flips over, trapping you underneath. At night, the ice weasels come.
Back to top
View user's profile Send private message
smellycheeseboy
Apprentice
Apprentice


Joined: 15 May 2003
Posts: 263
Location: The Future

PostPosted: Mon Jul 04, 2005 4:12 am    Post subject: Reply with quote

As soon as I stop being lazy I will post a much easy solution that I found. Until then you can rack your brains.
_________________
"No amount of fear can stop the rise of free media, or free software." --Jonathan Schwartz, Sun Microsystems
Back to top
View user's profile Send private message
andrewd18
Guru
Guru


Joined: 11 Apr 2004
Posts: 364
Location: Wisconsin, USA

PostPosted: Mon Jul 04, 2005 4:16 am    Post subject: Reply with quote

Quote:
What is the minimum number of weighings that you have to do in order to GUARANTEE that you have found the counterfeit coin and is it heavier or lighter?


42
_________________
Keep Your Toolchain Stable! - emwrap.sh

There's no place like ::1
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16348
Location: Rivendell

PostPosted: Mon Jul 04, 2005 4:33 am    Post subject: Reply with quote

A slight variation: http://www.cartalk.com/content/puzzler/transcripts/200353/answer.html

Could've sworn this thread's version had already been posted.
_________________
45
Back to top
View user's profile Send private message
tln
Veteran
Veteran


Joined: 24 Sep 2003
Posts: 1501

PostPosted: Mon Jul 04, 2005 4:43 am    Post subject: Reply with quote

IIRC a variation of this test is/was used by IBM during job interviews.
Back to top
View user's profile Send private message
stevenaleach
n00b
n00b


Joined: 18 May 2005
Posts: 19

PostPosted: Tue Jul 05, 2005 12:46 am    Post subject: Reply with quote

Another variant:

You have five stacks of coins, with 25 coins in each stack. One or more of the stacks may be counterfeit, but you don't know which one or ones. In fact, they could *all* be counterfeit or all legitimate. Your only guarantee is that the stacks are not mixed: that is each stack contains either all real or all counterfeit coins. A normal coin weighs 5 grams, whereas a counterfeit coin weighs 6 grams.

With just one weighing, you can determine which are counterfeit or real.

How?
Back to top
View user's profile Send private message
stustill
Guru
Guru


Joined: 25 Feb 2003
Posts: 333
Location: Aberdeen, Scotland

PostPosted: Tue Jul 05, 2005 2:08 am    Post subject: Reply with quote

Assuming the stacks are numbered 1 - n, take 2^n coins from each stack and weigh them. Assuming all of the stacks are legitimate this should weigh 155 grams. Deduct 155 from the actual weight and convert the answer into binary. If the LSB is 1 then stack 1 is counterfeit, if the second LSB is 1 then stack 2 is counterfeit etc.


I think that works.... might be a brain fart though!

Stu
Back to top
View user's profile Send private message
stevenaleach
n00b
n00b


Joined: 18 May 2005
Posts: 19

PostPosted: Tue Jul 05, 2005 5:05 am    Post subject: Reply with quote

Quote:
Assuming the stacks are numbered 1 - n, take 2^n coins from each stack and weigh them. Assuming all of the stacks are legitimate this should weigh 155 grams. Deduct 155 from the actual weight and convert the answer into binary. If the LSB is 1 then stack 1 is counterfeit, if the second LSB is 1 then stack 2 is counterfeit etc.


That was it. Damn that was quick :-)
Back to top
View user's profile Send private message
aidy
l33t
l33t


Joined: 07 Apr 2005
Posts: 915

PostPosted: Tue Jul 05, 2005 9:08 am    Post subject: Reply with quote

resolute wrote:
xaenn wrote:
1. First put 6 on each side.

2. Take the lighter side of 6 and split it in half.

3. Assume the worst case scenario that it balances. and split the other pile of 6 in half.

4. See which pile of three is lighter.

5, Compare two of the coins

6. Compare two more of the three coins (one repeat). You now know if both balanced, that's the worst case scenario so assume they do.

7. Take two from the other stack of three and compare them.

8. Compare two more from that stack of three (one repeat)

It should now be clear which coin is different and if it is heavier or lighter.

The minimum number of weighings is three. Back to the drawing board for you. :)

HINT: think about what you can do with three piles of four coins.

It's you that should go back to primary school, because the _maximum_ number of weighings is three.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum