神枪手
Straight Shooter
题目详情
如果我们将顺子定义为 5 张连续点数的牌, 都具有相同的花色,那么在一副标准牌中的 5 张牌扑克牌中,发到顺子的概率是多少?
If we define a straight to be 5 cards with consecutive rank, all sharing the same suit, what is the probability of being dealt a straight in a 5-card poker hand from a standard deck of cards?
解析
在开始之前,先介绍一些基本术语和卡片基础知识:
:牌的“数字”(A、3、7、K 等)
:牌的“符号”(梅花、方块、红心、黑桃)
:有 13 个等级(A、2、3、4 ... 10、J、Q、K),每个等级有 4 种花色(如上所示),每个标准牌组共有 卡
在我看来,解决这个问题的最有效方法是从概率计数方法开始。更具体地说,是 ,其中分子表示事件 可能发生的有效方式的数量,总数表示可能结果的总数。
分母只是扑克牌的总数,即你可以从 52 张牌中发 5 张牌的方式的数量。即,它等于 。
然而,分子更具挑战性,它要求我们计算顺子发生的有效方式的数量。
让我们按花色开始计算。假设我们有牌 A、2、3、4、5,那么有效花色排列的总数是多少?
嗯,对于 5 个等级中的每一个,我们都有 4 种花色。这给了我们 花色的总排列。 我们必须记住,顺子的一个条件是所有 5 张牌不能有相同的花色。这意味着我们必须将 减去 4,因为这 4 个无效方式。 4 种可能的无效花色排列是如果所有 A 到 5 的牌都有花色梅花、或花色方块、或花色红心或花色黑桃。我们从 中减去这个值,得到最终的表达式 ,在给定正确的等级排列的情况下,有效花色排列的数量。
现在,我们需要计算有效排名排列的总数。我们可以通过基本的枚举(计数)来做到这一点。首先,我们有 A、2、3、4、5。然后是 2、3、4、5、6。之后是 3、4、5、6、7。依此类推,直到我们最后的枚举:10、J、Q、K、A(请注意,A 可以作为低牌或高牌)。这给了我们 10 个排名的总枚举。
结合等级枚举的数量以及每个等级枚举的有效花色排列的数量,我们得到 。
将其除以分母,我们得到最终的解决方案:
Original Explanation
Before I begin, here's some basic terminology and card basics:
: the 'number' of a card (Ace, 3, 7, King, etc)
: the 'sign' of a card (club, diamond, heart, spade)
: there are 13 ranks (Ace, 2, 3, 4 ... 10, Jack, Queen, King), and 4 suits for each rank (given above), giving us a total of cards per standard deck
The most approach to solving this problem, in my opinion, is by beginning with the counting approach to probability. More specifically, the , where the numerator denotes the number of valid ways event can occur, and total denotes the total number of possible outcomes.
The denominator is simply the total number of poker hands, of the number of ways you can be dealt 5 cards from 52. Namely, it's equal to .
The numerator, however, is a little more challenging, and asks us to count the number of valid ways for a straight to occur.
Let's start this calculation by suit. Given that we have cards A, 2, 3, 4, 5, what are the total number of valid suit arrangements?
Well, for each of the 5 ranks, we have 4 suits. This gives us total arrangements of suits. we must remember that a condition of a straight is that all 5 cards cannot share the same suit. This means we must subtract by 4, for the 4 invalid ways. The 4 possible invalid suit arrangements are if all card Ace through 5 have suit clubs, or suit diamonds, or suit hearts, or suit spades. We subtract this from to get our final expression, , for the number of valid suit arrangements, given a correct rank arrangement.
Now, we need to calculate the total number of valid rank arrangements. We can do this with basic enumeration (counting). First, we have Ace, 2, 3, 4, 5. Then, 2, 3, 4, 5, 6. After, 3, 4, 5, 6, 7. So on and so forth until our last enumeration, 10, Jack, Queen, King, Ace (note that ace can serve as low or high card). This gives us 10 total enumerations of rank.
Combining the number of rank enumerations, and the number of valid suit arrangements per rank enumeration, we get .
Divide this by our denominator, and we get our final solution: