Q: There is a list of vectors $ (x_1,...x_n) $ each $ x_i $ is either $0$ or $1$;
Determine the number of vectors that satisfy the equation bellow: $$ \sum_{i=1}^n x_i \leq k $$
so knowing that $k$ is a number greater or equal to $0$, we know we should have $k$ times $1$, so this is how I solved it:$$ {{n} \choose {k}} \times 2^{n-k} $$ collecting the sufficient number of $1s$ which is $k$ times $1$, by choosing $Xs$ and then multiplying them in the number of different combinations they can make with the rest of the $Xs$, the different conditions of the rest of the $Xs$ which is $2^{n-k}; $ ($0$ or$1$).
but the book has solved it this way: $$ \sum_{j=k}^n {{n}\choose{j}} $$ to me it's like it's choosing the number of $Xs$ considering them as $1s$ to get minimum number of k and then choosing extra $1s$ for it should be equal or greater than k, and consider the rest of not-chosen $Xs$ as $0$.
so what is what!? To me both are correct but not the same! I don't get it. What is wrong in here?