In mathematics, a composition of a positive integer n is a way of writing n as a sum of positive integers. Two sums which differ in the order of their summands are considered to be different compositions, while they would be considered to be the same partition.
A composition where some of the summands are allowed to be zero is sometimes referred to as a weak composition.
The sixteen compositions of 5 are:
Compare this with the seven partitions of 5:
It is possible to put constraints on the parts of the compositions. For example the five compositions of 5 into distinct terms are:
Compare this with the three partitions of 5 into distinct terms:
There are 2n−1 compositions of n; conventionally there is one composition of 0, and no compositions of negative integers.
The number of compositions of n into exactly k parts is
This article is licensed under the GNU Free Documentation License.
It uses material from the
"Composition (number theory)".
Home Page • arts • business • computers • games • health • hospitals • home • kids & teens • news • physicians • recreation• reference • regional • science • shopping • society • sports • world