**Happy 23rd of December!**

**Throughout the month, to accompany the release of our book on the Mathematics of Christmas, Hannah Fry & I are tweeting out Christmathsy bits and pieces, one a day, advent calendar style. Assuming we don’t run out of ideas, that is…**

We’re getting to the business end of this advent calendar now and the puzzling is getting serious. High stakes stuff today, as Santa needs help getting into that iconic costume…

Two levels of challenge…

Merry:

And Mayhem!

(For the advanced puzzle, note that not every path starting and ending in A involves a complete circuit of the pole. For example, if Santa follows the path ABCDBA, he has not completed a circuit.)

Each time you enter a room, you MUST follow all of the instructions written there.

For extra credit, try to find Santa’s shortest possible path in each case. And for *extra* extra credit, prove that your path really is the shortest.

Answers via the comments or on Twitter. All correct answers will be rewarded with deep respect and warm Christmas wishes.

The answers for these two puzzles won’t be available until Boxing Day, so you have an extra couple of days to think about them.

And join us tomorrow for the final day of the Impossible Santa Mathematical Advent Calendar!

**CLICK HERE TO SEE THE WHOLE CALENDAR SO FAR**

**SOLUTION TO YESTERDAY’S PUZZLE**

Scroll down for the solution…

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

**Solution:**

The clue was in the name of the hacker: “Caesar of Pisa”.

The first part of the message basically uses the simplest possible Caesar Cipher. The letters have been replaced by their number in the alphabet (A:01, B:02, etc.), but shifted by 1, so that “A” is represented by “02”, “B” by “03”, and so on, with “Z” represented by “01”.

In the second part of the message, these shifted numbers have been replaced by their corresponding Fibonacci numbers (Fibonacci was also known as Leonardo of Pisa): “01” becomes “1”, “02” also becomes “1”, “03” becomes “2”, and so on, up to “26” becomes “121393”.

Deciphering the message gives the following text:

**Dear Santa. Please could you bring me a stellated icosahedron. Thank you. Zara (aged 8)**

Of course, there is actually some ambiguity about the child’s name, since “A” and “Z” both end up mapping to “1”. She could also plausibly be called “Azra” or “Aara”, but “Zara” is by far the most common of the three (in the English-speaking world, at least), so Santa would probably be best advised to go with that, if forced to make a guess.

Well done to Troy ToTheWorld, Harry Pilgrim, PRL, Adam, ExceptionalLiar, Replicat, Catherine Evans and Olaf Doschke (who showed his working – see below). Mince pies all round, with a bonus brandy snap for those who picked up on the name issue:

Yes. We thought Zara too. Apologies to all the Aara's out there.

— Adam (@ajtpartridge) December 22, 2016

Olaf DoschleAs I already said per PM, wrapping around and mapping Z to 1 is not really according to some “unwritten encryption rule” for bijective code:letter mappings. As there are infinite Fibonacci numbers there also is no need to wrap around at any point.

Anyway after failing with statistical approach I concentrated on numeric series, took a bit time to think of Fibonacci and then mapped the second 1 o A just for reasons of unambigous codes (while they were not in your outset) and on the basis A was the only letter, which could have started a word or name with first two same letters (like Aaron).

If the shift would have been 2 starting to map with the second 1 would have failed and the thought of shifting one further would have solved it and then revealed the double meaning of 1 at the ZOU of THANK ZOU.

Anyway, nice puzzle.

Olaf Doschle[CORRECT ANSWER TO FIRST PUZZLE. REMOVED FOR SPOILER REASONS. CREDITED ON DAY 26]Stephen Morris[CORRECT ANSWER TO FIRST PUZZLE. REMOVED FOR SPOILER REASONS. CREDITED ON DAY 26]Stephen Morris[SOLUTIONS & OPTIMALITY PROOF FOR BOTH PUZZLES. REMOVED FOR SPOILER REASONS. REPRODUCED ON DAY 26]Olaf Doschke[COMMENTS REPRODUCED ON DAY 26]