In number theory, the composition , or decomposition , of a natural number is its representation in the form of an ordered sum of natural terms. The terms included in the composition are called parts , and their number is called the length of the composition.
Unlike composition, splitting a number does not take into account the order of the parts. Therefore, the number of splits of the number never exceeds the number of compositions.
With a fixed length of compositions, zero parts are also sometimes allowed in them.
Content
Examples
There are 16 compositions of the number 5:
Number of Songs
In general, there is compositions of n , of which exactly have length k .
To prove this statement, it suffices to construct a bijection between compositions n of length k and -element subsets -element set. Match the composition subset of the set consisting of partial amounts: . Obviously, this correspondence has the opposite: in a subset , whose elements are ordered in increasing order, you can restore the original composition:
- , at and finally .
Thus, the constructed mapping is bijective, and therefore the number of compositions of the number n of length k is equal to the number -element subsets -element set, i.e. binomial coefficient .
To calculate the total number of compositions of n, it is enough to either sum these binomial coefficients, or use the same map to construct a bijection between all compositions of n and all subsets -element set. ■
If zero compositions are allowed in compositions of number n of length k , then the number of such compositions will be equal to , since adding 1 to each part gives the composition of the number n + k already without zero parts. The question of the total number of compositions of n with possible zero parts is meaningless, since it is infinite.
See also
- Number splitting
Literature
- Sachkov V. N. Combinatorial methods of discrete mathematics. - M .: Nauka, 1977 .-- S. 241. - 319 p.