Abstract
The compositions of n into at most k parts are the ordered tuples\( \left( {x_0, x_1,...x_{k - 1} }\right) \) where x0+x1+...+xk−1=n and 0 ≤ xi ≤ n. Order matters: one 4-composition of 7 is (0, 1, 5, 1), different ones are (5, 0, 1, 1) and (0, 5, 1, 1). The compositions of n into at most k parts are also called ‘k-compositions of n’. To obtain the compositions of n into exactly k parts (where k ≤ n) generate the compositions of n−k into k parts and add one to each position.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2011 Springer Berlin Heidelberg
About this chapter
Cite this chapter
Arndt, J. (2011). Compositions. In: Matters Computational. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14764-7_7
Download citation
DOI: https://doi.org/10.1007/978-3-642-14764-7_7
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14763-0
Online ISBN: 978-3-642-14764-7
eBook Packages: Computer ScienceComputer Science (R0)