I can see how this might be interpreted as a bit string of length $n$ with $k$ ones, none of which consecutive. I suspect you can count this with stars and bars, but I can't make any headway into finding a recurrence relation.
Find a recurrence relation for the number of k subsets of integers 1 through n with no consecutive integers.
1
$\begingroup$
combinatorics
-
0Binomial coefficients – 2017-02-14
-
0I'm not seeing it... – 2017-02-15
2 Answers
3
$f(n,k)=f(n-1,k)+f(n-2,k-1)$, with the obvious initial conditions.
You either choose $n$ to be in your subset or you don't. If you don't, You have $f(n-1,k)$ ways of choosing your subset. If you do choose $n$ to your subset, now you can't choose $n$ or $n-1$, and you still need to choose $k-1$ additional elements, giving you $f(n-2,k-1)$.
1
Karpasi gives the recurrence relation for these numbers and a sound argument to justify it. It remains only to seed the recurrence with $f(n,0)=1$ (the empty set) and $f(2k-1,k)=0$ (there is no way to choose $k$ elements from $2k-1$ without two of them being consecutive.) It is easy to show that the following formula satisfies these criteria.
\begin{eqnarray*}
f(n,k) =\binom{n-k}{k}
\end{eqnarray*}