In Cribbage, a hand scores as follows:
2 points for each set of cards that totals 15 (face cards count 10, aces count 1)
2 points for each pair (this means 3ofakind is worth 6 points and 4ofakind is worth 12 points)
n points for each maximal straight containing n cards (i.e. a four card straight does not also count as two three card straights)
n points for each maximal flush containing n cards (i.e. a four card flush does not also count as four three card flushes)
1 point for the jack of trumps
It's easy to show that the best five card hand is
J5555, worth 29 points, and, although impossible in an actual game, the best six card hand would be 445566, worth 46 points.
If the entire deck of 52 cards was considered to be a single cribbage hand, what would be its value?
I'm having trouble calculating all the sets that total 15 by hand  so far I figured there are 64 distinct 2card sets, worth 64*2 = 128 points, and 1124 distinct 3card sets, worth 1124*2= 2248 points. I haven't even tried to tackle the rest of the sets yet.
There are 13 fourofakind sets in the deck, so 12*13= 156 points.
The maximal straight would be 13 cards from 2 to ace (or ace to king, whatever). There are 4^13 unique 13card straights you can make with the deck, so 4^13*13= 67108864 points.
There are only four maximal flushes you can make of 13 cards each, so 4*13 = 52 points.
Plus one point for the jack of trumps.
So, the running total is:
128 + 2248 + 156 + 67108864 + 52 + 1 = 67111449 points, not including all of the ncard sets totaling 15 (where n > 3).

Posted by tomarken
on 20060607 15:38:09 