Loop-Free Gray Code Algorithms for the Set of Compositions
- 76 Downloads
The topic of Gray codes for the set of compositions with non-negative integer parts has been studied by several authors. Klingsberg gave a non-recursive description of a Gray code for this set after the recursive version of Knuth. Recently, Walsh modified Klingsberg’s algorithm to find a Gray code which generates the set of all bounded compositions with non-negative integer parts. In this paper, we present two loopless Gray code algorithms for the set of compositions with positive integer parts.
KeywordsCompositions Gray codes Loopless algorithms
Unable to display preview. Download preview PDF.
- 6.Knuth, D.E.: The Art of Computer Programming, vol. 3, (soring and searching). Addison-Wesley, Reading (1973)Google Scholar
- 8.Korsh, J.F., LaFollette, P.S.: Loopless array generation of multiset permutations. Technical Report, Department of CIS , PA, USA (2002)Google Scholar
- 16.Vajnovszki, V.: A loopless generation of bitstrings without p consecutive ones. In: Combinatorics, computability and logic, pp. 227–240. Springer Ser. Discrete Math. Theor. Comput. Sci. Springer, London (2001)Google Scholar