Find the possible combinations

  • Thread starter Thread starter Mentallic
  • Start date Start date
  • Tags Tags
    Combinations
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 1K views
Messages
3,802
Reaction score
95

Homework Statement


This is something I want to know regarding a game series I am a big fan of.
If we are given a certain amount of points that can be distributed among a certain number of different skills, with the added restriction that each skill has a maximum number of points that can be put into it which is less than the total points we are given, then find the possible combinations.


Homework Equations


[tex]P(n,r)=\frac{n!}{(n-r)!}[/tex]

[tex]C(n,r)=\frac{n!}{r!(n-r)!}[/tex]


The Attempt at a Solution


I was able to find that if we ignore the maximum limit for each skill, then if
S = number of skills
P = number of points

The number of combinations C, should be equal to

[tex]C=\frac{(S+P-1)!}{P!(S-1)!} = C(S+P-1,P)[/tex]

Now to add the limit in each skill to the mix, I'm not feeling comfortable about. Any ideas/hints?
 
Physics news on Phys.org


[tex]C=\frac{(S+P-1)!}{P!(S-1)!}[/tex]

Is exactly the answer if there were no limits. This problem reminds me of the Einstein solid where you have N oscillators (S skills) and q energy units (P points). You have S buckets and P balls to place in the buckets.

What I would do next is to calculate the number of ways you can Put (P - (P_max+1)) units of energy into (S - 1) skills. This is the situation where you have put P_max + 1 points into 1 bucket and are distributing the rest among the other buckets. Then put 1 more in the filled bucket and calculate the number of arrangements all the way up to 1 bucket having P skill points. This is assuming you can't completely fill 2 buckets (P < 2*P_max)

So, the number of states where you have overfilled 1 bucket is:

[tex]\sum^{P-P_m}_{n=1} \frac{(P-P_m-n+S-2)!}{(P-P_m-n)!(S-2)!}[/tex]

You can probably use the same or a similar argument for P>2*p_max