You were recently caught trespassing on the queen's hunting grounds. The punishment for this crime is a miserable experience the locals call the maze of everlasting flowers:

Screenshot of the maze.

The full resolution of the image is 4K, so if the local version is hard to read, click it to open the full resolution version. Additionally, for those who are curious but don't want to look it up, is the Japanese kanji for flower, and is pronounced hänä.

Maze Regions

There are seven total regions in the maze; they are the starting and escape regions (denoted by S and respectively), along with individual regions labeled $1$ through $5$. The starting point for each region is denoted its symbol; S, , $1$, $2$, $3$, $4$, and $5$ respectively.

The Key to Freedom

Before being placed in the maze, you are given a magical key with the letter $n$ etched into it. Upon entering the starting region of the maze, you may choose any number to replace this etching of $n$. Choose wisely though, for once you leave the starting region, each region will change the number on your key, by summing the digits of the number you entered the region with (from this point forward, this is referred to as transformation). For example, if the number on your key is $52$ upon entering a region, your number will change to $7$ since $5 + 2 = 7$.

For clarity, the key is exempt from transformation in the starting and escape regions only.

In order to keep chosen values within the constraints of the puzzle, starting numbers should be restricted to those who's digits produce a sum of 5 digits in length or less. While numbers that would produce this result are astronomical in size, be sure to test your value first as there are only 5 sections in the puzzle you can navigate to.


There are various portals throughout the maze represented by a flower 🌸 image. These portals will transport you between regions, but the destination is dependent on the number etched into your key after transformation. To elaborate, if the number etched into your key is a two digit number, any portal you travel through will transport you to region $2$.

For example; let's say you enter region $3$ with the number $553$ etched into your key. The transformation caused by entering the region changes this number to $13$ since $5 + 5 + 3 = 13$. This means that the next portal you traverse through will transport you to region $2$ since $13$ only has two digits.

Escaping the Maze

Your escape relies on two factors:

  1. The number etched into your key after the transformation caused by entering region $1$.
    • Henceforth referred to as simply $r$.
  2. The number of total number of turns at the time of reaching a portal in region $1$.
    • Henceforth referred to as simply $t$.

To clarify the second factor, let's say you enter region $1$ with a current total of $28$ turns. If you go for the portal that requires the least amount of turns from the entry point of region $1$, your total upon reaching the portal will be $31$.

Can you Escape?

To succeed in escaping the maze, the following equation must be true with respect to the image (e.g. $\Delta = 9$):

$$\Delta = \Biggl(\frac{t \mod 6}{(t \mod r) + 1}\Biggr)^2$$

For example, assuming $t = 43$ and $r = 4$, your freedom is denied and as a result you are transported back to the start of the maze where the whole process starts over.

What Counts as a Turn?

To ensure that everyone understands what counts as a "turn" in an answer, a turn is defined as the movement from one corridor to another where there is a visually distinct 90 degree angle in the maze. For example, the starting point for region $4$ can start a path down two corridors without the cost of a turn. To demonstrate this visually, I've drawn (quite terribly), a few routes in the maze:

Screenshot of the aforementioned turn examples.

In this example, a "turn" is a 90 degree (for clarity, actual angle doesn't matter) bend in the drawn line. As a result, the white line from the start of region $4$ to the top left flower counts as a zero turn path.

Visually Blended Regions

Upon close inspection, you'll notice that regions $2$, $3$, and $5$ are visually blended, in that they do not have any borders preventing you from traversing between them at will. However, this is not the case. Consider these regions as different "levels" of the same portion of the maze. For example, if the last portal you traversed through sent you to region $2$, you are in region $2$ until you traverse through another portal.

The poor souls that receive this terrible punishment are unfortunately destined to wander for all eternity. Can you escape?

Additional tags include and .

  • 3
    $\begingroup$ I don't think I understand this at all. Are the circles the portals? What is the "S" near the centre left? What counts as "visiting" a section? Is the idea that when you reach a portal you are sent to the number that equals the current length of the number on your key? Does "in the final section" simply mean "when the last portal you went through took you to 1"? What does "the single digit result of summing digits in each section" mean? Is it the value of f(n) that's rounded to the nearest integer? How does this value determine where the portals in section 1 lead? (Do you have to make it 9?) $\endgroup$
    – Gareth McCaughan
    Oct 13, 2021 at 0:42
  • 2
    $\begingroup$ Does "being placed within the starting section" actually mean "being placed on the number equal to the length of the number on your key"? Why do you both talk about exactly what being "sent back to the start" means and say that it's "not permitted"? $\endgroup$
    – Gareth McCaughan
    Oct 13, 2021 at 0:43
  • $\begingroup$ @GarethMcCaughan does my update answer all your questions? $\endgroup$ Oct 13, 2021 at 14:50
  • $\begingroup$ It's a lot better. You've removed the thing about rounding to the nearest integer; does that mean that in fact $\Delta$ has to hit 9 exactly on the nose? I.e., that that ratio needs to exactly equal 3? $\endgroup$
    – Gareth McCaughan
    Oct 13, 2021 at 15:07
  • 3
    $\begingroup$ @Tacoタコス I'm guessing the downvotes may have come because people thought the puzzle was overly convoluted. You did a major rewrite of the question, and in doing so did make at least one change - in the original version you stated the white line path was one turn, but now you say it's zero turns. After looking at this for a while I think the puzzle itself is interesting, but it could have used a little more polish and/or having someone else look at it to help you refine it before posting. $\endgroup$
    – Rob Watts
    Oct 13, 2021 at 21:29

1 Answer 1


At first glance, I have ONE very simple answer, but I might have miscounted something.

Let's start by analysing the range of possible turns and r values thanks to the equation. The equation is simplified to:

t mod(6) / t mod(r)+1 = 3


t mod(6) = 3 and t mod (r) = 0

knowing that r has to be one digit to reach area 1, it also:

has to be odd, otherwise no answer is possible

We can then calculate a bunch of possible T, and search for any paths in the maze which reach that number of turns.

Noting that in the possible R, with no other restrictions that I may have missed:

anything reaching 1 or 3 will lead to the same number of possible turns, and anything reaching 5, 7 or 9 will have less solutions than 1 or 3

So a possible solution with my understanding is going for:

N = 1, going through purple (6) and green (3) for t = 6+3=9, r = 1 and D = (9 mod(6)/(9 mod(1) +1))² = 9

  • $\begingroup$ We support MathJax for prettier math formatting, if you want $\endgroup$
    – bobble
    Oct 13, 2021 at 16:53
  • $\begingroup$ This technically answers the puzzle, with sound logical reasoning. However, it also takes advantage of a loophole that wasn't accounted for. The intended solution builds on what you've established and exposes a relationship between the value for $t$ and $r$. $\endgroup$ Oct 13, 2021 at 20:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.