Gr. 12 Data Management
posted by avm .
In playing poker, the likelihood of being dealt a particular hand depends on the number of ways in which that hand could have been dealt from the 52card deck. Find the number of ways each hand could be dealt.
a) No pairs (five different face values, not in sequence, not all cards in the same suit)
cards: 2 (spades) 5 (clubs) 6 (diamonds) 10 (spades) jack (hearts)

I'm not sure how this is data management.
Anyway, I found this one longer and trickier than I first thought it would be. Calculating the number of hands without pairs is easy:
You can choose from 52 for your first card. That rules out that card and the three others of same value, so you next choose from 48, then from 44, then from 40, then from 36. Allowing them to be drawn in any order, you need to divide that by 5!, so your answer is
52 * 48 * 44 * 40 * 36 / 5! = 1317888.
But that doesn't eliminate straights and flushes, so your final answer will be :
1317888  (number of straights)  (number of flushes) + (number of flushes that are also straights)
since some straights are also flushes.
How many of those hands are flushes? There are 13C5 flushes for each suit. That's 1287 * 4.
And then how many are straights? There are 10 possible straights, but each of the 5 cards could be in any of the 4 suits, so 10*4*4*4*4*4.
But some flushes are also straights, and I'm going to leave that one for you. I am reassured that my logic is correct because Wikipedia gives the final answer I get, but I confess I don't quite see their formula.