# Taking the (mathematically) perfect picture at the Leaning Tower Of Pisa

Hundreds, perhaps thousands of tourists visit Pisa every day —mainly for its famous leaning tower. They rush from the train station, through the bridges and medieval alleys just to stand near the tower and take that picture they have dreamed of, posing in as many creative (and sometimes ridiculous!) ways as imaginable. The basic one is the Power Ranger, pretending to push the tower back to its vertical position, but there are many others: “I’m going to eat a tilted gelato”; or groups that pretend to push the tower as if it was Raising the Flag on Iwo Jima; or lovely couples, perhaps on their honeymoon, pushing the tower, each one on opposite sides (aww). Continue reading

# The croissant equation

If you have a sweet tooth, then perhaps you enjoy just standing outside a fancy bakery and observing the many cakes and bakes from the shop, from their indulgent red velvet cupcakes, creamy sponges or decadent brownies. Cakes, cookies and cupcakes are complicated pieces of baking engineering which require sophisticated techniques to get the many flavours and textures into the single bite that you enjoy so much. Continue reading

# Review of Elastic Numbers

I spend a lot of time solving maths puzzles. Many of my favourites appear in Chalkdust and on my website. But there is a problem with spending so much time doing puzzles: its not very easy for me to find new and interesting puzzles any more.

I was therefore pleased to hear that Daniel Griller—author of the Puzzle Critic blog, a great source of less well-known puzzles including this gem—was releasing a book of original puzzles. Elastic Numbers (Amazon UK, US) is this book, and boasts 108 puzzles. These puzzles are sorted into four sections by difficulty: bronze (easiest), silver, gold and diamond (hardest).

I highly recommend the bronze and silver puzzles to teachers, who will find a collection of well posed questions they can give to students to make them think about common school topics. However, these puzzles don’t offer much challenge to the seasoned puzzler, and although many are neat they feel a little unspectacular.

But the slight disappointment I was feeling about the book immediately disappeared when I flicked forwards to the gold and diamond puzzles. These puzzles will make you immediately reach for the nearest pen and paper and getting solving. With so many good puzzles in these sections, its hard to pick favourites, but the following puzzle stood out (so it’s perhaps not surprising that this puzzle is the source of the title of the book):

### Elastic numbers

Source: Elastic Numbers by Daniel Griller (obviously)
A two-digit number $ab$ ($a$ and $b$ are the two digits of the number; the number is not $a$ multiplied by $b$) is called elastic if:

1. Neither $a$ nor $b$ is zero.
2. The numbers $a0b$, $a00b$, $a000b$, … made by putting any number of zeros between $a$ and $b$ are all multiples of the original two-digit number $ab$.

Find three elastic numbers, and explain why they are elastic.

As any mathematician will be able to spot, Elastic Numbers is typeset in $\mathrm{\LaTeX}$. I greatly approve of this and the pretty equations it gives (we use $\mathrm\LaTeX$ for Chalkdust too), although this leaves the book looking more like a puzzle dictionary than a fun puzzle book that you might give straight to the kids. But to puzzlers like me, this doesn’t matter: the best thing about a puzzle is the new and exciting mathematical situation it gives you to investigate. And this book is packed full of mathematical excitement. And on that note, I’m off to work out where Evariste is standing…

### Where is Evariste?

Source: Elastic Numbers by Daniel Griller (obviously)
Evariste is standing in a rectangular formation, in which everyone is lined up in rows and columns. There are 175 people in all the rows in front of Evariste and 400 in the rows behind him. There are 312 in the columns to his left and 264 in the columns to his right.

In which row and column is Evariste standing?

# In conversation with Marcus du Sautoy

