Abstract
In this paper we give a fast algorithm to generate all partitions of a positive integer n. Integer partitions may be encoded as either ascending or descending compositions for the purposes of systematic generation. It is known that the ascending composition generation algorithm is substantially more efficient than its descending composition counterpart. Using tree structures for storing the partitions of integers, we develop a new ascending composition generation algorithm which is substantially more efficient than the algorithms from the literature.
Article PDF
Similar content being viewed by others
Avoid common mistakes on your manuscript.
References
Andrews, G.E.: Enumerative proofs of certain q-identities. Glasg. Mat. J. 8(1), 33–40 (1967)
Andrews, G.E.: The Theory of Partitions. Addison-Wesley Publishing (1976)
Garvan, F.: The Maple Book. Chapman & Hall/CRC, Boca Raton, Florida (2001)
Kelleher, J.: Encoding partitions as ascending compositions. Ph.D. thesis, University College Cork (2006)
Kelleher, J., O’Sullivan, B.: Generating all partitions: a comparison of two encodings. Published electronically at arXiv:0909.2331 (2009)
Lin, R.B.: Efficient data structures for storing the partitions of integers. In: The 22nd Workshop on Combinatorics and Computation Theory. Taiwan (2005)
Livovschi, L., Georgescu, H.: Sinteza şi analiza algoritmilor. Editura Ştiinţifică şi Enciclopedică, Bucureşti (1986)
Sloane, N.J.A.: The on-line encyclopedia of integer sequences. Published electronically at http://oeis.org (2011)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Merca, M. Fast Algorithm for Generating Ascending Compositions. J Math Model Algor 11, 89–104 (2012). https://doi.org/10.1007/s10852-011-9168-y
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10852-011-9168-y