Composition (number Theory)
   HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, a composition of an
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign (−1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
''n'' is a way of writing ''n'' as the sum of a sequence of (strictly)
positive integer In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country"). Numbers used for counting are called ''cardinal n ...
s. Two sequences that differ in the order of their terms define different compositions of their sum, while they are considered to define the same
partition Partition may refer to: Computing Hardware * Disk partitioning, the division of a hard disk drive * Memory partition, a subdivision of a computer's memory, usually for use by a single job Software * Partition (database), the division of a ...
of that number. Every integer has finitely many distinct compositions. Negative numbers do not have any compositions, but 0 has one composition, the empty sequence. Each positive integer ''n'' has 2''n''−1 distinct compositions. A weak composition of an integer ''n'' is similar to a composition of ''n'', but allowing terms of the sequence to be zero: it is a way of writing ''n'' as the sum of a sequence of
non-negative integer In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country"). Numbers used for counting are called ''cardinal n ...
s. As a consequence every positive integer admits infinitely many weak compositions (if their length is not bounded). Adding a number of terms 0 to the ''end'' of a weak composition is usually not considered to define a different weak composition; in other words, weak compositions are assumed to be implicitly extended indefinitely by terms 0. To further generalize, an ''A''-restricted composition of an integer ''n'', for a subset ''A'' of the (nonnegative or positive) integers, is an ordered collection of one or more elements in ''A'' whose sum is ''n''.


Examples

The sixteen compositions of 5 are: *5 *4 + 1 *3 + 2 *3 + 1 + 1 *2 + 3 *2 + 2 + 1 *2 + 1 + 2 *2 + 1 + 1 + 1 *1 + 4 *1 + 3 + 1 *1 + 2 + 2 *1 + 2 + 1 + 1 *1 + 1 + 3 *1 + 1 + 2 + 1 *1 + 1 + 1 + 2 *1 + 1 + 1 + 1 + 1. Compare this with the seven partitions of 5: *5 *4 + 1 *3 + 2 *3 + 1 + 1 *2 + 2 + 1 *2 + 1 + 1 + 1 *1 + 1 + 1 + 1 + 1. It is possible to put constraints on the parts of the compositions. For example the five compositions of 5 into distinct terms are: *5 *4 + 1 *3 + 2 *2 + 3 *1 + 4. Compare this with the three partitions of 5 into distinct terms: *5 *4 + 1 *3 + 2.


Number of compositions

Conventionally the empty composition is counted as the sole composition of 0, and there are no compositions of negative integers. There are 2''n''−1 compositions of ''n'' ≥ 1; here is a proof: Placing either a plus sign or a comma in each of the ''n'' − 1 boxes of the array : \big(\, \overbrace^n\, \big) produces a unique composition of ''n''. Conversely, every composition of ''n'' determines an assignment of pluses and commas. Since there are ''n'' − 1 binary choices, the result follows. The same argument shows that the number of compositions of ''n'' into exactly ''k'' parts (a ''k''-composition) is given by the
binomial coefficient In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers and is written \tbinom. It is the coefficient of the t ...
. Note that by summing over all possible numbers of parts we recover 2''n''−1 as the total number of compositions of ''n'': : \sum_^n = 2^. For weak compositions, the number is = , since each ''k''-composition of ''n'' + ''k'' corresponds to a weak one of ''n'' by the rule : a_1+a_2+ \ldots + a_k = n +k \quad \mapsto \quad (a_1 -1) + (a_2-1) + \ldots + (a_k - 1) = n It follows from this formula that the number of weak compositions of ''n'' into exactly ''k'' parts equals the number of weak compositions of ''k'' − 1 into exactly ''n'' + 1 parts. For ''A''-restricted compositions, the number of compositions of ''n'' into exactly ''k'' parts is given by the extended binomial (or polynomial) coefficient \binom_= ^nleft(\sum_ x^a\right)^k, where the square brackets indicate the extraction of the
coefficient In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series, or an expression; it is usually a number, but may be any expression (including variables such as , and ). When the coefficients are themselves var ...
of x^n in the polynomial that follows it.


Homogeneous polynomials

The dimension of the vector space K _1, \ldots, x_nd of
homogeneous polynomial In mathematics, a homogeneous polynomial, sometimes called quantic in older texts, is a polynomial whose nonzero terms all have the same degree. For example, x^5 + 2 x^3 y^2 + 9 x y^4 is a homogeneous polynomial of degree 5, in two variables; t ...
of degree ''d'' in ''n'' variables over the field ''K'' is the number of weak compositions of ''d'' into ''n'' parts. In fact, a basis for the space is given by the set of monomials x_1^\cdots x_n^ such that d_1 + \ldots + d_n = d. Since the exponents d_i are allowed to be zero, then the number of such monomials is exactly by the number of weak compositions of ''d''.


See also

*
Stars and bars (combinatorics) In the context of combinatorial mathematics, stars and bars (also called "sticks and stones", "balls and bars", and "dots and dividers") is a graphical aid for deriving certain combinatorial theorems. It was popularized by William Feller in his cl ...


References

* {{ cite book , title=Combinatorics of Compositions and Words , first1=Silvia , last1=Heubach , first2=Toufik , last2=Mansour , series=Discrete Mathematics and its Applications , location=Boca Raton, Florida , publisher=CRC Press , year=2009 , isbn=978-1-4200-7267-9 , zbl=1184.68373


External links


Partition and composition calculator
Number theory Combinatorics