how to find counterfeit coin out of 8 coins
3 Suppose there are seven coins, all with the same weight, and a counterfeit coin that weights less than the others. How many weighings are necessary using a balance scale to determine which of the eight coins is the counterfeit one? Give an algorithm for finding this counterfeit coin.
两次称重就足够了 - 首先比较硬币1,2,3到4,5,6,然后你会有两到三个硬币进行第二次比较。
链接地址: http://www.djcxy.com/p/70676.html上一篇: 用于修改硬币改变的多项式时间算法
下一篇: 如何从8个硬币中找到假币