Skip to main content

Section 7.3 Excursion: Partitions

Whenever we subdivide a set into categories, we are using a partition of sets. For example, we might subdivide students at a university into three categories: full-time student, part-time student, or students who are not currently enrolled. Partitions are useful in counting because they give non-overlapping cases. For example, the total number of students at a university is the sum of the number of full-time students, the number of part-time students, and the number of students who are not currently enrolled.
In this section, we define the partition of a set and a related concept– the partition of a natural number. Partitions of natural numbers come up frequently in number theory and because listing or counting partitions is difficult, it is common in advanced computer science classes to work with algorithms to generate partitions.

Subsection 7.3.A The Definition of Partition

Given a set, we might want to categorize its elements in such a way that each element of the set is in exactly one category. Let’s make this concept formal.

Definition 7.3.1 partition of a set.

A partition of a set \(S\) is a collection of nonempty subsets \(T_1, T_2, \ldots, T_k\) such that each element of \(S\) is in exactly one of the subsets \(T_i\text{.}\) Notice that a partition satisfies two properties:
  1. \(\displaystyle S = T_1 \cup T_2 \cup \cdots \cup T_k\)
  2. \(T_i\) and \(T_j\) are disjoint when \(i \neq j\text{.}\)
For example,
\begin{equation*} \{1,5\} \cup \{2,4,6\} \cup \{3\} \end{equation*}
is a partition of the set \(S = \{1,2,3,4,5,6\}\text{.}\)
Let’s look at another example of partitions of a set.

Example 7.3.2 Partitions of the set \(\{a,b,c\}\).

List all partitions of the set \(\{a,b,c\}\text{.}\)
Solution.
One partition is just the set \(\{a,b,c\}\text{.}\) If we group the elements into two sets we get three more partitions: \(\{a,b\} \cup \{c\}\text{,}\) \(\{a,c\} \cup \{b\}\text{,}\) and \(\{a\} \cup \{b,c\}\text{.}\) There is one final partition: \(\{a\} \cup \{b\} \cup \{c\}\text{.}\)
At times, we are only interested in the sizes of the sets in a partition. For example, in DefinitionΒ 7.3.1 our set \(S\) had six elements and the subsets had two, three, and one element. Note that \(6 = 2 + 3 + 1\text{.}\) This example motivates our next definition.

Definition 7.3.3 Partition of an integer.

Β 
  1. A partition is a formal sum of positive integers listed in non-increasing order. For example, \(5+3+3+2\) is a partition since \(5 \ge 3 \ge 3 \ge 2\text{.}\)
  2. The parts of a partition are the numbers being added. For example, the partition \(5+3+3+2\) has four parts: 5, 3, 3, and 2. Notice that repeats are counted. A partition can have only one part. For example, the partition 13 has only one part: 13.
  3. For any positive integer \(n\text{,}\) a partition of the integer \(n\) is any partition where the sum of the positive integers in the partition is \(n\text{.}\) For example, \(5+3+3+2\) is a partition of 13 because \(5+3+3+2=13\) and 13 is also a partition of 13.
  4. The (Young) diagram of the partition \(a_1+ a_2+a_3+\ldots +a_m\) of the integer \(n\) is a drawing of \(n\) squares with \(a_1\) squares in the first row, \(a_2\) squares in the second row, through \(a_m\) squares in the \(m\)th row where the squares are drawn justified to the left. For example, the partition \(5+3+3+2\) has the diagram shown in FigureΒ 7.3.4 which has five squares in the first row, three squares in the second row, three squares in the third row, and two squares in the fourth row.
    Figure 7.3.4. The diagram of the partition \(5+3+3+2\) of the integer 13.
There is a connection between the partitions of a set and the partitions of a positive integer.

Remark 7.3.5 Partitions of sets and integers.

If \(T_1 \cup T_2 \cup \cdots \cup T_k\) is a partition of a set \(S\) having \(n\) elements and if we order the sets \(T_i\) such that the number of elements in each set are nonincreasing, then \(|T_1|+|T_2|+ \ldots +|T_k|\) is a partition of \(n\text{.}\)
Try working with partitions of an integer.

Activity 7.3.A Partitions of an integer.

