# BMO2 2022

The second and final round of this year’s British Mathematical Olympiad took place on Thursday.

Here are some thoughts on the problems. I wasn’t involved in choosing the problems, although I did write Q4. I’ll say a bit more about this geometry problem than about the other three, so I’ve put this first.

The copyright to the problems is retained by BMO, and I’m reproducing here with permission. The paper can be found in its original format here.

Problem Four

Let me explain how I devised this problem. Let A’ be the point diametrically opposite A on the circumcircle of triangle ABC. (Sometimes called the antipode of A.) Now consider any line L through A’, and let P be the point where it meets the circumcircle again. I was particularly thinking about lines L where P lay on the same side of BC as A’, as depicted.

Because AA’ is a diameter, there is a right angle $\angle APA'$. So I considering intersecting L with the lines $\ell_B,\ell_C$ given in the question, since this would create two cyclic quadrilaterals, denoted $BDPP_B, DCP_CP$ in the figure.

Let’s just focus on $BDPP_B$. This cyclic quadrilateral gives us two equal angles in many different ways. But a particularly nice pair is the one shown, because ACPB is also cyclic, which confirms that the angle measure is $\angle C$. In particular, by extending $P_BD$ to E on AC, we get a third cyclic quadrilateral $BECP_B$, and hence find out that $P_BD,P_BE\perp AC$.

So four lines go through D: AP, BC, and the perpendiculars from $P_B,P_C$ to the opposite sides of the triangle.

How to turn this into a question? The steps outlined above are relatively clear because

• the right angle at P is essentially given;
• there are four other right angles, two involving $\ell_B,\ell_C$ which are given, then one involving $P_BD,P_BE$ being perpendicular to AC, and the same for $P_C$ and AB, which are to be deduced,

so the cyclic quadrilaterals just pop out directly. This would then be too straightforward for BMO2, and would also waste the fact that four lines meet at D. It would suffice to work with $P_B$ as we did above, and assert that the corresponding result also held for $P_C$.

To move towards the form of the BMO2 question, we consider taking P=A’, so that line L is actually the tangent to the circumcircle. We still have the quadruple concurrency at D, but now D lies on AA’. It seems almost certain that we wouldn’t have this concurrency if we built the figure using the tangent from any point other than A’. So this will be the configuration for the problem.

As the writer, I know that the four lines meet when T=A’, so I know I can force T=A’ by insisting that three lines meet, and then set the problem asking to prove that the fourth goes through the same point. One could have stated that $P_BE,P_CF,AT$ meet, and ask to prove that the meeting point lies on BC. I preferred the one I chose. Reflecting on the difficulty of the problem:

• It is hard to draw a diagram which looks right! Essentially you have to draw a few, and if T ends up close to A’ on one, the diagram will look right.
• Crucially, we now only have four right angles in the figure, so only one pair of (symmetric) cyclic quads can be read off immediately

I think the cleanest way to attack the problem is to extend AQ to meet the circumcircle at T’, with the goal of showing T’=T. Then $BECP_B, ACT'B$ cyclic gives $BQT'P_B$ cyclic (in an exact reversal of the argument in the prelude earlier). What we don’t know is that $P_B,T',P_C$ are collinear, but this follows since now we derive $\angle QT'P_B=\angle P_CT'Q=90^\circ$ from this new cyclic quad. Consequently T’=T.

There are many routes for coming up with olympiad problems in geometry and other topics, and the scenario I’ve described isn’t particularly typical for myself and certainly isn’t necessarily standard for other problem setters. Nonetheless, I hope that’s an interesting insight into the origin story of a problem like this.

Problem One

This question reduces to establishing whether

$m(m+k)+k=n^2$

has infinitely many solutions in (m,n). The technique for proving via ‘square sandwiching’ that this is normally not possible has been discussed previously on this blog here:

and here:

This is a good opportunity to reflect in more detail. Let $P(x)$ be a polynomial with integer coefficients, and we consider whether the image $P(\mathbb{Z}):= \{ P(n)\,:\, n\in \mathbb{Z}\}$ contains infinitely many squares.

Clearly if $P(x)=Q(x)^2$ for Q another polynomial with integer coefficients, then this holds. Square sandwiching establishes that the answer is no when P(x) is a monic quadratic (meaning that the coefficient of $x^2$ is one) unless P(x) is the square of a linear polynomial. The same holds if the leading coefficient is a square. Note that the general case where P(x) is negative except on a finite range (eg if P has even degree and negative leading coefficient) is also immediate.

But there are several cases where the answer is yes:

• For example, when $P(x)=2x^3$, we have P(n) a square whenever $n=2k^2$.
• Indeed, note that $P(x)=x$ has this property too!
• Amongst non-monic quadratics, note that $P(x)=nx^2+1$ works when n is not a square because of the theory of Pell’s equation.

We could have the alternative question: if $P(n)$ is always a square, does this imply $P(x)=Q(x)^2$. Indeed, one could generalise this and ask: if $P(\mathbb{Z})\subset R(\mathbb{Z})$ does this imply that $P(x)=R(Q(x))$ for some choice Q?

Our original setting with $R(x)=x^2$ is classical, due to Polya, and is a good problem for any students reading this. The case $R(x)=x^k$ is handled by Polya and Szego. The case of general R is more challenging, and though it can be treated without heavier concepts, is probably best left until one knows some undergraduate algebra. Readers looking for a paper may consult Davenport, Lewis and Schinzel Polynomials of certain special types (Acta Arith. 1964).

Problem Two

Rearranging to get

$\frac{f(2xy)}{2y} = \frac{f(f(x^2)+x)}{f(x+1)}$

is a good first step, as y appears only on the LHS. As y varies, the LHS is therefore constant, and so we deduce that $f(2y)=Cy$, ie f is linear on the even integers.

There were then a number of ways to proceed, bearing in mind one had to study the odd integers and solve for C. Taking x even in the given equation is a good next step, because (after some careful argument about C and divisibility by powers of 2) $f(f(x^2)+x)$ is already known, leading to an expression for f(x+1), ie some control over the odd integers.

There were a few possibilities for how to piece the odds and evens together, and extract the constant C. It’s worth mentioning that if the problem had studied functions from the non-negative integers to the non-negative integers, then C=0 would have been a possibility. You might like to consider whether this could lead to extra functions satisfying the given equation.

Problem Three

I personally found this quite difficult. We have a large number of 50-dimensional integer vectors with entries bounded by [0,2022] such that their sum is (n,n,…,n) and we are tasked to show that we can split the sum to obtain (m,m,…,m) and (n-m,n-m,…,n-m).

It seemed helpful to replace each vector $(x_1,x_2,\ldots,x_{50})$ with the 49-dimensional vector $(x_2-x_1,x_3-x_1,\ldots,x_{50}-x_1)$. We now have a large number of 49-dimensional integer vectors with entries bounded by [-2022,2022] with sum equal to the zero vector. Our task is to show that we can partition into two smaller sums with sum zero. (*)

It seems likely that the role of 2022 is not important, and will just determine how large n must be. I was hoping there might be a quick proof along the following lines: Let $\mathcal V$ denote the collection of vectors, and $A,B\subset \mathcal V$ some subsets, inducing sums $\Sigma_A,\Sigma_B$ respectively. Clearly $\Sigma_A=-\Sigma_B$ if $B=A^c$, and we might expect to be able to find $A\ne B$ such that $\Sigma_A=\Sigma_B$. I was hoping one could then move some vectors around (eg from $B\mapsto A^c$) to produce disjoint sets A,B for which $\Sigma_A=-\Sigma_B$, but I couldn’t see any way to achieve this.

This doesn’t mean it’s impossible though of course! And perhaps a contestant will find a successful argument along these lines during the olympiad.

In fact, it seems that a careful induction (on the number of cards, ie the dimension of the vectors) is the best way to proceed, and I will leave that there.

# BMO1 2021

The first round of the British Mathematical Olympiad was sat on Thursday by roughly 2000 pupils in the UK, and a significant number overseas on Friday.

For obvious reasons, much of the past 18 months has been dominated by logistical rather than academic problems, so it’s refreshing to be returning to the traditional format of this exam, even if the marking has been stayed online.

I wasn’t involved in setting in this paper, so here are some thoughts on the problems. These aren’t supposed to be official solutions, and it’s entirely possible that I’m missing the most natural approach or framing. Students reading this in future years are advised, as always, that such commentaries are normally more valuable after attempting and digesting the problem yourself first.

Note that the copyright to the problems is retained by BMO, and I’m reproducing here with permission. The paper can be found in its original format here.

Problem One

If one exhibits eighteen (= 6 x 3) explicit examples of relevant sums of consecutive positive odd numbers, one has finished the problem. An exhaustive search is impractical and uninteresting. However, beyond that, we would also like to find integers N which we are convinced have this property without needing to explicitly decompose them into the desired sum format.

Let’s study such a sum. We need an even number of odd numbers to end up with an even sum. Probably the algebraically neatest way is to set up such a sum symmetrically as:

$2n-k, 2n-(k-2),\ldots,2n-1,2n+1,2n+3,\ldots, 2n+k,$

for k an odd number. The sum of this sequence of consecutive odd numbers is 2n(k+1). So, we seek integers N which can be written as 2nm, where m is an even number, in as many ways as possible. Note that if we have an integer N which can be factorised as a product of two distinct even numbers we are forced to take the larger as 2n, and the smaller as m, since we require 2n-k to be strictly positive.

It’s equivalent to finding integers M which are less than 100 and have lots of factors (then multiplying by 4 to recover an N), and there are a few ways to do this, including now potentially by exhaustive search. It is useful to remember that is M can be factorised into primes as $M=p_1^{a_1}\ldots p_k^{a_k}$ then its factors can be described as the set:

$\{1,p_1,p_1^2,\ldots,p_1^{a_1}\}\times \{1,p_2,p_2^2,\ldots,p_2^{a_2}\}\times\cdots \times \{1,p_k,p_k^2,\ldots,p_k^{a_k}\},$

In particular, the number of such factors is $(a_1+1)(a_2+1)\ldots(a_k+1)$, independently of the choice of the primes. This gives a recipe for constructing all integers M<100 with at least twelve factors. We could take $(a_i)$ to be some permutation of (11), or (5,1), or (3,2), or (2,1,1), which give the following valid M:

$M=2^5\times 3 = 96, \; M=2^3\times 3^2 = 72, \; M=2^2\times 3\times 5 = 60,$ $M=2^2\times 3 \times 7 = 84,\; M=3^2\times 2 \times 5 = 90,$

and the corresponding valid N are 240, 288, 336, 360, and 384.

For what it’s worth, this problem took me a while. I spent a long time saying things like “we need numbers that can be written as 4n and as 8n and as…” and aiming to conclude “all multiples of 24 greater than 24 x ?? will work”, but this didn’t ever generate enough examples of one class.

Problem Two

In order to have won exactly 30% of the games so far, the number of games so far must be a multiple of 10, and the same is true for 70% success rate. The other success rates have similar constraints, but the multiples are smaller. After ten games, of course Arun cannot have simultaneously won both 30% and 70% of the total! So we need at least twenty games.

It feels as if we should be able to include the other success percentages so long as we can make 30% and 70% work. But can we do this in twenty games? This would require Arun to win 3 out of the first 10, and 14 out of the first 20 (or the exact opposite), and after some head-scratching, this is impossible, since it would require winning eleven out of the ten games between these observations. This is a nice observation, and we now know the answer must be at least thirty. Given that we have made some nifty, rigorous deductions already, one might speculate that this is the true answer. To verify this, we just have to give a construction, and there are a number of ways to achieve this, for example such that Arun wins

