Skip to main content
Log in

An analysis of two related loop-free algorithms for generating integer partitions

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

Two loop-free algorithms, LEX and NEXPAR2, for generating the partitions of a positive integer n, in lexicographic and antilexicographic order, respectively, are investigated, and their structures are shown to be closely related. By utilising a number of combinatorial identities which relate the cardinalities of various classes of partitions, we derive formulae from which operation counts for the two algorithms may be obtained. For large n, corresponding asymptotic formulae are also obtained. A number of modifications and refinements of the two algorithms are discussed, and the relative performance of the algorithms resulting, and also the original algorithms, is analysed for both the non-asymptotic and the asymptotic cases.

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.: The theory of partitions. Reading, Massachusetts: Addison-Wesley 1976

    Google Scholar 

  2. Berge, C.: Principles of combinatorics. New York: Academic Press 1971

    Google Scholar 

  3. Brylawski, T.: The lattice of integer partitions. Discrete Math. 6, 201–219 (1973)

    Google Scholar 

  4. Ehrlich, G.: Loopless algorithms for generating permutations, combinations, and other combinatorial configurations. J. Assoc. Comput. Mach. 20, 500–513 (1973)

    Google Scholar 

  5. Fenner, T.I., Loizou, G.: A binary tree representation and related algorithms for generating integer partitions. Computer J. 23, 332–337 (1980)

    Google Scholar 

  6. Hardy, G.H., Ramanujan, S.: Asymptotic formulae in combinatory analysis. Proc. London Math. Soc. 17, 75–115 (1918)

    Google Scholar 

  7. McKay, J.K.S.: Partitions in natural order, Algorithm 371. Comm. ACM 13, 52 (1970)

    Google Scholar 

  8. Nijenhuis, A., Wilf, H.S.: Combinatorial algorithms. New York: Academic Press 1975

    Google Scholar 

  9. Page, E.S., Wilson, L.B.: An introduction to computational combinatorics. Cambridge: Camridge University Press 1979

    Google Scholar 

  10. Reingold, E.M., Nievergelt, J., Deo, N.: Combinatorial algorithms: Theory and practice. Englewood Cliffs, New Jersey: Prentice-Hall 1977

    Google Scholar 

  11. Riha, W., James, K.R.: Efficient algorithms for doubly and multiply restricted partitions, Algorithm 29. Computing 16, 163–168 (1976)

    CAS  Google Scholar 

  12. Stockmal, F.: Generation of partitions in part-count form, Algorithm 95. Comm. ACM 5, 344 (1962)

    Google Scholar 

  13. Wells, M.B.: Elements of combinatorial computing. Oxford: Pergamon Press 1971

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Fenner, T.I., Loizou, G. An analysis of two related loop-free algorithms for generating integer partitions. Acta Informatica 16, 237–252 (1981). https://doi.org/10.1007/BF00261261

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00261261

Keywords

Navigation