# Thread: Card game: number of combinations

1. ## Card game: number of combinations

In a card game an Ace = 4 points, king=3 points, queen=2 points and jack=1 point.
Now we have only 16 cards that have points to deal with(4A,4K,4Q,4J)
To reach 4 points, we have 5 ways: (0A+0K+0Q+4J),(0A+0K+1Q+2J),(0A+0K+2Q+0J),(0A+1K+0 Q+1J),(1A+0K+0Q+0J)
Or another example to reach 7 points we have 9 ways: (0A+0K+2Q+3J),(0A+0K+3Q+1J),(0A+1K+0Q+4J),(0A+1K+1 Q+2J),(0A+1K+2Q+0J),(0A+2K+0Q+1J),(1A+0K+0Q+3J),(1 A+0K+1Q+1J),(1A+1K+0Q+0J)

How can I get a formula to find the number of ways to reach a specific point "n".

Regards.

2. ## Re: Card game: number of combinations

Originally Posted by billobillo
In a card game an Ace = 4 points, king=3 points, queen=2 points and jack=1 point.
Now we have only 16 cards that have points to deal with(4A,4K,4Q,4J)
To reach 4 points, we have 5 ways: (0A+0K+0Q+4J),(0A+0K+1Q+2J),(0A+0K+2Q+0J),(0A+1K+0 Q+1J),(1A+0K+0Q+0J)
Or another example to reach 7 points we have 9 ways: (0A+0K+2Q+3J),(0A+0K+3Q+1J),(0A+1K+0Q+4J),(0A+1K+1 Q+2J),(0A+1K+2Q+0J),(0A+2K+0Q+1J),(1A+0K+0Q+3J),(1 A+0K+1Q+1J),(1A+1K+0Q+0J)
If you expand $\prod\limits_{j = 1}^4 {\left( {\sum\limits_{k = 0}^4 {{x^{jk}}} } \right)}$ the coefficients of the $x$ terms answer your question. That is both $5x^4~\&~9x^7$ are in the expansion.
I use the CAS MathCad to eapand.
Here is WolframAlpha .

3. ## Re: Card game: number of combinations

Thank you for your time,nice solution, but is there a way to get the 5 or 9 without expanding the whole formula?
A combination formula for example?

4. ## Re: Card game: number of combinations

Originally Posted by billobillo
Is there a way to get the 5 or 9 without expanding the whole formula?
A combination formula for example?
In your OP you requested "How can I get a formula to find the number of ways to reach a specific point "n"."
That is what I did. So far as I know there is no formula for particular terms.
These problems are solved by generating functions.

5. ## Re: Card game: number of combinations

Well thanks again for your help, I was having a hard time for finding a solution, and your solution is so helpful.