• One of the first two
• Two of the first five
• Three of the first ten
• Twelve of the first twenty
• Twenty-one of the first thirty

To get full credit, almost any justification that a construction exists for 30 games would be fine – but one must be given. Otherwise how do you know that the true bound isn’t 40 or 50 because there’s some other reason why 30 fails?

Problem Three

Facing this problem for the first time, there’s a temptation to try values smaller than 2021, and this may well be useful. If nothing else, such experiments may well lead to a conjecture of the general form of the answer. Personally, I find it relatively easy to make mistakes when dealing with small numbers, and would turn to this as a second strategy after trying more theoretical routes first.

First note that the condition $0\le n\le 11$ could be replaced by $n\ge 0$, since we are forced to include zero pieces of weight $2^{11}=2048$, and would similarly be forced to include zero pieces of weight $2^n$ for any $n\ge 11$. (%)

When counting a potentially complex set, we should start by seeing whether there is anything which we can control effectively. For example, I don’t think it is clear how to control the number of pieces of weight 64 in a configuration. However, powers of two lend themselves well to inductive arguments (if you take the powers of two and multiply them all by two, you still have powers of two!) and to studying parity (that is, whether a number is odd or even).

In this case, note that you must have either one or three of the pieces with weight one to ensure the total weight is odd. Similarly, if the goal had been 2022, we would need either zero or two of these pieces to ensure the total weight is even.

So that settles the number of pieces of weight one, and it remains to solve the problem for total weight 2018 and 2020 with the extra condition that we are no longer allowed to use any pieces of weight one. A way to capture this is to divide everything in the problem by two. So we are now trying to capture all the ways to generate weights 1009 and 1010.

We can reformulate this more generally, and assert that the number of configurations $f(n)$ to make total weight n satisfies the relations:

$f(2n)=f(2n+1)=f(n)+f(n-1).$ (*)

It would be quite tiresome to solve backwards in a binary search fashion, but perhaps this is where trying some small examples turns useful. Either by observation on the original problem, or by thinking about (*) with some initial condition like f(0)=f(1)=1, we find that $f(n)=\lfloor n/2\rfloor +1$. (That is, $f(n)=\frac{n+2}{2}$ when n is even, and $f(n)=\frac{n+1}{2}$ when n is odd.)

As a final aside, this question is an excellent exercise in using generating functions in an olympiad context. A couple of points are worth making:

1. It is important to decide whether you’re including f(0) as an example, much more so than in the original argument. As we’ll see, it works better if you do include it, and will avoid an awkward sequence of algebra steps.
2. Figuring out the answer, for example from small-ish cases, will make a generating function argument easier unless you are very fluent with manipulating rational functions. In this case, we would be studying $\sum_{n=0}^\infty f(n)x^n$, and trying to show that it is equal to

$\sum (\lfloor n/2\rfloor +1)x^n = (1+x)(1+2x^2+3x^4+\ldots) = \frac{(1+x)}{(1-x^2)^2}.$ (*)

Many readers who’ve played around a bit with generating functions may find it easier to go from the left to the right than vice versa.

Writing down a direct generating function for f(n) and showing it matches up with (*) remains a good exercise. It is helpful to bear in mind the discussion at (%).

Problem Four

Since I last blogged regularly, I have given a series of masterclass on Euclidean geometry three times, including twice in an online format.

Part of the point of this masterclass is to get younger students to think in more general terms about what they are doing when they are solving geometry problems, even when they are straightforward. In a competition, time is tight, and anything that gets the job done is good, but there’s still value in reflecting on these ideas here. Two ideas in the first session are:

• Attacking the conclusion coherently
• Clean angle chasing

and this problem offers a good example of both of these in practice.

We’ll start with attacking the conclusion coherently. We’ve got to prove that a triangle is equilateral. How can we achieve this? There are a number of ways:

• Prove all three lengths are equal
• Prove that all three angles are equal
• Prove that two angles are equal to 60 degrees.
• Prove that one angle is equal to 60, and (any) two lengths are equal
• Prove that one angle is equal to 60, and the other two angles are equal

It’s important to keep all of these in mind as one explores the configuration. It’s genuinely unclear at the very start which of these characterisations of equilateral triangles will be most appropriate. Note though, that the configuration is symmetric in the roles of D and E, so that, for example, proving that the angle at D is 60 would be sufficient, since by symmetry the angle at E would also be 60, and we would conclude.

As regards clean angle chasing, the main moral here is to avoid angle arithmetic unless you are convinced it’s necessary. Ideally one keeps track of what could be determined in terms of other quantities, and only attempts the algebra/arithmetic once you are sure that it will work. It certainly isn’t helpful to have diagrams littered with angle measures like $240^\circ - \theta - \frac{\alpha}{2}$. Equality is the best thing to aim for. Try and demonstrate and notate equal angles wherever possible.

For example, here, even before introducing C,D,E, there is plenty of structure which might useful. Essentially every length in the configuration involving $(O_1,O_2,A,B)$ is equal, and all the angles are 60 or 120.

So we bear this in mind. I would consider proving that $\angle DO_1E=60^\circ$ with the following figure.

There are number of ways to complete the argument. Here are a couple of more obscure ones that illustrate my approach.

Firstly, let’s ignore the result that $\angle DO_1E=60^\circ$ and proceed directly to $\angle O_2DO_1=60^\circ$. It suffices to show that the blue angles are equal, which is equivalent to demonstrating that $ADO_2O_1$ is cyclic.

To achieve this, we would like to show that the angle $\angle AO_2D$ is equal to the red angle we’ve already discussed, and this follows by chasing round, using that $O_1$ is the centre of triangle ABC, and then the fact that $AO_2D$ is the external angle opposite $\angle ABC$ in cyclic quadrilateral $ABCO_2$. Indeed, note that this use of an equal external angle rather than ‘opposite angle is 180 – […]’ is the textbook example of clear angle chasing, where focusing on equality rather than arithmetic massively cleans up many diagrams.

As a second, rather overblown way to complete the argument, let’s show that the angles at D and E are equal, without calculating them. Since $O_1D,O_1E$ are angle bisectors, we have two pairs of equal angles as shown.

It would suffice to show that these measures are themselves equal. This is saying that line $ECO_2D$ is the external angle bisector of $\angle ACB$. And this is true, since $O_2$ is the arc-midpoint of AB on $\Gamma_1$!

I hope these observations are interesting. But, to reiterate, this level of complexity is unnecessary, and arguments by congruent triangles or direct angle chasing are perfectly satisfactory too!

Problem Five

The punchline of this problem is that m(N) is an integer precisely if N is a triangle number, from which it is quick to count the number of such N.

But how to arrive that this punchline? It is reasonably clear that the N-set with minimal mean must have the form $(1,2,\ldots,k, N)$. One could proceed by setting up inequalities involving the means of $(1,2,\ldots,k-1,N)$ and $(1,2,\ldots,k,k+1,N)$ to establish a relationship between k and N.

But there is a more direct route. A useful, and very intuitive result about means is the following. If you have a set of numbers with mean x, and you add into the set a new number y, then the mean of the new larger set is between x and y. In particular, if y>x, then the new mean is larger than x.

In particular, consider the mean of $(1,2,\ldots,k,N)$. If it is less than k, then removing k gives a smaller mean. If it is greater than k+1, then adding k+1 gives a smaller mean. So since the mean is an integer, it must be equal to k or k+1. That is, we have

$\frac{1+2+\ldots+k+N}{k+1}=k\text{ or }k+1.$

These lead to $N=\frac{k(k+1)}{2}\text{ or }\frac{(k+1)(k+2)}{2}$.

Problem Six

There must be some significance to the choice of 71 terms, and the 999,999 but it’s hopeless to try and see this immediately. In this scenario, it really is helpful to play around with semi-small examples.

Note that the second term is 1 regardless of whether we view this as P for PREVIOUS or S for SUM. However, if we then have an S, our sequence starts 1,1,2,2… or 1,1,2,4,… and these are bad, as once we have two even consecutive even numbers, we are doomed to see even numbers forever.

So once we have a common factor, that common factor is retained. How would we introduce a factor of, say, 11? Well, if you take 1,1,1,1,1,1,1,1,1,1,1 then take an S, you get 11, and afterwards you get either 11 or 22.

This gives a clue of the right way to set up the problem. For definiteness, we consider the second term to be an S. If you then consider a sequence of Ss and Ps, and write down the number of Ps between successive Ss (which may be zero) as a list $p_1,p_2,p_3,\ldots$, it holds that $\sum p_i=70$, and that each string of $p_i$ Ps introduces a factor of $p_i+1$, leading to

$\prod (p_i+1)=999,999=3^3\times 7\times 11\times 13\times 37.$

Note that $2\times 3 + 6+10+12+36=70$, so there exists a choice of the $p_i$s that satisfies these relations simultaneously. (And if we had replaced 71 by a smaller choice, this would have been impossible.)

The actual answer to the problem is obtained by studying how to rearrange the blocks of SPPP…s, but the main challenge lies in reducing to this form.

I thought this was a hard problem for BMO, and was impressed to see some solutions under exam conditions.

# EGMO 2019

Last week, we held our annual IMO training and selection camp in the lovely surroundings of Trinity College, Cambridge. Four of our students have subsequently spent this week in Kiev, for the ninth edition of the prestigious European Girls’ Mathematical Olympiad.

The UK team, none of whom had attended the competition before, and all of whom remain eligible to return at least once, did extremely well, placing fourth out of the official European countries, and earning three silver medals, and one gold medal, with complete or almost-complete solutions to all six problems between them. More details are available on the competition website.

In this post, I’m going to discuss some of the non-geometry problems. As a special treat, the discussion of Question 6 is led by Joe Benton, which is only fitting, since he wrote it. You can find the first day’s three problems here, and the second day’s problems here. The geometry problems are treated in a separate post.

Problem One

Triple equalities are hard to handle directly, so generally one starts with a single equality, for example the left hand one $a^2b+c = b^2c+a$, after noting that the setup is cyclic (but not symmetric) in the variables, under cycling $a\to b \to c\to a$.

Some quick notes:

• The given equations are inhomogeneous, meaning that not every term has the same degree in terms of {a,b,c}. In complicated equations, normally we want to cancel terms, and we certainly can’t cancel terms with different degrees! So a good first idea is to find a way to make the equations homogeneous, for example using the condition, which is itself inhomogeneous. For example, one could replace $c$ with $c(ab+bc+ca)$, and it’s clear this might lead to some cancellation. In this case, the algebra is more straightforward if one rearranges and factorises first to obtain $a(1-ab)=c(1-bc)$, from which the condition gives $a(bc+ca)=c(ab+ac)$.
• Shortly after this, we find $a^2c=ac^2$, which means $a=c$ unless at least one of these terms is equal to zero.
• This case distinction should not be brushed over lightly as a tiny detail. This is the sort of thing that can lose you significant marks, especially if the omitted case turns out to be more involved than the standard case.
• This is a good example of planning your final write-up. The case distinction $\{a,c\ne 0\}, \{a\text{ or }c=0\}$ is really clumsy. What about b? We have already said that the setup is cyclic in (a,b,c), and it’s annoying to throw this aspect away. It really would be much much to have the overall case distinction at the start of your argument, for example into $\{a,b,c \ne 0\}$ and $\{a\text{ or }b\text{ or }c=0\}$, because then in the latter case you could assume that $a=0$ without loss of generality, then see what that implied for the other variables.
• In this setting, one really should check that the claimed solutions satisfy both the condition and the triple-equality. This is a complicated family of simultaneous equations, and even if you’re lucky enough to have settled on an argument that is reversible, it’s much easier to demonstrate that everything is satisfied as desired than actually to argue that the argument is reversible.

