How many solution of a equations? I have the following question:
Let $n$ and $k$ be integers with $n \geq k$. How many solutions are 
there to the equation 
$$ x_1 + x_2 + \cdots + x_k = n $$
where $x_1, x_2, x_k$ are 
integers $\geq 1$?
Now I know the total number of solutions is $\binom{n+k-1}{k-1}$ but thats when $x_1 \geq 0$, $x_2 \geq 0$, $\ldots$, $x_k \geq 0$ How do I find it with the restriction?
 A: How many ways are there to distribute $n$ identical candies to $k$ kids, so that each kid gets at least one candy?
First give each kid a candy. Then distribute the remaining $n-k$ to the kids, with each kid getting $0$ or more. 
By the formula you quoted, this can be done in
$$\binom{(n-k)+k-1}{k-1}$$
ways. 
This can be simplified to $\dbinom{n-1}{k-1}$.
Remark: Please see the Wikipedia article on Stars and Bars.
I find it easier to proceed the other way. It is relatively straightforward to show directly that there are $\binom{n-1}{k-1}$ ways to distribute $n$ candies among $k$ kids, with each kid getting at least $1$. From that we can deduce the formula you quoted where $0$ is allowed. 
A: Perform a substitution of variables: $y_i=x_i-1$.  Then you have $$y_1+y_2+\cdots+y_k=n-k$$ and $y_i\ge 0$ for all $i$, and you can use your formula.
I think you should be able to generalize it from there so you don't need to use $y$ every time.
A: If you know how many solutions in case $x_i\ge 0$ then just rewrite your initial equation as $$(x_1-1)+(x_2-1)+...+(x_k-1)=n-k$$ and use what you already have to immediately obtain the answer: $n-k+k-1\choose k-1$=$n-1\choose k-1$.
