A Unified Approach to Algorithms Generating Unrestricted and Restricted Integer Compositions and Integer Partitions
- 128 Downloads
An original algorithm is presented that generates both restricted integer compositions and restricted integer partitions that can be constrained simultaneously by (a) upper and lower bounds on the number of summands (“parts”) allowed, and (b) upper and lower bounds on the values of those parts. The algorithm can implement each constraint individually, or no constraints to generate unrestricted sets of integer compositions or partitions. The algorithm is recursive, based directly on very fundamental mathematical constructs, and given its generality, reasonably fast with good time complexity. A general, closed form solution to the open problem of counting the number of integer compositions doubly restricted in this manner also is presented; its formulaic link to an analogous solution for counting doubly-restricted integer partitions is shown to mirror the algorithmic link between these two objects.
KeywordsInteger compositions Integer partitions Bounded compositions Bounded partitions Pascal’s triangle Fibonacci
Mathematics Subject Classifications (2000)05A07 11P82 11Y16 11Y55
Unable to display preview. Download preview PDF.
- 7.Kimberling, C.: Enumeration of paths, compositions of integers, and Fibonacci numbers. Fibonacci Q. 39(6) (2001)Google Scholar
- 8.Kimberling, C.: Path-counting and Fibonacci numbers. Fibonacci Q. 40(4) (2002)Google Scholar
- 13.Knuth, D.: The Art of Computer Programming. Addison-Wesley, Reading (1997)Google Scholar
- 14.Ruskey, F.: Combinatorial Generation. Working Version (1j-CSC 425/520) (2003)Google Scholar
- 16.Sloan, N.J.A. (ed.): The online encyclopedia of integer sequences. http://www.research.att.com/~njas/sequences (2008)
- 17.Stojmenovic, I.: Generating all and random instances of a combinatorial object. In: Nayak, A., Stojmenovic, I. (eds.) Handbook of Applied Algorithms: Solving Scientific, Engineering and Practical Problems. Wiley, New York (2008)Google Scholar
- 22.Yamanaka, K., et al.: Constant time generation of integer partitions. IEICE Trans. Fundam. E90-A(6) (2007)Google Scholar