[algogeeks] Re: puzzle - Weighing marbles
Do you know if the faulty marble is lighter or heavier? On 2/2/07, Atamurad Hezretkuliyev [EMAIL PROTECTED] wrote: Hi, Can somebody help me with this puzzle? I tried to solve it but couldn't. Puzzle 1 Weighing marbles Given are 12 marbles. One of these marbles is slightly heavier or lighter than the others. You have a two plate scale. You are allowed to weigh three times. Can you find the marble that differs in weight? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/algogeeks -~--~~~~--~~--~--~---
[algogeeks] Re: puzzle - Weighing marbles
We don't know if the marble is heavier or lighter ... which makes it interesting :) Here's a very clever solution: http://mathforum.org/kb/message.jspa?messageID=1085028tstart=0 On 2/2/07, aditi saha [EMAIL PROTECTED] wrote: Do you know if the faulty marble is lighter or heavier? On 2/2/07, Atamurad Hezretkuliyev [EMAIL PROTECTED] wrote: Hi, Can somebody help me with this puzzle? I tried to solve it but couldn't. Puzzle 1 Weighing marbles Given are 12 marbles. One of these marbles is slightly heavier or lighter than the others. You have a two plate scale. You are allowed to weigh three times. Can you find the marble that differs in weight? -- Fear of the LORD is the beginning of knowledge (Proverbs 1:7) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/algogeeks -~--~~~~--~~--~--~---
[algogeeks] Re: puzzle - Weighing marbles
Split the marbles into sets of 4 each Compare the first and second sets If both the sets are equal (the problem is in third set) { choose 2 of the marbles in the third set compare with 2 marbles from the first set(which we know are good) if comparision is equal { compare one of the remaining 2 marbles in the third set with a good marble if comparison is equal culprit is the uncompared marble in the third set else culprit is the last chosen marble in the third set } else { compare one of the chosen 2 marbles in the third set with a good marble if comparison is equal culprit is the uncompared marble in the chosen 2 of the third set else culprit is the last chosen marble in the third set } } else { choose one of the marbles from the first pan and shift to second pan remove the other 3 marbles from the second pan and put 3 from the third pan If the comparison value changes (now , previous or vice versa) { one of the transferred 2 marbles is the culprit found by comparing one of the marble with a standard one (from third set) } else { If comparison value is equal { one of the three marbles from second pan was the culprit (we know heavier or lighter now ...from the first comparison) can be determined by comparing two of the marbles if equal third guy is the culprit else the (heavier or ligher guy) as determined by the first comparison } else (comparison values are same) { one of the three unshifted marbles from the first pan is the culprit can be found in a strategy similar to the previous cases } } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups-beta.google.com/group/algogeeks -~--~~~~--~~--~--~---