Rivka Lipkovitz is a high school senior from San Francisco, California, whose research project earned her fifth place in the 2025 Regeneron Science Talent Search. For her research, Rivka modeled how U.S. voter identification laws affect voter turnout—very timely stuff!
An avid practitioner of the Doomsday Algorithm, Rivka took some time to share one of her favorite math puzzles with me:
A teacher is handing out candy to his students, of which there are at least four. He abides by the following rules:
He hands out candy to groups of three students (i.e., “trios”) at a time. Each member of the trio gets one piece of candy.
Each unique trio can ask for candy, but that same trio can’t come back for seconds. If students in the trio want more candy, they must return as part of a different trio.
When a trio gets candy, the next trio can’t contain any students from that previous trio.
It turns out that every possible trio can get a helping of candy. What is the smallest class size for which this is possible?
Four, five, and six students are clearly impossible.
Seven students implies ${7\choose 3} = 35$ unique trios. To cycle through all 35 trios exactly once each, I looked at the problem as unique triangles within a heptagon. There are five 'types' of triangles.
There are seven unique triangles for each of the five types. I created an algorithm that cycles through a trangle from types 1, 2, 4, and 3, and then repeats six more times. Finally, each triangle from type 5.
There are many different processions...
Each student is part of 15 trios and will receive 15 candies.
$$\boxed{7 \text{ is the smallest class size.}}$$Instead of trios of students, suppose now that groups of 10 students come up to get candy. This time, there are at least 11 students in the class. As before:
Each member of the group of 10 gets one piece of candy per visit.
Each unique group of 10 can ask for candy, but the exact same group of 10 can’t come back for seconds. If students in the group want more candy, they must return as part of a different group.
When a group of 10 gets candy, the next group of 10 can’t contain any students from the previous group of 10.
Suppose the class size is the minimum that allows every possible group of 10 to get a helping of candy. How many pieces of candy does each student receive?
I hypothesize that given a group size of $g$ requesting candy, the minimum class size is $2g+1$.
There are thus ${2g+1\choose g}$ unique groups will be able to get candy while following the class rules.