The Mathsbombe Competition

2026 edition. From the people behind the Alan Turing Cryptography Competition.
Home Archive
The Problems
Released Wed 11th Mar 4:00PM
Released Wed 11th Mar 4:00PM
Released Mon 30th Mar 4:00 PM

Problem 6

A city is surrounded by a tall city wall with $17$ towers, numbered $1$ through $17$. Each tower has levels $0$-$20$. There is a single entrance to the city walls on the ground floor of tower 1, and the towers are interconnected by a number of corridors and stairs:

  1. there are narrow, one-way corridors between the towers $1 \to 2 \to 3 \to \cdots \to 17 \to 1$ on each level
  2. each tower, except tower $17$, has a two-way spiral staircase connecting the levels $0-20$,
  3. tower $17$ is thinner then the rest, therefore it can only fit a narrow, one-way spiral staircase leading downwards. Additionally, every level (except the top level) has a one-way set of stairs leading to the level above in tower $1$.

Inside the city walls, there are no signs to indicate levels or numbers of towers, as a defence against potential invaders. Additionally, every floor of every tower has an identical door. The door on the ground floor of tower 1 is the exit which leads out of the tower system, but opening any other door releases a deadly poison. The local guards avoid releasing the poison by each carrying instructions that, when followed from any level of any tower, lead them to the exit door in tower 1. These instructions are encoded in the form of a sequence of letters (A,B, or C), where each letter corresponds to the following step:

  1. go to the adjacent tower along the one-way corridor
  2. go up the stairs
  3. go down the stairs
If the guard reads B on the top floor or C on the bottom floor, they ignore that instruction. If a guard reads B in tower 17, they follow the staircase leading upwards to tower 1.

At least how long does the sequence of letters need to be to achieve this?

The wording has been clarified on 02/03/2026 (the solution has not changed).

To deter guessing without thinking, we ask that you also solve the following simple arithmetic problem before checking your answer:

What is six plus six, subtract five?  

This problem was first solved on Wed 25th February at 4:25:30pm
Mathsbombe Competition 2026 is organised by the The Department of Mathematics at The University of Manchester.
© The University of Manchester 2012–2026, All Rights Reserved
Contact us | Privacy notice