Problem Two

Maybe I speak for a number of people when I say I’m a little tired of domino tiling problems, so will leave this one out.

Problem Five

I liked this problem. A lot. It did feel like there were potential time-wasting bear traps one might slip into, and perhaps these comments are relevant:

• This feels like quite a natural problem to ask. In particular, the task specified by (A)+(B) is much more elegant than the RHS of (C). So unless you have immediate insight for the RHS of (C), it makes sense to start with the task, and aim for any bound similar to (C).
• There are a lot of transformations one could make, for example, repeatedly removing n from one of the $a_n$s, or re-ordering them conveniently somehow, which shouldn’t affect any solution. You can also attack the RHS of (C) in a number of ways (perhaps with a case split for n odd or even?). As with involved but easy angle chases discussed in the companion post, it’s probably better to hold this in mind than instantly to do all of these, since it will just obscure the argument if you end up not using the result of the simplification!
• One should always try small examples. Here, it’s worth trying examples large enough to get a sense of what’s happening, because I think the crucial observation is that (unless you were very very unlucky) there are lots of suitable sequences $B=(b_i)$. (*)
• Certainly the case where the $(a_i)$s themselves form a complete n-residue system is ‘easiest’ and certainly straightforward. One might say that the case where the $(a_i)$ are equal (or at least congruent) is ‘hardest’ (in that $(b_i-a_i)$ might have to take the largest values in some sense), but is also straightforward. There’s certainly the option of trying to rigorise this, but I don’t know whether this can be made to work.

# BMO2 2019

The second round of the British Mathematical Olympiad was taken on Thursday by the 100 or so top scoring eligible participants from the first round, as well as some open entries. Qualifying for BMO2 is worth celebrating in its own right. The goal of the setters is to find the sweet spot of difficult but stimulating for the eligible participants, which ultimately means it’s likely to be the most challenging exam many of the candidates sit while in high school, at least in mathematics.

I know that lots of students view BMO2 as something actively worth preparing for. As with everything, this is a good attitude in moderation. Part of the goal in writing about the questions at such length is because I think at this level it’s particularly easy to devote more time than needed to preparation, and use it poorly. This year time is tight at the end of semester, and so what follows is closer to a set of complete solutions than usual, for which apologies, although I hope it is still possible to get a sense of how one might have come across the solutions yourself. Of course, this means that what follows will certainly spoil the problems for anyone who hasn’t tried them by themselves already.

The copyright for the problems is held by BMOS, and reproduced here with permission.

Question 1

As if often the case in geometry questions, what you’ve been asked to prove here isn’t the most natural property of the configuration. A good first step would be to see if there are stronger statements which are true.You are asked to show that triangle BPE is isosceles, but you aren’t told which of the three vertices is the apex. In fact, the task is to show that $BP=EP$ or, alternatively, $\angle BEP=\angle PBE$. It’s not in general true that BE is equal to BP=EP. Unless you’re very unlucky, you can establish this from one diagram.

Now, you don’t immediately know whether it’s going to be easier to show that two lengths are equal, or that two angles are equal. However, you know that P lies on the perpendicular bisector of BC, hence BP=CP, which is a big clue. In particular, this means that P would be the centre of the circle through BCE. This clearly implies the given result, so deciding to prove this instead is a good strategy.

There are now a number of ways to prove this. Note that D lies on the altitude from A, and the feet of the perpendiculars from D to sides AB and AC are both present in the configuration so (just as for the orthocentre diagram) we can calculate most of the angles involving {A,B,C,D,E}.

For example, ABDE is cyclic, so $\angle BED=\angle BAD = 90-\hat{B}$, hence $\angle AEB=\hat{B},\,\angle EBA=\hat{C}$. This shows that AB is tangent to the circumcircle of BCE. But then the line L is a radius of this circle, and so its centre must be P, the unique point on L which is equidistant from B and C.

Alternatively, we could directly calculate $\angle BEC=180-\hat{B}$ and $\angle CBP=90-\hat{B}$. But BPC is isosceles so $\angle BPC=2\hat{B}$. In general, the converse of ‘angle at centre is twice angle at circumference’ does not hold, but when we know P is equidistant from B and C this does hold, and so the angle relations precisely confirm that P is the centre of the circle through BPE.

My intention had been that the triangle would be acute-angled, to reduce the number of diagram options based on the magnitude of $\hat{B}$. If pursuing this second approach, one would need to be careful to account for whether P is on the same side or the opposite side of BC to E. That said, unless you do something very exotic, it should be exactly the same argument or calculation, and such a case distinction probably isn’t very important.

Question 2

First, a short remark. As stated, if n=5, a piece could move 3 squares to the left then 4 squares up, by Pythagoras. Handling all such options is likely to be quite annoying, since some values of n can be written in this Pythagorean form, and others cannot. This brings us to some good general principles for olympiad problems which look like this one:

• A construction, when one exists, will probably be possible using simple versions of the allowed moves / structures.
• An argument why a construction is impossible should probably be based on ideas which treat the simple moves similarly to the more complicated moves.

The setup of the problem encourages you to think about dividing the board into $n^2$ sub-boards, each with dimensions $n\times n$. Continue reading

# BMO1 2018

The first round of the British Mathematical Olympiad was sat yesterday. The paper can be found here, and video solutions here. Copyright for the questions is held by BMOS. They are reproduced here with permission.

I hope any students who sat the paper enjoyed at least some of the questions, and found it challenging! The following commentaries on the problems are not official solutions, and are not always full solutions at all, but contain significant steps of solutions, so would be best saved until after you have attempted the problems, if you are planning to do so. I’ve written quite a lot about Q5 because I found it hard (or at least time-consuming) and somewhat atypical, and I’ve written a lot about Q6 because there was a lot to say. I hope at least some of this is interesting to some readers of all levels of olympiad experience.

Question 1

A list of five two-digit positive integers is written in increasing order on a blackboard. Each of the five integers is a multiple of 3, and each digit {0,1,…,9} appears exactly once on the blackboard. In how many ways can this be done? (Note that a two-digit number cannot begin with zero.)

It’s a trope of BMO1 that the first question must be doable by some sort of exhaustive calculation or listing exercise. Of course, that is rarely the most efficient solution.

However, there is normally a trade-off between eliminating all listing, and reducing to a manageable task.

The key observation here is that writing the integers in increasing order is really just a way to indicate thatÂ order of the choicesÂ doesn’t matter. Even if that seems counter-intuitive. The question wants to know how many ways to choose these five numbers. The order of choice doesn’t matter since we’re going to put them in ascending order on the blackboard anyway.

You want to make your choices with as much independence as possible. So it would, for example, be a bad idea to choose the smallest number first. How many possibilities are there where the smallest number is 24? What about 42? What about 69? These are all different, and some are zero, so will make the computation very taxing.

However, you might notice that the digits {0,3,6,9} have to go together to form two numbers, and the rest have to pair up with one digit from {1,4,7} and one from {2,5,8}. You might know that an integer is divisible by 3 precisely if its digit sum is divisible by 3, but in this context you wouldn’t lose too much time by simply listing everything! These tasks are now completely separate, so you can take the number of ways to pair up {0,3,6,9} and multiply by the number of ways to pair up {1,4,7} and {2,5,8}. You need to take care over the ordering. ItÂ does (obviously) matter which is the first digit and which is the second digit in a number!

# MOG 2018

I’m teaching a lecture course at Technion this coming semester, which is going to limit opportunities for travel somewhat for the next three months or so. It was therefore nice to take advantage of the new ultra-cheap Luton-Tel Aviv connection on Wizzair to make a whistlestop weekend trip to Cambridge. It was lovely to catch up with friends, colleagues and former students, including some people who fit into all those categories.

Among my various mathematical diversions over the weekend, about thirty of us spent most of Sunday marking the 2018 edition of the UK’s Mathematical Olympiad for Girls (MOG). You can find the paper without solutions here, and the paper with official solutions and commentary here.

I have had several blog posts on probabilistic, competitive and educational topics queued up over this summer which has alternated between extreme busyness and lethargy, but this felt like a good opportunity to break the drought and both start and finish a post on the same day!

I’m going to write some thoughts about Question 4, mostly about part a), which I hope might be useful to future students who perhaps find this post while preparing for next year’s edition of the competition. Here’s the statement:

Each of 100 houses in a row are to be painted white or yellow. The residents are quite particular and request that no three neighbouring houses are all the same colour.

a) Explain why no more than 67 houses can be painted yellow.

b) In how many ways may the houses be painted if exactly 67 are painted yellow?

Of all the questions on the paper, based on the fraction of the scripts which I saw, I suspect Q4a) is the one for which the most candidates will have scored significantly fewer points than they’d been hoping for.

I think this illustrates some useful guidance for maths competitions, and also illuminates some differences between maths and other subjects which candidates might not have thought about.

Many students wrote that because three houses in a row cannot be yellow, the way to get as many yellow houses as possible is to use a YYWYYW… pattern. Since 100 is not a multiple of three, you have to work out what to do with the final house, after you’ve coloured 99 using the pattern, and sometimes you can colour it yellow, and sometimes you can’t.

Finding and proving results about maxima

Before focusing on the qualities of this argument, it’s worth returning to the question statement. It’s in two parts, and (assuming the answer to the second part isn’t “none“) then the overall goal is to find the maximum number of yellow houses, and to count the number of ways to achieve this maximum number, presumably by characterising them somehow. If the question had just asked us to find the maximum, and had not told us what it is, we would have to:

• Decide on a value M, and show that there is a configuration with exactly M yellows.
• Show that no value >M of yellows is possible.

Note that, apart from deciding on the value of M, which really has to come at the start of the argument, you can do these steps in either order.Â And if you want to find the number of configurations achieving the maximum, you have to:

• Decide on a value M, and count the number of configurations with exactly M yellows, and check that this is positive!
• Show that no value >M of yellows is possible.

Again, you can perform these steps in either order. If the question is posed like this (with M unknown), you have no idea as you are attempting the paper whether finding the value of M is supposed to be easy or supposed to be a really significant part of the attack on the problem, so starting your solution with a sentence like “I’m going to show that M is the maximum” and continuing by giving your proof an exoskeleton like “First, I’ll show that M+1 (or >M) is impossible. [Do this. Then leave a gap.] Now, I’ll count the number of configurations with M yellows.” This leaves no ambiguity that you are doing the problem in the right way, and for someone reading it, it might be the case that the validity of your argument is almost instantly clear once the rough outline is established.

In any case, on MOG Q4, the question has been split into two parts deliberately, and you have been told what the value of the maximum is. In fact, the order is the opposite to what I’ve proposed in the bullet points above. But this just serves to emphasise that, even when or especially when the maximum is already given, the order of attack is not important. The two bullet points might be completely unrelated mathematical arguments, but they are certainlyÂ structurally unrelated.

Structuring your approach to MOG Q4

But, to return to MOG Q4, the first part is asking you to show that 68 or more yellow houses is not possible under the rules. The second part is where you are supposed to establish what all the 67 yellow configurations are, and on this occasion it may turn out that you re-use ideas established in part a) during the enumeration of part b).