We often look at all of the partitions of a particular integer. For example, there are three partitions of the integer three: \(3\text{,}\) \(2+1\text{,}\) and \(1+1+1\text{.}\) The corresponding diagrams are drawn in FigureΒ 7.3.7.
Figure 7.3.7. The diagrams of the partitions \(3\text{,}\) \(2+1\text{,}\) and \(1+1+1\) of the integer 3.
  1. List all the partitions of the integer four (\(n=4\)) and draw the diagram for each partition. Hint: there are five partitions of four.
  2. List all the partitions of the integer five (\(n=5\)) and draw the diagram for each partition. Be sure that you found them all.
The next activity builds on this one, so be sure to record your answers.
Let’s look at an example of a function defined on partition.

Example 7.3.8 Max part function on partitions.

Let \(\mathbb{P}_{10}\) be the set of all partitions of the integer 10. The function \(\fn{maxpart}:\mathbb{P}_{10} \to \mathbb{N}\) is defined by \(\fn{maxpart}(\alpha)\) is the first part of \(\alpha\text{.}\)
  1. Identify the domain and codomain of \(\fn{maxpart}\text{.}\)
    Solution.
    The domain is \(\mathbb{P}_{10}\) and the codomain is \(\mathbb{N}\text{.}\)
  2. Evaluate \(\fn{maxpart}(4+3+3)\) and \(\fn{maxpart}(10)\text{.}\)
    Solution.
    We have \(\fn{maxpart}(4+3+3)=4\) and \(\fn{maxpart}(10)=10\text{.}\)
  3. Give an example of a partition \(\alpha\) of the integer 10 such that \(\fn{maxpart}(\alpha)=2\text{.}\) Is it unique?
    Solution.
    Note that \(2+2+2+2+2\) is a partition of 10 and \(\fn{maxpart}(2+2+2+2+2)=2\text{.}\) It is not unique because, for example, \(\fn{maxpart}(2+2+2+2+1+1)=2\) as well.
  4. Is \(\fn{maxpart}\) onto? Explain.
    Solution.
    No, the image of \(\fn{maxpart}\) is \(\{1,2,3,4,5,6,7,8,9,10\}\text{.}\)
  5. Is \(\fn{maxpart}\) one-to-one? Explain.
    Solution.
    No, we saw two different partitions with \(\fn{maxpart}(\alpha)=2\)

Subsection 7.3.B Conjugate Partitions

It can be difficult to know if you have found all partitions of an integer and there is no explicit formula for the number of partitions of an integer. One tool that can help check any list is the idea of conjugate partitions.

Definition 7.3.9 Conjugate of a partition.

The conjugate of the partition \(\alpha\) is the partition \(\beta = b_1+b_2+ \ldots +b_k\) where \(b_1\) is the number of squares in the first column of the diagram for \(\alpha\text{,}\) \(b_2\) is the number of squares in the second column of the diagram for \(\alpha\text{,}\) and so on through \(b_k\) is the number of squares in the \(k^{\text{ th } }\) column of the diagram for \(\alpha\) and where \(k\) is the number of columns in the diagram for \(\alpha\text{.}\) For example, the conjugate of the partition \(3+1\) is the partition \(2+1+1\) as we see in ExampleΒ 7.3.10.
Let’s check the example from DefinitionΒ 7.3.9.

Example 7.3.10 Calculating the conjugate of a partition.

Β 
  1. Calculate the conjugate of the partition \(3+1\text{.}\)
    Solution.
    The diagram for the partition \(3+1\) is shown on the left in FigureΒ 7.3.11.
    Figure 7.3.11. The diagram of the partition \(3+1\) of the integer four and its conjugate \(2+1+1\text{.}\)
    The diagram has two squares in the first column, one square in the second column, and one square in the third column. Therefore, the conjugate of \(3+1\) is the partition \(2+1+1\) shown on the right in FigureΒ 7.3.11.
  2. Calculate the conjugate of the partition \(6+4+2+1+1\text{.}\)
    Solution.
    The conjugate of \(6+4+2+1+1\) is \(5+3+2+2+1+1\text{.}\) These partitions are drawn in FigureΒ 7.3.12.
    Figure 7.3.12. The diagram of the partition \(6+4+2+1+1\) of the integer 14 and its conjugate \(5+3+2+2+1+1\text{.}\)