For many people, Marcus du Sautoy might just be the most recognisable face in modern mathematics (although Carol Vorderman fans may disagree with this assertion!). He writes regularly for several national UK newspapers, is a frequent guest on the BBC and is about to release his fifth book. He has also taken mathematics to some more unconventional places, including the Glastonbury festival, the Royal Opera house and the Barbican. His academic work focuses on number theory and group theory, something that he says appeals to him due to its inherent structure, and because once you have the right idea “it kind of runs itself”. This love for big ideas and the story of mathematical discovery will be familiar to anyone who has ever seen him enthusiastically explain one of his favourite subjects, Euclid’s proof that there are infinitely many primes, on radio, television or in print.

I feel sorry for all the toys with composite numbers on them.

However, despite his broad research background and his familiarity with, dare we say it, intimidating-sounding concepts such as ‘zeta functions of infinite-dimensional Lie algebras’, du Sautoy assures us that he is not the sort of person who “gets things really quickly”. This, he says, has helped him become effective at communicating mathematics—you must “get in the head of your audience” and understand why they aren’t comfortable with a concept, or “find the thing that they get, which you can use” to take them on the same journey that you have been through on your own road to understanding. In short, it is empathy.

# The pipe singularity

Uproar and bewilderment had followed the plenary congress that had been held in the vast expanses of the imperial palace of Atzlan, the Aztec capital. Remotep, head of the royal laboratory, had made a great announcement. Following years of observations, studies and experiments, the renowned scientist had been able to forge a complete picture of the fundamental principles of life: this knowledge had already brought enormous advances to humanity but would soon completely revolutionise human existence.

# Superegg

Let me take you to centre of Stockholm—back in 1959. The capital of Sweden was being rebuilt after World War II. As part of this program, two big arteries had been built and they intersected in the heart of the city: Sergels torg (Sergel’s Square). This place appeared to be a big problem for city planners, as its shape wasn’t really a square, but a rectangle.

The idea was to plan a roundabout around it. But what shape should this roundabout have? A circle?

Such a waste of space! Ellipse?

Too narrow for the traffic in the red parts.

Desperate times call for desperate measures, ie for mathematicians. More precisely, the team of architects asked for help from Piet Hein, a Danish mathematician, inventor, designer, author, and poet (what else?!). And he invented a superellipse.

To simplify the task, let’s start with a circle. Just a standard $x^2+y^2=1$—nothing fancy.

Have you ever wondered what happens if we enlarge the exponents in this familiar equation? So what does, for example, $x^6+y^6=1$ look like?

Is it a circle or a square? Or maybe a squircle? The higher the exponent, the closer to a square we get: $x^{100}+y^{100}=1$ is almost indistinguishable from a square.

Now let’s complicate things, just a little bit, and look at a more general shape: an ellipse. For example, $\left(\frac{x}{3}\right)^2+\left(\frac{y}{2}\right)^2=1$ looks like this

Again, as we enlarge the exponents, we get closer and closer to a rectangle. So here’s $\left(\frac{x}{3}\right)^{10}+\left(\frac{y}{2}\right)^{10}=1$

and $\left(\frac{x}{3}\right)^{100}+\left(\frac{y}{2}\right)^{100}=1$

Almost a rectangle, right? These interesting shapes are called superellipses.

Remember that our original problem was to build a roundabout rectangular enough to fill most of the available space and circular enough to allow for smooth traffic flow. Hein found out that the perfect shape was an ellipse with exponent equal 2.5 (precisely, the Sergels torg roundabout can be described by $\left(\frac{x}{6}\right)^{2.5}+\left(\frac{y}{5}\right)^{2.5}=1$).

Superellipses quickly became popular among architects all over the world. For example, the famous Mexican Azteca Olympic Stadium has such a shape.

Other applications include:

• A possible shape of the table for negotiators after the Vietnam War, as a compromise between a circular one (“everyone’s equal”) and a rectangular one (“two sides on the conflict”).  Unfortunately, this amazing idea was rejected.
• The Tobler hyperelliptical projection (a method for drawing maps) uses arcs of superellipses as meridians.
• In mobile operating systems, iOS app icons have superellipse curves.

