in All availableThis forumThis topic
 An interesting brain teaser
Author Message
smellycheeseboy
Apprentice

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

 Posted: Tue Jun 28, 2005 12:16 am    Post subject: An interesting brain teaser 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
xaenn
n00b

Joined: 21 Oct 2004
Posts: 23

 Posted: Tue Jun 28, 2005 2:03 am    Post subject: 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.
myuser
Apprentice

Joined: 31 Jan 2004
Posts: 218

 Posted: Tue Jun 28, 2005 2:28 am    Post subject: Place counterfeit detection apparatus in / on the scales.
resolute
n00b

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

Posted: Tue Jun 28, 2005 2:34 am    Post subject:

 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."
Valhlalla
Apprentice

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

 Posted: Tue Jun 28, 2005 3:21 am    Post subject: I can get it to work with 3 but only if the first weighing is balanced._________________Pork Chop Sandwiches, Oh Sh*t!
smellycheeseboy
Apprentice

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

 Posted: Tue Jun 28, 2005 4:12 am    Post subject: 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. Me_________________"No amount of fear can stop the rise of free media, or free software." --Jonathan Schwartz, Sun Microsystems
xaenn
n00b

Joined: 21 Oct 2004
Posts: 23

 Posted: Tue Jun 28, 2005 4:54 am    Post subject: Yeah, needless to say I would've never figured that out.
doubleagent
Guru

Joined: 15 Apr 2005
Posts: 444
Location: 127.0.0.1

Posted: Tue Jun 28, 2005 5:48 am    Post subject:

 Valhlalla wrote: I can get it to work with 3 but only if the first weighing is balanced.
_________________
 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
beu
Retired Dev

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

 Posted: Tue Jun 28, 2005 8:18 am    Post subject: Re: An interesting brain teaser Interesting ?!
richardjames
n00b

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

 Posted: Tue Jun 28, 2005 9:33 am    Post subject: 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.
smellycheeseboy
Apprentice

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

 Posted: Mon Jul 04, 2005 4:12 am    Post subject: 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
andrewd18
Guru

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

Posted: Mon Jul 04, 2005 4:16 am    Post subject:

 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
pjp

Joined: 16 Apr 2002
Posts: 16716

 Posted: Mon Jul 04, 2005 4:33 am    Post subject: A slight variation: http://www.cartalk.com/content/puzzler/transcripts/200353/answer.html Could've sworn this thread's version had already been posted._________________Ladies and gentlemen, allow me to present, Man Not Caring. -- Perry Cox
tln
Veteran

Joined: 24 Sep 2003
Posts: 1501

 Posted: Mon Jul 04, 2005 4:43 am    Post subject: IIRC a variation of this test is/was used by IBM during job interviews.
stevenaleach
n00b

Joined: 18 May 2005
Posts: 19

 Posted: Tue Jul 05, 2005 12:46 am    Post subject: 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?
stustill
Guru

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

 Posted: Tue Jul 05, 2005 2:08 am    Post subject: 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
stevenaleach
n00b

Joined: 18 May 2005
Posts: 19

Posted: Tue Jul 05, 2005 5:05 am    Post subject:

 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
aidy
l33t

Joined: 07 Apr 2005
Posts: 915

Posted: Tue Jul 05, 2005 9:08 am    Post subject:

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.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First
 All times are GMT Page 1 of 1

 Jump to: Select a forum Assistance----------------News & AnnouncementsFrequently Asked QuestionsInstalling GentooMultimediaDesktop EnvironmentsNetworking & SecurityKernel & HardwarePortage & ProgrammingGamers & PlayersOther Things GentooUnsupported Software Discussion & Documentation----------------Documentation, Tips & TricksGentoo ChatGentoo Forums FeedbackOff the WallDuplicate Threads International Gentoo Users----------------中文 (Chinese)DutchFinnishFrenchDeutsches Forum (German)  Diskussionsforum  Deutsche DokumentationGreekForum italiano (Italian)  Forum di discussione italiano  Risorse italiane (documentazione e tools)Polskie forum (Polish)  Instalacja i sprzęt  Polish OTWPortuguese  Documentação, Ferramentas e DicasRussianScandinavianSpanishOther Languages Architectures & Platforms----------------Gentoo on AMD64Gentoo on ARMGentoo on PPCGentoo on SparcGentoo on Alternative ArchitecturesGentoo for Mac OS X (Portage for Mac OS X)
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