You might have noticed in ExampleΒ 7.3.10 that there is a geometric relationship between the diagrams of a partition and its conjugate.

Remark 7.3.13 Calculating conjugate partitions geometrically.

Given the diagram of a partition, when can reflect the squares across the line of slope -1 (\(\backslash\)) through the upper level corner of the diagram to get the diagram of the conjugate.
It is possible that a partition equals its conjugate.

Definition 7.3.14 Self-conjugate partitions.

A partition is self-conjugate if it equals its conjugate.
Let’s explore conjugate partitions and self-conjugate partitions.

Activity 7.3.B Self-conjugate partitions.

Β 
  1. Find the conjugate of each partition of three and draw a double-headed arrow from each partition to its conjugate or a loop from a partition to itself if the partition is self-conjugate.
  2. Repeat for each partition of four.
  3. Repeat for each partition of five.
  4. Looking back at your examples of self-conjugate partitions, what geometric symmetry do they have?
  5. Draw the diagram of a self-conjugate partition of \(n\) when \(n=1, 3, 5, 7\) and \(9\text{.}\)
  6. Is there always a self-conjugate partition when \(n\) is odd? Explain.
  7. A classmate conjectures that for any odd integer \(n\text{,}\) there exists a unique (only one) self-conjugate partition of \(n\text{.}\) Do you agree? Justify your answer.
  8. Can you find all three self-conjugate partitions of 12? Hint: Do not list all partitions, just try to build self-conjugate ones.
Conjugation defines a function on partitions.

Example 7.3.16 Conjugation function on partitions of an integer.

Let \(\mathbb{P}_4\) be the set of partitions of the integer four. Define the function \(\fn{conj}: \mathbb{P}_4 \to \mathbb{P}_4\) by \(\fn{conj}(\alpha) =\) the conjugate of \(\alpha\text{.}\)
  1. Calculate \(\fn{conj}(3+1)\) and \(\fn{conj}(2+2)\text{.}\)
    Solution.
    In this notation, \(\fn{conj}(3+1)=2+1+1\) and \(\fn{conj}(2+2)=2+2\text{.}\)
  2. Use the function \(\fn{conj}\) to describe self-conjugate partitions.
    Solution.
    A self-conjugate partition is precisely a partition \(\alpha\) such that \(\fn{conj}(\alpha)=\alpha\text{.}\) That is, a self-conjugate partition is a fixed point of the function \(\str{conj}\text{.}\)

Subsection 7.3.C Collecting Coins

Here is a puzzle involving partitions of integers. You will need at least ten coins or other small objects.

Activity 7.3.C Collecting Coins Puzzle.

Take some coins and arrange them into piles. You may have any number of piles and any number of coins in each pile. A pile may have as few as one coin in it. Order them largest to smallest (in nonincreasing order). This ordered arrangement of coins in piles is a state of the system.
From that starting state, collect the top coin off each pile and make one new pile out of those collected coins. Notice that any pile that had just a single coin was eliminated. Again, order the piles in nonincreasing order by size. You now have a new state.
Repeat this process on the new state β€” collect the top coin from each new pile, make one new pile out of those collected coins, and arrange the piles in order. Keep repeating the process. Although we can repeat this process forever, we stop if we get back to a state that we had visited before.
You can watch a video of the process in action at Collected Coins.
  1. If you have five coins and you start with one pile of two coins and three piles of one coin each, then we denote that state \(2+1+1+1\text{.}\) Write down \(2+1+1+1\text{,}\) perform the process, and write down the resulting state. Then keep repeating the process, writing down each state each time, until you get to a state that you have visited before.
  2. Start with six coins in two piles of three, which is denoted \(3+3\text{.}\) Perform the process, write down the resulting state, and then repeat until you get to a state that you have visited before.
  3. Start with seven coins in piles of four, two, and one, which is denoted \(4+2+1\text{.}\) Perform the process, write down the resulting state, and then repeat until you get to a state that you have visited before.
  4. A state is a fixed point of the system if when we apply one step of the process to that state we get that state immediately again. Give an example of a fixed point that you have found and find another example.
  5. Conjecture which states are fixed points and which numbers of coins have a fixed point state.
  6. Thus far, we have been looking at one state at a time. For a given number of coins, \(n\text{,}\) we can visualize the entire system by drawing the directed state graph \(G_n\text{.}\) The vertices are all possible states and there is an arrow from each state to the state that follows from one step of the process. The state graph \(G_5\) is drawn in FigureΒ 7.3.18. Draw the state graphs \(G_1\) (one coin) \(G_2\) (two coins), \(G_3\) (three coins), and \(G_4\) (four coins).
    Figure 7.3.18. The directed state graph \(G_5\) on five coins.
  7. Now draw the state graph \(G_6\) (six coins). Be sure that you have all possible states. Hint: Start with the state \(1+1+1+1+1+1\) and perform the process until you get a repeat. Then, find a state that is not yet included in your graph. Repeat this process until all eleven possible states in your graph.
  8. In your state graphs, how did you indicate a fixed point?
