You're allowed to perform one of four operations each time on a binary sequence:
Delete the rightmost
0in the sequence (if it exists)Turn the rightmost
0into1(if it exists)Insert
0to a position such that it becomes the rightmost0of the new sequenceTurn a
1into0(if it exists) such that it becomes the rightmost0of the new sequence
Operation 3&4 are basically inversions of operation 1&2 respectively.
For example, you can turn 1 into 111 with the following process using 8 operations: $1\xrightarrow{3}01\xrightarrow{2}11\xrightarrow{3}101\xrightarrow{4}100\xrightarrow{1}10\xrightarrow{2}11\xrightarrow{3}110\xrightarrow{2}111$.
Now the problem is to find the number of ways to transform $\underbrace{11\cdots11}_{n\text{ ones}}$ into $\underbrace{11\cdots11}_{m\text{ ones}}$ ($n\le m$) using exactly $2k$ operations. Two ways are considered different if and only if there exists a time where two sequences differ.
The solution to this problem turns out to be
$$ (2k-1)!!\sum_{i=0}^{\min\{n,m\}}\binom k{m-i}\binom mi\binom{k+m-i}{n-i} $$
I've proved this for the case $k=m-n$, but currently I can't find a complete proof. Any help is appreciated!