Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: Generating all 5-card hands

by hv (Parson)
on May 19, 2005 at 12:12 UTC ( #458597=note: print w/replies, xml ) Need Help??

in reply to Generating all 5-card hands

For a hand with a 5 to avoid scoring 2 points, it must have no pair, and no subset that sums to 15. Since that means we can only have one of each of the pairs (1, 9), (2, 8), (3, 7), (4, 6) that sum to 10, the hands to consider consist of the 16 ways we can choose one from each of those pairs.

If we have 9 we cannot have 6, so we must have 4, so we cannot have 2, so we must have 8, so we cannot have 7, so we must have 3. But 3+4+8 = 15, so we cannot have 9.

So we must have 1; if we have 8 we cannot have 7, or 6, so we must have 3 and 4. So we have 3+4+8 = 15 again, which means we cannot have 8.

So we must have 1 and 2, which means we cannot have 7, so we must have 3. But 1+2+3+5+4 = 15, and 1+3+5+6 = 15. So there is no hand including a five which doesn't include at least 2 points.


Replies are listed 'Best First'.
Re^2: Generating all 5-card hands
by Anonymous Monk on May 05, 2008 at 22:46 UTC
    I thought you would be interested to know that I added a link to this discussion at Cribbage Corner, in the section on hand distribution and probabilities. Thank you for taking the trouble to work this out!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://458597]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2019-04-23 14:25 GMT
Find Nodes?
    Voting Booth?
    I am most likely to install a new module from CPAN if:

    Results (118 votes). Check out past polls.