# Why are there $\binom{2k+n-1}{2k}$ ways to create a homogeneous polynomial term of degree $2k$ with $n$ variables?

Why are there $$\binom{2k+n-1}{2k}$$ ways to create a homogenious polynomial term, which is of the form:

$$x_1^{a_1} + x_2^{a_2} + \dots x_n^{a_n}$$ where $$a_1 + a_2 + \dots + a_n = 2k$$

We're looking into the set $$H_{2k,n}$$, the set of homogeneous polynomials of degree $$2k$$ with $$n$$ variables, and the dimension of this set is apparently $$\binom{2k+n-1}{2k}$$, but I can't wrap my head around it.

Anyone a clear explanation?

Stars and bars. You have $$2 k$$ exponents to distribute among $$n$$ variables. Think of it as $$2 k$$ stars separated into $$n$$ buckets (the variables) by $$n - 1$$ bars. Something like "$$****|*|**||*$$" ($$a^4 b^1 c^2 d^0 e^1$$). So you have $$2 k + n - 1$$ positions in all, of which you have to select $$n - 1$$ for the bars.