Anyway, I’m going to repeat an earlier paragraph.Â Many students wrote that because three houses in a row cannot be yellow, the way to get as many yellow houses as possible is to use a YYWYYW… pattern. Since 100 is not a multiple of three, you have to work out what to do with the final house, after you’ve coloured 99 using the pattern, and sometimes you can colour it yellow, and sometimes you can’t.

Now that we’ve established some general principles, we can see why some students may have got themselves into knots that weren’t directly relevant to the question.

• The blue comment “sometimes you can colour it yellow, and sometimes you can’t” is just not relevantÂ because at this stage we are trying to show that 68 (or more) is not possible. If at any point it becomes a discussion of whether one class of configurations leads to 66 or 67, this can’t be relevant to showing that 68 is not possible.
• The green sentence “because three houses in a row cannot be yellow, the way to get as many yellow houses as possible is to use a YYWYYW… pattern” is, as written, true, but dangerous. Because it’s not precise. As becomes clear in part b), there are actually lots of ways to get as many yellow houses as possible, and while all of them have this pattern most of the time, it is certainly not the case that you use this pattern for the first 99, and then make a decision about the final house. (Since this only gives one configuration.)
• The fact that 100 is not a multiple of 3 is crucial to the problem. If it had asked about 99 houses, you would have had more room just to work with a breakdown into 33 groups of three houses, and some of the argument would have been simpler. So an argument saying that 100/3 = 66.66…, which we can round up to 67 is not really explaining what’s going on. Of course we have to have a whole number of houses, but why you round up rather than down is all about the rules of colouring.
• Finally, the notion of an ‘iterated maximum’ is a generally erroneous argument. In such an argument, you argue that the maximum way to attack a subproblem is X, and once you have X, clearly the maximal way to finish is Y, so the maximum total is X+Y. This is wrong, because of course it’s possible there might be aÂ non-maximum way X*>X to attack the subproblem, from which you can finish in Y*<<Y, so the total ends up being lower overall.
• In this example, the problem is not that the green statement is an erroneous iterated maximum. It’s just sounds like one. It can easily be made into a non-erroneous argument. But as soon as you start with a pattern, but then consider how to add something onto the end of it, you have essentially fallen into this trap unless you very carefully explain why taking the maximum for the first 99 houses plus the maximum for the final house must give a maximum overall.

Because the condition is aÂ local one (meaning it tells you about rules governing two or three adjacent houses, notÂ aÂ global one affecting all houses in the street), it’s good to use a local argument. In the example:

(YYW)(YYW)…(YY*W)(YW*Y)…(YWY)(Y),

notice that it is not true that in every group of three consecutive houses, two are Yellow. (Look between the *asterisks*.) However, it is true that in every group of three consecutive houses, at most two are Yellow, and so in particular if we split as shown above, there are at most two yellows in all the three-brackets, and at most one at the end, giving at most 67 in total. The fact that the pattern changes from YYW to YWY does not affect this argument.

If you set it up this way, then this gives you a good headstart on part b). You might notice that the pattern can change from YYW to YWY (as in the previous example), but not the other way round. And what about WYY? Can this ever come up? You need to justify both aspects of this, and then clarify how to count the number of places where the pattern could change, having now established that all configurations have this form.

The question setters produced a beautiful paper, and it was clear that one of their goals was to use multiple parts sensibly so as to suggest entrance routes into the problem. Many many students successfully used the factorisations discussed in the first parts of Q1, and even those who didn’t succeed seemed mostly to be trying to find differences of squares, rather than prime factors out of nowhere.

This principle applied elsewhere though, and in particular on Q3. I think some students thought Q3a) was supposed to involve three calculations, but in fact it required just giving a combinatorial justification for why the set of objects counted by b can be split into two, where one subset is counted by c and one by d. This argument, which might have been familiar to some through knowledge of Pascal’s triangle, applies equally well at other squares in the box, and also in three dimensions. If you don’t have the gap in the middle of the house, you can immediately apply this argument to Ghastly in part b). But in fact, even with the gap, you can make this work, because you are only really counting across *places you could have been just before in your path*, and the gap means that sometimes this is smaller than it would be without the gap.

There were other ways to do the question, such as counting all paths, and all paths through the gap, but all attempts using a b=c+d+e argument seemed quick and successful.

A couple of other tips to bear in mind on these sorts of questions.

• When you’re deep in a calculation, it’s easy to forget that you started with a problem of some kind, and you should always go back to check that your answer makes sense in the context of the problem! Even if fits the algebra, you should not have any of the following (among many other examples that can emerge after a small conceptual or calculation error):
• A negative radius for a circle
• A non-integer number of configurations
• A probability >1
• You should also check for potential symmetries. While it’s dangerous to use symmetry excessively until you’re sure the situation genuinely is symmetric, it can be your friend in reducing errors. For example, maybe you found the final count in the far corner for Ghastly the ghost to be eg 18+16+12? But the three adjacent-to-far-corner cells are clearly equivalent from the starting point. Any difference between them can only be a feature of the argument you are trying. So they should have the same path count, and probably you made a small error in one of them.
• It’s also worth checking your answers feel roughly right for magnitude. In particular, again on Q3 , if you get a very large answer for part b), you should try to check against other options. How many total paths are there? (Ie, ignoring the gap.) If your answer is much bigger than this, you must have made a small mistake, probably multiplying where you should have been adding. It might well, for example, not feel right if you end up showing that the number of paths is greater than the number of atoms in the universe. This applies equally well for Q4. Note that 67! is an extremely large number, and is larger than 2^100, which is the total number of colourings without observing any of the consecutive rules, let alone the maximum condition.
• As a final point, it was good to see that many candidates were making a bona fide effort to get as many marks as possible. I would say, however, that just writing down a speculative answer is often less helpful than a single sentence explaining what you are trying to do. Pretty much any comment on patterns and a division into cases for Q4 would be useful, even if it wasn’t completely correct, whereas a guess at eg $\binom{67}{33}$ or similar for the final answer is probably less valuable, and draws attention to what you haven’t done, rather than any progress that you really have made.

Anyway, I hope that was interesting at some level to some girls potentially interested in taking MOG or any other challenging mathematics in the future.

# Balkan MO 2018 – UK Team Blog

The Balkan Mathematical Olympiad is a competition for secondary school students organised annually by eleven countries in Eastern Europe on a rotating basis. The 2018 edition was held near Belgrade, Serbia over the period 7-12 May 2018. The UK was grateful to be invited as a guest nation.

Our participation is arranged by the UK Maths Trust, as part of a broader programme to introduce the country’s most enthusiastic young mathematicians to regular problem-solving, challenging mathematics, and several annual opportunities to participate in competitions. For the Balkan MO, we have a self-imposed rule that students may attend at most once, so that as many as possible might enjoy the experience of an international competition.

The non-geometry problems of the contest are discussed at length in this blog post, and the geometry problem which appeared as Q1 is discussed at considerable length, along with some background on harmonic ranges, in this blog post. A full report encapsulating all these aspects, is available here.

This post covers the non-mathematical aspects of the contest, which was enjoyed by all the UK students.

Problem selection

The programme of this competition is a scaled down version of the IMO. The leaders gather in suburban Belgrade on Monday night to select four problems from a shortlist compiled by the organisers. To recreate the students’ experience, it makes sense to start by trying these without reference to solutions. Some of the questions are UK submissions, so I can briefly astonish my colleague Vesna with almost instant fluency, before admitting that I wrote or edited the corresponding solutions.

Making the choice occupies Tuesday morning. As always, it feels slightly like a shot in the dark, as one night is not really sufficient to get a feeling for twenty problems, especially the hardest ones. In the end, there was clearly a unique good hard problem, but unfortunately it had to be rejected because it was too similar to a recent problem from a well-known source. Some of us have been investing considerable energy in finding natural Euclidean arguments to the geometry problem chosen as Q3, but once Greek leader Silouanos outlines the role of harmonic ranges, it is hurriedly moved to Q1. I think the resulting set of four questions are attractive, but with a rather compressed difficulty range, and certainly not in the right order for the UK students, whose geometric toolkits probably don’t yet include the ideas needed to access the easy’ solutions.

In any case, it’s interesting to discuss with the leaders from some of the eleven Balkan full member countries. Our opinions differ concerning which styles of problem give an advantage to extensively-trained problems. I personally feel that Q2 and Q3 are accessible even to students (or adults!) without much mathematical background, whereas here is a prevailing view that no problem with combinatorial flavour is ever ‘easy’. By contrast, many of the ideas required for a short solution to either Q1 or Q4 might be considered obscure even by serious olympiad enthusiasts, though feature on the school curriculum, at least for the most able children, in many of these countries.

We have to finalise the wording of the problems, and there are many many proposed improvements to Q2 and Q3. The final problem, unsurprisingly, requires considerably less attention. That’s our job done for the British delegation, while the other leaders get to work producing versions in their own languages, including Bosnian and Serbian, the (non-)differences between which can happily fill one dinner’s worth of interesting conversation.

The contest

On Wednesday morning, we are transferred to the contestant site, in the rolling hills just outside the south-east city limits of Belgrade. An extremely brief opening ceremony takes place in a room slightly smaller than the number of people attending the competition. The UK team look happy enough perched on a table. Two local violinists play Mozart with a gypsy flourish, before Teodor von Burg, a former Serbian olympiad star and graduate of Exeter College, Oxford, speaks briefly about the usual cliches of such speeches, and the additive paradox of wishing everyone good luck before a competition, then ends rapidly to avoid indulging such cliches himself.

After the contestants fan out to various exam rooms spread through the hotel, the contest begins and they are allowed to ask queries about the problems for 30 minutes. Many many students ask ‘what does exactly the same route mean?’ and ‘what if Alice and Bob play forever?’, but some variety is provided when Aron shares his detailed dilemma about the exact usage of carbon paper. (FAO future UK students: this is not to become a habit, please…)

After Monday’s 2am start, I am overdue a nap. There has been some room-swapping, and mine is reserved for ‘Professor Mr Jill Parker’. Whomever the bed truly belongs to, I leave it in time to meet the team outside the exam with Jill and Vesna. As we’d predicted, many are enthusiastic about Q2 and Q3, but have been frustrated by the geometry. Tom crowd-sources an investigation to recover a result about the incentre claimed by Alex, who perhaps now regrets, in his rush to move to other questions, not offering more of such details himself. No-one claims anything beyond observations in the number theory, so we suggest they keep thinking about it through the afternoon.

A brief excursion

Agnijo and Nathan had done their research on Belgrade, and had asked about the possibility of visiting the Nikola Tesla museum. The team have a guide, Sandra, a maths undergraduate, and I’m extremely impressed that she and some of her colleagues are able to organise a visit downtown and guided tour of this museum at essentially no notice for them, along with Italy, Bosnia and Azerbaijan. Vesna and I diverge to make a start on marking in a cafe, rejoining in time for the museum, where Giles apparently learns what ‘Azerbaijan’ is, and we all learn about Tesla’s extraordinary life story, and get to see the original Tesla coil (briefly) in action. Agnijo and Tom have been primed with fluorescent tubes, which do indeed glow as lightning surges between the century-old coil and its crowning sphere. Other exhibits, including highlights from Tesla’s wardrobe (pre-dating \emph{geek chic}, it would seem), and an imitation ticket from Belgrade to New York, are perhaps less fascinating.

But the roar of $10^6$ Volts is still in our ears as we stroll across the city centre, where Alex confidently identifies several churches as the orthodox cathedral they’d visited earlier, and eyes are drawn to the faded but strident protest banners outside the parliament. We choose a restaurant in bohemian Skadarska street, where prices are low, and availability of protein and itinerant accordion players is high. The team are trying to be polite about their hotel’s food, but I sense this variation is welcome. Giles pokes gingerly at a deep-fried pork slab, which erupts with multiple cheeses. The ‘Serbian sword‘ could be retitled ‘as many meat items on a stick as possible (plus 1/8 of a pepper)’.

