Sub topic 10
Splitting Items into Unlabeled Groups
The working model
Assume you can use combinations and factorials, and that you can recognize when order does or does not matter. This chapter focuses on a special type of combination problem: dividing distinct items into groups when the groups have no names or roles.
A group is unlabeled when switching the group names does not create a new result. For example, dividing eight students into Group A and Group B is different from dividing them into two unnamed groups of four. If the groups are unnamed, the division
- Group 1: Alice, Ben, Cara, David
- Group 2: Eli, Fran, Gia, Hugo
is the same as the division with the two lists reversed.
Two unlabeled groups
Suppose eight distinct people must be split into two groups of four.
First, choose four people for one group:
C(8, 4) = 70
The remaining four people form the other group. However, every division has been counted twice. Choosing the first group as the other set produces the same two groups in reverse order.
Therefore:
C(8, 4) / 2! = 70 / 2 = 35
The division by 2! removes the repeated arrangements of the two unnamed groups.
import math
people = math.comb(8, 4)
unlabeled_groups = people // math.factorial(2)
print(people) # 70
print(unlabeled_groups) # 35More than two equal-sized groups
Suppose twelve distinct people are split into three unnamed groups of four.
If the groups had labels, you could:
- Choose four people for the first group.
- Choose four of the remaining eight for the second group.
- Put the last four in the third group.
This gives:
C(12, 4) × C(8, 4) × C(4, 4)
This count treats the three groups as labeled. Every final division appears 3! times because its three groups can be placed in the first, second, or third position.
Thus:
C(12, 4) × C(8, 4) × C(4, 4) / 3!
This is equivalent to the compact formula:
12! / (4! × 4! × 4! × 3!) = 5,775
The factors 4! remove the order within each group. The factor 3! removes the order among the three unnamed groups.
import math
answer = math.factorial(12) // (
math.factorial(4) ** 3 * math.factorial(3)
)
print(answer) # 5775When not to divide
Do not divide by the number of groups if the groups have different roles. For example, assigning people to a president’s committee, a finance committee, and a research committee creates labeled groups. The names or roles distinguish them.
You also do not divide when the group sizes are all different and the sizes identify the groups. A group of two, a group of three, and a group of four are distinguishable by size.
If some group sizes repeat, divide only for the repeated sizes. For example, with groups of sizes 2, 3, 3, and 4, the two groups of size 3 can switch places without changing the result. Divide by 2!, but do not divide by 4!.
A visual check
GRE strategy
For a grouping problem:
- Identify whether the items are distinct.
- Determine each group’s size.
- Temporarily treat groups as labeled.
- Remove the order within each group with factorials.
- Divide by factorials for groups that can exchange places.
- Check that the result is a whole number and is no larger than the labeled count.
A common error is dividing by the number of groups instead of dividing by its factorial. For three interchangeable groups, the correction is 3!, not 3.
Exercise
In how many ways can 10 distinct students be split into five unnamed pairs?
Show answer
Arrange the students, divide by 2! for the order within each pair, and divide by 5! for the order of the pairs: 10! / (2!^5 × 5!) = 945.