Mathcamp 2025 Qualifying Quiz Part 2 Math Jam, Problems 5 and 6
Go back to the Math Jam ArchiveCanada/USA Mathcamp staff will discuss solutions to Problems 5 and 6 of the 2025 Mathcamp Qualifying Quiz! Mathcamp is an intensive 5-week-long summer program for high school students. The Qualifying Quiz is the centerpiece of the Mathcamp application; the problems are designed to be fun, challenging, and thought-provoking. Anybody who's interested is welcome, whether you applied to Mathcamp this year or just want to talk about some cool problems with Mathcamp instructors. It'll be even more fun if you bring your own solutions so you can participate in the discussion during the Jam! Presenters: Neeraja Kulkarni, Dan Gulotta
Copyright © 2025 AoPS Incorporated. This page is copyrighted material. You can view and print this page for your own use, but you cannot share the contents of this file with others.
Facilitator:
Welcome to the Canada/USA Mathcamp Qualifying Quiz Math Jam! The Math Jam will begin at 7:00 pm ET (4:00 pm PT). We will cover problems 5-6 today. You can find problems 1-4 in the Math Jam archive: https://artofproblemsolving.com/school/mathjams-transcripts?id=720
Hello and welcome to the Canada/USA Mathcamp Qualifying Quiz Math Jam!
hi
hello
Hello!
Before I introduce our guests, let me briefly explain how our online classroom works.
This room is moderated, which means that all your questions and comments come to the moderators. We may share your comments with the whole room if we so choose.
Also, you'll find that you can adjust the classroom windows in a variety of ways by clicking on the user dropdown menu in the top-right corner of the classroom.
Canada/USA Mathcamp is an intensive five-week-long summer program for high-school students interested in mathematics, designed to expose students to the beauty of advanced mathematical ideas and to new ways of thinking. You can learn more about Canada/USA Mathcamp here: www.mathcamp.org
Many AoPS instructors, assistants, and students are alumni of this outstanding program!
Each year, Mathcamp creates a Qualifying Quiz, which is the main component of the application process. If you haven't already seen it, you can find the 2025 Quiz problems at https://www.mathcamp.org/qualifying_quiz/ . In this Math Jam, members of this year's Mathcamp Quiz committee will discuss the problems are their solutions. Today, we're joined by:
Dan Gulotta (dgulotta) has been a camper, mentor, and visiting speaker at Mathcamp, most recently in 2021. He is currently a postdoc at the University of Utah, studying number theory and p-adic geometry.
Neeraja Kulkarni (user1618) has been a mentor at Mathcamp in 2020 and 2023. She is currently a postdoc at the University of Rochester, studying harmonic analysis.
Also helping out today, we have Kevin Carde (KevinCarde). Kevin is the Assistant Director and Technical Lead of Mathcamp. He's been part of every Mathcamp summer since 2011!
I'll turn things over to Neeraja (user1618)!
Hi everyone! Thanks jwelsh for the introduction. I'm Neeraja, and I'll be presenting problem 5. Dan will be presenting problem 6.
Please feel free to ask questions in the chat at any time!
Problem 5: The state of Infiana is an infinite plane of farmland, subdivided into an infinite square grid of 1 km × 1 km plots of land. A finite number of farmers (at least two) each own infinite territory in Infiana, with each 1×1 plot belonging to exactly one farmer. The plots that each farmer owns are connected by orthogonal adjacency; in other words, any two points belonging to the same farmer can be connected by a road that lies within that farmer’s territory and that does not pass through a vertex of a 1 × 1 plot along the way. A farmer may split their territory into two fields by building a fence along the gridlines, all within their own territory. The laws of Infiana dictate that the fence must be of finite length, but the resulting fields must still have infinite area. Each field can then be further subdivided into more fields.
Part a:
For each positive integer n, give an example of a territory that can be split into n pieces but no more.
Let’s start by getting a feel for the problem by taking a look at some small values of n. First, what might a territory that can be split into two pieces look like? Describe it.
Okay, there are many correct answers! Most of them say "a rectangle with finite width and infinite length"
A similar and also correct answer is a U-shape, as shown below.