We return to Avala feeling sleepily satisfied. Tom and Agnijo discuss the GCSE question ‘prove using algebra that the product of two odd numbers is odd’, and whether you can or should prove it without algebra. The taxis clearly sense our post-prandial vulnerability, and operate a creative attitude to receipts, and to powers of ten. But this round of ambiguous paperwork and mathematical corrections is just the prelude for Vesna and myself, who have a cosy night in with the scripts.

Coordination

At a competition, the leaders of each team study their own students’ work, and agree an appropriate mark with a team of local coordinators. The UK has an easier workload: we do not have to provide translations, since our students write in English, though some of them might like to note that in a question about parity, mixing up the words odd’ and even’ as if flipping a coin does make it harder to convince the reader you know what you’re talking about.

We start with 9am geometry, where the coordinators are proposing giving Aron 8 or 9 out of 10 as part of a crusade against citing configurational properties as ‘well-known’. Aron has, in fact, outlined a proof of his (fairly) well-known fact, and if the proposal is to award 6 or 7 without this, then the marking team’s entire day is guaranteed to be a continuous series of wars. I think the penny drops shortly after our meeting, and Aron gets upgraded to 10/10 at 9.30. Unfortunately, what remains of the crusade will deny Alex any credit at all for his unjustified claim about the incentre, despite its role in an appealing synthetic solution.

The middle two questions have a wide range of arguments. The British work on Q3 is actually pretty good, and even in the two scripts with small corners missing have organised their cases very clearly, and the coordinators (who initially want to give all full marks) can see that the students already had the ingredients to fix their minor errors. Q2 is more challenging. Once we have worked out where the good bit begins, Nathan’s solution is clearly superb, and once we’ve worked out which of his mysterious side-comments to ignore, Giles has all but the final details of a really imaginative solution, and Agnijo is flawless. Aron seems keen to make an even number of really confusing mistakes on this paper, so on this question has mixed up ‘horizontal’ and ‘vertical’ as if flipping a coin, though the coordinators are more sympathetic than I would have been. Tom claims that his solution is ‘very poorly written’, which is very far from the case, but after rolling back and forth through his logic a few times, we agree that a couple of cases of q are inadvertently missing.

The students return from their short excursion in time to hear their scores before dinner, and though Alex is a bit disappointed about the non-acceptance of his ‘lemma’, everyone is broadly pleased with themselves, as they should be. I get my first experience of the infamous hotel salad, which the students had previously described as ‘vinegar topped with lettuce’, which is roughly accurate, though the rest is nice enough. Agnijo is worried the main course includes beef, but is satisfied with the supposedly vegan alternative, namely a grilled fish.

The Balkan countries take the table of scores a bit more seriously than we do, and so this year’s celebratory table is sipping Bulgarian cognac washed down with Romanian tears, though this wholesome rivalry shouldn’t distract from the hugely impressive seven perfect scores from those countries’ contestants (plus four from the others). The competition at the adjacent table seems to be the relative merits of Serbian, Macedonian and Montenegrin wine and rakija. Meanwhile, the UK students have made plenty of new friends to induct into their favourite card games, and some Albanians, Bosnians and Turks seem a) very keen to practise their excellent English, and b) appropriately baffled by the rules, and lack of rules.

The bulk of Friday is set aside for an excursion. Our destination is Valjevo, a town two hours’ drive west of Belgrade, which represents some sort of historical home for the Serbian maths enrichment community. We gather in their gloriously rococo hall to listen to an in-depth presentation concerning many aspects of daily life at Valjevo Grammar School. The nearby research institute in leafy Petnica offers a more science-focused perspective. The students get to tour some labs, though they don’t get to practise for their upcoming A-level or Highers physics by trying any experiments. Nathan, however, finalises his solution to Q4 from the contest, which seems a good use of time, and which you can read earlier in this report. Aron asks me to solve what seems a challenging geometry question in my head. I cannot. A stamp-sized freehand diagram on a napkin doesn’t help either.

Vesna was a regular visitor to Petnica as a teenage olympiad contestant, and she has briefed me on the charms of a nearby cave, apparently a regular choice for planned and unplanned excursions during her selection camps in the 90s. The UK group plans to sneak away from the third phase of the tour to find this cave, but we are foiled because the third phase of the tour is indeed a visit to the cave. This involves a short walk, during which Agnijo is harassed by the world’s least threatening dog. The temperature is pushing 30C, but Aron is worried about sunburn, so is reluctant to remove his polar fleece. He gently roasts, while Alex tells us some horror stories from his experience as a Wimbledon ballboy during the 2016 heatwave. The cave provides cool relief, and is indeed giant, with plenty of sub-caves underneath the looming stalactites.

It turns out we are in the less impressive half of the cave. The students want to climb to the more impressive upper cave. It may be more impressive, but it is also considerably darker, and I admire Giles’ and Nathan’s tenacity to find out exactly how far a distant rocky staircase extends into the gloom temporarily illuminated by a phone torch. That concludes the adventure, and we return to Belgrade coated in varying quantities of cave detritus. The return journey affords great views of the distant mountains towards the Bosnian and Montenegrin borders, though Tom is keen to use the time to make a start on coordinating the multi-author student report. Unable to avoid eavesdropping on the discussion, sounds like it will be a substantial document when completed…

Finishing up

Back in Avala, the closing ceremony takes place during dinner, and is informal. Jury chair Zoran Kadelburg awards the certificates; chief organiser Miljan presents the medals; and Miljan’s wife notices and steps into the essential role of helping the medallists flip their newly-acquired prizes in front of any flags they might be carrying for the waiting photographers. This one-at-a-time low-key arrangement was actually very nice for everyone, and our four medallists enjoyed their moments.

It is a balmy evening, so we drift outside again. Aron is random-walking, hunting for the WiFi sweetspot so he can download the punchline to our colleague Sam’s claimed complex solution to Q1 before Nathan finishes rounding up new players for the next round of card games; while Giles and Alex disappear off towards the most distant unlit car park with a troupe of guides and Bosnians and a volleyball. At the leaders’ table, Vesna and the other Balkan residents give a collective hollow laugh on hearing that I have elected to travel to the Montenegrin Alps by bus. But that ten hour experience starts tomorrow, outside the remit of this report, which will end here, with some pictures of mountains.

# Harmonic ranges and Balkan MO 2018 Q1

A discussion of the non-geometry questions {Q2,Q3,Q4} on the Balkan MO 2018, held in Serbia, may be found here.

A blog post about the UK team’s experience is here, and a more formal pdf report is here.

Balkan MO 2018 Problem One

A quadrilateral ABCD is inscribed in a circle $\Gamma$, where AB>CD, and AB is not parallel to CD. Point M is the intersection of the diagonals AC and BD and the perpendicular from M to AB intersects the segment AB at the point E. If EM bisects the angle CED, prove that AB is a diameter of $\Gamma$.

I do not think that this was the hardest question on the paper, but I have the most to say about it, so it gets its own post. The section entitled ‘Step One’ contains (including the exercise at the end) a complete solution which only uses familiar material. The remaining sections have to quote some more obscure material, and may be of less interest to inexperienced readers, for whom many other Balkan and IMO geometry problems might be more appropriate.

Although I’ve been working hard to improve my geometry over the past couple of years, my attitude to the subject remains recreational. I prefer problems with a puzzle-like quality rather than this sort of question, whose statement is, after a little thought, not so surprising, even if most proof methods are either complicated (but elementary) or exotic. I feel most approaches to this problem require three steps: it’s easy to read a solution and forget that the first step really is a step!

I’m fairly vigorously opposed to software diagrams, as at least for me they discourage exactly the sort of insights one is generally hoping for. If you are reading this section carefully, almost certainly the most useful approach is to draw your own diagram, moderately accurate. There are only five points, though you might like to peek at Step Zero to inform drawing an accurate enough diagram without needing to apply the condition by eye.

Step Zero: Introduce X, the intersection of AD and BC.

To follow through any synthetic approach, it’s essential to have a good perspective on what the diagram means, and you will almost certainly need to introduce X to get such a perspective. Here are a couple of reasons why you might think to introduce X:

