返回题库

黑屋分牌

Dark Room Deck

专题
Discrete Math / 离散数学
难度
L2

题目详情

黑暗房间里有 52 张牌,恰好 10 张正面朝上,其余朝下。你可以触摸和翻牌,但无法感知哪张正面朝上。

要求把牌分成两堆,使两堆中“正面朝上的张数”相同。

In a dark room, there is a deck of 52 cards, with exactly 10 cards facing up, rest are facing down. You can touch the cards with your hands but cannot sense which cards are facing up/down. You need to split all these cards into two decks with equal number of cards facing up!

Hint

We never said that both the final decks must have 5 cards each facing up.

解析

做法:

  1. 随机拿出 10 张作为 A 堆,其余 42 张为 B 堆。
  2. 把 A 堆的 10 张 全部翻面

证明:设原先 A 堆里有 xx 张正面,则 B 堆有 10x10-x 张正面。A 堆翻面后正面数变为 10x10-x,与 B 堆相同。


Original Explanation

Create a deck of 10 cards randomly from the original 52-card deck. And then turn over the 10-card deck.

Solution

This puzzle involves a trick, i.e, we can manually flip over any number of cards.

We create a deck of k=10k=10 cards randomly selected from the deck.

Suppose the kk-card deck included xx number of cards that were originally facing up, and kxk-x cards are facing up in the other deck.

By flipping over this kk-card deck, now there are exactly kxk-x cards facing up in this deck, same as the other deck.


This question can be solved regardless of the original number k=10k=10, as long as we know the count of cards facing up.