Abstract
We investigate the problem of listing combinations using a special class of operations, prefix shifts. Combinations are represented as bitstrings of 0's and 1's, and prefix shifts are the operations of rotating some prefix of a bitstring by one position to left or right. We give a negative answer to an open problem asked by F. Ruskey and A. Williams (Generating combinations by prefix shifts, In Proc. 11th Annual International Computing and Combinatorics Conference 2005, LNCS 3595, Springer, 2005, pp.570–576), that is whether we can generate combinations by only using three very basic prefix shifts on bitstrings, which are transposition of the first two bits and the rotation of the entire bitstring by one position in either direction (i.e., applying the permutations σ2, σ n and σ n −1 to the indices of the bitstrings).
Similar content being viewed by others
References
Gilbert E N. Gray codes and paths on the n-cube. Bell Systems Technical Journal, 1958, 37: 815–826.
Gray F. Pulse code communication. U.S. Patent Number 2632058, 1953.
Joichi J T, White D E, Willamson S G. Combinatorial Gray Codes. SIAM Journal on Computing, 1980, 9(1): 130–141.
Richards D. Data compression and Gray-code sorting. Information Processing Letters, 1986, 22(4): 201–205.
Diaconis P, Holmes S. Gray codes for randomization procedures. Statistics and Computing, 1994, 4(4): 287–302.
Amalraj D J, Sundararajan N, Dhar G. A data structure based on Gray code encoding for graphics and image processing. In Proc. the SPIE: International Society for Optical Engineering, Hague, Netherlands, 1990, pp.65–76.
Chen M, Shin K. Subcube allocation and task migration in hypercube multiprocessors. IEEE Transactions on Computers, 1990, C-39(9): 1146–1155.
Chang C C, Chen H Y, Chen C Y. Symbolic gray code as a data allocation scheme for two-disc systems. Computer Journal, 1992, 35(3): 299–305.
Savage C. A survey of combinatorial gray codes. SIAM Review, 1997, 39(4): 605–629.
Ruskey F, Williams A. Generating combinations by prefix shifts. In Proc. 11th Annual International Computing and Combinatorics Conference (COCOON'2005), LNCS 3595, Kunming, China, Springer, 2005, pp.570–576.
Tang D T, Liu C N. Distance-2 cycle chaining of constant weight codes. IEEE Transactions, 1973, C-22(2): 176–180.
Eades P, McKay B. An algorithm for generating subsets of fixed size with a strong minimal change property. Information Processing Letters, 1984, 19(3): 131–133.
Chase P J. Combination generation and Graylex ordering. Congressus Numerantium, 1989, 69: 215–242.
Knuth D E. Pre-fascicle 4A (a draft of Section 7.2.1.3: Generating all Combinations). The Art of Computer Programming. Addison-Wesley, 2004, 61 pages, http://www-cs-faculty.stanford.edu/~knuth/fasc3a.ps.gz
Ehrlich G. Loopless algorithms for generating permutations, combinations, and other combinatorial configurations. Journal of the ACM, 1973, 20(3): 500–513.
Chinburg T, Savage C D, Wilf H S. Combinatorial families that are exponentially far from being listable in Gray code sequence. Transactions of the American Mathematical Society, 1999, 351(1): 379–402.
Compton R C, Williamson S G. Doubly adjacent Gray codes for the symmetric group: How to braid n strands. Linear and Multilinear Algebra, 1993, 35(3–4): 237–293.
Author information
Authors and Affiliations
Corresponding author
Additional information
This work is supported in part by the National Natural Science Foundation of China under Grant No. 60553001 and the National Grand Fundamental Research 973 Program of China under Grant Nos. 2007CB807900 and 2007CB807901.
Electronic Supplementary Material
Below is the link to the electronic supplementary material.
Rights and permissions
About this article
Cite this article
Cheng, Y. Generating Combinations by Three Basic Operations. J. Comput. Sci. Technol. 22, 909–913 (2007). https://doi.org/10.1007/s11390-007-9094-7
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11390-007-9094-7