I am wondering about algorithm generating sequence of binary strings of length n with k ones where next string differs in two digits.
For example:
11100
11010
11001
10101
10110
10011
00111
01011
01101
01110
11100
Of course, there must be used all n \choose k binary strings.
You should read my blog post on this kind of permutation (amongst other things) to get more background – and follow some of the links there.
Here is a version of my Lexicographic permutations generator fashioned after the generation sequence of Steinhaus–Johnson–Trotter permutation generators that does as requested:
The output from the above program is the following for example: