<pre>
A transition can occur at an adjacent pair (i,i+1) where 1<<code>i<i+1<</code>n.
Since there are k transitions, there are C(n-1,k) total number of ways
that transitions can occur.  But the string may start with a 1 or a 0
(after which its transitions uniquely determine the string).  So there
are a total of 2C(n-1,k) such strings.
</pre>
