毒酒桶 II
Poisoned Kegs II
题目详情
国王有 10 名仆人试酒, 桶酒中恰好 1 桶有毒。若喝到毒酒,1 个月后死亡;否则存活。
仆人只同意参与 1 个月。
问:最大 是多少,才能保证国王一定能找出毒桶?
A King has servants who risk their lives to test which of the kegs of wine is poisoned. Exactly one keg is poisoned, and if a servant drinks from it, they will die in month, otherwise, they survive. The servants agree to participate for only month. What is the maximum value of such that the king can always identify the poisoned keg?
解析
10 名仆人对应 10 位二进制信息,可区分 种死亡模式。
把桶编号为 0.. 的二进制;第 位为 1 的桶由第 名仆人去尝。
1 个月后死亡模式唯一对应桶编号。
因此最大 。
Original Explanation
The kegs can be labeled in binary from to , and the servants are labeled from to . With servants, we can represent up to binary digits. Each keg label can be written as , where or . We give wine from keg to all servants whose indices match the binary sequence:
For example, if , servants and receive wine from keg . After a month, the pattern of servants who die reveals which keg is poisoned. If servants and die, then keg is poisoned. This creates a one-to-one mapping between the kegs and binary sequences of length . Thus, the maximum is kegs. We can't test more than this, as there are only subsets of servants, which wouldn't allow unique identification if .