Given a set of N balls and one of which is defective (weighs less than others), you are allowed to weigh with a balance 3 times to find the defective. Which of the following are possible N?
------------------------------------------------------------------
答案:ABCD
A. 12 B. 16 C. 20 D. 24
梅氏砝码问题,<=27的都能称出来
----------------------------------------------------------------------------------------------------------------------------
梅氏砝码问题
有4个砝码,共重40克,现有一个天平,问这4个砝码分别为多少克?可以称出1-40克的重量。
----------------------------------------------------------------------------------------------------------------------------
这个在数学上叫做梅氏砝码问题,其叙述如下:
若有n个砝码,重量分别为M1,M2,……,Mn,且能称出从1到(M1+M2+……+Mn)的所有重量,则再加一个砝码,重量为Mn+1=(M1+M2+……+Mn)*2+1,则这n+1个砝码能称出从1到
(M1+M2+……+Mn+Mn+1)的所有重量。
取n=1,M1=1,则可以依此类推出所有砝码的重量为:
1,3,9,27,81,243,……