We introduce a little more vocabulary that is used in the exercises.

Definition 7.3.19 Cycles and cyclic states.

Let \(\mathbb{P}_n\) denote the partitions of the integer \(n\text{,}\) as defined in DefinitionΒ 7.3.3. For a fixed positive integer \(n\text{,}\) the process introduced in ActivityΒ 7.3.C defines a function \(\beta:\mathbb{P}_n \to \mathbb{P}_n\text{.}\) When we repeat this process, we are iterating the function \(\beta\text{.}\) That is, we are calculating
\begin{equation*} s, \beta(s), \beta^s(s), \beta^3(s), \ldots\text{.} \end{equation*}
where \(\beta^k\) is the \(k\)th iterate of the function \(\beta\text{,}\) as defined in DefinitionΒ 6.4.20.
  1. A state is cyclic if when we start at that state we eventually return to that state. That is, \(s\) is cyclic if \(\beta^k(s) = s\) for some positive integer \(k\text{.}\) For example, with five coins the cyclic states are \(3+2\text{,}\) \(2+2+1\text{,}\) and \(3+1+1\text{.}\)
  2. A \(k\)-cycle is a list of distinct states:
    \begin{equation*} s, \beta(s), \beta^2(s), \ldots, \beta^{k-1}(s) \end{equation*}
    where \(\beta^k(s) = s\text{.}\) The length of the cycle is \(k\text{.}\) For example, the three cyclic states in \(G_5\) form a 3-cycle. As another example, any fixed points are 1-cycles.

Subsection 7.3.D Exercises for 7.3.A The Definition of Partition

1. Practice.

Β 
  1. Check that \(\{1,2\} \cup \{3,4,5\}\) is a partition of \(\{1,2,3,4,5\}\text{.}\)
  2. Explain why \(\{1,2,3\} \cup \{3,4,5\}\) is not a partition of \(\{1,2,3,4,5\}\text{.}\)
  3. Explain why \(\{1,2\} \cup \{3,4\}\) is not a partition of \(\{1,2,3,4,5\}\text{.}\)
Check.
  1. Hint: Check both parts of DefinitionΒ 7.3.1.
  2. Hint: 3 is in both sets.
  3. Hint: 5 is not in either set.

3. Understand.

List all of the partitions of the set \(\{1,2,3,4\}\text{.}\) Hint: Organize your work by listing the partitions of the set corresponding to each partition of the integer four. For example, under \(2+2\) you would include the partitions \(\{1,2\} \cup \{3,4\}\text{,}\) \(\{1,3\} \cup \{2,4\}\text{,}\) and \(\{1,4\} \cup \{2,3\}\text{.}\)
Check.
Hint: There are 15.

4. Understand.

Let \(\mathbb{P}_{10}\) be the set of all partitions of the integer 10. The function \(\fn{countparts}:\mathbb{P}_{10} \to \mathbb{N}\) is defined by \(\fn{countparts}(\alpha)\) is the the number of parts of \(\alpha\text{.}\)
  1. Identify the domain and codomain of \(\fn{countparts}\text{.}\)
  2. Evaluate \(\fn{countparts}(4+3+3)\) and \(\fn{countparts}(10)\text{.}\)
  3. Find \(\alpha \in \mathbb{P}_{10}\) such that \(\fn{countparts}(\alpha)=2\text{.}\)
  4. Identify the image of \(\fn{countparts}\text{.}\) Is \(\fn{countparts}\) onto?
  5. Is \(\fn{countparts}\) one-to-one? Explain.
