Skip to main content
Log in

Generalized Algorithm for Restricted Weak Composition Generation

Generation Algorithm for Second-Order Restricted Weak Compositions

  • Published:
Journal of Mathematical Modelling and Algorithms in Operations Research

Abstract

This paper presents a new algorithm that arrives at a generalized solution for the generation of restricted weak compositions of n-parts. In particular, this generalized algorithm covers many commonly sought compositions such as bounded compositions, restricted compositions, weak compositions, and restricted part compositions. Introduced is an algorithm for generating generalized types of restricted weak compositions called first-order, and second-order restricted weak compositions.

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.

Similar content being viewed by others

References

  1. Bacchelli, S., Barcucci, E., Grazzini, E., Pergola, E.: Exhaustive generation of combinatorial objects by eco. Acta Inform. 40, 585–602 (2004)

    MathSciNet  MATH  Google Scholar 

  2. Bernini, A., Grazzini, E., Pergola, E., Pinzani, R.: A general exhaustive generation algorithm for gray structures. Acta Inform. 44, 361–376 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  3. Gray, F.: Pulse code communication. US Patent 2632058 (1953)

  4. Heubach, S., Mansour, T.: Combinatorics of Compositions and Words. CRC Press (2010)

  5. Klingsberg, P.: A gray code for compositions. J. Algorithms 3(1), 41–44 (1981)

    Article  MathSciNet  Google Scholar 

  6. Knuth, D.: The Art of Computer Programming, vol. 4. Addison Wesley (2005)

  7. Mansour, T., Nassar, G.: Gray codes, loopless algorithm and partitions. J. Math. Model. Algor. 7, 291–310 (2008)

    Article  MathSciNet  MATH  Google Scholar 

  8. Mansour, T., Nassar, G.: Loop-free gray code algorithms for the set of compositions. J. Math. Model. Algor. 9, 343–345 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  9. Opdyke, J.: A unified approach to algorithms generating unrestricted and restricted integer compositions and integer partitions. Journal of Mathematical Modelling and Algorithms 9(1), 53–97 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  10. Reingold, E.M., Nievergelt, J., Deo, N.: Combinatorial algorithms: theory and practice. Prentice-Hall Inc. (1977)

  11. Vajnovszki, V., Vernay, R.: Restricted compositions and permutations: from old to new gray codes. Inf. Process. Lett. 111(13), 650–655 (2011)

    Article  MathSciNet  MATH  Google Scholar 

  12. Walsh, T.: Loop-free sequencing of bounded integer compositions. J. Comb. Math. Comb. Comput. 33, 323–345 (2000)

    MATH  Google Scholar 

  13. Walsh, T.: Generating gray codes in o(1) worse-case time per word. Discret. Math. Theor. Comput. Sci. 2731, 73–88 (2003)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel R. Page.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Page, D.R. Generalized Algorithm for Restricted Weak Composition Generation. J Math Model Algor 12, 345–372 (2013). https://doi.org/10.1007/s10852-012-9194-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10852-012-9194-4

Keywords

Mathematics Subject Classifications (2010)

Navigation