• If the conclusion is true, then $\angle ADB=\angle ACB=\pi/2$, and so M lies on two altitudes, and thus is the orthocentre of some triangle. Which triangle? It’s triangle AXB.
• Alternatively, the corresponding altitude is an angle bisector of the pedal triangle, and so the given diagram might remind you very strongly of this. Which triangle has pedal triangle CED? It’s AXB again.
• If your diagram was accurate enough (and since part of the statement is a ‘given…’ this is not so easy) you might have noticed that AD, ME and BC were concurrent. Where? At X:= AD n BC, obviously.
• In a similar vein, if the conclusion is true, then ADME and BEMC are both cyclic, and we are given ABCD cyclic. The radical axes of these three circles are AD, ME, and BC, so it is reasonable to guess that X, the (hypothesised) point of concurrence is relevant. See later.
• You are given part of a complete quadrilateral (since M is one of the intersection points of quadrilateral ABCD$– it might well be useful to complete it! • Random luck. It’s not unreasonable to consider arbitrary intersections, though this can be a low-reward strategy in general. If you did introduce X for no reason, you then had to guess, observe or realise that X, M and E should be collinear. Step One: Proving X, M, and E are collinear. This is harder than Step Two I think, so is postponed. Step Two: showing the result, given X,M,E collinear The official solution proposes introducing the reflection of A in E, which is certainly a good way to get lots of equal angles into useful places rather than not-quite-useful places. However, probably one didn’t spot this. Whether or not this was your motivation in the first place, once X is present, it’s natural to look for an argument based on the radical axis configuration. Our conclusion is equivalent to showing that ADME or BEMC are cyclic, and obviously ABCD is given as cyclic. However, motivated by the radical axis configuration (Which you can look up – but I recommend not getting distracted by what radical axis means at this stage. It’s a theorem concerning when three pairs of points form three cyclic quadrilaterals, and it has a valid converse! I also recommend not drawing any circles when thinking about the diagram.) let E’ be second intersection of circles ADM and BMC. We know that E’ lies on line XM, and so it suffices to show that E’=E. But by chasing angles in the cyclic quadrilaterals involving E’, we find that if $E\ne E'$, then $\angle EE'A=\angle BE'E$, and so $\triangle AEE'\equiv \triangle BEE'$, which after a bit of thought implies triangle AXB is isosceles, which contradicts the given assumptions. Step One: Proving X, M, and E are collinear By introducing enough extra notation and additional structure, one can prove this part by similar triangles. I think a natural approach in a question with significant symmetry is to use the sine rule repeatedly. This has pros and cons: • Disadvantage: it’s easy to get into an endless sequence of mindless calculations, which don’t go anywhere and leads more towards frustration than towards insight. • Advantage: one can plan out the calculation without actually doing it. Imagine, to give a completely hypothetical example, trying to plan such an approach in a lurching Serbian minibus with only one diagram. You establish which ratios can be calculated in terms of other ratios, and wait until you’re back in a quiet room actually to do it. You might try to show that $\angle ADB=\angle ACD=\pi/2$ directly by such a method, but I couldn’t make it work. I could plan out the following though: • Start with some labelling. I write $\alpha,\beta$ for $\angle XMD, \angle CMX$, and a,b for $\angle DME,\angle EMC$. The goal is to prove that $(a,\alpha)$ and $(b,\beta)$ are complementary by showing that $\frac{\sin \alpha}{\sin \beta}=\frac{\sin a}{\sin b}$. Will also refer to $\hat{A}$ for $\angle BAD$ when necessary. • The first ratio of sines is the easier one. Using the equal length MX in triangle DXM, triangle CMX, and then the sine rule in triangle DXC, obtain $\frac{\sin\alpha}{\sin\beta}=\frac{DX}{CX} = \frac{\sin \hat{A}}{\sin \hat{B}}$. • We can obtain $\frac{\sin a}{\sin b}=\frac{DE/DM}{CE/CM}$, but this could get complicated. However, by exploiting the equal angles $\angle DEA=\angle BEC$, we can derive $\frac{DE}{CE}=\frac{AD}{BC}\frac{\sin \hat{A}}{\sin\hat{B}}$. But of course, ABCD$is cyclic, and so there are relevant similar triangles, from which $\frac{AD}{BC}=\frac{DM}{CM}$. So in fact we have shown $\frac{\sin a}{\sin b}=\frac{\sin \hat{A}}{\sin \hat{B}}$, as we wanted since now we know:

$\frac{\sin \alpha}{\sin \beta}=\frac{\sin a}{\sin b}.$ (1)

• We need to be careful as this doesn’t immediately imply $\alpha=\pi-a$ and $\beta=\pi-b$. (For example, we need to exclude $\alpha=a$! It’s useful to exploit the fact that both a and b are obtuse here. For this type of thing, it’s more useful to focus on showing uniqueness (we definitely know one solution!) rather than finding all solutions. We are essentially asked to show uniqueness of a solution to an equation like

$\frac{\sin(\theta-x)}{\sin x}=z,$ (2)

• where $\theta<\pi$. After suitable rearranging, (2) determines $\tan x$, and so certainly has at most one solution in any interval of width less than $\pi$. This is a standard issue when using this type of argument and it’s important to know how roughly how to resolve such issues, as you wouldn’t want to waste significant competition time on such technicalities.

As an exercise, you can try to prove Step Two using this method. A hint: suppose M is not the orthocentre of triangle AXB. Introduce points C’,D’ such that $\angle AD'B=\angle AC'B=\pi/2$. Now AE bisects $\angle DEC$ but also $\angle D'EC'$. Can you use this to find two congruent triangles which can’t possibly actually be congruent?

An alternative synthetic approach

UK student Alex started with the following observation. Simple angle-chasing in cyclic quadrilateral ABCD reveals that

$\pi/2-\angle AME = \angle EAM=\angle MDC,\quad \pi/2 - \angle EMB=\angle MBE=\angle DCM.$ (3)

But we are given that M lies on the angle bisector of $\angle CED$. So we make the following claim.

Claim: the only point M which lies on the angle bisector and satisfies (3) is the incentre of triangle CED.

Remark: This claim is false. However, it is true that such a point can only be the incentre or E-excentre of triangle CED. One could salvage the original by restricting M to lie inside the triangle.

Remark: As was heavily discussed, this claim is certainly not well-known. It is very believable, but it is also not obvious either. An approach by ratios of sines, for example, as in the solution given above, seems rather tricky. Aron’s argument below is lovely, but again briefÂ is not equal toÂ easy’!

Proof of claim (Aron):Â Write $\theta:= \angle MDC$ and $\varphi:=\angle DCM$. Consider the altitude MX in triangle MDC. This is isogonal in this triangle to line ME, because the angles $\pi/2-\theta$ and $\pi/2-\varphi$ are interchanged at M. This means that the circumcentre of triangle MDC lies on ME. (Perhaps you are more familiar with the stronger statement that the orthocentre and circumcentre – eg of triangle MDC – are isogonal conjugates.) But the circumcircle of triangle MDC also lies on the perpendicular bisector of CD, and this meets the angle bisector on the circumcircle of triangle CED. Indeed, this intersection point is the arc midpoint of CD, and this really is well-known to be the circumcentre of $\odot ICI_ED$, the circle which includes the incentre and the E-excentre, and so this characterises the two possibilities for M, as required.

Harmonic ranges

In the end, the most straightforward approach to this question was to use harmonic ranges. Personally, I would use this to complete what I referred to as Step One, namely showing X,M,E collinear. I feel the radical axis argument given above is a more natural way to handle the second step, though one can also deploy projective theory for this too in relatively few steps.

This is not the place for an in-depth introduction to harmonic ranges. However, I think less experienced students are often confused about when they should consider looking for them, so I’ll try to focus on this.

What is it? Study four points A,B,C,D on a line $\ell$, grouped into two pairs (A,B),(C,D)$Then define the cross-ratio to be $(A,B ; C,D ) := \frac{\overrightarrow{CA}}{\overrightarrow{CB}}\,\div \,\frac{\overrightarrow{DA}}{\overrightarrow{DB}}.$ (4) We say that (A,B;C,D) form a harmonic rangeÂ (or harmonic bundle, harmonic systemÂ etc etc.) if their cross-ratio is -1. This certainly implies that one of (C,D) lies between A and B, and the other lies outside. Note that this is a property of two pairs of points, not of four points! (A,B;C,D) harmonic does not imply (A,C; B,D) harmonic and so on. Crucially, there is an analogous definition for two pairs of points lying on a given circle. What can you do with harmonic ranges? There are two reasons why they are useful in solving geometry problems: • They often appear in standard configurations and given configurations! • Given one harmonic range, there are natural ways to generate other harmonic ranges. We’ll discuss both of these in a second, but a rough outline of a typical proof using harmonic ranges is as follows. First, identify a harmonic range in the configuration, perhaps using a standard sub-configuration; then, project this first harmonic range around to find some new, perhaps less obvious, harmonic ranges; finally, use some converse result to recover a property about the diagram from your final harmonic range. We need to discuss the two useful reasons given above in more detail: • Take a triangle ABC, and consider the intersection points D,E of the internal and external A-angle bisectors with the opposite side BC. Can you prove (for example using a theorem about lengths in the angle bisector configuration…) that (B,C; D,E) is harmonic? A related example occurs when you have both Ceva’s configuration and Menelaus’s transversal present in a given triangle, as you then have a harmonic range too. (See the suggested notes.) One of the points may be the point at infinity on $\ell$. Without getting into philosophy, can you see how to choose C so that $(A,B; C,\infty)$ is harmonic? This is a very very useful example. There are plenty of good examples for cyclic ranges too, which you can explore yourself. • Harmonic ranges live in the world known as projective geometry. What this means in general is not relevant here, but it’s a good mnemonic for remembering that one can project one harmonic range to acquire another. The most simple example is this. Given A,B,C,D on a line $\ell$, let P be some point not on $\ell$. The set of lines (PA,PB,PC,PD) is often referred to as a pencil. Now, consider intersecting this pencil with a different line $\ell'$ (again not through P) to obtain a new set of points (A’,B’,C’,D’). The key fact is that if (A,B; C,D) is harmonic, then (A’,B’; C’,D’) is also harmonic! Not only does this give a new harmonic range, it establishes that the harmonic property really depends on the pencil of lines, rather than the choice of $\ell$. Letting $\ell$ vary, we get an infinite collection of harmonic ranges. So if your diagram has a suggestive pencil of four lines, this is a promising sign that harmonic ranges may have value. One can also project between lines and circles and from circles to circles, and typically you will need to do this. How do you prove the results? If you proved the first example above using the angle bisector theorems, you might ask how do you prove the angle bisector theorem’? Well, there are elegant synthetic methods, but the sine rule is a fail-safe mode of attack too. Essentially, almost all results about harmonic ranges can be proved using the sine rule, perhaps with a bit of help from other standard length-comparison results, in particular Menelaus, Ceva, and trigonometric Ceva. As we’ve seen in the first attempt at Step One, sine rule calculations can be arduous. Projecting harmonic ranges can be a shortcut through such calculations, provided you know enough examples. How do I know when to use them? This is really just a reiteration: • If you are given a configuration and you recognise part of the diagram as a harmonic range, it might well be worth pursuing this. If you can’t project it into any useful other harmonic range (even after, for example, introducing one extra intersection point), this might lead nowhere, but you’ll probably find something. • If you see that part of the diagram is well-suited for projecting harmonic ranges into other harmonic ranges, this is relevant. For example, if there are several lines through one point, particularly if that point also lies on a relevant circle. • Similarly, if you require some sort of symmetric result like ‘points $\mathcal{A}$ have some tangency condition iff points $\mathcal{B}$ have the same tangency condition’, then consider whether the condition has a harmonic range interpretation, and whether $\mathcal{A}$ can be projected onto $\mathcal{B}$. • If it feels like the problem could be solved by a giant sine rule calculation comparing various ratios, it might be amenable to harmonic range analysis, so long as you find a first example! Where can I find actual details?Â Because this is a report on a contest, rather than a set of lecture notes, the level of detail given here is intentionally very low. Though I hope it gives a useful overview of why such approaches might be useful, perhaps especially for those students who have a passing familiarity with harmonic ranges, but are not yet fluent at successfully applying the methods in actual problems. The detail is important though, and I recommend these resources, among many articles on the internet: • Alexander Remorov’s sheet on Projective Geometry, which also includes a discussion of polars. My own knowledge of the subject is particularly indebted to this source. I like Question 4. • Sections 9.2–9.4 of Evan Chen’s recent book Euclidean Geometry in Mathematical Olympiads includes an ideally compact repository of useful statements. Problems, some of which veer into more challenging territory, are at the end of the section. # Balkan MO 2018 – Questions 2,3,4 The Balkan Mathematical Olympiad is a competition for secondary school students organised annually by eleven countries in Eastern Europe on a rotating basis. The 2018 edition was held near Belgrade, Serbia over 7-12 May 2018. The UK was grateful to be invited as a guest nation. A full account of the competition can be found in this reportÂ and this blog report. This blog post concerns the three non-geometry questions on the paper. For typical able British schoolchildren, the order of the questions might not be ideal, and so this post talks about the problems in a non-standard order. A post about the geometry Q1, and a discussion of some of the background, including an introduction to harmonic ranges may be found here. Problem Three Alice and Bob play the following game. They start with two non-empty piles of coins. Taking turns, with Alice playing first, each player chooses a pile with an even number of coins and moves half of the coins of this pile to the other pile. The game ends if a player cannot move, in which case the other player wins. Determine all pairs (a,b) of positive integers such that if initially the two piles have a and b coins, respectively, then Bob has a winning strategy. Clearly, the game ends when both piles are odd. If one pile a is odd, and the other b is even, then only one move is possible, namely ending up a+b/2 and b/2. It’s not possible that both of these are odd, so further analysis would be required. However, we might notice from this that if a is even, and b is 2 modulo 4, then there are two possible moves, but at least one of them ends up with both piles now being odd. So when the official solution starts with the sentence ‘let $v_2(a)$ be the exponent of the largest power of two dividing (this is often called a valuation, and is a useful property to consider in many contexts.) a‘, this is not magic, but a natural response to a preliminary investigation along the lines of the previous paragraph. One should then consider some cases. It is clear that Bob wins if (a,b) are both odd, that is $v_2(a)=v_2(b)=0$, and in our preliminary exploration we established that Alice wins if $a\equiv b\equiv 2$ modulo 4, that is $v_2(a)=v_2(b)=1$. It’s not too hard to establish from here that if $v_2(a)=v_2(b)$, then Bob wins iff this common valuation is even, and Alice wins when it’s odd. It’s also worth noting that this holds irrespective of the players’ choices of moves. To finish the problem, we now have to classify the remaining cases, and prove what happens in these cases. From the final preliminary observation, we know that Alice wins if $v_2(a)=1$ and $v_2(b)\ge 1$, but it seems like the game might go on for ever if both players aim to avoid losing when starting from $v_2(a)=0$ and $v_2(b)\ge 1$. One can try some more small examples, or move straight to a conjecture, but the parity (That is, whether a number is odd or even) of $\min(v_2(a),v_2(b))$ determines the outcome. In neither case does Bob win, but Alice wins when this minimal valuation is odd, and the game continues forever if it’s even, and if you haven’t already, you should try proving this by considering how the valuations could change on any move. As a slight alternative, especially once you know the answer and have observed that the outcome is invariant under multiplying both a,b by four (and so $v_2(a)\mapsto v_2(a)+2$), one could attempt the following argument. Introduce the notation $(a_t,b_t)$ for the pile sizes at time $t\ge 0$, so $(a,b)=(a_0,b_0)$. We know the outcomes in all cases where $\min(v_2(a),v_2(b))\le 2$. So if we start the original game G from a pair (a,b) satisfying $\min(v_2(a),v_2(b))\ge 2$, we could consider an alternative game G’ whose rule for winning instead says that we wait for the first time t such that Alice is to move and $\min(v_2(a_t),v_2(b_t))\le 2$. Then we declare the winner (or non-winner) to be the outcome of the original game G started from $(a_t,b_t)$. While the outcome profile is obviously the same as the original game G, we can claim that playing G from (a,b) is the same as playing G’ from (4a,4b), and thus derive the entire outcome profile by induction. The details required to establish this claim are easy but numerous, and certainly need to be present in a full solution, which explains Alex’s unfortunate mark for this problem despite having this sophisticated and workable idea. Finishing the details would be an excellent exercise for anyone aiming to tighten up their combinatorial clarity at this level. Problem Two Let q be a positive rational number. Two ants are initially at the same point X in the plane. In the n-th minute (n=1,2, … ) each of them chooses whether to walk due north, east, south, or west, and then walks $q^n$ metres in this direction. After a whole number of minutes, they are at the same point in the plane (not necessarily X), but have not taken exactly the same route within that time. Determine all possible values of q. The answer is that only q=1 is possible, and the majority of approaches will eliminate all but a finite number of potential values first, then study the cases q=2 and q=1/2 separately. Even though it might seem obvious, remember that you have to provide an example for q=1 too! This is really a question about polynomials, where the variable is q. So for example, if ant A follows the path NNESWN, then its coordinates after the sixth minute are $(x^6_A,y^6_A)=\left(q^3-q^5,\, q+q^2-q^4+q^6\right).$ So if we want to prove it’s impossible for $(x^n_A,y^n_A)=(x^n_B,y^n_B)$ for some different length-n paths, we could first focus on just one coordinate, say the x-coordinate. But note that $x_A^n-x_B^n$ is a polynomial in q with degree at most n, where all the coefficients are {-2,-1,0,1,2}. So if the ants are in the same place at time n, then q is a root of this polynomial. Insisting on converting q into $\frac{a}{b}$ at an early stage is a sort of intellectual comfort blanket that’s probably going to distract from the main insight. But at this stage, we do need to introduce this, and argue that if $q=\frac{a}{b}$ in lowest terms, then q cannot be a root of such a polynomial if either a or b is at least 3. Proving this yourself is definitely a worthwhile exercise. Remember to use that a and b are coprime! (With an additional idea, you can reduce instead to a polynomial with coefficients in {-1,0,+1}, from which you can finish even faster.) To reduce the number of cases left, we can show that there are examples for q iff there are examples for 1/q, arguing either via the polynomial description (much easier with q rather than $\frac{a}{b}$ again here), or more combinatorially in terms of reversed ant paths. To finish the problem we have to eliminate one of the possibilities q=1/2 and q=2 (as one follows from the other by the previous paragraph). For q=2, we should study the first time at which the ants diverge, but life will be easier if we argue that we may assume that this happens on the first step. Now, we study the first couple of moves. • If one ant moves horizontally and the other moves vertically on the first move, then what can you say about the parity of each ant’s coordinates after the first step, and indeed after all future steps? This will show that they cannot ever meet. • Otherwise, assume that both ants move horizontally, one East, one West. Since we can’t use parity, but powers of two are deeply involved, it makes sense to consider using congruence modulo 4. Indeed, after this first step, the ants’ x-coordinates are not congruent modulo 4 (since one is 1 and the other is -1). • If they both move vertically on the second step, or both move horizontally on the second step, this remains the case. (One should check both options for the horizontal case.) Thereafter, all moves have length divisible by 4, and so this property holds forever, and so the ants do not meet. • If one moves horizontally, and one moves vertically on the second step, what can you say about the ants’ y-coordinates modulo something relevant? If you want to study q=1/2 instead, you might observe by trying some examples that if the ants head off in different directions, there is a real sense that they become too far apart to get back together using the future allowed moves. This motivates considering some sort of distance argument. The interplay between the coordinates is not really suited to standard Euclidean distance, since the ants can’t walk in a diagonal direction (which is what will mostly determine the Euclidean distance). Instead, it’s worth studying $d_n(A,B):=|x^n_A - x^n_B| + |y^n_A-y^n_B|$ (which is sometimes called $\ell_1$-distance, or Manhattan distance orÂ taxicab distance.) What is $d_1(A,B)$, and can you control $d_n(A,B)-d_{n-1}(A,B)$ strongly enough to show that $d_n(A,B)$ is always strictly positive? If you can, perhaps you can draw an analogy with the argument for q=2 as a final insight into the workings of this interesting question? Problem Four Find all primes p and q such that $3p^{q-1}+1$ divides $11^p+17^p$. None of the UK students solved this problem during the competition, but several managed it during some free time the following morning. Nathan’s solution, lightly paraphrased, will follow shortly. In a question like this, you don’t know how many of the details will be crucial. Is the choice of {3,11,17} going to be important? How will we use the fact that q is prime? You probably can’t answer these meta-questions immediately. It also looks like standard motifs of subtracting multiples of $3p^{q-1}+1$ from $11^p+17^p$ is not going to make life easier. Nathan’s approach is to study the possible factors of $11^p+17^p$, focusing on prime power factors. Once he has a rich enough understanding of potential such factors, he can then study whether they combine to form $3p^{q-1}+1$, which turns out to be very restrictive, leaving only a handful of cases to eliminate by hand. Nathan writes: We can quickly eliminate the possibility that p=2, and so now assume we have a solution where p is odd. Claim I: None of 8, 49 or 11 divide $3p^{q-1}+1$. Proof: It’s enough to show that they do not divide $11^p+7^p$. The non-divisibility of 11 is clear. For 8, note that $11^p\equiv 1,3$ and $17^p\equiv 1$ modulo 8, and so $11^p+17^p\equiv 2,4 \not\equiv 0$. To handle 49, we rewrite $11^p+17^p$ as $11^p-(-17)^p$ and we have the valuation $v_7(11 - (-17))=v_7(28)=1$. So when we lift the exponent (see later), we find $v_7\left(11^p-(-17)^p\right) = 1+v_7(p).$ So if $49\mid 11^p+17^p$, then the LHS is at least two, and so $v_7(p)\ge 1$. But then p=7 is the only option, for which certainly $49\nmid 3p^{q-1}+1$. The claim is now proved. So we may now write $3p^{q-1}+1 = 2^a7^b \prod r_i^{e_i},$ (1) where $r_i$ are primes not equal to {2,7,11}, and $a\in\{1,2\},\, b\in\{0,1\}$. Claim II: each $r_i\equiv 1$ modulo p. Proof: As before $r_i\mid 11^p-(-17)^p$, and since $r_i\ne 11$, 11 has a multiplicative inverse modulo $r_i$, and so indeed there exists t such that $11t \equiv -17$ modulo $r_i$. Using this in the divisibility relation: $r_i\mid 11^p-(-17)^p \equiv 11^p - (11t)t^p \equiv 11^p(1-t^p) \quad\iff\quad r_i\mid 1-t^p.$ The order of t modulo $r_i$ then divides p, so is either 1 or p. If this order is 1, then $t\equiv 1$, but then, modulo $r_i$, $11\equiv -17$, so $r_i\mid 28$, which we have excluded already. So the order is p, and thus $p\mid r_i-1$, as we claimed. Going back to (1), we have $1\equiv 3p^{q-1}+1 = 2^a7^b\prod r_i^{e_i} \equiv 2^a 7^b\quad \mod p,$ and so $p\mid 2^a7^b-1$. But remember that $a\in\{1,2\}$ and $b\in\{0,1\}$, so there are only a handful of cases to check. Each of the other cases requires a line or two to eliminate, so do try this yourself! In the end, though, we see that (a,b)=(2,0) or (2,1), both leading to p=3 are the only possibilities. Returning to the original question, we just have to check possible solutions to $3^q+1 \mid 11^3+17^3=2^2\cdot 7\cdot 223$, which we can do manually (for example by checking all prime $q\le 7$), to find that the only solution is (p,q)=(3,3). Dominic: As part of this solution, Nathan uses the lifting the exponent lemma to control $v_7(11^p-(-17)^p)$. This example is simple enough that it’s probably easiest to go directly. Since p is odd, we can factorise $11^p+17^p= 28\cdot \left( 11^{p-1}- 11^{p-2}\cdot 17 + 11^{p-3}\cdot 17^2-\ldots + 17^{p-1}\right).$ Can you come up with an argument for why 7 cannot divide the second factor? Some of the notation Nathan used elsewhere in his solution may be useful! If you can, then you’ve shown that $v_7(11^p+17^p)=1$. The general statement of the lemma relates $v_p(x^n-y^n)$ to $v_p(n)$ and $v_p(x-y)$, which explains why Nathan converts $+17^p$ to $-(-17)^p$, though it makes little difference to the proof. You can find statements of this lemma, which has become relatively well-known recently in this community (and which is sometimes attributed to Mihai Manea), in many places on the internet and in modern books. The proof is very similar in the general case to the special case discussed previously. It’s worth remembering that the case p=2 always requires extra care (and indeed a different statement). This distinction comes from the fact that the simultaneous congruence equations $x+y\equiv 0$ and $x-y\equiv 0$ modulo$n\$ have two pairs of solutions when $2\mid n$.

It’s worth noting also that in a solution like Nathan’s where different ranges of options are excluded one after the other, this clear organisation into claims is of huge benefit to the reader, irrespective of how much text is or isn’t included as a prelude.

# EGMO 2018

Last week the UK held its annual training and selection camp in Cambridge. This week, four of the students have been attending the European Girls’ Mathematical Olympiad. 2018 is the seventh edition of this prestigious competition, and is being held in Florence.

You can find very many details about the competition, and observe the UK’s excellent performance (with particular congratulations to Emily, who obtained a perfect score) at the competition website. A short article about the team in the TES can be found here.

In this post, I’m going to muse on some of the problems. You can find the two papers here and here.

Problem Two

Part a) would have been more immediate if the set A had been defined as

$A:= \left\{\frac{k+1}{k} \,:\, k=1,2,3,\ldots\right\},$

as this is instantly suggestive of a telescoping product such as

$7 = \frac{7}{6}\cdot \frac{6}{5}\cdot\ldots \cdot \frac{2}{1}.$

I found part b) to be one of the most difficult sections of the paper. It builds on the idea that given an expression for x as a product of elements of A, and an expression for y as a product of elements of A, we can combine these (ie take the product of the products!) to get an expression for xy as a product of elements of A. This yields $f(xy)\le f(x)+f(y)$, and so the task is to show that sometimes this isn’t the most efficient way to proceed.

