Integer Partitions
How many ways can you write 6 as a sum of positive integers if you ignore the order of the terms? Questions like this, such as splitting identical objects into piles where only the pile sizes matter, are counted by integer partitions. Partitions have no simple closed formula, so you count them with diagrams, bijections and recurrences. These same tools prove surprising equalities between different kinds of partitions.
What counts as a partition
An integer partition of a positive integer n is a way of writing n as a sum of positive integers, called parts, in which the order of the parts does not matter. To give each partition one standard form, list its parts in nonincreasing order: 3+1+1 and 1+3+1 are the same partition of 5. The number of partitions of n is written p(n), and p(0)=1 counts the empty partition.
Example: The partitions of 5 are 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1 and 1+1+1+1+1, so p(5)=7.
The first values p(1),…,p(6) are 1,2,3,5,7,11. There is no closed formula, and the growth is fast: p(100)=190,569,292.
Ferrers diagrams and conjugation
A Ferrers diagram draws a partition as left-justified rows of dots, one row per part, with the longest row on top. Reading the diagram by columns instead of rows gives the conjugate partition. Column i has one dot for every part of size at least i, so the conjugate of 5+3+1 is 3+2+2+1+1.
Transposing twice returns the original diagram, so conjugation is a bijection from the partitions of n to themselves. It turns the number of parts into the size of the largest part, which gives two counting rules:
- partitions of n into exactly k parts correspond to partitions of n with largest part exactly k;
- partitions of n into at most k parts correspond to partitions of n with every part at most k.
A partition equal to its own conjugate is self-conjugate: its diagram is symmetric about the main diagonal. Peeling such a diagram into nested hooks, each a row and a column meeting at a diagonal dot, gives odd hook sizes that strictly decrease. So self-conjugate partitions of n match partitions of n into distinct odd parts.
Counting by number of parts
Let p(n,k) count partitions of n into exactly k parts. Split these by their smallest part. Either it is 1, and deleting it leaves a partition of n−1 into k−1 parts, or every part is at least 2, and subtracting 1 from each of the k parts leaves a partition of n−k into k parts:
The boundary values are p(n,1)=p(n,n)=1, and p(n,k)=0 when k>n. Summing over k gives p(n)=∑k=1np(n,k), so a table of p(n,k) built row by row produces p(n) without listing every partition.
Distinct parts and odd parts
Euler's theorem says that the number of partitions of n into distinct parts equals the number into odd parts. The generating function proof is one line:
The left product uses each part at most once. On the right, the even factors cancel, leaving a product that lets each odd part appear any number of times.
The table collects the equalities, with counts for n=6.
Restriction on a partition of n | Equally many partitions with | Reason | Count for n=6 |
|---|---|---|---|
Exactly 3 parts | Largest part exactly 3 | Conjugation | 3 |
At most 2 parts | Every part at most 2 | Conjugation | 4 |
Distinct parts | Only odd parts | Euler's theorem | 4 |
Self-conjugate | Distinct odd parts | Hook decomposition | 1 |
What to remember
- A partition of n is an unordered sum of positive integers; write the parts in nonincreasing order and count partitions with p(n).
- Conjugation swaps the number of parts with the largest part.
- p(n,k)=p(n−1,k−1)+p(n−k,k), and p(n) is the sum of p(n,k) over k.
- Partitions into distinct parts and into odd parts are equally numerous.
Example: Splitting eight identical tokens into piles
Eight identical tokens are split into nonempty piles. Two splittings are the same when they have the same pile sizes, whatever order the piles are in, so each splitting is a partition of 8.
a) How many splittings use exactly 3 piles? List them, then confirm the count with the recurrence p(n,k)=p(n−1,k−1)+p(n−k,k).
List the partitions with parts in nonincreasing order, working down from the largest possible first part. With three parts summing to 8 and the other two parts at least 1 each, the largest part is at most 8−2=6:
That is 5 splittings. To check, apply the recurrence with n=8 and k=3. The partitions of 7 into two parts are 6+1, 5+2 and 4+3, so p(7,2) is ________. The partitions of 5 into three parts are 3+1+1 and 2+2+1, so p(5,3) is ________. Then
so there are 5 splittings into exactly 3 piles, matching the list.
b) How many splittings have a largest pile of exactly 3 tokens? Use conjugation rather than a fresh list.
Conjugation swaps the number of parts with the largest part, so partitions of 8 with largest part exactly 3 correspond one-to-one with the partitions of 8 into exactly 3 parts from part a). Transpose each Ferrers diagram from part a), reading column i as the number of parts that are at least i:
- 6+1+1 becomes ________.
- 5+2+1 becomes 3+2+1+1+1.
- 4+3+1 becomes 3+2+2+1.
- 4+2+2 becomes ________.
- 3+3+2 becomes 3+3+2, so it is self-conjugate.
Each image sums to 8 and has largest part 3, and the five images are different, so there are 5 splittings whose largest pile has exactly 3 tokens.
c) Count the splittings in which all piles have different sizes and the splittings in which every pile holds an odd number of tokens, then match the two lists.
Distinct parts: a single pile gives 8. Two different parts give 7+1, 6+2 and 5+3, which is ________ partitions. Three different parts give 5+2+1 and 4+3+1, which is ________ more. Four different parts need at least 1+2+3+4=10 tokens, more than 8, so there are none. The total is 1+3+2=6.
Odd parts: work down by the largest part. Largest part 7 gives only 7+1. With largest part 5 there are ________ partitions, 5+3 and 5+1+1+1. Largest part 3 gives 3+3+1+1 and 3+1+1+1+1+1, and largest part 1 gives eight 1s. The total is 1+2+2+1=6.
Both counts equal 6, as Euler's theorem predicts. To match them, write each distinct part as 2am with m odd and replace it by 2a copies of m:
- 8=23⋅1 becomes eight 1s.
- 7+1 stays 7+1.
- 6+2 becomes 3+3+1+1.
- 5+3 stays 5+3.
- 5+2+1 becomes 5+1+1+1.
- 4+3+1 becomes 3+1+1+1+1+1.
Every odd-part partition appears exactly once, so there are 6 splittings of each kind.
The multiplicity of a part size is the number of times that size occurs in a partition. Consider the integer partition
Complete these statements using exact integers: this is a partition of , it contains parts, and the multiplicity of the part size 4 is .
Let p(7,k) be the number of partitions of 7 into exactly k parts, where the order of the parts does not matter. Complete the table with p(7,k) for each k from 2 to 7, and enter the total number of partitions of 7 in the last row.
| Number of parts k | Partitions of 7 with exactly k parts |
| 1 | 1 |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| Total |