Skip to main content
Log in

Fast Algorithm for Generating Ascending Compositions

  • Published:
Journal of Mathematical Modelling and Algorithms

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. Andrews, G.E.: Enumerative proofs of certain q-identities. Glasg. Mat. J. 8(1), 33–40 (1967)

    Article  MATH  Google Scholar 

  2. Andrews, G.E.: The Theory of Partitions. Addison-Wesley Publishing (1976)

  3. Garvan, F.: The Maple Book. Chapman & Hall/CRC, Boca Raton, Florida (2001)

    Book  MATH  Google Scholar 

  4. Kelleher, J.: Encoding partitions as ascending compositions. Ph.D. thesis, University College Cork (2006)

  5. Kelleher, J., O’Sullivan, B.: Generating all partitions: a comparison of two encodings. Published electronically at arXiv:0909.2331 (2009)

  6. Lin, R.B.: Efficient data structures for storing the partitions of integers. In: The 22nd Workshop on Combinatorics and Computation Theory. Taiwan (2005)

  7. Livovschi, L., Georgescu, H.: Sinteza şi analiza algoritmilor. Editura Ştiinţifică şi Enciclopedică, Bucureşti (1986)

  8. Sloane, N.J.A.: The on-line encyclopedia of integer sequences. Published electronically at http://oeis.org (2011)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mircea Merca.

Rights and permissions

Reprints 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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10852-011-9168-y

Keywords

Mathematics Subject Classifications (2010)

Navigation