I tried a couple of things, like trying to bound f(p) below when p is a prime. This wasn’t ludicrous, as one would certainly need to use a term $\frac{kp}{kp-1}$ somewhere in the product so that it is divisible by p. However, this didn’t go anywhere, and nor did investigating f(n!). Perhaps others had more success down these avenues.

But as a general rule, if an abstractly-defined function is typically hard to calculate, then classes where you can calculate it are likely to be extra valuable. Here, powers of two make life particularly easy. We have $2\in A$, and so $2^n=2\times 2\times\ldots\times 2$ is a valid product. And we can’t possibly achieve $2^n$ as a product of fewer terms than this, because 2 is the largest element of A. So $f(2^n)=n$. Note that this is already way better than the bound we would have achieved from our argument in part a), which yields $f(m)\le m-1$.

My next observation was that a similar argument and a natural construction gives $f(2^n+1)=n+1$. But this can be extended so that when $2^n+1\le m\le 2^{n+1}$, we have $f(m)\ge n+1$ and in fact there is equality exactly for

$m= 2^n+1, 2^n+2, 2^n+4,\ldots, 2^n+2^{n-1},2^{n+1}.$ (*)

In particular, note that all of these are even except $2^n+1$. It may well be the case that we don’t need this extension, but before you’ve solved the problem you don’t know how much you’ll have to extend each idea!

