How to count the number of n-tuples $(x_1,x_2,...,x_n)$ that give a distinct sum?

409 Views Asked by At

Say we have the following $n-$tuple $(x_1,x_2,...,x_n)$ such that $$1\leq x_i\leq 2n,\text{ for all }i=1,2,...,n.$$ I want to know how many tuples exist which give the same sum. So for instance if $n=3$: $$(1,2,1)\equiv (2,1,1)\equiv (1,1,2)$$ because they yield the same sum.

I read some answers to similar questions and found people using the stars and bars technique or Polya Enumeration Theorem (which I don't clearly understand). Furthermore, if I understand the stars bar approach, then we need to know the sum $\sum_{i=1}^{n} x_i$ which will be equal to the number of stars and then you could throw in the $n-1$ bars. Here the number of stars range from $n$ to $2n^2.$ So maybe I have to do the following sum: $$S = \sum_{m=n}^{2n^2} \binom{m-1}{n-1}.$$ Does this make sense?

1

There are 1 best solutions below

0
On

You are looking for the number of integer compositions of integer $m$ into exactly $n$ parts for $n\le m\le 2n^2$.

Their number is

$$\binom{m-1}{n-1}.$$

Yes, you are right. Their total number is therefore

$$\sum_{m=n}^{2n^2}\binom{m-1}{n-1}.$$