Find the number of solutions to
x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 + x_8 + x_9 + x_10 <= 2
in nonnegagive integers.
Counting the ways:
1) You can have 10 zeros == 1 way
2) You can have 1 one and 9 zeros == 10 ways
3) You can have 1 two and 9 zeros == 10 ways
4) You can have 2 ones and 8 zeros:
If you start with a 1: 9 ways to place the other one.
If you start with 0 1: 8 ways to place the other one.
If you start with 0 0 1: 7 ways to place the other one.
If you start with 0 0 0 1: 6 ways to place the other one.
... continue with this and add all the ways.
I agree with your solution, instead I did this another way
I started with considering all the possible numbers this could be equal to because of the inequality sign, 0 1 or 2
For zero there can only be 1 possibility, all zeros
For x_1+x_2...x_10 equal to 1, there are 10 possibilities, one of them is one, the others are zero
For x_1+x_2...x+10 to be equal to 2, we use stars and bars (we could have done for the first two cases, but I'm too lazy ), so it would be (10+2-1) choose (10-1) which is 11 choose 9 which is 55
Adding all of these together we get 55+10+1 which is 66