Don’t get impatient, I haven’t forgotten about Easter! Take your favourite superllipse, rotate it along its longest axis and you’ll get a superegg! Why is it so super? Well, it can stand upright on a flat surface or on top of another superegg. This is a proper solution to the egg of Columbus problem!

Brass superegg by Piet Hein. Image: Malene, CC BY-SA 3.0

Happy Easter!

# Is it better to run or walk in the rain?

One of the many things affecting us living in the UK is the rain! Especially when we are caught out in it without an umbrella (or when we’re too lazy to dig it out of our bag). Intuitively it seems like a good idea to run, or at least walk faster so we spend less time in the rain, however this means that the rain hits our front at a faster rate. So what’s the best thing to do in order to minimise how wet you get? This problem has actually been discussed quite a bit in the past few decades, from mathematical journals to tv shows like Mythbusters (they actually did two episodes on this, the second being a correction!).

Let’s start with the simplest model, imagine the rain coming straight down at a constant rate. In the figure to the left, you are represented as the grey rectangle (since the rain has made you sad). Suppose also that the raindrops fall uniformly and such that you cannot walk ‘into’ it, i.e. the rain is only hitting your head. In this case, regardless of the rate at which the rain is falling, your best option is to move as fast as you can to minimise your time spent in the rain.

$k$ and $c$ are just positive constants here to show that the lines in the diagram are proportional to the actual vectors

Well, what if the rain is coming down towards you at an angle due to the wind? For this we’ll want to introduce some actual maths. Again, we will assume the rain is falling uniformly with a constant velocity $\textbf{v}_r$. An important concept in this problem is the rain region. This region contains the initial positions of all raindrops that will hit you at some time. Suppose you’re moving with speed $s$, so your velocity in 2D is $\textbf{v}_u=(s,0)$, scaled such that you spend the time $1/s$ in the rain. Let’s put a point $P$ on you, and take a point $Q$ from the rain region, representing a rain drop that will hit you at time $t$. Then, this rain drop will hit you at position $Q+\textbf{v}_r t$. Your original point $P$ can be written as $P=Q+\textbf{v}_r t-\textbf{v}_u t$. Thus for every (exposed) point on you, $P$, the points $P+ (\textbf{v}_u -\textbf{v}_r)t$ are in the rain region for $t \in [0,1/s]$. The rain region is entirely made up of these lines, each with length $||\textbf{v}_u -\textbf{v}_r||/s$. It should be clear then if the rain is coming down at an angle, hitting your front, you should run as fast as you can to minimise the length of the rain region (the ‘width’ of the rain region will be fixed, proportional to your height).

What if the rain is coming from behind you? Here things get a little more complicated. The components of the rain’s velocity are $\textbf{v}_r=(v_r^1,v_r^2)$ where $v_r^1>0$ since the rain is falling in the forwards direction. A few things distinct things can happen here (with our assumption of the rain falling uniformly, at the same velocity). Recalled you move with speed $s$. If $s>v_r^1$ you will overtake the rain falling from behind you and only your top and front gets wet. If $s=v_r^1$ you are moving with the rain and only the top of you gets wet. Finally, if $s<v_r^1$ the rain hits your back and top, but you do not walk into any rain so your front remains dry. Let $A_{fb}$ be the area of your front or back exposed to the rain, and $A_{t}$ is the area of the top of your head. In our 2D case, these would just be the height and width of your ‘rectangle’, respectively. The amount of rain hitting these parts are then proportional to $R_{fb}=|v_r^1-s|A_{fb}$ and $R_{t}=|v_r^2|A_{t}$ (again, respectively). Recalling that the time spent in the rain is $1/s$, the total wetness function, $R$, is proportional to:
\begin{align} R_1(s)=\frac{1}{s}[ (v_r^1 – s) A_{fb} + |v_r^2| A_{t} ]; \quad \text{if } s\leq v_r^1 \nonumber \\
R_2(s)=\frac{1}{s}[ (s-v_r^1) A_{fb} + |v_r^2| A_{t}]; \quad \text{if }  s>v_r^1
\end{align}
where the multiplier for the proportion is just the density of the rain. Note that this function can be applied to the previous case too where the rain is falling backwards, into you ($v_r^1<0$). We find that we always have $R=R_2$ and the way this is minimised is to increase $s$ as much as possible.

