Counting binary strings with bounded ones
= Counting binary strings with bounded ones
{title2=$\#\{w:\#0(w)=n,\ \#1(w)\le m\}=\binom{n+m+1}m$}
A <binary string> with $n$ zeroes and $j$ ones is determined by its $j$ one-positions, giving $\binom{n+j}j$ possibilities. Sum for $0\le j\le m$ and apply the <hockey-stick identity>. Equivalently, distribute at most $m$ ones among the $n+1$ gaps around the zeroes and add a slack count; <stars and bars> counts $n+2$ nonnegative counts summing to $m$.