发牌直到触发条件
Carded Pair
题目详情
从一副标准 52 张牌中无放回依次发牌。
当满足以下任一条件时停止发牌(以先发生者为准):
- 出现 2 张国王(K);或
- 出现至少 1 张国王(K)且至少 1 张 A。
问:停止时平均一共发了多少张牌?
英文原题
Cards are dealt one-by-one from a standard deck of cards without replacement. The card dealing ends when either kings appear OR at least king and ace appear, whichever comes first. Find the expected number of cards that are dealt in the game.
解析
只需考虑已见到的 A 与 K 的状态:
- 若已见到 2 张 K,则停止;
- 若已见到至少 1 张 K 且至少 1 张 A,则停止。
用递推(在剩余牌堆中按 A/K/其它 的数量计算下一张)可得到从初始 (4K,4A,44O) 出发的期望发牌数为
英文解析
Just consider the states of A and K that have been seen:
- Stop if 2 K's have been seen;
- Stop if at least 1 K and at least 1 A have been seen.
With recursion (calculate the next one by the number of A/K/others in the remaining deck), you can get the expected number of cards from the initial (4K ,4a ,44O)