2 Combinatorics of Compositions and Words
Note that the difference between partitions and compositions is a matter
of order – for partitions we do not care about order, while for compositions,
two differently ordered sequences result in two different compositions of n.
Thus for every partition with at least two different parts, there are more
compositions than partitions, as we can reorder the partition in all possible
ways to get the associated compositions.
Example 1.2 The partitions of 4 are 4, 31, 22, 211 and 1111,whilethe
compositions of 4 are 4, 31, 13, 22, 211, 121, 112 and 1111. The partition
211 can be reordered in three different ways and results in the compositions
211, 121, 112. However, the partition 22 results in only one composition 22.
MacMahon derived a number of results, for example the total number of
compositions and the number of compositions with a given number of parts,
using generating functions. He also provided a representation of a composition
as a graph, which allowed for the derivation of those results using a simple
combinatorial argument. As defined by MacMahon, “the graph of a number
n is taken to be a straight line divided at n − 1 points into equal segments.
The graph of a composition of the number n is obtained by placing nodes at
certain of the n − 1 points of division.” Figure 1.1 illustrates the graph of
the composition 215 of eight in the format given in [136]. We refer to this
representation as the line graph of a composition to distinguish it from other
representations that will be introduced in Chapter 3.
APQ B
FIGURE 1.1: Line graph of the composition 215.
The individual parts are read off as the number of segments between nodes
or between the first and the last nodes and the endpoints A and B, respec-
tively. Using this representation, MacMahon gave a combinatorial proof of
the following result.
Theorem 1.3 [136, page 835] The number of compositions of n with exactly
m parts is given by
n−1
m−1
, and the total number of compositions of n is 2
n−1
.
Proof Since the number of parts of a composition is one more than the
number of nodes, and the number of division points is n −1, we merely select
at which of the n −1 division points we place the m −1 nodes. Furthermore,
since each of the n − 1 division points is either a node or not a node in each
composition, the total number of compositions is 2
n−1
. 2
© 2010 by Taylor and Francis Group, LLC