Lukas' Notes

combinatorics

Definition

Permutation with Repetition

A permutation with repetition chooses all occurrences in a multiset and places them in order. Order matters, so and are different arrangements. Equal copies are nevertheless indistinguishable, so swapping the two copies of within does not create a new arrangement. Each distinct element must occur with its fixed multiplicity.

Let a multiset contain distinct elements with multiplicities , where

Such a permutation is an ordered tuple of length containing exactly copies of each . The number of distinct such permutations is the multinomial coefficient

Derivation from the Product Rule

Construct an arrangement by assigning positions to one distinct value at a time. First choose the positions occupied by from all positions. This can be done in ways and leaves positions empty.

Next choose the positions occupied by from those remaining positions, giving choices. Then choose the positions occupied by from the positions still empty, giving choices.

Continue in the same way until every value has been placed. Because , exactly positions remain for , so the final choice is forced.

For the multiset , choose two of the three positions for . The remaining position is then forced to contain :

The three first-stage branches are the three subsets of positions of size two. Each branch has one continuation because the final position is forced.

The product rule multiplies the number of choices at each stage:

Expanding the binomial coefficients exposes a telescoping product:

The cyan factorial counts the positions left after placing and before placing , so it appears once below and once above the fraction bar. The orange and green pairs arise in the same way at the next stages. Every intermediate factorial hidden by the ellipsis cancels by this pattern. Finally, , leaving only and the multiplicity factors .

Why the Denominator Appears

If all occurrences were distinct, they would have permutations. The copies of are indistinguishable, however, so permuting those copies among themselves does not change the resulting tuple.

Every distinct tuple is therefore counted

times among the labelled arrangements. Dividing by this overcount gives the formula.

Why division rather than subtraction?

Begin with one visible arrangement, . To count as though every occurrence were distinct, temporarily name the two copies of as and . The same visible arrangement then has two labelled descriptions:

The factor is not a collection of two bad arrangements to remove. It is the number of labelled descriptions of every one visible arrangement. More generally, if the multiplicities are , then each visible arrangement has

labelled descriptions. If there are visible arrangements, the labelled world therefore consists of equal groups of size :

Division counts the number of equal groups. Subtraction would require removing duplicates from each of the still-unknown groups, so it cannot remove a fixed number globally.

Forgetting labels in

Temporarily distinguish the repeated copies as and . Their labelled permutations collapse in pairs when the subscripts are forgotten:

Each visible arrangement has labelled versions, obtained by swapping and . Hence

With several repeated values, the labels within each value can be permuted independently. The size of each collapsed group is therefore .

Cancelling the overcount in

Here and the multiplicities are . Expanding the factorials shows how the denominator removes the indistinguishable relabellings:

One factor removes permutations of the two copies of ; the other removes permutations of the two copies of . The factor changes nothing.

The denominator as successive collapses

Start with labelled copies and forget one family of labels at a time. Each step merges arrangements that differ only by a swap of indistinguishable copies.

The diagram and the algebra express the same quotient:

Fill positions instead of collapsing labels

A different construction places one value at a time. Choose two of the five positions for , two of the three remaining positions for , and give the final position to .

The counts refer to subsets of the available positions:

Once the positions of are fixed, only three positions remain. Once the positions of are fixed, the last position is forced to contain .

The successive choices multiply:

The intermediate and terms telescope. Choosing positions one value at a time therefore produces the same denominator as collapsing labelled copies.

Distinction from Sampling with Replacement

Warning

Here the multiplicity of each element is fixed in advance. If instead each of positions may independently receive any of elements, the number of possible tuples is .

Example

Arranging BANANA

The word BANANA contains six letters with multiplicities

Its number of distinct arrangements is