散落的硬币
Scattered Coins
题目详情
你站在一个房间里,地板上散落着 1000 个硬币。在这些硬币中,有 980 枚反面朝上,其余 20 枚正面朝上。你的任务是将硬币分成两堆。你能保证两堆的正面朝上的数量相同吗?你不能触摸硬币来确定其侧面,但你可以翻转任意数量的硬币。
You are standing in a room in which the floor is scattered with 1000 coins. Out of those coins, 980 have tails facing up and the remaining 20 have heads facing up. Your task is to separate the coins into two piles. Can you ensure that both piles have an equal number of heads facing up? You are not allowed to touch the coins to determine their side, but you can flip as many coins as you'd like.
解析
假设我们首先将硬币分成两堆。第一堆有 硬币,第二堆有 硬币。如果 是第 1 堆中正面朝上的硬币数量,那么 是我们需要正面朝上的第 2 堆中正面朝上的硬币数量。这也意味着第一堆中有 硬币,且尾部朝上。
如果我们翻转第一堆中的所有硬币,所有正面都会变成反面,所有反面都会变成正面。结果,第一堆将有 头和 尾。因此,首先,我们需要使第一堆中的正面数量等于第二堆中的正面数量:。该方程的解为 。
因此,如果我们随机取出20枚硬币,将它们全部翻过来,那么20枚硬币的那堆正面朝上的数量应该与980枚硬币的那堆正面朝上的数量相同。
Original Explanation
Let's assume that we begin by separating the coins into two piles. The first pile has coins and the second pile has coins. If is the number of coins in pile 1 with heads facing up, then is the number of heads in pile 2 that we need to have heads facing up. This also means that there are coins in the first pile with a tails facing up.
If we were to flip all coins in the first pile, all heads become tails and all tails become heads. As a result, the first pile will have heads and tails. So to start, we need to make the number of heads in the first pile equal to the number of heads in the second pile: . The solution to this equation is .
Therefore, if we take 20 coins at random and turn them all over, the number of heads facing up in the pile with 20 coins should be the same as the number of heads facing up in the pile with 980 coins.