Adjacent Interchange Generation of Combinations. Ruskey, F. Journal of Algorithms, 9(2):162--180, June, 1988.
Adjacent Interchange Generation of Combinations [link]Paper  doi  abstract   bibtex   
Let C(n, k) denote the set of all bitstrings of length n that contain exactly k 1's. The replacement in a bitstring of a 01 by a 10, or a 10 by a 01, is an adjacent interchange, and an adjacent interchange algorithm generates bitstrings so that succeeding bitstrings differ by a single adjacent interchange. We prove that there is an adjacent interchange generation algorithm for C(n, k) if and only if either (i) k is 0, 1, n, n − 1 or (ii) n is even and k is odd. A constant average time adjacent interchange algorithm for generating the elements of C(n, k) is given for the case where n is even and k is odd.
@article{ Ruskey1988,
  abstract = {Let C(n, k) denote the set of all bitstrings of length n that contain exactly k 1's. The replacement in a bitstring of a 01 by a 10, or a 10 by a 01, is an adjacent interchange, and an adjacent interchange algorithm generates bitstrings so that succeeding bitstrings differ by a single adjacent interchange. We prove that there is an adjacent interchange generation algorithm for C(n, k) if and only if either (i) k is 0, 1, n, n − 1 or (ii) n is even and k is odd. A constant average time adjacent interchange algorithm for generating the elements of C(n, k) is given for the case where n is even and k is odd.},
  author = {Ruskey, Frank},
  doi = {10.1016/0196-6774(88)90036-3},
  file = {:Users/KunihiroWASA/Dropbox/paper/1988/Ruskey, Adjacent Interchange Generation of Combinations, 1988.pdf:pdf},
  issn = {01966774},
  journal = {Journal of Algorithms},
  month = {June},
  number = {2},
  pages = {162--180},
  title = {{Adjacent Interchange Generation of Combinations}},
  url = {http://www.sciencedirect.com/science/article/pii/0196677488900363 http://linkinghub.elsevier.com/retrieve/pii/0196677488900363},
  volume = {9},
  year = {1988}
}

Downloads: 0