This territory can be split into two infinite parts using a fence of length 1 along any of the interior grid lines, but any additional fences would create a finite region, which is not allowed.
Now, we want to extend this construction to larger values of n. What happens if we add another infinite line of grid squares, making it an “m”-shape with infinitely long legs? How many fields can we split this shape into?

It can be split into three fields, as shown here.

Like in the first example, if more than two fences are placed, a finite region is created. One way to persuade yourself of this is that each field needs to contain an infinite portion of at least one of the legs, but this can only be true of one field per leg due to the orthogonal adjacency requirement.
We can extend this construction to work for arbitrary n, creating a “comb” structure with n infinitely extending “teeth” as shown below.

This answers part (a).
Part b:
Prove that no territory can be broken up into infinitely many pieces.
Three
3
3
3
3
A key part of part (b) is the finiteness of the number of farmers. Can you use the solution to part (a) to explain why this is?
Great answers from the chat!
If the number of farmers could be infinite, we could extend the comb construction from the previous problem infinitely, since doing so would create infinitely many farmers between the “teeth” of the comb.
We now want to make a rigorous argument to show that the allowed number of fields is limited in some way by the number of farmers in Infiana.
Based on the comb example, it makes intuitive sense that the number of fields is related to the number of ways that the territory “goes out to infinity.” The problem is how to make this notion precise.
Many applicants developed an intuitive notion of the “ways of going out to infinity” via the concept of “infinite arms” of a territory, as a generalization of the teeth of the “comb” in part (a).
However, this concept is difficult to work with rigorously. How do we define an arm? How do we tell the difference between two arms and two parts of the same wide arm? How do we even know that it’s always possible to define an arm?
The key lies in a different property of a territory. Imagine the comb shape. What other attribute of it can we say “goes out to infinity,” other than the interiors of its teeth?
The territories separating the teeth?
the boundary between farmers' territory.
The slots between them
Nice ideas! Let's think about the boundary between the farmers' territory
Think of the "lines" between each pair of plots in different farmers’ territories. We can consider each of the connected components of the graph formed by these line segments as a single “boundary component”.
Each boundary component has infinite length, because of the following reasoning. If a boundary component had any endpoints or loops, then the orthogonal adjacency or infinite territory requirements would be violated.
Each boundary component can have more than two ends (imagine a "T" or "H" shape), but the portion of a boundary component adjacent to any given territory is just a simple curve of infinite length.
A territory is entirely defined by its boundary components. For instance, instead of thinking of the comb in the previous problem as being made up of some number of “teeth,” we can think of it as being bounded by one big U-shaped boundary component with many smaller U-shaped boundary components within its curve.
Our goal is to find a relationship between the number of boundary components adjacent to a territory to the number of farmers’ territories adjacent to it.
First, note that a single territory cannot be on two sides of a boundary component because then there would be some line of orthogonally adjacent squares within that farmer’s territory which goes from one side of the boundary component to another, which is impossible since boundary components have no endpoints.
I now claim that every fence is a simple curve with both ends on a boundary component.
Why is this true? Can you explain it?
If it were not, it wouldn’t fully enclose a shape. You would be able to move around it without leaving a territory.
Yeah, if a fence enclosed a shape without having endpoints on a boundary component, the fence would be a loop enclosing a finite area, which is not allowed
Great! Next I claim that every fence must go from one boundary component to a different boundary component (i.e. it can't return to the same boundary component). Why is this?
if it returned to the same boundary it would enclose a finite space which is not allowed
It would make the place inside finite
If it went to the same boundary, you would be able to follow along it in a finite path, so it must enclose a finite space.
Perfect!
Next, we want to show that no two fences can connect the same pair of boundary components.
Imagine that there are two fences which both join the same pair of boundary components. Then you could start at the endpoint of one fence (which is on the first boundary component), travel along the fence to its other endpoint (on the second boundary component), travel along the second boundary component to the second fence, and travel back along the second fence to the first boundary component. Why would this break the laws of Infiana?
in Infiana a shape with finite perimeter has finite area
finite area
Finite perimeter Finite area
Yes, again, a closed loop is formed, so that farmer’s field must have finite area.
As a result, each pair of boundary components can be connected at most once by a fence, so if there are n boundary components adjacent to some farmer’s territory, there can be at most (n2) distinct fences.
Since there are finitely many farmers, each farmer has a finite number of neighbors, so the number of boundary components adjacent to any farmer's territory if finite.
This completes part (b).
Part c:
Prove that there are always at least two farmers who cannot split their territory at all.
Again, boundary components are the key to solving this problem.
We use induction on the number of territories in Infiana for this proof. As a base case, let there be just two territories.
Is there ever such a configuration with just 2 territories that can be split, and if not, then why?
There is only one boundary component, so no.
only one boundary comonent
which is the single infinite line separating their territories
Perfect! If there are 2 farmers, there is exactly one boundary line separating their territories
Since each fence must join two distinct boundary components, no fence is possible. This finishes the base case.
Now, for the inductive step, suppose that for any number of farmers k in Infiana which is less than some number n, there are always at least two farmers who cannot split their territory at all.
Let’s consider some configuration of Infiana with n farmers and assume for the sake of contradiction that it has less than two territories which are unsplittable.
Since there are 2 or more farmers in total, at least one farmer can split their territory, so their territory must have at least two boundary components. Let’s call this farmer’s territory T.
Now we will divide all the farmers, excluding T, into 2 groups: "farmers to the left of T", and "farmers to the "right of T", defined in the following way:
We can pick the portion of one boundary component adjacent to T (which is equivalent to an infinite line) and divide the territories into two “sides”: one including all of the territories on the same side of that infinite line as T, other than T itself, and the other including all of the territories on the opposite side of that infinite line from T.
Now, based on this definition, does each side have at least one territory, and why?
Yes because there must be an infinite area on one side of an infinite line, and also an infinite area on the other side of the line
Yes, because a boundary component is defined by two territories, so the boundary components on each side have at least one territory connected to them.
yes because \mathcal{T} 's boundary component is a infinite curve that splits it into 2, and every other farmer's territory lies entirely in one of the 2 regions, so each side must contain at least one of the remaining n−1 territories. if one side was empty then all the other farlands would be on the same side of \mathcal{T} 's boundary
If not, T cannot be split.
Each side must have at least one territory in it because T has at least two boundary components and each boundary component must be adjacent to at least two territories.
Recall that we assumed earlier, for the sake of contradiction, that there are less than two unsplittable territories overall.
This means that at least one side of T has no unsplittable territories. Let’s call that side the “left side” and the other side the “right side.”
Imagine a configuration in which all the territories on the left side and T are all combined into a single territory; and the territories on the right side are kept as they are.
Then how many unsplittable territories does this new configuration have, and how many farmers does it have?
1 unsplittable territory and less than n farmers
4 territories and 4 farmers
i mean 3 farmers
Then we can use inductive hypothesis to finish
1 big farmland on the left side of T and all the right side ones, and since left side contributed no unsplittable, T must be splittable
Okay, many different answers here
The new configuration of Infiana has less than two unsplittable territories, since all the territories on the left side are unsplittable and there’s only one other territory which is not from the original left side.
Additionally, it clearly has fewer than n farmers.
This now contradicts the inductive hypothesis
ohhhhh so the only unsplittable farm must be on the right side farmers, so only one territory is unsplittable in the new configuration, contradiction with the left side no unsplittable assumption, so in the original n both sides must each have at least one unsplittable?
yeah!
Because of this contradiction, it is necessarily true that there are always at least two farmers who cannot split their territory at all.
This completes Problem 5!
Thanks everyone for your comments!
Now I'll hand it over to Dan to talk about Problem 6.
Thanks Neeraja!
Problem 6: The Hilbert Curve is a famous example of a space-filling curve. (You can read all about it on Wikipedia, though you don't need any of that information to solve this problem.) Inspired by the Hilbert curve, Misha decides to build an infinite running track of the same shape. Instead of making the segments smaller and smaller so that the whole thing fits inside a 1×1 square, he makes all the segments 1 meter long and allows the track to extend over the entire first quadrant of the plane.
The track is constructed in stages, as follows:
The initial stage H0 starts at (0,0) and covers the bottom left 1×1 square of the first quadrant. It consists of three segments in a U-shape:

For each positive integer n, the stage Hn starts at (0,0) and covers the bottom left (2n+1−1)×(2n+1−1) square of the first quadrant. It begins with Hn−1, then continues with three rotated or reflected copies of Hn−1 joined together with line segments of length 1, as shown below:

Note that the procedures for constructing Hn for even and odd n are essentially the same. We display them separately to emphasize that when n is odd, the construction results in Hn appearing sideways (reflected about the line y=x).
The first few stages of the construction are shown below:

(a) Warm-up: how long is Hn?
One way to approach this question is to count the points in Hn with integer coordinates. How many such points are there?
(Hint: H0 has four points with integer coordinates. How many Hn's are in an Hn+1?)
4
4 times
four times as many
Right - so then how many integer points should be in Hn?
(2n+1)2=22n+2
4^(n+1)?
4n+1
4n+1
4n+1
Right. There are 2n+1 possible x-coordinates and 2n+1 possible y-coordinates (each ranging from 0 to 2n+1−1). So there are 4n+1 points with integer coordinates in Hn.
Given that we know the number of points with integer coordinates, how can we find the length of Hn?
so track length should be 4n+1−1 since from the start you need to travel 1 to get to every point
that minus 1
subtract 1? so the length would be4^(n+1)-1
Right, since there are 4n+1 points with integer coordinates, 4n+1−1 line segments of length 1 are needed to connect them. So the total length is 4n+1−1.
So we have solved part (a).
(b) How far along the track does a runner travel to get to the point (n,n)? (Hint: try it first for n=2k.)
Let's follow the hint and look at the point (2k,2k) first.
In which stage of the construction does the curve reach (2k,2k)?
(Note that (1,1) is the upper right corner of H_0).
what is k ?
k can be any nonnegative integer.
H_k
H_k ?
The point (2k,2k) is in Hk but not in Hk−1.

Does that make sense so far?
How much of the curve does a runner have to go through to get to (2k,2k)?
1/2
12
It's just past halfway on the curve, so 22k+1
2^(2k+1)
Slightly past half of the curve. 22k+2−12+12=22k+1
if (2k,2k) is where it is on the diagram then the bottom two Hk−1 and the two lines
They need to go through two full Hk−1's to get to (2k,2k).
Since an Hk−1 has 4k points with integer coordinates, a runner has to pass through 2⋅4k points with integer coordinates before getting to (2k,2k). So they also have to pass through 2⋅4k segments to get to (2k,2k).
Now we consider how many steps it takes to get to the point (n,n). Denote this quantity by s(n).
Fix a value of k. For which integers n is (n,n) contained in the original Hk but not the original Hk−1?
(Hint: in part (a), we computed the maximum x and y coordinates of a point of Hk.)
when 2k≤n≤2k+1−1
Right, (n,n) is contained in Hk but not Hk−1 if 2k≤n<2k+1. In other words, 2k must be the largest power of two that is less than or equal to n.
How is the copy of Hk−1 containing of (n,n) related to the original Hk−1?
it's self similar to the opposite diagonal
To get the copy, we have to flip the original along the diagonal line y=x and then translate by (2k,2k).
Under this transformation, which point in the original Hk−1 corresponds to the point (n,n) in the copy?
Oops forgot the translation. It's (n−2k,n−2k)
Right, (n−2k,n−2k).
After we reach (2k,2k), we see that it takes s(n−2k) more steps to get to (n,n)
From the above analysis, we can write down a recursive formula for s(n). What is it?
s(n)=s(2k)+s(n−2k)=22k+1+s(n−2k)
The formula is:
s(n)={0,n=0s(n−2k)+2⋅4k,2k≤n≤2k+1.
This formula leads to a nice interpretation of s(n) in terms of the binary representation of n.
If the binary representation of n is nknk−1⋯n1n0, what is the binary representation of n−2k?
n_(k-1) n_(k-2) .... n_1 n_0
(n_k - 1)n_(k-1)...n_1n_0
same thing without leading digit
nk−1nk−2⋯n1n0
Right, subtracting 2k just removes the leading digit (which is nk=1). So the binary representation of n−2k is nk−1⋯n1n0.
Using this information, how would you express s(n) in terms of the base 2 representation of n?
For example, if n=2k2+2k1, what is s(n)?
22k2+1+22k1+1
Right. In general, if n is a sum of 2ki's, then s(n) is a sum of 22ki+1=2⋅4ki.
So if n is written as nknk−1⋯n1n0 in base 2, how would you write s(n) in base 4 (or 2 if you prefer)?
nk0nk−10⋯n10n00
a string of 2s and 0s
If the base 2 representation of n is nknk−1⋯n1n0, then n=∑ki=02ini. We see from the recursive formula that s(n)=∑ki=02⋅4ini. Equivalently, the base 4 representation of s(n) is (2nk)(2nk−1)⋯(2n1)(2n0). The base 2 representation is nk0nk−10⋯n10n00.
This concludes part (b).
(c) One interesting feature of this running track is that you sometimes pass within a 1-meter distance of points that are very far ahead of you along the track — or very far behind! Suppose Anna, Benny, and Charlotte all start from (0,0) at the same time. Anna strolls at 1 m/s, Benny walks at 2 m/s, and Charlotte jogs at 3 m/s. Which pair(s) of them will pass within 1 meter of each other infinitely often? (Provide a proof both for the pairs that do and for the pairs that don't!)
Let's look at Anna and Benny first.
Assume that Benny has traveled between 4n and 4n+1 meters, for some nonnegative integer n.
Define ¯Hn to be the original Hn, plus the segment leading out of it. Then our assumption says that Benny is in ¯Hn, but not in ¯Hn−1.
If Anna is in the first quarter of ¯Hn, where can Benny be?
the second quarter
The second
the second quarter?
Since Benny moves twice as fast as Anna, he would have to be in the first half of ¯Hn. Since we assumed that he has traveled at least 4n meters, he cannot be in the first quarter, so he must be in the second quarter.
2nd

If Anna is in the second quarter of ¯Hn, where can Benny be?
third or fourth
third or fourth quarter
3rd or 4th quarter
the second half of H_n
Right, Benny has to be in the second half of ¯Hn.

Can Anna be in the second half of ¯Hn?
no
no
no
no
Benny would be finished by the time she gets there
No, then Benny would have to be outside ¯Hn.
Now let's divide the diagram into sixteenths instead of quarters. It looks like this:

Each dashed square represents an Hn−2.
We can compare where Anna and Benny are at various times.

If Anna is in a light gray region, then Benny must be in the corresponding dark gray region.
it looks like they are never exactly 1 meter apart
In the last (bottom) four diagrams, the regions are more than 1 meter apart.
In the first two diagrams, there is one corner of the light region that is 1 meter from a corner of the dark region. But we can check that Anna and Benny do not reach these corners at the same time.
Assuming n≥2 (so that it makes sense to divide ¯Hn into sixteenths), Anna and Benny cannot pass within 1 meter of each other. So in total, they can pass within 1 meter of each other only finitely many times.
Now let's consider Benny and Charlotte.
Our strategy will be similar. We assume that Charlotte is in ¯Hn, but not in ¯Hn−1. We get a similar diagram:

In this case, dividing ¯Hn into 16ths wasn't enough: we had to divide it into 64ths.
The diagram shows that if n≥3 (so that it makes sense to divide the diagram into 64ths), Benny and Charlotte cannot pass within 1 meter of each other.
wait, but can't Anna and Benny pass within one meter of each other when they are both in the first quarter?
If they were both in the first quarter of ¯Hn, then they are both in ¯Hn−1, so we can perform the same analysis with n replaced by n−1.
As long as Benny isn't in the first quarter of ¯H0, we can always find some n so that Benny is in ¯Hn, but not in the first quarter.
And he's only in ¯H0 for a finite amount of time.
Finally, let's consider Anna and Charlotte.
Even when we split ¯Hn into 64ths, it looks like Anna and Charlotte can potentially pass within 1 meter of each other.

It looks like Anna passes the point (2n−1,2n−1) around the same time that Charlotte passes the point (2n,2n).
How long does it take Charlotte to reach (2n,2n)?
(Note that we computed the distance to (2n,2n) in part (b).)
22n+13 seconds i mean
In part (b), we calculated that Charlotte has to run 2⋅4n meters to reach (2n,2n). Since she travels at 3 m/s, it will take her 2⋅4n/3 seconds to reach (2n,2n).
I'm confused about the question. What exactly does it mean to pass by each other "infinitely often"?
After the first few seconds, any pair of runners will be at least 1 meter apart. Occasionally, they might be exactly 1 meter apart. So the question is asking whether there are infinitely many occasions where this happens.
Does that make sense?
Going back to Anna and Charlotte... How long does it take Anna to reach (2n−1,2n−1)?
Again, it's possible to use the formula that we found in part (b).
22n−1+22n−3+22n−5+⋯+23+21=22n+1−23
Since 2n−1 can be written as 11⋯1⏟n in base 2, our solution to part (b) tells us that the number of meters that Anna needs to walk to reach (2n−1,2n−1) is 22⋯2⏟n in base 4. This is 2⋅(4n−1+4n−2+⋯+1)=2(4n−1)/3 meters. Anna travels at 1 m/s, so it will take her 2(4n−1)/3 seconds.
So Anna reaches (2n−1,2n−1) just slightly before Charlotte reaches (2n,2n).
Now look at the first few steps in the construction of the Hilbert curve again.

Which way does Anna walk just after she reaches (2n−1,2n−1)? (The answer depends on n.)
Left if n is even, down if n is odd
If n is even, then Anna walks left. If n is odd, then she walks down.

Which way does Charlotte walk just before she reaches (2n,2n)? (Again, the answer depends on n.)
up if n is odd, right if n is even
If n is odd, then Charlotte walks upward. If n is even, then she walks to the right.

So do Anna and Charlotte pass within 1 meter of each other in between the time Anna reaches (2n−1,2n−1) and the time Charlotte reaches (2n,2n)?
When n is odd, yes

In this case, Anna and Charlotte are moving in opposite directions on parallel segments. At some time, they will have the same x-coordinate, and they will be exactly 1 meter apart.
It's possible to calculate that they are 1 meter apart at time 2⋅4n/3−5/12.
So we have shown that Anna and Charlotte pass each other infinitely often.
We're running short on time, so I think we will have to skip part (d). But we will make sure to post a solution on the Mathcamp web site.
There is a request for the problem statement for part d so I'll post that.
(d) Della and Ellie each take a stroll along the running track at a speed of 1 m/s. Ellie starts k seconds after Della, where k is a positive odd integer. Show that there is some value of k such that Della and Ellie never pass within 1 meter of each other.
Can you put a link here?
I assume the solutions will be available at https://mathcamp.org/qualifying_quiz/solutions/.
That's the end of the quiz. Thank you so much for spending your evening with us!
We'll be posting tonight's transcript at https://www.mathcamp.org/qualifying_quiz/solutions/ within the next few days, in case you want to revisit some of what we covered tonight.
We hope you enjoyed this year's QQ, and stay tuned for the 2026 Quiz (and the summer 2026 application) to be posted in January.
Thank you all for coming! Over 300 students joined us over the course of today's Marthcamp Math Jam!
& a special thanks to Mathcamp for coming out tonight too!
Thank you!
thank you! bye!
If you have questions for Mathcamp, you ask tomorrow or can contact them at www.mathcamp.org/contact.php
A transcript of this Math Jam will be posted soon here: www.aops.com/school/mathjams-transcripts
We're closing the classroom now!
Copyright © 2025 AoPS Incorporated. This page is copyrighted material. You can view and print this page for your own use, but you cannot share the contents of this file with others.