17 球问题
17 Balls
题目详情
有 18 颗豆子,其中 17 颗完全相同,1 颗更重。使用天平,至少需要称几次才能保证找出更重的那一颗?
There are 18 beans, 17 of which are identical and one is heavier. What is the minimum number of weighings using a balance scale to guarantee finding the heavier bean?
解析
天平一次称量只有 3 种结果:左边重、右边重、两边相等。因此称量 次最多区分 种情况。要在 18 颗豆子中保证找出唯一更重的那个,必须满足
最小的整数 为 3,因此最少需要 次称量。
Original Explanation
A balance scale has three outcomes:
- Left side heavier
- Right side heavier
- Both sides equal
Each weighing can give us at most 3 outcomes, so in general, if we have n items and k weighings:
is the minimum requirement to guarantee identification of one odd item. This is a standard approach from "coin weighing problems."
We have beans. We want the smallest integer such that:
So the minimum number of weighings is