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.
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)MathSciNetCrossRefzbMATHGoogle Scholar
Reingold, E.M., Nievergelt, J., Deo, N.: Combinatorial algorithms: theory and practice. Prentice-Hall Inc. (1977)Google Scholar