Check.
  1. \(\mathbb{P}_{10}\text{,}\) \(\mathbb{N}\)
  2. Hint: The answers add up to four.
  3. Hint: There should only be one + in your example.
  4. Hint: What is the smallest and largest number of parts you can get?
  5. Hint: No.

5. Understand.

Let \(\mathbb{P}_{10}\) be the set of all partitions of the integer 10. The function \(\fn{evenparts}:\mathbb{P}_{10} \to \mathbb{N}\) is defined by \(\fn{evenparts}(\alpha)\) is the the number of parts of \(\alpha\) that are even numbers.
  1. Identify the domain and codomain of \(\fn{evenparts}\text{.}\)
  2. Evaluate \(\fn{evenparts}(4+3+3)\) and \(\fn{evenparts}(10)\text{.}\)
  3. Find \(\alpha \in \mathbb{P}_{10}\) such that \(\fn{evenparts}(\alpha)=2\text{.}\)
  4. Identify the image of \(\fn{evenparts}\text{.}\) Hint: What is the largest number of even parts that a partition of 10 can have? Is \(\fn{evenparts}\) onto?
  5. Is \(\fn{evenparts}\) one-to-one? Explain.
Check.
  1. \(\mathbb{P}_{10}\text{,}\) \(\mathbb{N}\)
  2. Hint: The answers add up to two.
  3. Hint: One option is to use two even numbers that add to 10.
  4. Hint: A partition of 10 can have up to five even parts.
  5. Hint: No

6. Understand.

Let \(\mathbb{P}_{10}\) be the set of all partitions of the integer 10. The function \(\fn{oneparts}:\mathbb{P}_{10} \to \mathbb{N}\) is defined by \(\fn{oneparts}(\alpha)\) is the the number of parts of size one in \(\alpha\text{.}\)
  1. Identify the domain and codomain of \(\fn{oneparts}\text{.}\)
  2. Evaluate \(\fn{oneparts}(4+3+3)\) and \(\fn{oneparts}(10)\text{.}\)
  3. Find \(\alpha \in \mathbb{P}_{10}\) such that \(\fn{oneparts}(\alpha)=2\text{.}\)
  4. Identify the image of \(\fn{oneparts}\text{.}\) Is \(\fn{oneparts}\) onto?
  5. Is \(\fn{oneparts}\) one-to-one? Explain.

7. Understand.

Let \(\mathbb{P}_{k}\) be the set of all partitions of the integer \(k\text{.}\) The function \(f: \mathbb{P}_{10} \to \mathbb{P}_9\) is defined by \(f(\alpha)=\) the partition obtained from \(\alpha\) by subtracting one from \(\alpha\)’s smallest part (and ignoring any zeros.) Notice that this subtraction preserves the nonincreasing order so we do get a partition.
  1. Identify the domain and codomain of \(f\text{.}\)
  2. Evaluate \(f(5+3+2+2)\) and \(f(9+1)\text{.}\)
  3. Find a partition \(\alpha \in \mathbb{P}_{10}\) such that \(f(\alpha) = 4 + 4 + 1\text{.}\)
  4. Explain why there does not exist a partition \(\beta \in \mathbb{P}_{10}\) such that \(f(\beta) = 3+3+3\text{.}\)

9. Explore.

Read the Wikipedia entry on Young Tableaux.
  1. Give an example of a standard Young tableau of shape \(5+4+1\text{.}\)
  2. Give a different example of a standard Young tableau of shape \(5+4+1\text{.}\)
  3. List all the standard Young tableau of shape \(3+1\) using the numbers 1, 2, 3, 4. Hint: The upper left-hand corner must be 1.
  4. List all the standard Young tableau of shape \(3+2\) using the numbers 1, 2, 3, 4, 5.
Check.
  1. Hint: There was one on the wikipedia page.
  2. Hint: You need to put a 1 in the upper left-hand corner.
  3. Another hint: There are three of them.
  4. Hint: There are five of them.