I had a feeling that this meant $f(2^n+1)$ was a strong candidate to satisfy the requirements, and that almost any factorisation would work. I suspect many students at this point did some refinement of choice of n, but I want to stay abstract, and use the extended observation (*). Since $2^n+1$ is certainly not always prime, let’s focus on the infinitely many values n where it has a factorisation as $2^n+1 = ab$, and consider whether a or b can achieve equality at (*). We’d better introduce the notation

$2^\alpha

So $ab> 2^{ab}+2^a+2^b+1$, and so $\alpha+\beta>n$. But similarly, $ab< 2^{\alpha+1}2^{\beta+1}$, so $\alpha+\beta. We obtain

$\alpha+\beta+1=n,$

which is kind of what I’d been hoping for when I started this analysis. Now, we have

$f(a)\ge \alpha+1,\quad f(b)\ge \beta+1,$

$\Rightarrow\quad f(a)+f(b)\ge \alpha+\beta+2 = n+1,$ (**)

with equality precisely if $a,b$ both satisfy the equality conditions at (*). But $a,b$ are odd, and so we have equality at (**) precisely if $a=2^\alpha+1,b=2^\beta+1$. So we have a resolution to the problem whenever $2^n+1$ can be non-trivially factorised in any way other than $2^n+1=(2^\alpha+1)(2^\beta+1)$, so we have a rich (and certainly infinite) class of suitable (x,y).

Problem Three

An obvious remark. The jury will never choose contestant i if she has fewer than contestants in front of her unless they are forced to. They are only forced to if everyone has this property. So we ignore the second dashed bullet point, as it just tells us when the process ends. And with a little further thought, the process ends exactly when the contestants are in correct order.

I suspect part a) of this may end up featuring on future examples of our interactive write-up clinic, where students are challenged to produce technically-correct arguments for obvious but awkward mini-problems. The location of contestant $C_n$ is probably a good starting point.

For part b), you have to find an optimal construction, and prove that it’s optimal. At national and junior olympiad level, students often forget that they have to supply both of these components. At international level, the challenge is to work out which one gives the entry into the problem. I would say that about two-thirds of the time, either the optimal construction is very obvious, or is best attacked after you’ve had some insight into the bound. For this question (and again it’s just my opinion), I felt it was all about the construction. I made absolutely no progress by aiming for bounds. Whereas the construction offers plenty of insight into how to prove the bounds, and so once I had it, I found it quick.

The usual rules apply. An optimal construction is going to have to be neat to describe. It’s very unlikely to have millions of cases. Intuitively, it seems reasonable that starting the contestants in reverse order gives the jury the greatest possible ‘elbow room’ to squeeze moves into the procedure. Perhaps you tried to prove this directly, by coupling a procedure starting from arbitrary order with a corresponding procedure starting from reverse order? Well, I found that very hard, and perhaps you did too.

However, that doesn’t mean it’s the wrong construction! The key question is, what to do about contestant $C_n$? Well, essentially nothing. This contestant can never be moved. So when do we start allowing other contestants to pass her? It seemed natural to let the other contestants $C_1,\ldots,C_{n-1}$ do as much as possible among themselves first. That is

$\mathbf{C_n},C_{n-1},\ldots,C_2,C_1 \quad \Rightarrow\Rightarrow\Rightarrow \quad \mathbf{C_n}, C_1,C_2,\ldots,C_{n-1},$

where $\Rightarrow\Rightarrow\Rightarrow$ denotes lots of moves. At this point, what to do next stood out for me, namely that one could use $\mathbf{C_n}$ at the start to put all the others back into reverse order, while moving $\mathbf{C_n}$ to the back. That is

$\mathbf{C_n},C_1,C_2,\ldots,C_{n-1}\quad\Rightarrow \quad C_1,\mathbf{C_n},C_2,\ldots,C_{n-1} \quad\Rightarrow\quad C_2,C_1,\mathbf{C_n},C_3,\ldots,C_{n-1}$

$\Rightarrow\Rightarrow \quad C_{n-1},C_{n-2},\ldots,C_2,C_1,\mathbf{C_n}.$

You might have tried other things first, but once you notice this, you just know it has to be right. It’s just too elegant a construction, and it looks like the sort of thing one prove will be optimal, because the overall process

$\mathbf{C_n},C_{n-1},\ldots,C_n\quad \Rightarrow\Rightarrow\Rightarrow \quad \mathbf{C_n},C_1,C_2,\ldots,C_{n-1}$

$\Rightarrow\Rightarrow\quad C_{n-1},\ldots,C_2,C_1,\mathbf{C_n}\quad\Rightarrow\Rightarrow\Rightarrow\quad C_1,C_2,\ldots,C_{n-1},\mathbf{C_n},$

incorporates the corresponding process for n-1 (twice, in fact) and so induction is very accessible both for calculating the total number of moves. We conjecture that this is indeed the optimal process, and under this assumption, with $f(n)$ the number of moves, we would have $f(n) = f(n-1) + (n-1) + f(n-1)$, from the three stages of the process, from which, after looking at small values,

$f(n)=2^n - (n+1).$

I started by saying that the construction was the hard part of this problem. Well, that doesn’t mean the bound is easy. But at least with a construction in hand, you can make observations that might inform a bounding argument:

• observation 1: contestant $C_n$ never jumps;
• observation 2: in the optimal construction, by induction $C_{n-1}$ doesn’t jump in the outer phases, so in fact jumps only once, ie during the middle phase;
• observation 3: contestant $C_{n-2}$ doesn’t jump very often, and in fact can only jump after at least one of $C_{n-1}$ and $C_n$ have ended up in front of her. Since we’ve established that $C_{n-1},C_n$ don’t jump very often themselves, this gives a bound on the number of times $C_{n-2}$.

There is still work to do here, and errors with $\pm 1$ could easily creep in. But I still hold fast to my original claim that the construction was the hard part here. Or at least, the rough form of the construction. I guess it’s possible that one would have started making observations like the three above without a construction in mind, but I think it’s unlikely. Anyway, I leave for you the final details of the bounding argument, which involves formally transcribing observation 3, proving it, then generalising it to jumps of $C_{n-3}$ and so on.

Problem Four

One of the exercises I have been setting to UK students recently is to produce short solution digests, which manifest any key ideas of the solution abstractly and briefly enough to resonate in the future. I’m a little tired of domino tiling problems, so I’ll do one of these here. This will be slightly longer than if I were not writing for a (small) audience.

Double-counting the total value by rows/columns and by dominos shows there are $\frac{2kn}{3}$ dominos in a balanced configuration. When n=3, we can achieve k=1, and by tiling copies of this down the main diagonal, can extend to $3\,|\,n$. For $3\not|\,n$, we must have $3\,|\,k$ ie $k\ge 3$, but in fact k=3 is achievable, by tiling the main diagonal with copies of small boards for which k=3 can be constructed with a bit of trial-and-error.

The double-counting idea at the start is the nice part of the problem. The construction is a bit annoying, but saving ourselves work by building up large examples from copies of small examples is a useful motif to have in mind.

Problem Six

This question has lots of clues in the statement. It would, for example, be pretty surprising if the answer were ‘no’ to part b) given the setup in part a).

My confession is that I wasted lots of time on part a) not using the option m=0, which was foolish given that it’s clued from part b) that one needs to use the option m=0. My thought had been to consider some integer y, and ask which integers x were banned (if we were aiming for contradiction in part a)). For part a), it gets harder if t is smaller, so I found it helpful to think of t as $\epsilon\ll 1$. Anyway, if you struggled on part a), maybe worth reviewing whether you were definitely trying to solve part a), and not accidentally using the setup that really addressed part b)!

Some people have shown me solutions to part a) that carry an air of magic, by placing all the key steps (such as (*) to follow) in the language of the original setup. Let’s try to be cleaner. The key is to consider m=0. Since m=0 is included, we know that whenever x<y, we must have

$\epsilon y \le x \le (1-\epsilon)y.$ (*)

Maybe you just have a gut feeling that this can’t be possible if you have enough xs and ys? But either way, choosing to focus on (*) is the key step, because once you know you have to prove the result based on this, it’s not too hard. I prefer addition to multiplication, so one might as well take logs (since does it really look like we’re going to use heavily the integer property now?) to obtain

$\alpha\le |z_i - z_j|\le \beta,$

for all $z_i,z_j$ in some large finite collection, where $0<\alpha<\beta$. You should now have a strong gut feeling that this is impossible. You have an arbitrarily large collection of real numbers which have to be close to each other pairwise, but never too close pairwise. How to finish the argument is a matter of taste.

For part b), assuming we’re aiming for the answer ‘yes’, we probably want to construct it one step at a time, and you want to think of $t\approx \frac12$ to make life as hard as possible.

Now, suppose you have $x_1,x_2,\ldots,x_n$ so far. What next? Well if we could have

$x_{n+1} \equiv \frac{x_i}{2}\,\mod x_i,$

for all $i=1,\ldots,n$, that would be perfect. We can often solve sets of coupled residue equations like this using the Chinese Remainder Theorem. (Recall of course that the solutions themselves are rarely important – the fact that they exist is enough!) A couple of things go wrong with trying this crudely:

• If $x_i$ is odd, then $\frac{x_i}{2}$ is not an integer…
• If we correct this by asking for $x_{n+1}\equiv \lfloor\frac{x_i}{2}\rfloor\,\mod x_i$, then there’s a chance we might still be within the t-window around a multiple of $x_i$.
• Unless we are going to make complicated demands on the residues, to use CRT it would be easier if all the $x_i$s were coprime.

One option is to give up. But actually all these objections can be handled with fairly small alterations. Can you see how the second objection can be overcome by an appropriate choice of $x_1$? Remember that t is fixed right at the start, and cannot be equal to 1/2. Is the third objection actually an objection any more? If it is, can we fix it?

Anyway, I guess P6 was my favourite non-geometry question on the paper, though, that’s far from relevant. P5 was pretty neat too, but who knows whether a follow-up geometry post will materialise soon.