Pluzzes - Heavier ball
2016-04-15 14:18
134 查看
There are the same 8 balls, except just one ball a little bit heavier than the other 7 balls. And now you only have one scale, how do you use the least time to find the heavier ball?
I believe that most people can come up with at least one method to solve it.
Method 1: compare 3 times, which is eleborated in the following picture:
However, this is not the best method. The best method can find the heavier ball with only two comparsions.
we can separate the 8 balls into 3 groups which contain 3 balls, 3 balls, and 2 balls respectively.
So after comparsion group1 and group2, we can understand the heavier ball in which groups.
Next, in each group, there are only 2 or 3 balls, so we can find the solution with one more comparsion.
For 8 balls, we can find the heavier ball with only 2 comparsions. Is it fun ^_-
Note: for 9 balls, the answer is the same. You can try to think about it by yourself.
相关文章推荐
- 微软Word 2007数学插件 Microsoft Math 提供下载
- 关于C# Math 处理奇进偶不进的实现代码
- JavaScript中的Math.SQRT1_2属性使用简介
- JavaScript Math.ceil() 函数使用介绍
- 与Math.pow 相反的函数使用介绍
- JavaScript中使用指数方法Math.exp()的简介
- JavaScript使用Math.Min返回两个数中较小数的方法
- Ajax获取页面被缓存的解决方法
- JavaScript高级程序设计 阅读笔记(十二) js内置对象Math
- JavaScript中Math对象使用说明
- javascript对象之内置对象Math使用方法
- 基于java math API 的详细解释说明
- 简介JavaScript中用于处理正切的Math.tan()方法
- 浅谈JavaScript中的Math.atan()方法的使用
- PHP内置的Math函数效率测试
- 在JavaScript中使用对数Math.log()方法的教程
- JavaScript中用于四舍五入的Math.round()方法讲解
- 简介JavaScript中Math.LOG10E属性的使用
- 在javascript中随机数 math random如何生成指定范围数值的随机数
- 在PHP模板引擎smarty生成随机数的方法和math函数详解