Subsection 7.3.E Exercises for 7.3.B Conjugate Partitions

14. Explore.

Is there always a self-conjugate partition of \(n\) when \(n>2\) is even? Justify your answer. Hint: can you find a pattern in your answers to Exercise 11?
Check.
Hint: The answer is yes. Make sure that you know how to build self-conjugate partitions when \(n\) is odd as in ActivityΒ 7.3.B (f). Then use the fact that an even is just one more than an odd.

15. Explore.

Define the function \(p:\mathbb{Z}^+ \to \mathbb{Z}^+\) defined by \(p(n) =\) the number of partitions of the integer \(n\text{.}\)
  1. Calculate \(p(1)\text{,}\) \(p(2)\text{,}\) \(p(3)\text{,}\) \(p(4)\text{,}\) and \(p(5)\text{.}\)
  2. Read the wikipedia entry for Partition Function (number theory). According to the article, what’s \(p(100)\text{?}\) Is there a closed-form expression (explicit formula) for \(p\text{?}\)

Subsubsection Exercises for 7.3.C Collecting Coins

16. Practice.

Β 
  1. Start with some arrangement of ten coins into piles in nonincreasing order. Record that state (as a partition). Repeat the process, recording each state as you go, until you get to a state that you have visited before.
  2. Now pick a new state with ten coins. Record that state (as a partition). Repeat the process, recording each state as you go, until you get to a state that you have visited before, which could be from 16.(a).
  3. What do you think happens when you start with ten coins in any state?
Check.
Hint: They all end on the same state.

18. Understand.

Generalize your conjecture from Exercise 16 about what happens with ten coins. Hint: What is special about the integer 10?
Check.
Hint: Your conjecture should be that for some special numbers of coins, like 10, that all states end in the same state. Some other special numbers of coins are 1, 3, and 6.

19. Understand.

Let’s look at what happens with eight coins.
  1. Starting with \(1+1+1+1+1+1+1+1\text{,}\) what happens? Write the sequence of states that follow.
  2. Starting with \(2+2+1+1+1+1\text{,}\) what happens? Write the sequence of states that follow.
  3. Explain why it follows that \(G_8\) is disconnected. (While \(G_8\) has only these two different end cycles, \(G_n\) can have many end cycles.)
Check.
  1. Hint: The last new state you get (before it repeats) should be \(4+2+1+1\text{.}\)
  2. Hint: The last new state you get (before it repeats) should be \(3+3+1+1\text{.}\)
  3. Hint: We have found two different end cycles.

22. Understand.

A origin state is a state with no predecessors, i.e.Β no arrows into the vertex.
  1. List all of the origin states with three, four, five, six, and seven coins.
  2. Show that the state \(4+4+3\) on eleven coins is not an origin state.
  3. Explain how we know that the state \(4+2+2+1+1+1\) on eleven coins is an origin state.
Check.
  1. Hint: The origin states for five coins are the points on the graph \(G_5\) with no arrows pointing in, namely \(1+1+1+1+1\) and \(2+1+1+1\text{.}\)
  2. Hint: Work backwards to find a predecessor that maps to \(4+4+3\) under this process.
  3. Hint: First explain why any predecessor would have to have at least five piles. Then consider how many coins would be in the collected pile.

23. Explore.

Conjecture which states are origin states, as defined in Exercise 22, for any number of coins. Briefly explain your reasoning.
Check.
Hint: The conjecture involves the number of parts in the partition and the size of the first part.

24. Explore.

Β 
  1. Give several different examples of 2-cycles from your earlier work.
  2. Suppose there is a 2-cycle with \(n\) coins. Conjecture which states are in that 2-cycles.
  3. For what values of \(n\) does the graph \(G_n\) have a 2-cycle? Answer in general.

25. Explore.

Prove your conjecture from ActivityΒ 7.3.C (e) about fixed points. Be sure to show that these states are fixed points and that any fixed point is one of these states.

26. Explore.

(For readers who have completed Exercise 16, Exercise 17, Exercise 19, Exercise 21.) Conjecture which states are cyclic states for \(n\) coins. Hint: Draw the diagrams for the cyclic states you found earlier.