For the case of the rain falling forwards we have $v_r^1>0$. Let $C=-v_r^1 A_{fb} + |v_r^2| A_{t}$ and notice that $R$ is continuous, $R_1$ is a decreasing function of $s$, whilst the behaviour of $R_2$ depends on the sign of $C$.

• If $C>0$, $R_2$ is also a decreasing function of $s$ and $R$ will be minimised when $s$ is increased to its maximum.
• If $C=0$, then $R_2$ is a constant and we can minimise $R$ by taking any $s\geq v_r^1$.
• If $C<0$, $R_2$ is an increasing function of $s$, so we can only minimise $R$ by taking $s=v_r^1$, i.e. you run at exactly the horizontal speed of the rain.

$C$ depends on your size and the velocity of the rain. If the rain is only slightly falling forwards, then your best option will still be running as fast as you can! However, if the rain is falling forwards by a decent amount (such that $C<0$), then you’re better off running at exactly the horizontal speed of the rain. This also means the rain will only be hitting your head (theoretically)!

There are many more complicated models for this, taking into account things like different shapes (other than rectangles) or gusts of wind which affect the final conclusions.  Instead, we’ll just end on a limerick by Matthew Wright (unfortunately, not the previous member of Chalkdust)!

When caught in the rain without mac,
walk as fast as the wind at your back.
But when the wind’s in your face,
the optimal pace
is fast as your legs will make track.

In many of these related articles, you’ll find this limerick as a longer poem, adjusted to include the new results! For example, here is one by Dan Kalman and Bruce Torrence (or as they called themselves, Dank Hailman and Bruce Torrents):

When you find yourself caught in the rain,
while walking exposed on a plane,
for greatest protection
move in the direction
revealed by a fair weather vane.
Moving swift as the wind we’ll concede,
for a box shape is just the right speed.
But a soul who’s more rounded
will end up less drownded
if the wind’s pace he aims to exceed.

# Why self-service machines give such awful change

You’ve got this down. You’ve bagged your groceries, swiped your Nectar card, and you’ve paid with a fiver. You’re due 55p change. Surely you’ll get a 50p and 5p coin, right? Nice and light in your pocket.

Wrong!

Self-checkout fans will know that you really get 20p, 20p, 5p, 5p, 5p.

Why?!

Last week, we advocated a new £1.23 coin in place of the new pound coin in order to reduce the number of coins you get in change. The answer to this self-service riddle is related.

## Why do self-service checkouts give so much change?

Although supermarket self-checkouts accept all circulating coins, customers normally find that they only give out six possible coins as change. Normally these are

1p — 2p — 5p — 20p — £1 — £2.

They don’t give out 10p or 50p coins.

This is because self-checkout machines don’t reuse coins they are given. Instead, all the coins you put in are collected into a bucket [the brand that Sainsbury’s use call it a recycling acceptor: pdf]. The machines have separate tubes for coins as change, which are filled by staff with coins which have been checked by the bank as genuine.

The mechanisms for these tubes are expensive and prone to jamming. Combine this with the fact that many machines are based on US designs, where there are far fewer denominations of coin:

1¢ — 5¢ — 10¢ — 25¢ — \$1,

you end up with machines with fewer coin tubes than types of coin.

This means that 99p in change (for example) requires nine coins with the current choice of coins to fill the machine with. But there’s a better choice of six coins. Suppose a machine has only n coin tubes to give out change. Which coins should it pick?

