2
$\begingroup$

So, I've created a simple card game. Let's image a deck of cards with 3 suits with purely numeric values. A constraint being that there are only 12 cards opposed to 13 cards in each suit. I.e. there are three 1's, three 2's...three 12's for a total of 36 cards in the deck. Now, given a 5 card hand, how many different ways can I add up to n? For reference, the min hand would add up to n = 7 and the max hand would add up to n = 58. There are (36 choose 5) unique hands.

The ways to count the hands that add up to the minimum and maximum is 3

WLOG, n = 7. I can add up to 7 with (3 choose 3)*(3 choose 2) = 1*3 = 3 ways. This follows from the fact that I can pick all three 1's and then there are (3 choose 2) ways to pick the two of the three 2's in the deck.

Now, things start to get a little tough for the other numbers. n = 8 is do-able by hand but once we hit n = 9, I start to run into trouble. This is of course the motivation to using counting techniques!

For reference, here are the possible ways to add up to n = {7,8,9} with a 5 card hand given the possible hands...(I brute forced this in C)

Bin[7]=3 Bin[8]=12 Bin[9]=39

I indeed have brute forced all the ways to add up to a given n but what's the fun in that? It would be great to use counting techniques to do this but I am not sure if this is a solvable problem using counting.

If this isn't solvable using counting, what other methods are available to solve this problem (if any)?

Thanks

$\endgroup$
  • $\begingroup$ This smells like you need to use partitions, and, as you suspect, it is involved counting them. $\endgroup$ – John Nov 12 '14 at 21:05
  • $\begingroup$ I will look into those. Thanks. Still open for other suggestions too ! $\endgroup$ – datKiDfromNY Nov 12 '14 at 22:29
  • $\begingroup$ Update: This may indeed be an unsolved problem. $\endgroup$ – datKiDfromNY Nov 13 '14 at 2:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.