Coin tubes Coins Number expected
2 1p, 20p 21.5
3 1p, 20p, 50p 10.9
4 1p, 5p, 20p, £1 7.5
5 1p, 5p, 20p, 50p, £2 6.2
6 (self-checkout) 1p, 2p, 5p, 20p, £1, £2 (current) 5.9
1p, 2p, 5p, 20p, 50p, £2 (improvement) 5.4
7 1p, 2p, 5p, 10p, 20p, 50p, £2 or
1p, 2p, 5p, 20p, 50p, £1, £2
5.0

The message here is that £1 and 10p coins are less efficient than any other coin. The £1 coin, for example, is made up of only two 50ps, and it’s only half of £2.

So the self-checkout machines almost have it right: but if we’re going to use self-checkout machines with a small number of slots to give out change, we should swap the £1 coin tube for the 50p coin tube: then 99p is only six coins, instead of nine.

There is a good reason to keep £1 coins though: if you run out of £5 notes—a very common occurrence given that cash machines only give out £10 and £20 notes—you want to keep back your £2 coins for that. Maybe they have it right after all.

Speaking of Americans…

## Are quarters better than 20-cent coins?

Euro 20c vs Canadian 25¢. Fight!

Nearly all currencies have coin denominations starting with 1s and 5s. The differences can be found in between.

20-cent coins are favoured by most modern currencies (UK, Euro, most Commonwealth), whereas some older ones favour the 25-cent coin (US/Canada, Denmark, Thailand, pre-Euro Netherlands).

Is one more efficient than the other?

Coins Number expected Weight expected
1p, 2p, 5p, 10p, 20p, 50p, £1, £2 4.61 32.8g
1p, 2p, 5p, 10p, 25p, 50p, £1, £2 4.61 33.6g

Answer: they are equally efficient! Although, if you made a 25p coin weigh the same as a 20p coin, the expected weight is a little higher. (Fun fact: the UK used to have a 25p coin… but it was the same size/weight as the £5 coin.)

## Programming this yourself

As with the £1.23 post, I am doing this all with a bit of Python code I found on StackExchange:

def get_min_coins(coins, target_amount):
n = len(coins)
min_coins = [0] + [sys.maxint] * target_amount
for i in range(1, n + 1):
for j in range(coins[i - 1], target_amount + 1):
min_coins[j] = min(min_coins[j - coins[i - 1]] + 1, min_coins[j])
return min_coins


This is nice code because it avoids the lazy approach (‘greedy algorithm’) of trying the highest coin first and then dealing with the remainder. Such a lazy approach is quick but fails if you have coins of 1p, 3p, 4p and want to make 6p. The lazy approach would give you 4p, 1p, 1p; but of course the best option is 3p, 3p.

Have a play with the code yourself. Do share below if you find anything interesting.

# Is it possible to reach absolute zero?

German chemist Walter H Nerst [public domain]

The third law of thermodynamics (sometimes referred to as the heat theorem or unattainability principle) was postulated in 1912 by the German chemist Walther H Nernst and states that it is impossible to reach, by any procedure, the coldest temperature possible: absolute zero (0K, or −273.15C or −459.67F, depending on your preferred choice of units). However, this statement was a matter of some controversy, as there was no real proof of it. Although Nernst spent many years defending his version, many scientists refused to accept it, including such heavyweights as Max Planck and Albert Einstein. Both then started introducing their own versions. Einstein, for example, believed that the third law of thermodynamics must rely on the principles of quantum mechanics.

More than one hundred years went by and physicists and chemists from around the world were still debating the theorem, with some remaining unconvinced of its validity, given the lack of a proof.

However, a recently published paper in Nature Communications aims to clarify this debate. Researchers from the Department of Physics and Astronomy at University College London (UCL) have proven mathematically that it is impossible to reach absolute zero: we went to chat with one of them, Lluis Masanes.