Chalkdust, Issue 12

Page 1



In this issue... 4

In conversation with Christina Pagel Ellen Jolley asks for (independent) Sage advice

11

Chaotic scattering James M Christian reflects on chaos

20

Fun with Markov chains Brad Ashley generates tweets and alienates followers

40

Will this article ever end? Emilio McAllister Fognini has a problem deciding whether to halt

50

How can we be sure that 2 ≠ 1? Maynard + Maynard ≠ Maynard

58 68

The birth of the Fields Medal Gerda Grase takes a Field trip down memory lane Counting Countdowns Colin Beveridge poses a conundrum he can’t solve in 30 seconds

68

58

4 1

35

(Not) squaring the circle Sam Hartburn attempts the impossible

3 10 19

Page 3 model

26 28

Puzzles

34 48 56 62

#MarkovMadeMyTweet

63

Oπnions: Should I share my code? by Matthew Scroggs

67 76

Reviews

What’s hot and what’s not How to make... ... a chaotic scatterer On the cover: Mice chasing in hyperbolic space by Florian Bouyer Dear Dirichlet Crossnumber The big argument: Does maths need a Nobel prize?

Top ten: mathematical days out autumn 2020


chalkdust

The team Carmen Cabrera Arnau Charlotte Connolly Ellen Jolley Nikoleta Kalaydzhieva Sophie Maclean Matthew Scroggs Belgin Seymenoğlu David Sheard Adam Townsend

d c a b l n e

chalkdustmagazine.com contact@chalkdustmagazine.com @chalkdustmag chalkdustmag chalkdustmag @chalkdustmag@mathstodon.xyz Chalkdust Magazine, Department of Mathematics, UCL, Gower Street, London WC1E 6BT, UK.

Welcome to Chalkdust issue 12, a milestone indeed, so long as you are a Babylonian or otherwise prefer a number system that prioritises having a base with many divisors. We often use this space to highlight some of the exciting things we’ve been up to since the last issue, but we’ve mostly spent the last six months inside not doing anything. Thank goodness for old issues of Chalkdust to peruse—we’ve read one a month so far and not run out! This has reminded us just how diverse the applications of maths are, and in this issue we celebrate those applications. As well as a few of our personal favourites scattered throughout, you can read about how to use maths to generate tweets and predict the weather (pp 20–25), study the play of light from your Christmas decorations (pp 11–18), and improve at your favourite teatime maths game (pp 68–75). One place where the eminent applicability of maths can’t have escaped your notice recently is in the modelling of, and response to, a pandemic. We interviewed Christina Pagel, professor of operations research and member of Independent Sage, about applying maths, not just to pandemics, but to politics, paediatrics, periods, … and those are just the Ps (pp 4–9). We always like to present a balance of pure and applied, and so we are plumbing the foundations of mathematics, by asking whether there are some questions which simply cannot be answered (pp 40–47), and how we can know if our answers are true anyway (pp 50–55). We do hope you enjoy reading this issue at least as much as we’ve enjoyed compiling it! Maybe if you’re inspired to write about your favourite piece of maths your article will feature in our next issue. The Chalkdust team

Acknowledgements We would like to thank: all our authors for writing wonderful content; our sponsors for allowing us to continue making the magazine; Helen Wilson, Helen Higgins, Luciano Rila and everyone else at UCL’s Department of Mathematics; everyone at Achieve Fulfilment for their help with distribution. ISSN 2059-3805 (Print). ISSN 2059-3813 (Online). Published by Chalkdust Magazine, Dept of Mathematics, UCL, Gower Street, London WC1E 6BT, UK. © Copyright for articles is retained by the original authors, and all other content is copyright Chalkdust Magazine 2020. All rights reserved. If you wish to reproduce any content, please contact us at Chalkdust Magazine, Dept of Mathematics, UCL, Gower Street, London WC1E 6BT, UK or email contact@chalkdustmagazine.com

chalkdustmagazine.com

2


David Sheard

Solitons are special analytic solutions to the nonlinear wave equations that turn up everywhere: from fluid dynamics to quantum mechanics to molecular biology. One such equation is the Korteweg–de Vries (KdV) equation for a 1D wave đ?‘˘(đ?‘Ľ, đ?‘Ą) evolving in time đ?‘Ą: đ?œ•đ?‘˘ đ?œ•đ?&#x;Ľ đ?‘˘ đ?œ•đ?‘˘ + đ?&#x;¨đ?‘˘ + = đ?&#x;˘. đ?œ•đ?‘Ą đ?œ•đ?‘Ľ đ?œ•đ?‘Ľ đ?&#x;Ľ What makes solitons special is that they behave in many ways like solutions to the linear wave equation: propagating without losing their shape, and even interacting nicely:

In 1990, Daisuke Takahashi and Junkichi Satsuma proposed a discrete model for solitons called the ball and box model. It consists of an infinite row of boxes, some of which contain a ball. A sequence of consecutive balls represents a wave. The pattern of waves after each time step is found by starting from the left and moving each ball to the next available empty box to its right.

A row of đ?‘› consecutive balls behaves like a single wave, and moves to the right at a constant speed đ?‘›. Several such waves, so long as they start sufficiently separated, will interact (in a possibly messy way), and then disperse, maintaining their original shapes overall. Complex nonlinear interaction Same waves at beginning and end

This model is fun to play with, but—surprisingly given its simplicity—it manages to capture a large amount of the interesting and unusual behaviour of the fluid waves modelled by the KdV equation. 3

autumn 2020


chalkdust

I n c o n versat io n w it h . . .

Christina Pagel Christina Pagel

Ellen Jolley

This interview was conducted on 11 August 2020, and our discussion of the pandemic reflects this.

G

iven everything we read in the news during this pandemic, it is no longer a surprise to anyone that maths plays a crucial role in solving problems that affect our daily lives. This has been thrown into the spotlight recently, with mathematical modellers advising government policies across the world and statisticians holding the key to decoding the chaos of pandemic data; but it has been going on behind the scenes for quite some time. Operational research (OR) is the branch of applied maths dedicated to using maths to make better decisions, and it can be applied to almost any field. If that sounds vague, fret not, because we sat down with Christina Pagel, professor of operational research and director of the Clinical Operational Research Unit (Coru) at UCL, and a member of the Independent Sage (Scientific Advisory Group for Emergencies) committee, to clear up exactly what it entails. “Operational research is a really applied branch of maths, and you can use any kind of maths, as long as you’re answering a real world problem.” But some maths is more typical of operational research than others. For example, queueing theory is the mathematical theory behind modelling queues and making them more efficient, ie deciding who gets served in what order. Another classic of OR is optimisation, which is choosing how to allocate resources given certain constraints and goals, such as minimising costs or maximising profit. “That’s used everywhere from transport, health care, emergencies… The travelling salesman is a really well-known optimisation problem— chalkdustmagazine.com

4


chalkdust how do I visit these destinations in the shortest time possible?” Chalkdust would like to apologise to readers for any distress caused by the reminder of their decision maths A-level module. Data analysis is crucial too. “How do we use the data that people have to help them To save you from digging out your old lecture make decisions? That’s a big branch of opernotes: a Poisson distribution describes events ational research.” And of course, as with most that occur independently at a fixed rate, while branches of maths these days, simulations play an exponential distribution is the probabila big role. “Say in queueing theory, it’s fine as ity distribution of the time between Poisson long as you have Poisson arrivals and exponenevents. tial service times, but once you get to real life and see that actually you have this funky algorithm for choosing who gets served and how long it takes, then you start having to use simulation because you just can’t solve it analytically.” But the field is very problem-focused, and for Christina the maths is of only secondary interest to the questions themselves. “I’ve become less interested, as I become older and more senior, in the novelty or difficulty of the mathematics and much more interested in the problem.” And it shows—she has worked on more problems than there are maths puns in an issue of Chalkdust.

Paediatrics, politics, periods…

Wellcome Collection, CC BY 4.0

Great Ormond Street hospital, c 1872.

As director of Coru at UCL, Christina focuses on operational research applied to healthcare. She recently held a position as researcher in residence at Great Ormond Street hospital (Gosh), a children’s hospital in London, helping them solve problems like predicting how many beds they will need, or when the children’s respiratory disease peak will be. The peak is about a month and half earlier than the adult flu peak, and Christina built a model for Gosh to let them know when it begins. This is crucial to know because when it comes, “demand will double very quickly and they don’t have more capacity.”

This is only the tip of the iceberg in regards to all the problems healthcare needs mathematicians to solve. Another classic operational research problem that Coru has worked on recently is investigating the ideal placement of the UK’s 11 specialised ambulance services which transport sick children from local hospitals to paediatric intensive care hospitals, as well as the possibility of changing the number of ambulances at each location. “We also do simple models of vaccination programs for the [UK government’s] Department of Health and Social Care. If I’m introducing a new vaccine, what is the impact of other vaccines? How many times do I have to vaccinate? That involves a mixture of theoretical modelling and then data analysis. Sometimes we mix them together, like in queue models for how many health visitors you need to serve a certain community with certain 5

autumn 2020


chalkdust needs, which is something we’re doing right now for instance.” For even further evidence of the infinite set If you can’t articulate what you’re tryof problems mathematicians are in demand to ing to do, then all of your solutions for solve (as if we needed it), Christina tells me she began a fellowship in the US in 2016 to getting there are meaningless. study their healthcare system, but unexpectedly found herself more useful in political science. “Within about two months of me getting there, Trump was elected. And it became really clear that he was going to try to repeal Obamacare. He failed, but I didn’t know that at the time.” She felt there was no point working to improve a health system that was about to be upheaved, but she saw politicians arguing about Obamacare and she realised that she had a unique perspective on how to understand their feuds. “I thought, ‘Do we understand what the goal is in the situation?’ That’s a classic operational research point of view. If you can’t articulate what you’re trying to do, then all of your solutions for getting there are meaningless.” She devised a survey for politicians to understand what their goal was. The survey had thirteen possible goals that were developed with a focus group of serving politicians and academic health policy experts, such as ‘improve health’, ‘reduce costs’ and ‘reduce inequality’, and participants were asked to rank them on importance. Using a voting system, she was able to give the items an ‘overall’ ranking, and used a stats technique for plotting multidimensional priorities to see how people on different parts of the political spectrum felt about healthcare. “It wasn’t anything particularly sophisticated, but they just hadn’t ever done that!” What was common sense to Christina was a completely new way of looking at the problem to political scientists. The methodology was a triumph in and of itself—perhaps fortunately, since the more challenging task of showing that politicians agreed on the goals didn’t transpire quite as planned. “I thought everyone would say improving health is the most important thing. But actually, improving health was only most important for Democrats, and second most important was reducing inequalities and improving access to healthcare. Whereas, for Republicans, the most important thing was reducing costs, and the second most important thing was reducing the involvement of government in healthcare, which to me was really bizarre, but that was important for them. Improving health came fifth out of thirteen, and last was reducing inequality.” But even though they could not agree, the survey still clarified exactly why they couldn’t agree. “It’s really helped them understand how they can talk to each other. For instance, if you’re a Democrat, and you want to push a policy because it reduces inequality, to your Republican colleagues that’s not the angle you use, you have to explain how it reduces costs.” She is now working on a project looking at women’s period pain. chalkdustmagazine.com

6

Christina Pagel

For Christina, applied maths goes far beyond merely applying maths. She’s an interdisciplinary science communicator able to turn her hand to everything from politics to physics to biology.


chalkdust “It’s not really my expertise, but if no one else is going to do it, then I’ll do it.” She is working with the Health Foundation to look at GP records to quantify the problem, which she hopes will convince medical researchers to give the issue serious attention. “80% of women at some point in their lives suffer from really bad period pain, and about 20% have some years of their life where actually it’s debilitating for two or three days a month. People have just found a way to live with it, when you shouldn’t have to live with that—why should you have to live with that? So we’re now trying to take it further and make it into a bigger project.” Picking up a problem wherever she sees one to solve is rather a habit of hers it seems. Of course, healthcare has had one particularly big problem to solve recently.

…and pandemics Well, we had to talk about it eventually. Operational research has played a crucial role in managing the pandemic from the beginning, and Christina laments that even better use of it has not been made. “There are loads of places operational research could have helped [the UK government] to do better.” An obvious issue is distribution of PPE (personal protective equipment), but there are many examples. “For instance, 30% of people with Covid-19 in intensive care units (ICUs) had kidney failure, so the whole country ran short of renal medicine, and that had knock on effects on people receiving dialysis.” When medicine is in short supply like that, how should it be distributed and prioritised? “How do you decide how many ICU beds you need when you’re reorganising hospitals? How do you decide how many emergency hospitals you need, like the Nightingales? All of that is OR. Even things like oxygen supply—Covid leaves so many people on supplemental oxygen that hospitals were running short, so how do you manage that? Because if you run out, then everyone in the hospital who needs oxygen is screwed which you obviously don’t want.” Christina has been playing her part as I’ve been working across disciplines— a member of Independent Sage—or, as clinicians, patients, people in the governshe affectionately calls it, “indie Sage”—a group of scientists who produce indepenment, local commissioners—I’ve had to aldent advice on the UK’s handling of the ways try to explain things to lots of differpandemic, to challenge and analyse that ent types of people. given by the government’s official scientific advisory group, Sage. Although initially she was expecting to be doing operational research, it became more a public communication of science role. It turns out this is something she excels at. “Because I’ve been working across disciplines—clinicians, patients, people in the government, local commissioners—I’ve had to always try to explain things to lots of different types of people. That’s been really helpful in indie Sage, in that I’m not in a silo.” She now does weekly YouTube briefings (m indie_SAGE) breaking down where we are at with the pandemic and collating government data from countries around the world, and reasonably regularly appears on TV and radio explaining the latest numbers. Independent Sage believes the UK government should be aiming to achieve elimination of Covid. “There’s a technical difference between elimination and eradication. Eradication is what we’re try7

autumn 2020


chalkdust ing to do to polio and what we did to smallpox, but elimination is what New Zealand did, which is zero community transmission.” This would mean the virus can only enter the country via travellers, which Christina says could hopefully be handled with effective test and trace, and quarantine. “And once you’ve done that, you can go back to normal life! Masks, social distancing, you don’t have to worry about that stuff.” Critics of the strategy say it is simply unachievable. “But it’s not saying you’re never going to get a case. Small outbreaks are much easier to stamp down. It’s like in my house, I have a zero fire policy, I’m not going to let any fire come out, and if it does I’ll put a tea towel over it. We’re stuck in this limbo where you can open mostly but not completely, and if you relax when you haven’t got it down far enough it goes out of control. We’re saying get it down far enough, and you do that through really, really good contact tracing. You have to break the chain of transmission, that’s what South Korea did, that’s what China did.” Unfortunately, between speaking with Christina and writing this article, it’s starting to seem like this prediction may be coming true. So what does she think the UK should have done to get to such low levels of Covid? “You close down the areas that are really risky. We know outside is safe, but indoor pubs… it’s not a good idea. When countries opened shops, nothing really happened, but when they opened pubs, a few weeks later cases went up. Pubs, restaurants, bars, household parties… all of that causes superspreading events.”

Elimination… is zero community transmission… and once you’ve done that, you can go back to normal life! Masks, social distancing, you don’t have to worry about that stuff.

If we had put on more restrictions in the short term while cases were still low, Christina believes we could, in a matter of weeks, have been able to achieve low enough levels to try to eliminate Covid and then we would be in a much better position to reopen schools and have students return to university. The returning of students to university poses a particular concern. “Younger people are much less likely to get symptoms, so they may get Covid and have no idea. And if we don’t have a really good contact tracing system, you can’t stop that. Whereas a really good contact tracing system stops people without symptoms going out, that’s how it works”. To clarify, she doesn’t believe the problem was opening up too early, but rather too quickly. “We opened up schools, and then two weeks later we opened shops, and two weeks later bars, and then gyms and then workplaces. But actually every time you open something, you need to give it about four weeks before you see anything in the data.” More patience with easing restrictions could have avoided the need for local lockdowns. “Local lockdowns are very damaging, whereas if they just waited and got to very low levels of Covid, it would have been fine.”

Master of all trades Hearing how multi-disciplinary her current job is, perhaps it should not be a surprise that Christina has dipped her toes in quite a few fields before settling on maths, and has four master’s degrees to show for it. “I did maths as an undergrad, because I wanted to be a physicist, which made perfect sense at the time. And I thought quantum mechanics was awesome, so my first master’s was in quantum theory.” But when it came to choosing a PhD, she was told she would have to do a topic that was very heavy on tensors, and she understandably ran for the hills. “I thought, ‘I’m out then, chalkdustmagazine.com

8


chalkdust it’s not for me!’ So I got a job and decided to do a part-time MA in classics because I always loved history, I loved ancient history, I loved Latin. I chose maths for my degree because you can’t skip from doing maths A-level to doing a master’s in maths, but you can do that in humanities.” Even though supposedly she needed an arts degree, she was admitted to the MA in classics with a first in maths, simply because people find maths impressive. “People will just give you the benefit of the doubt, it’s actually really handy.” She really enjoyed the opportunity to learn purely for pleasure. Eventually, physics called her back. “I did a I did a PhD in space physics, because I PhD in space physics, because I thought… ‘I thought… ‘I want to be an astronaut.’ want to be an astronaut.’” Again, they were more than happy to accept a student with a background in maths. But she found herself frustrated with the obscurity of her work. “No one would have cared if I got it wrong. Literally, there were ten people in the world interested in that area of physics.” This is what inspired her to go into research that had a very direct application. “I thought this practical use of maths to help concrete problems is really appealing, so then I came to Coru.” Although she had found her new calling, she couldn’t bring herself to give up her other passions yet. “I did another part-time master’s in medieval history, and again I really loved it.” The final master’s, which she did later in her career, was in statistics. “That was because people in health think if you do maths, then you’re a statistician. So I thought I’ll just do a stats qualification so I can say I am! But it wasn’t nearly as fun.” However, she did enjoy having her talents in maths reaffirmed. “I spend most of my time now doing project management, so it was kind of nice to do maths again and realise I could still do it.” It is certainly good to hear that mathematicians have this power to jump around to any field they want. “The earlier you switch, the easier it is. For me, I looked at people who were working at Coru at the time, and about half the unit had done undergrads in physics, so I knew it was fine. We advertise that we don’t mind if people come with a different background. Maths teaches you how to think, and it is really flexible. You can’t change field and expect everything to stay the same. You have to be willing to learn a new programming language, a completely different way of looking at things. Operational research suits people who aren’t wedded to methods, or a certain type of way of doing things, but are actually really interested in real problems.” It may be a relief to anyone choosing modules or PhD topics that their choice won’t limit their career options—and in fact, as our conversation comes to a close, she has some advice for people making these decisions now. “If you’re thinking about doing a PhD, it does matter who your supervisor is. It’s quite an intense relationship, they’re the person who is going to be guiding you into becoming an independent scientist, and having someone who doesn’t want to do it or who is not that engaged can just be a really bad experience. And you have to find it interesting—because you’re going to be doing it for three years, and that’s a long time!” Ellen Jolley Ellen is a PhD student at UCL studying fluid mechanics. She specialises in the flow around droplets and ice particles.

9

autumn 2020


& WHAT’S

WHAT’S

HOT NOT Writing software

Naming your software Check out my new software: the Automated Chebyshev Real Orthogonal Novel Y-axis Maker.

Programming takes ages.

Maths is a fickle world. Stay Ă la mode with our guide to the latest trends. Agree? Disagree? a @chalkdustmag b chalkdustmag l chalkdustmag f chalkdustmag

HOT

NOT HOT

Friendly numbers

6 and 28 are friendly, as the sums of their factors divided by the numbers are both 2.

Seeing your friends Especially not in groups of more than 6.

NOT

HOT

Taylor Swift

Singer with hits including Blank Space, Shake It Off and Cardigan.

Maclaurin Swift Singer with hits including Blđ?&#x;˘nk Spđ?&#x;˘ce, Shđ?&#x;˘ke It Off and Cđ?&#x;˘rdigđ?&#x;˘n.

NOT

Video calls They’re so exhausting.

OBS

NOT HOT

It’s definitely a good use of a whole day to add a fifth camera to your custom setup.

NOT

Excel 97

Databases

Famously only has 65,536 rows.

Famously no one ever needs to store more than 65,536 data entries.

HOT

More free fashion advice online at d chalkdustmagazine.com chalkdustmagazine.com

10


chalkdust

Chaotic scattering: Uncertainty and fractals from reflections Flickr user Windell Oskay, CC BY 2.0

James M Christian

A

ny Chalkdust reader who has spent time playing billiards, snooker, or pool, will probably have some kind of feel for how the balls move around the table, how they bounce off each other, and how they bounce off the cushions. After a while, you just know instinctively how they should behave, at least in very simple situations. Reading this article is unlikely to improve your potting statistics; writing it has certainly not improved mine. We can start by shrinking the cue ball to the size of a point, and imagining the object ball being squashed into a hard-edged circular disc that is so heavy that it does not recoil in a collision. The path of the incoming cue ball can be represented by a ray. Rays always follow straight lines between bounces, mimicking a ball rolling across a perfectly smooth horizontal table. Reflection of the incident ray by the disc is shown on the right. Draw a line from the disc’s centre through the point where the ray hits the circumference. That line is the normal, and the law of specular reflection tells us that angle out equals angle in, or in symbols, đ?œƒref = đ?œƒinc .

đ?’•Ě‚

reflected đ?œƒref đ?’?Ě‚

đ?œƒinc

incident

Specular reflection of a ray hitting the edge of a disc.

To make things a bit more interesting, place identical discs at the corners of an equilateral triangle. That setup was first analysed in detail around three decades ago by physicist Pierre Gaspard and 11

autumn 2020


chalkdust chemist Stuart Rice. Scientifically, their groundbreaking paper provided a paradigm for chaotic scattering in a plane but we can think of it as just an abstract game of pinball. The three-disc system turns out to be really useful in applied mathematics for understanding billiard-type problems, while in physics it crops up in fields from laser optics to the kinetic theory of gases.

Formulating the problem The three-disc arrangement is shown below. Each disc has a radius of 1 unit, the size of the gap between them is â„“ , and the shaded area đ?›ş is called the scattering region. Any incoming ray is defined by an incidence angle đ?œƒđ?&#x;˘ and a displacement đ?‘Ľđ?&#x;˘ . We can select whatever values we like for đ?œƒđ?&#x;˘ and đ?‘Ľđ?&#x;˘ , and will refer to the pair of numbers (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) as the input.

An incident ray can generally end up doing only one of four things, which are the allowed outputs of the system. If the ray enters � , it ricochets between the discs before eventually escaping through one of the three gaps. The fourth possible outcome is that the ray is reflected away early on and so never enters � at all. Sometimes, a ray may also remain trapped inside � forever! But that situation is so incredibly unlikely that we can discard it here. Our question to try and answer is: for a given input, what will the ray do?

đ?&#x;Ł

�

đ?&#x;Ľ đ?‘Ś

đ?&#x;¤

đ?‘‚

đ?œƒđ?&#x;˘ đ?‘Ľđ?&#x;˘

đ?‘Ľ

The three-disc system with the gaps labelled 1 to 3 and colour-coded, with the red cross showing the origin of (đ?‘Ľ, đ?‘Ś) coordinates. The incident ray has initial position đ?‘Ľđ?&#x;˘ and angle đ?œƒđ?&#x;˘ (positive angles are measured in the clockwise sense).

The butterfly effect The zig-zagging path of any ray (its trajectory) can be computed using straight lines and applying the law of specular reflection every time it hits a disc. Crucially, our scattering problem is deterministic because it is governed by mathematical rules in which there is absolutely no randomness whatsoever. Given an input, classical physics demands that there must exist a unique output. Seems reasonable and obvious. What is not so reasonable and obvious is that a tiny change to the input can lead to a dramatic change in the output. This strange phenomenon—where a system can be susceptible chalkdustmagazine.com

12


chalkdust to minuscule fluctuations—is known technically as sensitive dependence on initial conditions. The term ‘butterfly effect’ is perhaps more widely known, coined by mathematician and meteorologist Edward Lorenz in the early 1970s as a nod to the unpredictability he discovered in a toy model of the weather. It purports, only half-jokingly, that a butterfly flapping its wings in Brazil can set off tornadoes in Texas. The butterfly effect appears in our scattering problem when we have, for example, two incoming rays starting from the same đ?‘Ľđ?&#x;˘ value but with slightly different đ?œƒđ?&#x;˘ values. The difference between their paths may become magnified through successive bounces, building up remarkably quickly until the two trajectories have diverged and no longer bear any resemblance to one another. Ultimately, we may even find that the two almost (but not quite!) identical inputs lead to completely different outputs.

A demonstration of the butterfly effect in the three-disc system. On the right, đ?œƒđ?&#x;˘ has been increased by 0.001° compared to the left.

Scattering that exhibits the butterfly effect is said to be chaotic. In common parlance, ‘chaotic’ is often used to convey disorder or perhaps even (perceived) randomness. Here, we are deploying the word in a scientific sense. While it might sometimes look random, the three-disc system cannot do anything except behave deterministically. It also hides some very intricate and very ordered structure that can be seen if we look in the right place‌

Exit basins and their properties

Ideally, we would like to relate a whole range of inputs to their corresponding outputs in one go. A nice way to do that is to think of đ?‘Ľđ?&#x;˘ and đ?œƒđ?&#x;˘ as labelling the horizontal and vertical axes, respectively, in a plane (just like the đ?‘Ľ –đ?‘Ś axes in coordinate geometry). Let us impose a square grid on a section of that (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) plane, where all the points represent different initial conditions. For each point in turn, the outcome of the computation is recorded. The collection of outputs is then overlaid on top of the grid, and colour-coded according to our three-disc system on page 12 to create a kind of map. An example is shown on the top of the next page when the gap between the discs is relatively small. The map answers our earlier question in a very direct and effective way. It tells us exactly what a ray does as a function of starting point (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ), and even cuts out all the unnecessary information about individual trajectories. But a single map is just the tip of a giant iceberg, and many more questions now follow. 13

autumn 2020


chalkdust

đ?œƒđ?&#x;˘

đ?‘Ľđ?&#x;˘

Exit basins when â„“ = đ?&#x;˘.đ?&#x;˘đ?&#x;§ and the plane of initial conditions (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) in the left-hand pane is [−đ?&#x;˘.đ?&#x;Ł, đ?&#x;˘.đ?&#x;Ł] Ă— [−đ?&#x;Łđ?&#x;˘Â°, đ?&#x;Łđ?&#x;˘Â°].

We can see that the (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) plane is divided into four coloured regions, known as exit basins, which identify a unique output for a given input—white for gap 1, red for gap 2, black for gap 3 (initial conditions giving rise to trajectories that never enter đ?›ş are shown in grey). The boundaries of these basins form striated patterns that are intertwined in extremely complicated ways. An important feature of the map is its self-similarity, where zooming-in on any portion of a boundary region uncovers smaller-scale substructure which looks like the pattern as a whole. Self-similarity persists all the way down to arbitrarily-fine length scales, and that property is typically one of the signatures of a mathematical fractal. It has been known since the mid 1990s that the basins can also possess the infinitely-mindbending Wada property which, in visual terms, means the boundary between two colours never quite forms. Amazingly, the remaining colours somehow always nestle in. Wada says that we can never jump from a black region to a red region without also jumping across a white region. Similar is true for other black-red-white permutations. More subtly, any jump over a boundary necessarily involves crossing all three colours an infinite number of times! As an analogy to the Wada property, think about the points on a number line. Any number is either rational (expressible as a ratio of integers, like đ?&#x;Ł/đ?&#x;¤ or đ?&#x;Ľ/đ?&#x;Ś) or irrational (Ď€ or √đ?&#x;¤ are the usual suspects). We cannot jump from đ?&#x;Ł/đ?&#x;¤ to đ?&#x;Ľ/đ?&#x;Ś without necessarily jumping over all the numbers in between, both the (countably-infinite) rationals and the (uncountably-infinite) irrationals. The same idea would also hold if we were to jump between any two irrational numbers instead. It turns out that the basins vary with the gap width â„“ (see the next page). For instance, the map takes up more of the (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) plane as â„“ increases. That result makes physical sense: we would expect the scattering region to be accessible from a wider range of initial conditions as the gaps become bigger. We can also see, qualitatively, that the pattern complexity reduces as â„“ increases since the density of the striations (loosely speaking, the number of stripes per unit area of boundary) drops off as the gaps expand. chalkdustmagazine.com

14


chalkdust

Exit basins when the gap width gradually increases (top to bottom: â„“ = đ?&#x;˘.đ?&#x;˘đ?&#x;Š, đ?&#x;˘.đ?&#x;˘đ?&#x;Ť, đ?&#x;˘.đ?&#x;Łđ?&#x;Ł, and đ?&#x;˘.đ?&#x;Łđ?&#x;Ľ) and the plane of initial conditions (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) in the left-hand column is [−đ?&#x;˘.đ?&#x;Ł, đ?&#x;˘.đ?&#x;Ł] Ă— [−đ?&#x;Łđ?&#x;˘Â°, đ?&#x;Łđ?&#x;˘Â°].

15

autumn 2020


chalkdust The striations in the maps look quite linear, especially when magnified. However, some curving can be seen if we look over a wider range of the (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) plane than shown here, particularly when the gap size increases. There is also a fundamental physical principle determining how the stripes must fit together (perhaps you spotted it earlier). Look on the right: if the black and white areas are swapped over, the map still looks the same! This is a consequence of the fact that there is no difference between gaps 1 and 3. Our three-disc system has a line of mirror symmetry along the đ?‘Ś -axis, and so the trajectories from (−đ?‘Ľđ?&#x;˘ , −đ?œƒđ?&#x;˘ ) and (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) are necessarily mirror images of each other.

The map looks the same when rotated đ?&#x;Łđ?&#x;Şđ?&#x;˘Â° with black and white swapped.

Uncertainty and unpredictability So far, we have found that the butterfly effect can play a key role in scattering, and that basins become less finely-structured as the gaps increase in size. Far from being independent, these attributes are two sides of the same coin. One way to establish their connection is through the concept of uncertainty, thinking more carefully about what it means for a deterministic system to have an uncertain outcome. How can that apparent contradiction be allowed by physics?! Let us start with an arbitrary initial condition, say đ?’™đ?&#x;˘ ≥ (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ), and from that point we can define two nearby initial conditions which are đ?’™đ?&#x;˘+đ?œ€ ≥ (đ?‘Ľđ?&#x;˘ + đ?œ€, đ?œƒđ?&#x;˘ ) and đ?’™đ?&#x;˘âˆ’đ?œ€ = (đ?‘Ľđ?&#x;˘ − đ?œ€, đ?œƒđ?&#x;˘ ). The small positive number đ?œ€ satisfies the inequality đ?œ€ ≪ đ?&#x;Ł. Equally, we could consider (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ + đ?œ€) and (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ − đ?œ€); it makes no difference to what follows. If the trajectories from all three starting points lead to the same outcome, then the input đ?’™đ?&#x;˘ is not susceptible to the butterfly effect when disturbances are of size đ?œ€ .

We can quantify the uncertainty in a fixed region of the (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) plane. Select at random a large number đ?‘ of đ?’™đ?&#x;˘ points within that region, and let đ?‘ đ?œ€ be the number of those points which exhibit the butterfly effect at the scale đ?œ€ . Then, the fraction of our initial conditions with uncertain outcomes is given by the power law đ?‘“đ?œ€ ≥ đ?‘ đ?œ€ /đ?‘ âˆź đ?œ€ đ?&#x;¤âˆ’đ??ˇ . The pure number đ??ˇ is the uncertainty fractal dimension. Smooth boundaries are associated with đ??ˇ = đ?&#x;Ł, a value that coincides exactly with the dimension of a typical line in Euclidean geometry (where points are 0D, lines are 1D, areas are 2D, and volumes are 3D). Accordingly, đ?‘“đ?œ€ scales with đ?œ€ đ?&#x;¤âˆ’đ?&#x;Ł = đ?œ€ , so that halving đ?œ€ halves the fraction of initial conditions with uncertain outcomes.

Fractal boundaries are those with đ?&#x;Ł < đ??ˇ < đ?&#x;¤, where đ??ˇ is non-integer and lies somewhere between the Euclidean dimensions of a line and an area. We can think of such boundaries as becoming increasingly rough and irregular (sometimes called area-filling) as đ??ˇ approaches 2. In those cases, đ?‘“đ?œ€ scales with đ?œ€ to a power that drops towards zero as đ??ˇ → đ?&#x;¤. The crux of the matter is that for fractal boundaries, the proportion of uncertain points, đ?‘“đ?œ€ , can fall off relatively slowly even for big reductions in đ?œ€ . chalkdustmagazine.com

16


chalkdust An intuitive way to visualise unpredictability is to consider a small circle đ?›´ with radius đ?œ€ in the (đ?‘Ľđ?&#x;˘ , đ?œƒđ?&#x;˘ ) plane, as on the right. The centre of that circle of uncertainty is placed on the ‘ideal’ initial condition, đ?’™đ?&#x;˘ . However, if we know đ?’™đ?&#x;˘ only to within an error đ?œ€ , the ‘true’ initial condition may lie anywhere in the neighbourhood đ?›´ around đ?’™đ?&#x;˘ . If đ?›´ contains only one colour, the outcome is independent of the finite accuracy. Uncertainty appears whenever đ?›´ impinges on a basin boundary, in which case all colours are contained and the outcome cannot be predicted. That is a recipe for a deterministic system to behave unpredictably, but in such a way that our faith in physics (thankfully) remains intact. After a quick calculation, we find the following formula for relating đ??ˇ to the way in which đ?‘“đ?œ€ varies across the scales: đ??ˇ =đ?&#x;¤âˆ’

d logđ?&#x;Łđ?&#x;˘ đ?‘“đ?œ€ . d(logđ?&#x;Łđ?&#x;˘ đ?œ€)

đ?&#x;Łđ?&#x;˘đ?&#x;˘

đ?‘“đ?œ€ đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;Ł

â„“ = đ?&#x;˘.đ?&#x;˘đ?&#x;§ â„“ = đ?&#x;˘.đ?&#x;˘đ?&#x;Š â„“ = đ?&#x;˘.đ?&#x;˘đ?&#x;Ť â„“ = đ?&#x;˘.đ?&#x;Łđ?&#x;Ł â„“ = đ?&#x;˘.đ?&#x;Łđ?&#x;Ľ

đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;¤ đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;Łđ?&#x;˘ đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;Ť đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;Ş đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;Š đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;¨ đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;§ đ?&#x;Łđ?&#x;˘âˆ’đ?&#x;Ś đ?œ€

đ?›´â€˛ đ?œ€

đ?›´

Uncertain outcomes are associated with circle � ′ (which overlaps a basin boundary) but not with circle � .

The slope of the log-log graph is thus a crucial piece of information, and it needs to be obtained by curve fitting. A set of graphs is shown on the left for the centre panes of the exit basins on pages 14 and 15 when đ?œ€ varies across six decimal orders of scale. For â„“ = đ?&#x;˘.đ?&#x;˘đ?&#x;§, we find đ??ˇ ≈ đ?&#x;Ł.đ?&#x;Ťđ?&#x;¤ while for â„“ = đ?&#x;˘.đ?&#x;Łđ?&#x;Ľ, we find đ??ˇ ≈ đ?&#x;Ł.đ?&#x;Şđ?&#x;Ł. The largest (smallest) uncertainty dimension occurs for arrangements with the narrowest (widest) gaps, and the conclusion we can rightly draw is that the smaller the gap, the greater the sensitivity to initial fluctuations.

Computed log-log plots for the three-disc system using đ?‘ = đ?&#x;¤đ?&#x;¤đ?&#x;˘ initial conditions. For the five values of â„“ considered, straight-line fits have slopes corresponding to uncertainty dimensions đ??ˇ ≈ 1.92, 1.89, 1.86, 1.84, and 1.81, respectively.

But what does it all mean more generally? It means something quite profound: systems associated with larger values of đ??ˇ , irrespective of their physical nature, have more complicated basin boundaries. So in a sense, the fractal dimension becomes a convenient yardstick for comparing the susceptibility of different systems to the butterfly effect.

Concluding remarks We’ve applied some very deep ideas—ideas that have come to play a pivotal role in modern understandings of physics—to a toy scattering problem. But the bigger picture to think about is 17

autumn 2020


chalkdust that simplicity can very often be deceptive. Uncertain outcomes are present whenever finite precision in our knowledge of initial conditions becomes important, not just here but pretty much everywhere. Perhaps one of the most important scientific discoveries of the 20th century is that unpredictability, so beautifully encoded within fractal basin boundaries, is in the DNA of physical law. If you’re still not convinced, or if you want to amaze people with all this stuff, take four silvered spheres such as Christmas tree decorations and a bit of Blu-Tack or glue (see next page). Form a tetrahedron with the decorations, place it on top of a mirror, and surround it on three sides with three pieces of cardboard (each of a different colour). Now look into the gaps of the tetrahedron. What you’ll see is chaotic scattering in action, and an impressive fractal pattern made possible by the law of specular reflection. You can see an example on page 11, and read more about it in the article Christmas Chaos by Windell Oskay. I always derive great pleasure from seeing simple systems behave in complicated ways (the greater the contrast, the better). And it is inevitably mathematics that allows us to unpack what is going on. The fact that even the most trivially-familiar laws of Nature can conspire to create such complexity should be a source of wonder and inspiration to us all—not just Chalkdust readers! James M Christian James is a lecturer in physics at the University of Salford whose research has evolved into a curious blend of linear and nonlinear problems: from electromagnetics and fluids, to solitons and spontaneous patterns. When not writing papers or teaching, he spends a ridiculous amount of time playing with fractals and wishing he were a mathematician instead.

d orcid.org/0000-0003-2742-0569 My favourite application of maths Maths is great, but sometimes it’s also great to use the maths for something. We’ve spread some of our favourite—and least favourite—applications of maths throughout this issue.

The Duckworth–Lewis–Stern method Matthew Scroggs

Cricket is great, but rain can cause chaos by shortening one-day matches: if one team is given less time to bat, how can you fairly decide a winner? Thankfully, statisticians Frank Duckworth and Tony Lewis invented a method that can be used to decide who the better team is based on the runs scored and wickets remaining when rain delays occurred, as well as data from past games. Their method has been used since 1997 to decide the winners of huge numbers of cricket matches. Since 2014, the method has been called the Duckworth–Lewis–Stern method, as Steven Stern took charge of adjusting the parameters of the method following the retirements of Duckworth and Lewis. 353/4 dec.

chalkdustmagazine.com

18


A chaotic scatterer You will need Four (mirrored) baubles, glue, fairy lights

Instructions

1

Glue two of the baubles together.

Glue on a third bauble to make a triangle.

3

2

Glue on the fourth bauble to make a tetrahedron.

4

Wrap the tetrahedron in fairy lights and look into the centre. Tube map platonic solids, Frรถbel stars and slide rules: more How to make at d chalkdustmagazine.com 19

autumn 2020


chalkdust

Fun with Markov chains Brad Ashley

P

robability has found itself a comfortable position amongst industry mathematics. And now, with the advancement of the computer age, a 100-year-old piece of maths has jumped to the forefront, namely Markov chains. These can be used for an awe-inspiring range of ideas including predicting the weather, mapping the probability distribution of a Monopoly properties, and even Donald Trump tweet generation. But what exactly are Markov chains, and why are they so unique?

Understanding Markov chains Let’s say we are having a very nice day and are happy as a result, and that for some reason unknown to us, we only posses the emotional capacity to either be happy or sad. Can we predict what our feelings will be tomorrow? We know that our feelings tomorrow will be dependent on our feelings today; that is, a probabilistic function where the input is today’s mood and only today’s mood. Or in other words, a Markov chain! So how do we do this? Let a happy day and a sad day each be states. We will represent these as nodes on a graph. Now we need some probabilities for the changing of states. Suppose we consider ourselves optichalkdustmagazine.com

đ?&#x;Ł đ?&#x;¤

đ?&#x;§ đ?&#x;¨

happy

20

đ?&#x;Ł đ?&#x;¨

sad

đ?&#x;Ł đ?&#x;¤


chalkdust mistic people: let’s say there’s a đ?&#x;§/đ?&#x;¨ chance that if we are happy today, we will be happy tomorrow, and a đ?&#x;Ł/đ?&#x;¤ chance if we are sad today, we will be happy tomorrow. Since something must happen tomorrow (all apocalyptic events excluded), then the sums of the probabilities leaving each state must add to 1. This is an example of a two-state Markov chain, and while simple, it presents a useful visual aid to help our understanding. Much more formal and rigorous definitions can be found online, but in a nutshell, a Markov chain consists of a set of states where the probability of transitioning to any state is solely dependent on the current state. This dependence is called the Markov property and is what makes this neat piece of maths unique. We can even use this Markov chain to predict how many happy days we’re going to have over the next week. One way we can do this is by following the chain by hand. Take a fair six-sided die and put a finger on the happy state: let’s say today was a good day. Now roll the die and if 1–5 is rolled, follow the looped arrow back to the happy state, Frank Schwichtenberg, CC BY-SA 4.0 ♪ Because I’m happy with a 5/6 else follow the arrow to the sad state. If we were unforchance tomorrow if I’m feeling tunate enough to find ourselves on the sad state, let even happy today‌ ♪ rolls—2, 4 and 6—send us down the arrow to the happy state; and odd—1, 3 and 5—loop back round to the sad state. If we make seven rolls where each roll is a new day, our finger will conclude on the prediction for how we’ll be feeling a week today. If we note the state after each roll, we’ll have predictions for each of the seven days. Now we can plan our week accordingly! What about in a month then? Or a year? Following this diagram for 365 days, the rolling becomes a bit tedious. Instead, we can speed this up by taking ideas from linear algebra, and creating a transition matrix. Let each column of the matrix represent the current state and the rows represent the probabilities of transitioning to each state. For this example, the transition matrix is given by đ??ť đ?‘† đ?&#x;§

đ??ť ⎛đ?&#x;¨ ⎜đ?&#x;Ł đ?‘† ⎜đ?&#x;¨ âŽ?

đ?&#x;Ł đ?&#x;¤âŽž âŽ&#x; đ?&#x;ŁâŽ&#x; đ?&#x;¤âŽ

where đ??ť = happy and đ?‘† = sad. We can use this representation to make a prediction for any number of days in the future. It should be noted that this could equally work with the columns and rows swapped, but as long as we’re conscious of which way we’re doing it, it simply becomes context. We can check whether the matrix has been created properly; the columns (in this case) should add to 1. If they don’t, something has gone horribly wrong! Say we wanted a prediction for two days’ time. We first raise this transition matrix to the power 21

autumn 2020


chalkdust of 2, giving the following calculation: đ?&#x;§

⎛đ?&#x;¨ ⎜đ?&#x;Ł ⎜ âŽ?đ?&#x;¨

đ?&#x;Ł đ?&#x;¤âŽž âŽ&#x; đ?&#x;ŁâŽ&#x; đ?&#x;¤âŽ

đ?&#x;¤

đ?&#x;§ ⎛đ?&#x;¨ Ă— =⎜ ⎜đ?&#x;Ł Ă— âŽ?đ?&#x;¨

đ?&#x;§ đ?&#x;¨ đ?&#x;§ đ?&#x;¨

+ +

đ?&#x;Ł đ?&#x;¤ đ?&#x;Ł đ?&#x;¤

Ă— Ă—

đ?&#x;Ł đ?&#x;¨ đ?&#x;Ł đ?&#x;¨

đ?&#x;§ đ?&#x;¨ đ?&#x;Ł đ?&#x;¨

Ă— Ă—

đ?&#x;Ł đ?&#x;¤ đ?&#x;Ł đ?&#x;¤

+ +

đ?&#x;Ł đ?&#x;¤ đ?&#x;Ł đ?&#x;¤

Ă— đ?&#x;Łđ?&#x;¤ ⎞ ⎛ đ?&#x;Šđ?&#x;Ť âŽ&#x;=⎜ Ă— đ?&#x;Łđ?&#x;¤ âŽ&#x; ⎜ đ?&#x;¤đ?&#x;Ť ⎠âŽ?

đ?&#x;¤ đ?&#x;ĽâŽž âŽ&#x;. đ?&#x;ŁâŽ&#x; đ?&#x;ĽâŽ

Let’s see what is going on here by looking at the first entry of the new matrix. Like before, this is the probability of starting on happy and finishing back on happy, but this time for the day after tomorrow. If we relate this back to the graph, we can see that each term is a different possible path of probabilities (try saying that five times as fast) for exactly two days; (đ?&#x;§/đ?&#x;¨) Ă— (đ?&#x;§/đ?&#x;¨) is happy tomorrow then happy the day after, and (đ?&#x;Ł/đ?&#x;¨) Ă— (đ?&#x;Ł/đ?&#x;¤) is sad tomorrow and back to happy the day after. We then just choose a starting state. Like before, let’s be happy today: we represent this as a vector ( đ?&#x;Łđ?&#x;˘ ). We then do the following calculation with our matrix we just raised to the power of 2: đ?&#x;Š

⎛đ?&#x;Ť ⎜đ?&#x;¤ ⎜ âŽ?đ?&#x;Ť

đ?&#x;¤ đ?&#x;ĽâŽž đ?&#x;Ł âŽ&#x;( ) đ?&#x;ŁâŽ&#x; đ?&#x;˘ đ?&#x;ĽâŽ

đ?&#x;Š

⎛đ?&#x;ŤâŽž = ⎜ âŽ&#x;. ⎜đ?&#x;¤âŽ&#x; âŽ?đ?&#x;ŤâŽ

In return, we will get this column vector where the first entry is the probability of being on the happy state in exactly two days, and the second entry is being on the sad state. The cool thing is that we can put this matrix to any power đ?‘›, which will give us a set of predictions for the đ?‘›th day from today. Now, we’re mathematicians, so we need to do what any good mathematician should do and ask what happens when đ?‘› tends to infinity. This is something called the long run average probability and can be used to predict the behaviour of the Markov chain for some arbitrary but significant time in the future. This can be found analytically by taking some more ideas from linear algebra including a process called matrix diagonalisation, which would call for the use of more advanced mathematics. So instead, with a little rough-around-the-edges Python code (see the website version of this article) we can get a pretty good idea. As đ?‘› gets very large, it is seen that the happy state tends to đ?&#x;˘.đ?&#x;Šđ?&#x;§, or đ?&#x;Ľ/đ?&#x;Ś, and the sad state to đ?&#x;˘.đ?&#x;¤đ?&#x;§, or đ?&#x;Ł/đ?&#x;Ś. Therefore, given a significant amount of time in the future, this Markov chain is predicting a 75% chance we’ll be happy: not bad, all things considered. We should, of course, acknowledge the limitations of this as a model. There are plenty of emotions not taken into consideration, nor whether a day holds special significance, eg a birthday. However, it’s easy to imagine how this can be expanded to accommodate for these other ideas with bigger graphs and larger matrices. The below graph shows how we might add a third emotion, for example boredom. Assign the probabilities based on whatever data we may be using, then fill out the graph accordingly. chalkdustmagazine.com

22


chalkdust đ?&#x;¤ đ?&#x;Ľ

đ?&#x;Ł đ?&#x;Ľ đ?&#x;Ł đ?&#x;¨

happy đ?&#x;Ł đ?&#x;¨

đ?&#x;Ł đ?&#x;Ľ

đ?&#x;Ł đ?&#x;¤

sad đ?&#x;Ł đ?&#x;¨

đ?&#x;Ł đ?&#x;Ľ

bored đ?&#x;Ł đ?&#x;Ľ

We must be careful, however! When adding the new probabilities, it’s vital we ensure the sum of all arrows exiting a state still sum to exactly đ?&#x;Ł. In addition, we are after all working with probabilities, and as such should be aware that a low chance does not mean impossible, and a high chance does not mean inevitable. This is just a model, and real life is rarely so organised.

What can be done with them? Markov chains are used in a wide array of industry-based mathematics. But, with the rise of the technological age, these more light-hearted, fun and fascinating applications have emerged. A very interesting such use of these can be text prediction; quite a simple idea but we can have a lot of fun with it! If we take a few short sentences, say “I love Markov chains.â€? “Markov chains love me.â€? “Markov is I.â€? and we wanted to generate new original sentences from these, how could we do it? Representing each word as a state, we can create a Markov chain. The probabilities between states are then intuitively derived from the frequency of words following each other within these sentences. Take the word ‘Markov’. In these short sentence, the word ‘Markov’ is followed by the word ‘chains’ or ‘is’. However, if we look at the frequencies of these words, we have that ‘chains’ follows ‘Markov’ đ?&#x;¤/đ?&#x;Ľ of the time, and ‘is’ for đ?&#x;Ł/đ?&#x;Ľ. Do this analysis for every word and we have all the states and probabilities we need. Hence, like before, we can draw this up; it is shown to the right. Once again, the probabilities allow for this to be played with using a fair six-sided die, with which we can generate 23

đ?&#x;Ł đ?&#x;Ľ

I đ?&#x;Ł đ?&#x;¤ đ?&#x;Ł đ?&#x;¤

đ?&#x;¤ đ?&#x;Ľ

START đ?&#x;Ł

is

đ?&#x;Ł đ?&#x;¤

love đ?&#x;Ł đ?&#x;¤

.

Markov

đ?&#x;Ł đ?&#x;Ľ

đ?&#x;Ł

đ?&#x;¤ đ?&#x;Ľ

đ?&#x;Ł đ?&#x;¤

chains

me đ?&#x;Ł đ?&#x;¤

autumn 2020


chalkdust some new sentences: “I love Markov is I love Markov chains love me.” “Markov chains love Markov chains.” “I.” Notice that not every pair of states has a pair of probabilities between them. This is because some states have a zero chance of following the current word. For example, in none of the three short sentences does ‘me’ directly follow from ‘chains’, leading to the zero chance of ‘me’ following ‘chains’ in the Markov chain. We could include these arrows on our graph, annotating them with the zero chance, however this would lead to an unnecessary clutter, especially since these extra arrows would be inconsequential for our purposes anyway. There’s an amusing example of this method in Hannah Fry and Thomas Oléron Evans’s The Indisputable Existence of Santa Claus where they use this method to generate new Queen’s speeches with interesting results. Similarly, the sentences we’ve generated aren’t really sentences despite how much hilarity ensues, but imagine if we had a much larger data set…say someone’s Twitter. Twitter’s public availability lends itself as a large library of data containing peoples’ thoughts and opinions that we can Filip Hráček use. One such person is 45th president of the Fake Donald Trump tweets written by a Markov United States, Donald Trump, who often likes to chain based on his output up to the 2016 elecexpress his opinions publicly with questionable tion, built by Filip Hráček. legitimacy, although here, this can work in our favour. Filip Hráček is a programmer from the Czech Republic who, as an experiment, created a Donald Trump tweet generator using Markov chains. The probabilities become a lot more reliable when we introduce this large data set, causing the system to generate more coherent sentences. They’re still not perfect, but as was mentioned, this data coming from Donald Trump works in our favour. By setting each word in the tweet to a state, like before, the probabilities become more fine-tuned with the vast amount of data at hand. This model also employs something called an order-2 Markov chain. What this means is that instead of the next state being solely dependent on the previous, the model takes into account two states, or in the case the words, for making the decision on the next. A Reddit user under the handle Deimorz took this one step further and created a subreddit entirely populated with posts and comments generated by bot accounts using Markov chains. We can’t interact with them, but it’s unnerving to see the conversations they have relating to some topic unknown to us, especially since the bots are seemingly fully invested. There are quite a number of diverse experiments such as these online which use Markov chains, and which you can play with. Curiously, on the more serious side of application, this is the very primitive idea behind text prediction on mobile phones. Andrey Andreyevich Markov, a Russian mathematician born in 1856, was the creator of this piece of chalkdustmagazine.com

24


chalkdust mathematics in his work in probability theory. They have since been used in applied mathematics spanning many fields. Uses of Markov chains appear in computer science, business statistics, mathematical biology, contributing to Google’s PageRank, predictive text on mobile phones, and plenty more. What’s curious is that Markov developed this process for letter analysis in his native language of Russian: given a letter, calculating what is likely to be the next one. His motivation was based in probability and statistics and idea called the law of large numbers. For further reading, I’d recommend a research paper, The five greatest applications of Markov chains by Philipp von Hilgers and Amy N Lanville, which explains some of the most revolutionary uses of Markov chains in history, including going more in depth into Andrey Andreyevich Markov’s own application. It talks about historical uses in information theory, computer performance, and was one of the most interesting reads I found when conducting research for this article. Now it’s your turn! Get out some dice and play with these examples, or even come up with your own. There is so much more to this neat piece of mathematics worth exploring, far too much to squeeze into this article. So I implore you to get reading, and start creating! Brad Ashley Brad is a recent graduate of Sheffield Hallam University and is undertaking an MSc in Mathematics at the University of Sheffield. He has a keen interest in category theory, but he adores maths communication and popular maths books, finding opportunities to do his own writing where he can. His main hobbies include craft beer and the ukulele.

a @pogonomaths My favourite application of maths

Sundials

Adam Townsend

Sundials are really cool. There’s a great one in Durham where you stand in the centre and your own shadow tells the time. It’s a little unfortunate that the sun never shines in Durham.

10/10

Six months ago, we didn’t know... ...that if đ??´ is a set of integers such that

đ?&#x;Ł = ∞, đ?‘› đ?‘›âˆˆđ??´ ∑

then đ??´ must contain infinitely many sets of three numbers {đ?‘Ž, đ?‘?, đ?‘?} so that đ?‘? − đ?‘Ž = đ?‘? − đ?‘? .

This is a weaker version of the (still unsolved) Erdős–Turån conjecture, and was proved by Thomas F Bloom and Olof Sisak.

25

autumn 2020


Puzzles

Looking for a fun puzzle but not got time to tackle the crossnumber? You’re on the right page.

33 primes Colour in 24 squares in the grid below to make a crossnumber grid that contains 33 distinct prime numbers. The completed grid has order 2 rotational symmetry. To help you, prime numbers that appear anywhere in the grid are shown on the right. 1

1

1

6

7

2

2

2

7

3

9

7

6

3

3

1

5

6

2

1

7

7

3

3

6

4

1

3

3

4

7

1

1

1

3

1

1

8

2

2

8

1

0

5

2

1

1

5

7

8

8

0

8

9

1

7

3

0

8

1

0

4

9

0

0

3

4

7

1

1

4

9

1

0

3

0

1

9

3

3

7

Arrange the digits Put the numbers 1 to 9 (using each number exactly once) in the boxes so that the sums are correct. The sums should be read left to right and top to bottom ignoring the usual order of operations. For example, đ?&#x;Ś + đ?&#x;Ľ Ă— đ?&#x;¤ is 14, not 10.

chalkdustmagazine.com

26

11 13 17 19 23 29 31 43 47 53 61 67 71 73 97 103 113 157 167

á − = 3

173 1381 31181 181 1811 42533 191 1913 47111 193 1933 61129 233 2161 91381 281 2281 173081 311 2311 217733 331 2543 301933 347 2999 397633 397 3019 667727 677 3347 761129 727 4253 3976331 733 7331 7742533 761 7727 76112999 773 8887 811 10301 887 11299 1129 21773 1181 23311

Ă— − á

Ă— Ă— = 64

+ + á

− + = 5

= đ?&#x;Šđ?&#x;Ť =đ?&#x;¤ =đ?&#x;Ł


chalkdust

Maths and non-maths Fill the missing words in the mathematical and non-mathematical phrases to reveal a hidden number in the blue boxes. theorem, (4) 1 Fermat’s Christmas. 1

2 2 3

4

dust, Charlie

3

number, Optimus .

(5)

4

root, Trafalgar

(6)

6

7 8

,

(4)

Germain, Ellis-Bexter.

(6)

8 Scalene The Auld Arrange the operators Put the operators +, −, Ă— and á (using each operator exactly three times) in the circular boxes so that the sums are correct. The sums should be read left to right and top to bottom ignoring the usual order of operations. For example, đ?&#x;Ś + đ?&#x;Ľ Ă— đ?&#x;¤ is 14, not 10. = đ?&#x;¤đ?&#x;Š =đ?&#x;˘

= 45

function, (4) -Jones.

6 Arithmetic Girls.

7

= 1

.

5 Riemann Catherine

5

= 117

(5) .

=đ?&#x;Ľ

(8)

, .

9

5

1

= đ?&#x;Łđ?&#x;Ľ

8

3

6

=đ?&#x;§

4

2

7

= đ?&#x;Łđ?&#x;Ś

= = = 18 4 1 Arrange the digits and operators Put the numbers 1 to 9 (using each number exactly once) in the square boxes, and operators +, −, Ă— and á (using each operator exactly three times) in the circular boxes so that the sums are correct.

The sums should be read left to right and top to bottom ignoring the usual order of operations. For example, đ?&#x;Ś + đ?&#x;Ľ Ă— đ?&#x;¤ is 14, not 10. 27

autumn 2020


chalkdust

On the cover

Colouring for mindfulness: Mice chasing in hyperbolic space Florian Bouyer

I

magine three mice equally distanced from each other, ie at the vertices of an equilateral triangle. If at the same time, all three mice start chasing their neighbour clockwise, then each of their paths would be a logarithmic curve. But this is rather hard to draw, especially if we want to restrict ourselves to only using a ruler. Instead, let us imagine that the mice can only run in a straight line and need to stop to reassess their direction. If at a given stage we draw their intended path, and assume that the mice cover a tenth of the distance to the next mouse before stopping and reassessing their direction, we get the picture below. While these pictures have been drawn using straight lines only, we see three logarithmic spirals emerging:

Stage 1 chalkdustmagazine.com

Stage 2

Stage 3

28

Stage 20


chalkdust But why stop there? Why not start with đ?&#x;Ś, đ?&#x;§ or đ?‘› mice on the vertices of a regular square, pentagon or đ?‘›-gon? The following instructions show a very algorithmic approach to drawing these patterns: 1. Draw a regular đ?‘›-gon, each side having length â„“ .

2. Going clockwise (or anticlockwise) along the vertices, mark the point that is at distance đ?&#x;˘.đ?&#x;Łâ„“ on the side next to the vertex. (Feel free to experiment with different values such as đ?&#x;˘.đ?&#x;¤â„“ , đ?&#x;˘.đ?&#x;Łđ?&#x;Ľâ„“ etc.) 3. Join all the points together to make a regular đ?‘›-gon with smaller side length.

4. Repeat the process with the new đ?‘›-gon.

Question

What is the side length of the new đ?‘›-gon you drew in terms of đ?‘› and â„“ ?

Ď€) Answer: â„“ đ?&#x;˘.đ?&#x;Şđ?&#x;¤ − đ?&#x;˘.đ?&#x;Łđ?&#x;Ş cos ( đ?‘›âˆ’đ?&#x;¤ đ?‘› √

Here are some of these basic shapes:

4 mice, stage 25

5 mice, stage 35

6 mice, stage 50

Tiling While in themselves, the basic shapes can be fun to colour in, more amazing pictures emerge when these basic shapes are put together through tiling. Tiling simply means putting geometric shapes— these are our tiles—down on a flat surface such that they do not overlap or leave any gaps. To keep thing simple, we will only explore edge-to-edge tilings: tilings where each edge of each tile fully touches the edge of another tile. Therefore any two tiles can either: • share an edge (which we now refer to as an edge of the tiling), • share a vertex (which we now refer to as a vertex of the tiling), or • be completely disjoint. We first explore regular tilings: tilings where all the tiles are the same regular �-gon. 29

autumn 2020


chalkdust

How many regular tilings are there? A theorem which has been known since antiquity tell us that: In ye Euclidean plane there are only three regular tilings. These are:

equilateral triangles 6 at each vertex

squares 4 at each vertex

regular hexagons 3 at each vertex

A quick sketch of the proof is: • As we are dealing with only one regular polygon, all the vertices of the tiling have the same configuration, so let us pick an arbitrary vertex. • We must have at least three tiles at that vertex, all made from the same regular �-gon.

• Given that the interior angle of a regular đ?‘›-gon is (đ?‘› −đ?&#x;¤)Ď€/đ?‘›, if đ?‘› ⊞ đ?&#x;Š we have that the interior angle of đ?&#x;Ľ đ?‘›-gons is ⊞ đ?&#x;Ľ Ă— đ?&#x;§Ď€/đ?&#x;Š > đ?&#x;¤Ď€, ie the tiles overlap.

• Therefore, we just need to check for which đ?‘› ∈ {đ?&#x;Ľ, đ?&#x;Ś, đ?&#x;§, đ?&#x;¨} we have an integer đ?‘˜ such that đ?‘˜(đ?‘› − đ?&#x;¤)Ď€/đ?‘› = đ?&#x;¤Ď€, ie (đ?‘› − đ?&#x;¤)đ?‘˜ = đ?&#x;¤đ?‘›. This leads us to the pairs (đ?‘›, đ?‘˜) ∈ {(đ?&#x;Ľ, đ?&#x;¨), (đ?&#x;Ś, đ?&#x;Ś), (đ?&#x;¨, đ?&#x;Ľ)}.

Combining a regular tiling with the appropriate đ?‘›-mice problem produces more interesting drawings to colour in, such as the triangular and hexagonal tilings included on the inside rear cover.

Tilings of different regular đ?‘›-gons

Of course, we can drop the restrictions that all the tiles are the same and look at tilings where the tiles are regular, but different, đ?‘›-gons. To study these, we look at what could be happening at a given vertex of the tiling. As we know that the interior angle of a regular đ?‘›-gon is đ?&#x;¤ đ?‘›âˆ’đ?&#x;¤ Ď€ = (đ?&#x;Ł − ) Ď€, đ?‘› đ?‘›

if we have đ?‘ž regular polygons with đ?‘?đ?&#x;Ł , đ?‘?đ?&#x;¤ , ‌ , đ?‘?đ?‘ž sides then we need that their total interior angle adds up to đ?&#x;¤Ď€, ie đ?&#x;Ł đ?&#x;Ł [đ?‘ž − đ?&#x;¤ ( + â‹Ż + )] Ď€ = đ?&#x;¤Ď€. đ?‘?đ?&#x;Ł đ?‘?đ?‘ž

chalkdustmagazine.com

30


chalkdust So a vertex of a tiling is only possible if there exists đ?‘ž numbers đ?‘?đ?&#x;Ł , ‌ , đ?‘?đ?‘ž such that đ?‘žâˆ’đ?&#x;¤ đ?&#x;Ł đ?&#x;Ł . +â‹Ż+ = đ?‘?đ?&#x;Ł đ?‘?đ?‘ž đ?&#x;¤

It turns out that this condition is restrictive enough to give only 17 different possibilities, of which đ?&#x;Ś give two different configurations. For example, (đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ś, đ?&#x;Ś) and (đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ś, đ?&#x;Ľ, đ?&#x;Ś) both work (you can check!) but the former represents (going round the vertex) 3 triangles followed by 2 squares, while the latter represents 2 triangles followed by a square, a third triangle and a second square. Once we know the 21 different vertex configurations, we can go through and combine them to see if they can be extended to a full plane tiling! For example, taking the vertex configuration (đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ) (six triangles around a vertex, which we already have seen) and (đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;¨, đ?&#x;¨) (two triangles followed by two hexagons) we can create the tiling here on the left:

(đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;¨, đ?&#x;¨) and (đ?&#x;Ľ, đ?&#x;¨, đ?&#x;Ľ, đ?&#x;¨)

(đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;Ľ) and (đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;¨, đ?&#x;¨)

We could also take the vertex configuration (đ?&#x;Ľ, đ?&#x;Ľ, đ?&#x;¨, đ?&#x;¨) and (đ?&#x;Ľ, đ?&#x;¨, đ?&#x;Ľ, đ?&#x;¨) (triangle, hexagon, triangle, hexagon) to get the tiling on the right. Both of these tilings have two different configurations for their vertices and so are examples of a 2-uniform tiling. In general, a đ?‘˜ -uniform tiling is a tiling composed of regular đ?‘›-gons with exactly đ?‘˜ different vertex configurations. Filling in the tiling on the left with the đ?&#x;Ľ-mice and đ?&#x;¨-mice problem, we can get the picture on the rear cover of the magazine. Note, however, that not all vertex configurations can appear in a tiling. For example, (đ?&#x;§, đ?&#x;§, đ?&#x;Łđ?&#x;˘) is a possible configuration, but it is the only configuration that includes both a pentagon and decagon, and also the only configuration that includes at least two pentagons. So if we wanted to extend this to a full tiling, we can only use vertex configuration (đ?&#x;§, đ?&#x;§, đ?&#x;Łđ?&#x;˘), but then we can see (with some thought) that at one point we need a tile to be both a pentagon and a decagon at the same time.

The hyperbolic plane While we could go on exploring tilings in the Euclidean plane (and you are very much encouraged to do so), it is not the only world we can explore. Let’s look at the hyperbolic plane; in particular, the PoincarÊ disk model. The hyperbolic plane was discovered when mathematicians were trying to show that Euclid’s fifth axiom, 31

autumn 2020


chalkdust Given a line â„“ and a point đ?‘ƒ , there exists a unique line parallel to â„“ going through đ?‘ƒ. depended on the previous four axioms. This turns out not to be possible, because we can construct a geometric world where the first four axioms of Euclid are true, but the fifth one is replaced by Given a line â„“ and a point đ?‘ƒ , there exists at least two lines parallel to â„“ going through đ?‘ƒ. Concretely, we define the PoincarĂŠ disk as follows: • The whole model takes place inside a unit circle đ??ś drawn on the Euclidean plane. • Points in the PoincarĂŠ disk are Euclidean points inside đ??ś.

• Straight lines in the PoincarĂŠ disk are (Euclidean) arcs of circles perpendicular to đ??ś (ie circles intersecting đ??ś at angles of Ď€/đ?&#x;¤), plus any (Euclidean) lines going through the centre of đ??ś (which can be taken as the arc of a circle with infinite radius). Parallel lines on the PoincarĂŠ The advantage of the PoincarĂŠ disk model is that the whole disk space is contained in a finite Euclidean space, so we can visualise all of it. This said, as the boundary of đ??ś represents distance at infinity in the PoincarĂŠ disk model, the same shape (ie with fixed hyperbolic side length) will appear smaller (in the Euclidean sense) the closer to the boundary of đ??ś it is.

Since we have defined the notion of points and lines in hyperbolic geometry, we can draw đ?‘›-gons and define the notion of tilings in the same way we do in Euclidean geometry. If we look at tiling in the hyperbolic plane, then we get a different picture than in the Euclidean setting. How many regular tilings are there in the hyperbolic plane? In the hyperbolic plane, the angles of a triangle always add up to strictly less than Ď€ (this is a consequence of the different fifth axiom). Once we know this, we see that the interior angle of a regular đ?‘›-gon can be any value strictly less than (đ?‘› − đ?&#x;¤)Ď€/đ?‘›. It takes a fair bit of work to show that given an angle đ?&#x;˘ < đ?›ź < (đ?‘› − đ?&#x;¤)Ď€/đ?‘›, we can draw a hyperbolic đ?‘›-gon with interior angles đ?›ź . But given this fact, if we fix đ?‘› then we can fit đ?‘˜ đ?‘›-gons round a vertex as long as

Hence for any đ?‘›-gon,

chalkdustmagazine.com

đ?&#x;¤đ?‘› đ?&#x;¤ đ?‘›âˆ’đ?&#x;¤ < â&#x;š đ?‘˜> . đ?‘˜ đ?‘› đ?‘›âˆ’đ?&#x;¤

32


chalkdust There are infinitely many regular tilings in the hyperbolic plane. As well as tilings, we can see that the �-mice problem also translates into the hyperbolic plane, therefore by once again combining the two we can create some nice drawings to be coloured in. In this magazine, we have included: • Front cover: A tiling of 8 triangles meeting at a vertex, the view being centred on a tile; • Inside rear cover: A tiling of 8 triangles meeting at a vertex, the view being centred on a vertex of the tiling; and a tiling of 6 squares meeting at a vertex, the view being centred on a vertex of the tiling. These have been left white so you can colour them in yourself. More can be found on my website (link below).

Draw these pictures yourself Hopefully, the above has intrigued you into exploring and making your own kind of drawings. If you want, they can all be done with a pencil, ruler (to draw and measure distances) and compass— even the lines in the PoincarÊ disk model (Compass and Straightedge in the PoincarÊ Disk by Chaim Goodman-Strauss tells you how). But this is a very slow process so the drawings included here were done by computer. Originally, I produced the drawings using the free program Cinderella.2. This is a geometry program and can draw regular �-gons, both on the Euclidean plane and the hyperbolic plane. It also has the ability to understand and apply various transformations to shapes drawn. In practice, this can be a bit fiddly, and so these drawings can (and have) been produced by using the TikZ package in LATEX. This has more of an algorithmic flavour and you cannot see what you are producing until you compile your code, but can be less computer intensive and the code can easily be copied. The procedure is slightly different and for the moment only works in Euclidean geometry. You can find a guide to drawing tilings with the �-mice problem using both Cinderella.2 and TikZ on the Chalkdust website: have fun!

More reading See Branko Grunbaum and Geoffrey C. Shephard, 1977, Tilings by Regular Polygons, Mathematics Magazine, 5, 227–247. Florian Bouyer Florian Bouyer is a lecturer in mathematics at the University of Bristol. While specialising in arithmetic geometry, he gets distracted with programming to try and create mathematical ‘art/visualisation’.

d sites.google.com/site/fjscbouyer/ 33

autumn 2020


#MarkovMadeMeTweet Use this handy Markov chain tweet generator to carefully craft your next tweet. Use a standard die on each turn to decide which path to follow to the next word. To find out more about the maths of Markov chains, turn to pages 20–25.

Tweet us a @chalkdustmag using the hashtag #MarkovMadeMeTweet when you are finished. 34


So I had this circle, but I wanted a square, Don’t ask why; that’s my affair.

Sam Hartburn

Ruler and compass are the tools to use, It’s been proven impossible, but that’s no excuse.

The crucial aspect of this little game Is that the areas should stay the same.

Many have tried it, but hey, I’m me, I’m bound to find something that they couldn’t see.

35

So, here we go. Oh. That’s a rectangle.


Now make an arc to form đ?‘Ś plus đ?‘Ľ , From the midpoint make a semicircle next.

Never mind, I’ll give it a try, Call the long edge � and the short edge � .

Draw a square on that side, and I don’t want hysteria, But the square and the rectangle have the same area.

Extending đ?‘Ś to this arc gives the length I desire, I can prove it with algebra if you require.

But what about the circle?

36

So, here we go. Oh. That’s a triangle.


Never mind, I’ll give it a try, I can find the midpoint of any side.

And draw a right angle up from there, It’s a crucial ingredient for a square.

It’s a rectangle, same height, half the base, And that means it takes up the same space.

A parallel line through the third point now, Fill in the top and the side somehow.

But what about the circle?

And I can already square a rectangle!

37

So, here we go. Oh. That’s a pentagon.


That’s okay, I’ll give it a try, If I join the corners between pairs of sides,

I can make it into triangles, one, two, three, And squares from triangles are now easy.

Put two sides together, joined at right angles, Then by some famous theorem involving triangles.

The square on the long side sums the other two, Repeat the process, and then we’re through.

But what about the circle?

38

So, here we go. Oh. That’s a hexagon.


But come on, for six sides I know what to do, And the same will work for seven too.

This is so easy, look, it’s great, I can even do the same for eight.

And nine, and ten, and—holy cow! That looks a bit like a circle now.

In fact, I’ve got it, it’s obvious, innit? To square the circle, you take the limit!

The practical details of the construction Are left as an exercise for your deduction.

39

Sam Hartburn Sam is a freelance proofreader and copy-editor and a hobbyist maths geek. She likes to make maths rhyme. d qbfproofreading.co.uk c sam.hartburn@qbfproofreading.co.uk a @SamHartburn d samhartburn.co.uk


chalkdust

Will this article ever end? Emilio McAllister Fognini

T

he obvious answer is yes: there are only so many atoms in the universe to make paper and ink out of, so of course it will have to end at some point. But questions of this ilk, like so many apparently simple questions, can spark an interesting discussion. The more interesting question is this:

Question Do all yes/no questions have an answer, and if so, is there an algorithm that can compute it just from the statement itself? The first half of the question is clearly false, think about paradoxes like ‘Is the sentence “This sentence is false” true?’. For further discussion, please go talk to your favourite philosopher (mine is Nick Bostrom). The second half is something we will be looking into in more detail; more precisely, how such a question led to the creation of modern computer science. To rephrase the previous question with a bit more formality and clarity:

Question Given a yes/no statement in formal logic, does there exist an algorithm that can compute the yes/no answer?

chalkdustmagazine.com

40


chalkdust Formal logic is the logic used by mathematicians and logisticians (see pp 50–55). Further discussion is well outside the scope of this article, but it is just there to make sure that the question the algorithm would try to solve doesn’t produce paradoxes like the one above. This question, or one very similar but in German and itself written in the language of formal logic, was posed by one of the most famous mathematicians of the 20th century—David Hilbert. It is called the decision problem, or Entscheidungsproblem in German. We can clearly see that this is an important question. Almost any question in mathematics can be posed in terms of formal logic and mathematics can be used almost anywhere. So being able to show that there will always be an algorithm to compute the answer to any question would be of incredible use. It would mean that there would always be a clear method to solve any problem that can be reduced to mathematics. Before we can dig our teeth into this problem though, we must first properly define what we mean by an algorithm. Since we live in a world built by, and upon, algorithms, we intuitively know that it is something that takes in some information, does something to it, and then gives us some sort of ‘useful’ answer. This is a very nebulous definition, clearly, as I used the term ‘does something’. That and the idea of utility is a heavily contextual notion (if I’m stuck and dehydrated in a desert, a proof to the Riemann hypothesis isn’t going to be very useful to me). A slightly more formal definition of an algorithm in plain English would be the definition from Marshall H Stone and Donald Knuth:

…a set of rules that precisely defines a sequence of operations such that each rule is effective and definite and such that the sequence terminates in a finite time. Or in layman’s terms, a finite sequence of well-defined operations. But as any mathematician knows, writing something in plain English is usually much easier than doing so in mathematics. This is where Alan Turing comes into the picture. Turing was one of the greatest mathematicians of the 20th century—if not of all time—and was a key figure in the foundation of theoretical computer science and artificial intelligence; he is often called the father of both fields. Turing did a whole host of wonderful and amazing work in his short career. Unfortunately, despite the revolutionary work that he did both academically and in breaking Nazi codes during the second world war, his work was not truly recognised until long after his passing. This was, of course, partly to do with the secretive work of codebreaking, but also because he was gay at a time when homosexual acts were illegal. In 1952, he was convicted of ‘gross indecency’ and given the option between a prison sentence or chemical conversion therapy; the chemical injections he chose led to depression, and later, his premature death by suicide. Turing died at the age of only 41, and we can only wonder what astonishing work he would have done if the prejudices of the time hadn’t caused his premature death. Turing’s first groundbreaking work was solving Hilbert’s problem and defining what was meant by an algorithm in formal mathematics using his elegant concept of the Turing machine. A definition and answer had been given a few months earlier by another mathematician called Alonzo Church— a pioneer in his own right and someone who Turing would later study under for his PhD. However, not only was Turing’s solution a greater conceptual leap than Church’s proof, but it was also a more intuitive and pragmatic idea than the heavy formal logic of Church’s approach, called lambda calculus. But enough beating around the bush, let us talk about the Turing machine. 41

autumn 2020


chalkdust

The Turing machine and the Church–Turing thesis Turing’s idea of how to formalise an algorithm in a mathematical framework was to design a machine that would be similar to the concepts proposed by Ada Lovelace and Charles Babbage, two more pioneering mathematicians and founders of the field of computer science. This was a mathematical construction composed of an infinite tape, a box (normally called a head) that could read what’s written on the tape and write new things onto the tape, a motor to move the head left or right, a set of numbers/symbols to read, and a processor full of instructions. The idea is that the input for the algorithm is written on the tape, the Turing machine then reads this and performs a sequence of simple actions dictated by the processor, perhaps using the tape to temporarily store information, and then writes the output of the algorithm on the tape. We’ll look at an explicit example of a Turing machine working in a minute, but first all the components of a Turing machine fit and work together like so: • The processor can have (finitely) many different configurations of its internal settings: we shall call these states. • The Turing machine itself doesn’t have any memory. But we can encode what it previously read by switching into one of many different states. • The Turing machine is fully deterministic and well-defined. Given the current state and the symbol the head is reading, we know exactly what the machine will do. • In a given state, the Turing machine can do any combination of the following: read the tape, write to the tape, move the head left or right, and (depending on what was read from the tape) change the state that the processor is in. • There has to be at least one state in the processor that will stop the Turing machine and signal the end of the computation: this is usually called a halt state for the Turing machine. This is typically done when the head has printed the output of the algorithm.

A schematic representation of a Turing machine.

Turing’s great insight was not only the simplicity of his construction but the notion that perhaps any form of computation could be represented as a Turing machine. This was later expanded upon during his study under Church for his PhD, leading to a groundbreaking theory which is now chalkdustmagazine.com

42


chalkdust the cornerstone of computer science and a branch of logic and mathematics called computability theory. The Church–Turing thesis states that any computable function (a function computable by a machine or any formal algorithm that solves a problem) can be translated into an equivalent computation model involving a Turing machine. There is still some ambiguity about what exactly a computable function is and if every possible computation is represented as a computable function. But as these questions are still being discussed by academics all over the world, we will sidestep this thorny issue. The Church–Turing thesis quickly leads to the conclusion that since our brain can compute mathematics and all algorithms that have been developed thus far can be computed by our brains, every algorithm ever computed is equivalent to a Turing machine! Because of this fact, the modern definition of an algorithm is based around Turing machines. Now that we have a mathematical definition of a general algorithm, can we answer Hilbert’s question? Yes, we can, but first let’s get a little more comfortable with Turing machines.

Example Turing machine: how to build a dam in three easy steps Like most things in mathematics, the best way to get some familiarity with an idea is to see a worked through example. The toy machine I will use to illustrate Turing machines is one from a rather famous family of Turing machines created by Tibor Radó called busy beavers (Radó also discovered a general solution to Plateau’s problem, see page 60). They are very simple machines that are fed an infinite tape full of 0s and their aim in life is to write as many 1s as possible on the tape; but it can’t just print 1s forever, it has to stop eventually. The example we will look at is the 3-state busy beaver.

The processor for a 3-state busy beaver, which terminates as soon as the head reads a 1 while the processor is in state A.

Starting in state A, the Turing machine reads a 0, so it erases this and writes a 1 in its place. Then it moves the head so that it is positioned over the next symbol, and the processor transitions into state B. The next symbol the head reads is again 0, but this time because it’s in a different state the Turing machine leaves this 0 as it is, moves the head again, and transitions into state C. The machine just keeps repeating this process until it enters its halt state. Although we don’t see it here, where the Turing machine derives its main source of power is its ability to switch state depending on the information on the tape and encoded information from 43

autumn 2020


chalkdust

This 3-state busy beaver halts after 14 steps and writes six 1s on the tape. You can’t do more without more states. The coloured squares show the head position and the state of the processor.

its previous state. If you are familiar with a bit of programming, this is very similar to jumping to a memory location in assembly language or conditional statements and loops that are found in higher-level languages like Python. If you want to write one out for yourself in full—I recommend you don’t. Even a simplified binary number checker takes more than a page of explanation of explicit states and even longer if you wanted to show it all working—I know from painful experience. But if you’re feeling very proactive, try to play out the beaver from above: you could use it on a row of coins to represent the tape with tails = đ?&#x;˘ and heads = đ?&#x;Ł. Extra credit for making a 4-state beaver.

The Turing machine and the decision problem or: how I learned to stop worrying and love the halting problem Now, finally, back to Hilbert’s Entscheidungsproblem. How did Turing solve it? Turing’s own paper and full technical proof isn’t too hard to read or understand. I will, however, provide a truncated version of the proof and try to provide an alternate method while keeping the core intuition. In the paper, Turing proposes a method to encode a Turing machine, the states, and inputted symbols, into what he coins a description number. Similar to what we do to with text and Unicode— uniquely representing some text with a binary number. This description number describes the machine, and therefore the computation that it represents, completely! He then asks the obvious next question.

Question Can one compute the description number of a Turing machine from a yes/no statement in formal logic? If we could, then we would show that any yes/no statement has at least one corresponding Turing machine (which Turing showed was equivalent to a computable algorithm) and so the answer to Hilbert’s question would be yes! Unfortunately, this is not the case; so, the answer to Hilbert’s question is a resounding no. chalkdustmagazine.com

44


chalkdust Turing was able to show this by using an idea from another Titan in the world of mathematics and logic, Kurt Gödel. Gödel is famous for a lot of important results from the fields of logic, mathematics, and philosophy, and is an interesting person in his own right. However, the key Turing used—and therefore the thing we will be looking at—is Gödel’s incompleteness theorem. This is a wonderfully mind-bending theorem that deserves its own article, and I highly recommend you go read into it (try Gödel’s Proof by E Nagel and JR Newman), but the important piece of logic that Turing adapted was the idea of using something being self-referential to reach a contradiction. We can see this in the paradox I mentioned at the start: ‘Is the sentence “This sentence is false” true?’. Gödel’s idea was very similar, but to formalise it in the realm of formal logic was his great achievement. To use this insight, Turing proposed a Turing machine, and therefore a computable algorithm, that I’m sure anyone who has ever written code wishes they had in their back pocket: a Turing machine to see if another Turing machine, with a given input, will halt. Or in other words, a computable algorithm which can tell you whether an algorithm, together with an input, would eventually stop and give you an answer, or whether it would just keep cranking through calculations forever. As an aside, an algorithm that could do this would not only be a boon for any budding programmer wishing to debug their code—but also an incredibly useful tool in pure mathematics. You could solve Goldbach’s conjecture by applying this mystical Turing machine to a simple program to search for the first counterexample! (What would the program look like?) Unfortunately, like most things that are too good to be true, this doesn’t exist. Let’s see why! Let’s suppose we have this amazing halt-deducing Turing machine and call it H (for Halt). If Hilbert’s decision problem has a positive answer, this machine will exist—as asking if a Turing machine halts can be written in formal logic—so let’s not get bogged down in the details of how it would hypothetically work. But, on a high level, if we give H a description of a Turing maThe halt-deducing machine H. chine and its input, H will either halt and print ‘halts’ onto the tape if the inputted Turing machine halts: or it will halt and print ‘loop’ onto the tape if the inputted Turing machine loops forever. In particular, note that H itself will always halt. We can then modify this machine a little bit. To H we attach an inverter which will flip its output: if H outputs ‘halts’, the inverter will go into a loop and not halt; if H outputs ‘loop’, the inverter will halt and output a picture of a scorpion. As mentioned before, H needs two inputs: the Turing machine itself and its input. We wish to check if H terminates when we apply it to itself, so we need to put H into both of its input slots. To do this, we can attach a device to copy the input into it, which we can call a cloner. We can call this new Turing machine H∗ , as shown on the next page. Now that we have H∗ , and the idea from Gödel of self-application, all we need to do is input H∗ into itself. When we input H∗ we have two possibilities. If H∗ does halt, then the inverter means that H∗ doesn’t halt. But if H∗ doesn’t halt, then H∗ does halt. We have reached a contradiction! 45

autumn 2020


chalkdust

The modified Turing machine, H∗ .

But the only thing we assumed is that H, and therefore H∗ , exists. But as the existence of H leads to a contradiction, we must conclude that a Turing machine like H cannot exist. However, as a Turing machine is a mathematical object and asking if it will halt can be phrased in terms of formal logic, a yes to Hilbert’s question would mean that H does exist! Therefore Hilbert’s question has negative answer: not all yes/no questions can be answered by an algorithm. This argument is the same as the one Turing presented in his original paper, albeit simplified: there he shows that the description number of H and H∗ can’t be calculated as the computation would go on forever. This is what we call an uncomputable number as no finite algorithm could ever compute it. Typically, the numbers we are use every day (Ď€, e, đ?&#x;§, đ?&#x;Ľ/đ?&#x;Ś, etc) only require a finite amount of information to represent them. This can be the number itself if it is an integer, or a quotient of integers, but some numbers with infinite non-repeating decimal expansions can also be represented with a finite amount of information, like Ď€ and e. This is because Ď€ and e both have finite generating formulae that can produce every digit. In other words, if you give me a position in Ď€ or e, like the 1737th position, the formula can find the 1737th digit of the number after a finite number of steps. This isn’t always the case: if I have an infinitely long number whose digits are random, you wouldn’t expect to be able to compute its decimal expansion using a finite algorithm. These numbers are uncomputable as they cannot be computed or represented in any finite sense.

The legacy of Turing and his machines The legacy of the Turing machine and the ideas Turing put forward during his lifetime are hard to quantify. It is always hard to know what the world would be like without certain people and their ideas in it. Just limiting Turing’s body of work down to his idea of the Turing machine, we can imagine that the world would perhaps be almost unrecognisable. The concept of computers and their programs that were pioneered by Ada Lovelace and Charles Babbage had been around for about 93 years before Turing’s own paper on the matter. Despite Church developing his lambda calculus to solve Hilbert’s problem, it is quite difficult to imagine whether the modern computer chalkdustmagazine.com

46


chalkdust would be around today, and if so, what it would look like. Perhaps the best view on the importance of Turing’s work comes from a sentiment put forward by John von Neumann, another intellectual juggernaut of the 20th century, to Stan Frankel. Frankel, writing in a letter to Brian Randell, says,

‌[Von Neumann] firmly emphasised to me, and to others I am sure, that the fundamental conception is owing to Turing—insofar as not anticipated by Babbage, Lovelace and others. This was in reference to Von Neumann architecture, the modern framework of the stored program computer, which almost every computing device in the world, past 1945, can draw its direct heritage from. That, and the wider body of work credited to Turing, is why we call him the father of theoretical computer science. There is much more to talk about relating to Turing and his work, but as I said at the beginning, this article must end. Emilio McAllister Fognini Emilio is a master’s student at UCL and is a first order approximation of an analysis student. He may be a finite state Turing machine, but he hasn’t halted or gone into a loop yet; we’ll just have to wait and see‌

c emilio.mcfog@gmail.com My least favourite application of maths

Splitting the bill Sophie Maclean

Picture this. You have had a lovely meal out with friends. Maybe had a drink or two. Some of you had desserts. Now it is time to pay and the waiter arrives with the bill. As a mathematician, everyone looks to you. But it is fine—there are 6 people, so you just divide by 6, right? Wrong! Because David didn’t drink (he’s deriving home) so its not fair for him to pay the same. OK, so everyone pays for what they ordered. A bit more arithmetic, but doable. Wrong again! Ellen stole at least half of Matt’s scorpion sauce, and Niki and Adam shared a bottle of wine but Niki had more. By the time you have settled on a way of splitting that everyone is happy with, you have invoked telescoping series, some rather complicated fluid dynamics, a few Markov processes, and rather confusingly quantum teleportation. Sigh. Anyone up for drinks to reward ourselves for that hard work?

ÂŁ75.63/6

Did you know... ...that the six permutations of (đ?&#x;Ł, đ?&#x;¤, đ?&#x;Ľ) form a regular hexagon in 3D? 47

autumn 2020


chalkdust

Moonlighting agony uncle Professor Dirichlet answers your personal problems. Want the prof’s help? Contact c deardirichlet@chalkdustmagazine.com

Dear Dirichlet, I have recently entered retirem ent, having handed over my day job—writing bafflingly popular hyper-violent thr illers which end with the villain getting crushed by an oak bookcase—to my you nger brother. But I now find my self with time (as well as coffee and cigarette sta ins) on my hands. I’m thinking of dip ping into movie making. Any good plot ideas?

— Leigh Children, now Wyoming app

arently?!

■ dirichlet says: I had a dream last night about a sixth Terminator sequel, but this time with replicating Terminators. Like babushka dolls, each Terminator spawns l, 2, or 3 new Terminators, causing red­eyed havoc. Linda Hamilton returns to find a way to halt the exponential clone takeover... I call it ‘R0 Schwarzenegger Is Greater Than One’. It’s a winner, Leigh. That’s for damn sure.

Dear Dirichlet,

ringly successful family business, writing bewilde I have recently taken over the a large the bad guy getting squashed by h wit ate min cul ich wh els nov super-brutal er seemed to pite the fact that my brother nev Des re. nitu fur ood dw har of piece I’m really strugstarting, without any new ideas bother planning his stories before ily down—any outlines? gling. I don’t want to let the fam Wyoming

— Andrugh C .,

dirichlet says: A chemical substance is let out onto the streets

of small­town America, but this stuff is dangerous. Formed of two elements, it replicates itself! Left alone, it grows in size. The only law it obeys is the iron law of geometric progression. It attracts a lot of attention... I call it ‘Compound Interest’. You can’t lose, Andrugh. chalkdustmagazine.com

48


chalkdust

Dear Dirichlet, Last week, a farmer friend invited me round to her barn to catch up: a few drinks, mostly outside, meet her horses etc. After I arrived, I realised she had invited loads of other people. All in the bar n, nowhere near enough social dis tancing, rule of six evaporated. I’m feeling fine but I’m worried I might have bee n exposed—any advice to help me calm down?

— Neigh-sayer, Hartlepool

dirichlet says: I’m afraid it all depends on the eigenvalues of the

barn. Positive eigenvalues lead to exponential growth. If you’re not sure, were there any computers or security cameras installed, maybe to watch over the horses? That’s a classic sign of ‘in­stable­IT’. If not, you might be OK: negative eigenvalues tell you that the barn was asympto(ma)tically stable.

Dear Dirichlet,

to learn some ht use the time in the evenings mig I t ugh tho I in, w dra hts nig As the ’s newly public dog along to some of Tom Lehrer new piano music. I fancy singin r. I could do with a little high for my singing registe main party pieces, but they’re all rite. Any that’s going to take forever to rew but es, not few a n dow all m bringing the — Agnes, The Pub/Club/L oo tips to speed it up? ■

dirichlet says: Here, I’ve transposed it for you.

Dear Dirichlet, We’re sneaking a few weeks’ holiday next month, and we recko n we’ll be driving past your cottage in Belgium. If you see us, give us a wave!

— Prue & Paul, Essex

dirichlet says: I’ll give you one in both directions: u(x,t) = F(x ­ ct) + G(x + ct).

More Dear Dirichlet, including seasonal specials, online at d chalkdustmagazine.com 49

autumn 2020


chalkdust

How can we be sure that 2 ≠1? Maynard

W

hat if I told you that đ?&#x;¤ = đ?&#x;Ł? You may say I’m wrong. OK, well, what if I proved it to you? We can both agree that there’s an đ?‘Ľ and a đ?‘Ś where đ?‘Ľ = đ?‘Ś . From there, multiply, subtract, factorise, divide, substitute, divide again, and you get đ?&#x;¤ = đ?&#x;Ł.

Still not happy? You’re probably unconvinced by my so-called ‘proof’. OK, I say, and, after a minute, hand you a sheet of paper with the following hastily scrawled on it: đ?‘Ľ=đ?‘Ś

đ?‘Ľ đ?&#x;¤ = đ?‘Ľđ?‘Ś

đ?‘Ľ đ?&#x;¤ − đ?‘Ś đ?&#x;¤ = đ?‘Ľđ?‘Ś − đ?‘Ś đ?&#x;¤

(đ?‘Ľ − đ?‘Ś)(đ?‘Ľ + đ?‘Ś) = đ?‘Ś(đ?‘Ľ − đ?‘Ś) đ?‘Ľ +đ?‘Ś =đ?‘Ś

đ?&#x;¤đ?‘Ś = đ?‘Ś

đ?&#x;¤ = đ?&#x;Ł.

It’s better, but you’re still displeased. This time, I’ve made clear what steps I’m taking from đ?‘Ľ = đ?‘Ś to đ?&#x;¤ = đ?&#x;Ł. However, you point out, I don’t connect any of these steps. Nodding slowly, I take my chalkdustmagazine.com

50


chalkdust time and write out a very nice, orderly proof, complete with justifications for each line: đ?&#x;Ł

đ?‘Ľ=đ?‘Ś

đ?&#x;Ľ

đ?‘Ľ đ?&#x;¤ − đ?‘Ś đ?&#x;¤ = đ?‘Ľđ?‘Ś − đ?‘Ś đ?&#x;¤

đ?&#x;¤

đ?&#x;Ś đ?&#x;§ đ?&#x;¨ đ?&#x;Š

đ?‘Ľ đ?&#x;¤ = đ?‘Ľđ?‘Ś

multiply both sides by đ?‘Ľ

(đ?‘Ľ − đ?‘Ś)(đ?‘Ľ + đ?‘Ś) = đ?‘Ś(đ?‘Ľ − đ?‘Ś)

factorise

subtract đ?‘Ś đ?&#x;¤ from both sides

đ?‘Ľ +đ?‘Ś =đ?‘Ś

divide both sides by (đ?‘Ľ − đ?‘Ś)

đ?&#x;¤=đ?&#x;Ł

divide both sides by đ?‘Ś .

đ?&#x;¤đ?‘Ś = đ?‘Ś

replace đ?‘Ľ with đ?‘Ś since đ?‘Ľ = đ?‘Ś

At this point, you spot my mistake: in going from line 4 to 5, I have divided both sides by đ?‘Ľ − đ?‘Ś . But we began with the assumption that đ?‘Ľ = đ?‘Ś , meaning that đ?‘Ľ − đ?‘Ś = đ?&#x;˘, and dividing by 0 is not defined! This means that lines 5 to 7 are operating on nonexistent values and are therefore meaningless. You’re happy with yourself, but something is bothering you. To reveal my mistake, you asked me to be more precise. But why stop here? Because you found what you were looking for? That’s not how truth is found. My proof, like all proofs, is a path from one statement to another, just as we may follow the path from đ?‘Žđ?‘Ľ đ?&#x;¤ + đ?‘?đ?‘Ľ + đ?‘? = đ?&#x;˘ to đ?‘Ľ = ( − đ?‘? Âą √đ?‘? đ?&#x;¤ − đ?&#x;Śđ?‘Žđ?‘?)/đ?&#x;¤đ?‘Ž, or from the existence of rectangles to the transitivity of parallelism (see right). Along this path I have made several intermediate statements, and linked them together with justifications. You found that one of my links is flawed, and you wonder how we know that the others aren’t also wrong. You begin to question foundational principles, wondering, for instance, why we’re even allowed to do the same thing to both sides of an equation.

For the unfamiliar: Euclidean geometry (standard geometry on a flat surface) rests on 5 assumptions, one of which (the parallel postulate) has historically been regarded as ugly. In attempting to eliminate the parallel postulate, mathematicians have found numerous other statements that are equivalent to it, such as that a rectangle exists or that parallelism is transitive.

You keep digging deeper and deeper, questioning more and more of what you previously took to be correct. Eventually, you come across a piece of mathematics that is perhaps the most beautiful and elegant thing you’ve ever laid your eyes upon: natural deduction.

Natural deduction Natural deduction is one result of asking for deeper and deeper justification when doing maths. A system of natural deduction is a set of very simple, almost irrefutable rules that act to formalise our intuition about what is definitely true. 51

autumn 2020


chalkdust These rules include such things as reiteration, which simply allows us to repeat ourselves. Precisely, reiteration says that if you know that a statement đ?‘ƒ is true, then you can conclude that đ?‘ƒ is true. This is hardly controversial.

đ?&#x;Ł

đ?&#x;¤

đ?‘ƒ đ?‘ƒ

R, đ?&#x;Ł

There are two rules for the natural idea of ‘and’. First is the soReiteration (R): if đ?‘ƒ , then đ?‘ƒ . called conjunction introduction rule, stating that if you know that đ?‘ƒ and đ?‘„ are both true, then you may conclude đ?‘ƒ ∧ đ?‘„ , pronounced ‘đ?‘ƒ and đ?‘„ ’. On the other side, we have conjunction elimination, stating that if you know that đ?‘ƒ ∧ đ?‘„ is true, then you may conclude đ?‘ƒ and also may conclude đ?‘„ . đ?&#x;Ł

đ?‘ƒ

đ?&#x;Ľ

đ?‘ƒ ∧đ?‘„

đ?&#x;¤

đ?‘„

đ?&#x;Ł

đ?‘ƒ ∧đ?‘„

đ?&#x;Ľ

đ?‘„

đ?&#x;¤

∧I, đ?&#x;Ł, đ?&#x;¤

Conjunction introduction (∧I): if đ?‘ƒ and đ?‘„ , then đ?‘ƒ ∧ đ?‘„ .

đ?‘ƒ

∧E, đ?&#x;Ł ∧E, đ?&#x;Ł

Conjunction elimination (∧E): if đ?‘ƒ ∧ đ?‘„ , then đ?‘ƒ and đ?‘„ .

These rules don’t feel like they do much besides swapping out ‘and’ for ‘∧’; however, doing so is important for formality and precision. Things start to get tricky with the rules codifying ‘or’. The first, disjunction introduction, tells us that if đ?‘ƒ is true, then you may conclude đ?‘ƒ ∨ đ?‘„ , pronounced ‘đ?‘ƒ or đ?‘„ ’: if I am hungry, then it’s also true that I’m either hungry or tired. đ?&#x;Ł

đ?&#x;¤

đ?‘ƒ

đ?‘ƒ ∨đ?‘„

∨I, đ?&#x;Ł

đ?&#x;Ł

đ?‘ƒ ∨đ?‘„

đ?&#x;Ľ

‌

đ?&#x;¤

đ?‘ƒ

đ?&#x;Ś

đ?‘‹

đ?&#x;¨

‌

đ?&#x;§

Disjunction introduction (∨I): if đ?‘ƒ , then đ?‘ƒ ∨ đ?‘„ .

The second rule, disjunction elimination, states that if đ?‘ƒ ∨ đ?‘„ is true, and from đ?‘ƒ you can prove đ?‘‹ , and from đ?‘„ you can prove đ?‘‹ , then you may conclude đ?‘‹ . More colloquially, if either đ?‘ƒ or đ?‘„ is true, and in both cases đ?‘‹ is true, too, then đ?‘‹ is true. For example, if I’m either well-rested or well-fed, and being wellrested makes me happy, and being well-fed makes me happy, then I must be happy.

đ?&#x;Š đ?&#x;Ş

đ?‘„

đ?‘‹

đ?‘‹

∨I, đ?&#x;Ł, đ?&#x;¤â€“đ?&#x;Ś, đ?&#x;§â€“đ?&#x;Š

Disjunction elimination (∨E): if đ?‘ƒ ∨ đ?‘„ and from đ?‘ƒ we can prove đ?‘‹ and from đ?‘„ we can prove đ?‘‹ , then đ?‘‹ .

Then come the rules regarding implication. We have implication introduction, stating that if from đ?‘ƒ we can prove đ?‘„ , then we may conclude đ?‘ƒ ⇒ đ?‘„ , pronounced ‘đ?‘ƒ implies đ?‘„ ’. And we have implication elimination (also known as modus ponens), which states that if đ?‘ƒ ⇒ đ?‘„ is true and đ?‘ƒ is true, then we

chalkdustmagazine.com

52


chalkdust can conclude đ?‘„ . If the weather being rainy implies that I am cosy, and the weather is rainy, then I must be cosy. đ?&#x;Ł

đ?&#x;¤

đ?‘ƒ

đ?&#x;Ś

đ?‘„

đ?&#x;Ľ đ?&#x;§

đ?‘ƒ ⇒đ?‘„

đ?&#x;Ľ

đ?‘„

đ?&#x;¤

‌

đ?‘ƒ ⇒đ?‘„

đ?&#x;Ł

⇒I, đ?&#x;¤â€“đ?&#x;Ś

đ?‘ƒ

⇒E, đ?&#x;Ł, đ?&#x;¤

Implication elimination (⇒E): if đ?‘ƒ ⇒ đ?‘„ and đ?‘ƒ , then đ?‘„ .

Implication introduction (⇒I): if from đ?‘ƒ we can prove đ?‘„ , then đ?‘ƒ ⇒ đ?‘„ .

Finally, we come to the most arcane rules, those handling negation. The negation of đ?‘ƒ is written ÂŹđ?‘ƒ and pronounced ‘not đ?‘ƒ ’. Before talking about the ÂŹđ?‘ƒ rules, however, we must first introduce a new symbol: ⊼ (pronounced ‘bottom’), which represents impossibility or contradiction. We can then introduce bottom introduction, which states that if both đ?‘ƒ and ÂŹđ?‘ƒ are true, which is absurd (usually‌ there are systems of logic that admit both đ?‘ƒ and ÂŹđ?‘ƒ at the same time, called paraconsistent logics), then we can conclude ⊼, to represent this impossibility.

We’re then able to make use of ⊼ through negation introduction, which states that if from đ?‘ƒ we can prove ⊼, then we can conclude ÂŹđ?‘ƒ . This is reasonable; if đ?‘ƒ being true led to a contradiction, then đ?‘ƒ isn’t true, so ÂŹđ?‘ƒ is. Finally we have negation elimination. This one is a nice easy way to end: it says that if we know ÂŹÂŹđ?‘ƒ , then we can conclude đ?‘ƒ . If something isn’t not true, then it must be true! And with that, we have completed (one kind of) natural deduction, laying out a framework for proofs based on undeniable principles so that we can be completely confident in our results.

Now, you may be wondering, hey, maths is about numbers and shapes and functions and vector fields, but all we’ve been working with are đ?‘ƒ s and đ?‘„ s! Not a single đ?‘› or đ?‘Ľ , let alone an đ?‘“ , has been written in the past several pages! Fear not! Purely logical systems such as natural deduction are key ingredients for building typical maths. For example, to de53

đ?&#x;Ł

đ?‘ƒ

đ?&#x;Ľ

⊼

đ?&#x;¤

ÂŹđ?‘ƒ

⊼I, đ?&#x;Ł, đ?&#x;¤

Bottom introduction (⊼I): if đ?‘ƒ and ÂŹđ?‘ƒ , then ⊼.

đ?&#x;Ł đ?&#x;¤

đ?‘ƒ

đ?&#x;Ś

⊼

đ?&#x;Ľ

‌

đ?&#x;§

ÂŹđ?‘ƒ

ÂŹI, đ?&#x;¤â€“đ?&#x;Ś

Negation introduction (ÂŹI): if from đ?‘ƒ we can prove ⊼, then ÂŹđ?‘ƒ .

đ?&#x;Ł

đ?&#x;¤

ÂŹÂŹđ?‘ƒ đ?‘ƒ

ÂŹE, đ?&#x;Ł

Negation elimination (ÂŹE): if ÂŹÂŹđ?‘ƒ , then đ?‘ƒ . autumn 2020


chalkdust fine numbers, we may first extend to predicate logic, then construct the naturals (via the Peano axioms), which we’ll use to make the integers and the rationals (via equivalence classes), then finally the reals (via Dedekind cuts). So, in fact, we still we get to work with all the maths we’re used to! Plus, due to the use of natural deduction, we have the added benefit of being confident about what we’re doing at every layer of abstraction!

So what?

The logic we’ve been building, with ∧, ∨, ⇒, ÂŹ, and ⊼, is known as propositional or zeroth-order logic. Predicate or first-order logic is an extension of propositional logic wherein our statements (đ?‘ƒ , đ?‘„ , đ?‘‹ , etc) may be parametrised. So as well as having đ??ť mean that ‘I am hungry’, we may also have H(đ?‘Ľ) mean that ‘đ?‘Ľ is hungry’. Additionally, predicate logic includes two quantifiers, ∀ and ∃, which respectively mean ‘for every’ and ‘there exists’: ∀đ?‘Ľ H(đ?‘Ľ) means that everyone is hungry, and ∃đ?‘Ľ H(đ?‘Ľ) means that (at least) one person is hungry.

If you’re anything like I was at age 17, or anything like how I portrayed you in the beginning of this article, you’re drooling right now. It’s like all of your fantasies regarding rigour and precision have been heard and answered by divine mathematicians.

But maybe you’re not intrinsically motivated by rigour, so you’re less excited by natural deduction. Which is fine! I’m not hurt. Maybe a little bit. Or maybe you just feel that this is overkill—did you really need all this work to know that đ?&#x;¤ ≠đ?&#x;Ł? Or maybe you’re not convinced that these rules are correct; perhaps you don’t agree that from ÂŹÂŹđ?‘ƒ we can conclude đ?‘ƒ . If you don’t agree, you are not alone! That ÂŹÂŹđ?‘ƒ entails đ?‘ƒ is a consequence of a rule called the law of excluded middle, which states that đ?‘ƒ âˆ¨ÂŹđ?‘ƒ . (This law is built-in to the system of natural deduction that we created.) Some mathematicians (the intuitionists or constructionists) reject the law of excluded middle, thus also forfeiting that ÂŹÂŹđ?‘ƒ entails đ?‘ƒ . One reason to question the law of excluded middle is that it allows us to state that something exists without stating what it is. For instance, we are able to prove that an irrational number raised to the power of an irrational number can be rational, but without giving an actual example. If we reject the law of excluded middle, then all such proofs must actually construct an example.

Still, I posit, natural deduction is worth your time. Because we’ve been so rigorous in building the system up, we gain the benefit of knowing exactly what we’re talking about. Before establishing such precision, we may have used đ?‘ƒ ⇒ đ?‘„ , but without a sense of what, exactly, it really means. Now we have a precise definition: it means that from đ?‘ƒ we can derive đ?‘„ (as per implication introduction); and it means that if we have đ?‘ƒ then we can conclude đ?‘„ (as per implication elimination); and it means nothing else. From this precision, we reap at least two amazing things: metamathematics and computers.

For one, we now can dip our toes into the metamathematical branch of proof theory, where we prove things about proof systems. For instance, we may wonder if natural deduction—or any proof system—is complete, meaning, chalkdustmagazine.com

54


chalkdust roughly, that any question we can ask within the system can be answered by the system. Likewise, we may wonder if it’s consistent, meaning we can never prove ⊼. Or perhaps it’s both? (Interestingly, logical systems capable of sustaining mathematics are never both at once, due to GĂśdel’s incompleteness theorem.) Proof theory is full of fascinating and surprising results, all enabled by being very precise about what we’re talking about. Additionally, with our newfound precision, we get to enlist computers! Because computers generally demand the utmost precision in order to be of any use, they aren’t of much help until we achieve such rigour. Now, however, we are able to get their help writing proofs, using proof assistants such as Coq and Lean, or interactive proof-writing systems such as my own a @mathsproofbot and a @mathstableaubot both prove (see d maynards.site/items/fitch/full). the true statements that a @mathslogicbot tweets. There are even programs that can write proofs entirely for us, as exemplified by a @mathsproofbot and a @mathstableaubot. So let us return to my claim that đ?&#x;¤ = đ?&#x;Ł. How can we reject this? ‘By intuition’ is the easiest way: clearly đ?&#x;¤ is not đ?&#x;Ł. However, now we may also turn to our system of natural deduction, where we were very careful about what we took to be true, and point out that đ?&#x;¤ = đ?&#x;Ł is not true in this system. To exemplify this, we can show that it will be rejected by proof assistants and proof-writing algorithms. Finally, we may rest confident. That is, until we dig deeper once again, questioning the principles of our system of natural deduction... Maynard Maynard is a student enthralled by maths and programming, and is only somewhat convinced that 1 is equal to 2.

d maynards.site a @Quelklef r quelklef My favourite application of maths

Art

Nikoleta Kalaydzhieva

My favourite application of maths is in art; in particular in the authentication of unknown or disputed art pieces. Mathematical structures called wavelets are used to analyse and compress images, and fill in the missing parts of paintings. Daubechies, a Belgian mathematician used these tools to rebuild a 14th century alfresco as well as determine the authenticity of famous works by Van Gogh and Rembrandt. 10/10

55

autumn 2020


#12 Set by Humbug 1

2

4

3

9 12

13

20

22

32

39

40

23

58

51

41

60

66 69

18

25

8

19

27

26

30 35

42

37

36

44

43

38

45

46

49

48 52

59

17

24

34

47 50

16

29 33

7

11

15

28 31

6

10 14

21

5

53

54

61

62

67

55

56

63

64

57

65

68

70

71

72

Although many of the clues have multiple answers, there is only one solution to the completed crossnumber. As usual, no numbers begin with 0. Use of Python, OEIS, Wikipedia, etc is advised for some of the clues. To enter, send us the sum of the across clues via the form on our website (d chalkdustmagazine.com) by 14 March 2021. Only one entry per person will be accepted. Winners will be notified by email and announced on our blog by 1 May 2021. One randomly-selected correct answer will win a ÂŁ100 Maths Gear goody bag, including non-transitive dice, a Festival of the Spoken Nerd DVD, a dodecaplex puzzle and much, much more. Three randomly-selected runners up will win a Chalkdust T-shirt. Maths Gear is a website that sells nerdy things worldwide. Find out more at d mathsgear.co.uk

chalkdustmagazine.com

56


chalkdust

Across 1 3 5 7

9 10 11 12 14 16 18 20 22 24 26 28 29 30 31 33 35 37 39 41 43 45 47 48 49 50 52

3 times 2D. 3 times a palindrome. 3 more than 33A. 3 times the reverse of 11A. 3 less than 2D. 3A backwards. 3 times the reverse of 18A. 3 more than a prime. 3 more than an even number. 3 more than a multiple of 10. 3 times the reverse of 8D. 3 more than 31A. 3 more than 15D. 3 more than a multiple of 110. 3 times 67A. 3 copies of the same digit. 3 less than 57D. 3 times 16A. 3 less than 20D. 3 times 57D. 33 more than a multiple of 100. 3 times 17D. 3 digit integer. 3 times a prime. 33 is the highest common factor of 43D and this number. 3 less than 46D. 33 is the highest common factor of this number and 63D. 3D backwards. 3 copies of the same digit. 300 more than 39A. 31 times a prime.

(3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3)

54 33 is the highest common factor of 44D and this number. 56 3 more than a square. 58 3 times a prime. 60 3 copies of the same digit. 62 3 less than an even number. 64 3 times a square. 66 3 is the product of this number’s digits. 67 3 times a multiple of 5. 68 3, 6 and 9 are the three digits of this number. 69 3 times the product of 58D’s digits. 70 3 copies of the same digit. 71 3 times 63D. 72 3 less than 64A.

Down

1 3 times 12A. 2 3 more than 9A. 3 3 less than an even number. 4 3A backwards. 5 3 more than an even number. 6 3 more than a multiple of 10. 7 3 less than 38D. 8 3 more than an odd number. 13 31 more than 62D. 15 3 times this number is even. 17 3 is the product of this number’s digits. 19 300 more than 7A. 20 3 more than 21D. 21 3 less than 20A. 22 3 more than 28A. 57

(3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3)

(3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3)

23 3 more than the sum of this number’s digits is 20. 24 3 less than a multiple of 112. 25 33 less than a multiple of 122. 26 3 times 34D. 27 3 times 6D. 32 3 times 31A. 34 3 more than a multiple of 4. 36 3, 6 and 9 are the three digits of this number. 38 3 less than a palindrome. 39 3 more than 39A. 40 30 more than 39A. 41 33 times a prime. 42 37 times a prime. 43 33 is the highest common factor of 54A and this number. 44 33 is the highest common factor of 43A and this number. 45 3 less than 56A. 46 3 more than a prime. 51 3 times 39D. 53 3, 6 and 9 are the three digits of this number. 55 3 copies of the same digit. 57 3 more than 29A. 58 3 odd digits. 59 3 times the product of 69A’s digits. 60 3 copies of the same digit. 61 3 copies of the same digit. 62 3 more than 62A. 63 3 times a multiple of 11. 64 333 times a square. 65 3 times a square.

(3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3) (3)

autumn 2020


chalkdust

The birth of the Fields medal Gerda Grase

W

hat comes to mind when you think of the most prestigious awards in mathematics? Chances are, it’s either the Abel prize or the Fields medal. I think most of us have heard about Abel at one point or another, but I became increasingly curious about Fields. Who is behind the so-called Nobel prize of mathematics? John Charles Fields was born in 1863, in Ontario, Canada and studied at the University of Toronto before moving to the United States in 1887 to study for a PhD at Johns Hopkins University in Baltimore. Fields was involved in several mathematical societies—the Royal Society of Canada and the Royal Canadian Institute among others—and he spent most of his life lecturing at the University of Toronto. Though a great mathematician, he excelled at organising mathematical events and promoting research. One of his greatest achievements was working with the International Mathematical Union to hold the 1924 International Congress of Mathematicians (ICM) in Toronto. This was only the second congress held by John Charles Fields the union after the first world war. During the first congress, Germany, Austria–Hungary, Bulgaria and Turkey were excluded from the union and many were worried this might escalate. But Fields was determined to make the 1924 congress work. He spent months in chalkdustmagazine.com

58


chalkdust Europe fundraising tirelessly. Some say personal acquaintances with rulers of Europe aided his efforts—attendance of a dinner with the king of Sweden and a later meeting with Mussolini in Bologna certainly support this claim—but no direct sources remain. After organising the conference, with money to spare, he paid for European mathematicians’ travel costs across the Atlantic. And this is where the idea of the Fields medal was born.

The proposal The idea of the award was first presented on It is proposed to found two gold 24 February 1931. Because of Fields’ talent for medals to be awarded at successive acquiring funds, the medals were to be funded by the remaining finances from the 1924 ICM. International Mathematical Congress Fields wrote, “It is proposed to found two gold for outstanding achievements in mathmedals to be awarded at successive Internaematics. tional Mathematical Congress for outstanding achievements in mathematics… The awards would be open to the whole world and would be made by an international committee.” He proposed the medals would be handed out at every congress for work already done, but also to encourage further achievement, starting with the next congress in 1936. Unfortunately, Fields’ health started to decline in 1932. Just days before his death, he noted in his will to leave an additional 47,000 Canadian dollars to fund the medal. As he had intended, the very first medals were awarded in the 1936 ICM in Oslo, Norway. Today, Fields medals are awarded every four years to between two and four brilliant mathematicians under the age of 40 with a prize of C$15,000. The age limit was not directly due to Fields himself; it was added in 1966 to promote diversity, although recently this choice has been criticised as there is anecdotal evidence suggesting female mathematicians fare better later in their careers. The medal itself was designed by Robert Tait McKenzie and features Fields’ monogram alongside a profile of Archimedes and the date of the Medal obverse medal’s founding, incorrectly written in Roman numerals: MCNXXXIII (1933). The reverse features an illustration of one of Archimedes’ most famous achievements: deducing the surface areas and volumes of the cylinder and the sphere which can be inscribed within the cylinder. Each face of the medal bears a Latin phrase: TRANSIRE SUUM PECTUS MUNDOQUE POTIRI (To transcend one’s human limitations and master the universe),

on the obverse, and the reverse reads: CONGREGATI EX TOTO ORBE MATHEMATICI OB SCRIPTA INSIGNIA TRIBUERE (Mathematicians gathered from the whole world to honour noteworthy contributions to knowledge).

59

autumn 2020


chalkdust The date of the prize being awarded and the recipient’s name is engraved on the rim of the medal. In 1936, Jesse Douglas and Lars Ahlfors were the first to receive Fields medals. What was so special about these two mathematicians, that they stood out from across the globe to become the first winners of the (arguably) highest honour in mathematics?

Jesse Douglas

Medal reverse

Jesse Douglas’s love for mathematics started in high school. While studying at the City College of New York, he became the youngest recipient of the college’s Belden medal for excellence in mathematics in his first year. After his undergraduate degree, Douglas began his doctoral study at Columbia University under the supervision of Edward Kasner, who introduced Douglas to the problem that became his most noteworthy achievement—Plateau’s problem. Plateau’s problem (also known as the soap bubble problem) is about showing the existence of a minimal surface for a given boundary, and possibly with other constraints. This has a fascinating physical applicaJesse Douglas tion in the form of soap films. A frame filled with a thin soap bubble, due to the action of surface tension, will always take the shape of minimum surface area: a so-called minimal surface. In 1931, Douglas discovered and proved a general solution, for which he came to win the Fields medal (although this was also done independently by Tibor Radó: Radó also created the busy beaver family of Turing machines, see page 43). Before this contribution, only some special cases had been proven by mathematicians such as Schwarz, Weierstrass, and Riemann. Around the same time, Douglas was working at the Massachusetts Institute of Technology as an assistant professor, later to be promoted to an associate professor. He continued to work on Plateau’s problem even after solving it, focusing on further generalisations of the problem. He published 11 papers between 1939 and 1940 on these generalisations. After working on Plateau’s problem for many years, Douglas diverted his attention to group theory, making significant contributions to the field. He spent the last 10 years of his life as a professor, back at the City College of New York.

Lars Ahlfors Lars Ahlfors was a Finnish mathematician born in April 1907. As a child, he already loved maths. This love only grew although most of his life was spent in the midst of war. Ahlfors started his university studies at the University of Helsinki and was taught by two of the best Finnish mathematicians at the time: Ernst Lindelöf and Rolf Nevanlinna. After this, he followed Nevanlinna to Zürich and discovered mathematics can be taught in a different way. Lars came to understand “that [he] was supposed to do mathematics, not just learn it”. During his time in chalkdustmagazine.com

60


chalkdust Zürich, Ahlfors encountered Denjoy’s conjecture (now known as the Denjoy–Carleman–Ahlfors theorem) which he proved in 1929. Loosely, the theorem determines the number of values an entire function (a function that is differentiable everywhere in the complex plane) can take at infinity. This is what gave Ahlfors international recognition, though he himself always credits the significant help of Nevanlinna and Pólya as the main influences that lead to his proof. Though impressive, this was not what earned Ahlfors his Fields medal. That award was specifically credited to a single paper. This paper shed some light on Nevanlinna’s theory of meromorphic functions and quasiconformal mappings (more stuff to do with complex functions). Currently this paper is recognised as one of the starting points for essentially a new branch of analysis called metric topology. Having already gone through the first world war as a child, Ahlfors was just about to go through the next challenge—the Konrad Jacobs, Erlangen, CC BY-SA 2.0 Lars Ahlfors second world war. But, surprisingly, his research benefited. He was able to devote himself to his work completely, even though libraries had closed due to the lack of students. In 1944, Lars was offered a position in Zürich, opportune timing since the Soviet Union was attacking Finland and Ahlfors’s own health was poor. So he, his wife, and two young children planned to flee to Switzerland, via Stockholm, the UK and then Paris. Times were tough, and Ahlfors was only able to take 10 crowns with him. So what did he do on arrival in Stockholm? He smuggled his Fields medal across the border and sold it in a pawn shop! He later reflected, “I’m sure it is the only Fields medal that has been in a pawn shop. As soon as I got a little money some people in Sweden helped me retrieve it.” What a relief! Imagine if someone had actually bought it! Luckily, the family made it to Switzerland safely. Slowly, though, Ahlfors began to feel that his invitation had been not an honour, but simply an attempt to fill a position they couldn’t find anyone else for. So when an offer came in from Harvard, Ahlfors gladly accepted it and remained there for more than 30 years until his retirement. Since Douglas and Ahlfors first won in 1936, 58 other mathematicians have been awarded the medal, including the only person to decline the award—Grigori Perelman—and the first and so far only woman to receive the award—Maryam Mirzakhani. The next ICM is due to be held in 2022 in St Petersburg, Russia, and the story of the Fields medal and its winners will continue. Gerda Grase Gerda is a final year undergrad at the University of Edinburgh, and her dissertation is on modelling the solar tachocline dynamics. In her free time, she enjoys creating some paperbased maths objects (including a dodecahedron with cubes for vertices!) and recreational bumblebee photography.

c gerdagrase@gmail.com b gerda.grase

61

autumn 2020


R-E-S-P-E-C-T

More harm than good

We can keep telling ourselves it doesn’t get to us, but the truth is this: everyone wishes they could win a Nobel prize, and mathematicians are no exception. You can say the Fields medal is the same, sure. But the prize money is pathetic, and the prestige really doesn’t compare outside of the maths bubble. I didn’t find any evidence of this, but I’m pretty sure Fields only invented his medal because he was salty about the Nobel.

Maths doesn’t need a Nobel prize. If we did, we would be just the same as physics, chemistry and—gasp— literature. By not having a Nobel prize, we prove that we are above all that. This makes it even more satisfying when a mathematician wins a Nobel for physics (hello, Penrose). It really helps with the feeling of smugness. On a more serious note, we don’t need an award. We do maths for maths’ sake. Sometimes we do it because of its applications; sometimes we do it for the love. You would be hard pushed to find a mathematician who was in it for the money, fame, or prizes. We don’t need prizes to advance maths.

If you try talking to your non-maths friends (if you have any) about the Fields medal, they won’t have a clue what you’re on about. More ostracism! If only Alfred, when establishing the prizes in his will back in 1895, had given us the approval we so desperately crave, everyone would know mathematicians are to be respected, not mocked. And gone would be the days of having to answer the most frustrating of questions: “Hasn’t all the maths already been done?” They’d know it hadn’t! They’d have heard of our great achievements. Instead we are eternally condemned to be mere bean counters in the eyes of public. Thanks Nobel—real noble of you.

chalkdustmagazine.com

But prizes are great for celebrating our colleagues and raising awareness of their work. Yet we don’t need a Nobel for this. Many institutions award prizes and grants which fit this purpose. For more prestigious prizes, we need look no further than the Fields medal (see pp 58–61) or the Abel prize. A Nobel for mathematics risks devaluing these prizes. And why celebrate Alfred Nobel over Abel and Fields? It would minimise the achievements of previous award winners. It would be erasing history. 62


chalkdust

Oπnions

Should I share my code? Matthew Scroggs

S

ix years ago, in September 2014, I started working on my PhD. By Christmas, I was doing calculations using code that would’ve taken the average PhD student three to four years to write. But this wasn’t down to my own programming skills: this was thanks to my supervisor and his previous students deciding to work on open source software. Open source software is software whose developers release the source code that makes up the software, rather than just releasing a binary or application that the user can run. Almost always, open source software is free to use and adapt. You are—perhaps without realising it—using open source software every day. If you use WordPress, Firefox, Audacity, or VLC, you are using open source software: you could download the source code of any of these programs and edit them however you like. Even if you don’t use any of these, almost every website on the internet is run on a server running the open source operating system Linux. The popularity of open source software has been increasing in academia too: the plot on the following page shows the proportion of papers in three numerical analysis journals—SIAM Journal on Scientific Computing, Computers and Mathematics with Applications, and Numerische Mathematik— that are found when using each journal’s search functionality to search for “open source”. You can see that there is a big increase in the proportion of papers in recent years, indicating a significant increase in the number of researchers writing or using open source software. 63

autumn 2020


percentage of papers

chalkdust (There are, of course, going to be some false positives in this plot, for example a paper about a problem in an open domain with a source term in the equation may well show up in the search. There will also be some papers that use open source software but don’t say so, which will not show up. But the increase shown over recent years is large enough that it is likely to be meaningful even with these issues.)

đ?&#x;¤đ?&#x;§ đ?&#x;¤đ?&#x;˘ đ?&#x;Łđ?&#x;§ đ?&#x;Łđ?&#x;˘

đ?&#x;§

đ?&#x;˘ đ?&#x;Łđ?&#x;Ťđ?&#x;Şđ?&#x;˘

đ?&#x;Łđ?&#x;Ťđ?&#x;Ťđ?&#x;˘

đ?&#x;¤đ?&#x;˘đ?&#x;˘đ?&#x;˘

year

đ?&#x;¤đ?&#x;˘đ?&#x;Łđ?&#x;˘

đ?&#x;¤đ?&#x;˘đ?&#x;¤đ?&#x;˘

So while my achievements early in my PhD sound impressive, I actually only wrote a few lines of code to extend code that already existed. Someone else had already done most of the three to four years of work, so I didn’t have to do this again. This sounds great, but would I have perhaps learned something during these three to four years that I’ve missed out on? The percentage of papers mentioning “open source�

“Will I learn more by writing the code myself?� I think one of the best ways to really understand how an algorithm works is to implement it, then tweak it to see how each step works. It is possible, therefore, to use other people’s code without really understanding what the methods you are using do. I do not, however, think that this is reason for not using other people’s code. The best way to test out an algorithm is usually to implement a version of it for a small, simplified problem. For example, you could use it to solve a one-dimensional problem, when in fact you are interested in a more realistic three-dimensional problem; or you could set some values in your equation to 0, giving a simpler equation to solve. Turning this simple code into more general code that can be used for the actual problems you are interested in, on the other hand, is a much larger job. Extending your code in this way is very time consuming, and there is much less to be learned by doing this. So once you’ve tried out and understood the methods you want to use, you would be much better off using someone else’s open source code to save yourself a lot of time. But what if no one else has written an open source implementation of your method?

“Why should I give away my work for free?� If no one else has already done the work for you, you may have no choice but to do all the programming yourself. You may then be reluctant to give away all your hard work to benefit others, but there are plenty of ways in which this can also benefit you. If your code does something that other code cannot do, you will probably find other people that want to use it. Having other people use your code has a number of benefits. chalkdustmagazine.com

64


chalkdust The more people use your code, the more likely it is that errors and bugs in your code will be spotted. Having a userbase that reports bugs to you will lead to a more reliable piece of software, allowing you to be more confident about your computations. Additionally, you may find that some of your users fix the bugs themselves, or add functionality to your code to make it more applicable to the problems they are solving. The time you spent starting the software can then start to pay off, as you can now benefit from the work of others. This is also a great way to find collaborators and new problems to work on. Some really great academic communities grow up around open source software, and there are even conferences organised just for developers and users of some software. Academics are often judged by their paper output, and writing good code can reduce this while often actually benefiting the community much more than writing a paper. It is possible, however, to write a good publication about your software, either by writing a full paper about the algorithms Journal of Open Source Software, CC BY 4.0 used in your software and the results obtained; or The Journal of Open Source Software (Joss) by writing a short paper for the Journal of Open Source Software (Joss), an open journal that publishes short papers about software libraries. Publishing a paper like this makes your software easily citable. If lots of people use your software, you may well get a lot of citations. As an example, the paper Gmsh: A 3‐D finite element mesh generator with built‐in pre‐and post‐processing facilities about the open source software Gmsh has 4677 citations. By comparison, the second most cited papers by its authors—Christophe Geuzaine and Jean-Francois Remacle—have just 260 and 727 citations respectively. This is all great, but maybe your software is nowhere near as good as other people’s open source code and not worth releasing.

“My code isn’t good enough” If you’ve written some code from scratch to do some computations, the code is almost certainly a little bit messy and lacking in documentation. In this state, it’s quite unlikely that anyone will use your code. At this point, you’re going to have to spend a quite significant amount of time learning about documentation and good code style in your preferred programming language. My best advice here would be to find a few popular pieces of open software using the same language as you and see what they do. You’ll probably find that there are contributors to these software that are willing to give you some guidance on what to do. (If your preferred language is Python, feel free to bug me for more specific advice.) Tidying and documenting code can seem like a very long and boring job, and might not seem worth it. Doing this, however, is likely to benefit you, as well as helping out others. 65

autumn 2020


chalkdust In a few months’ (or even years’) time, you may find that you need to revisit your code: perhaps your paper has been reviewed and you need to adjust some calculations, or maybe you want to build on your old work and extend the code to do something else. By this point, you’ll probably have forgotten exactly how your code works. If it’s an undocumented mess, it’s going to take you ages to work out how it worked. But if you tidied up your code and added some documentation, this task will be much easier. If you’re still daunted by the idea of tidying your code up, you might be able to do less work than you’re dreading. One or two well-documented examples of how you use your code would probably be enough to allow someone to work out how to use it. You can always do more tidying at a later date, maybe adding bits of documentation as and when users ask you about them so you cover the important areas first. Hopefully, you’re now strongly considering sharing your code, but perhaps wondering what to do next.

“What do I need to do to make my code open source?� If you want to release your code, you’re probably going to have to learn to use Git. Git is a version control tool that is used by many popular online code repositories, such as GitHub, GitLab and Bitbucket. Git can do an awful lot of things, but you probably don’t need to use most of them. You almost certainly work alongside someone who uses Git, who can show you the basics and help you decide where the best place to put your code is. You’ll also need to decide on a licence to give your code. This licence will tell users what they can do with your code. There are a few common open source licences that allow users to do slightly different things with your code; there are plenty of guides online that can help you decide which is best for you. Then you’re ready to go ahead and release your code. Perhaps one day soon you’ll be able to boast that you saved a PhD student four years of programming. Matthew Scroggs Matthew is a postdoctoral associate in the department of engineering at the University of Cambridge. He is one of the developers of the open source finite element method library FEniCSx, the open source boundary element method library Bempp, and the open source text-based adventure game engine AVE.

d mscroggs.co.uk a @mscroggs n @mscroggs@mathstodon.xyz r mscroggs f mscroggs My favourite application of maths

Physics

David Sheard

đ?‘” /Ď€đ?&#x;¤ chalkdustmagazine.com

66


On this page, you can find out what we think of recent books, films, games, and anything else vaguely mathematical. Full reviews of many of the items featured here can be found at d chalkdustmagazine.com

A Podcast of Unnecessary Detail In each episode, the three hosts—Helen Arney, Steve Mould and Matt Parker—each discuss an interesting subject based around a (tenuous) theme such as ‘table’, ‘stick’ or ‘rings’. Thanks to stand-up mathematician Matt, at least one third of each episode is maths. If you’ve been to a Festival of the Spoken Nerd event, you’ll know exactly what to expect. If not, you can finally find out what you’ve been missing out on. Highly recommended.

ggggg The Wonder Book of Geometry

The Art of Statistics David Spiegelhalter Statistical concepts clearly illustrated through real-world examples let the reader be reasoned and critical of the information we consume from the media.

David Acheson A gentle and entertaining introduction to geometry.

ggggh

ggggg

Number Munchers The game said that the number one is not prime, but didn’t explain why.

24 Hour Maths Magic Show

gggii

Excellent. Maybe still happening if you’re reading on launch day.

ggggg

Mathematical Adventures

Killing Floor

Ioanna Georgiou & Asuka Young A picture book that takes the reader on a journey through mathematical history. Excellent Christmas present for all your 10-year-old relatives.

Leigh Children Jack Reacher begins his vendetta against maths by destroying the world population’s ability to round down over 525 surprisingly tedious pages.

ggggi

iiiii 67

autumn 2020


chalkdust

Counting Countdowns

Colin Beveridge

R

achel Riley puts the last of the six numbers on the rack and presses the button to generate a random target. The host—whoever the host is now, I haven’t really watched Countdown since Richard Whiteley died—says a few words and starts a 30-second timer. And the contestant thinks, ‘Now I need to combine those numbers to make the target. I know! I’ll just check all of the possible calculations with these six numbers! I wonder how many there are.’ The aim of the game is to combine the six given numbers using the four basic arithmetic operations (+, −, Ă— and á) to reach a target number. You do not need to use all of the numbers, but you may not use any number more often than it appears on the board. Also, you’re inexplicably not allowed to use fractions at any point. For example, given the numbers in the big picture above, with the displayed target of 333, you might solve it as ((đ?&#x;§đ?&#x;˘ − đ?&#x;Ś) Ă— đ?&#x;Š) + đ?&#x;§ + đ?&#x;¨, or as ((đ?&#x;§đ?&#x;˘ − đ?&#x;¨) Ă— đ?&#x;Š) + đ?&#x;¤đ?&#x;§,

or several other acceptable ways.

tl;dr: including the trivial answer of 0, there are 974,861 distinct answers that can be reached by applying the four basic operations to combine six numbers, if you ignore (a) coincidences and (b) Countdown’s fraction-phobia.

chalkdustmagazine.com

68


chalkdust

Starting simple ‌in which we analyse a much simpler version of the Countdown numbers game. Back in the Upper Palaeolithic, when humankind was first starting to emerge, Channel Lots launched a teatime chisel-marks-and-numbers game show hosted by Ug, in a horrible tie, and Thog∗, famed for her ability to combine two numbers at speed. Protocountdown’s numbers game required exactly this skill: Thog would select two numbers at random, and the contestants would combine them using the four basic operations. How many outcomes are there?

Adapted from Wikimedia user James St John, CC BY-SA 4.0

Ug, contemporary painting.

• You can add or multiply the two numbers (one way each, because these operations commute) → đ?&#x;¤ outcomes;

• you can subtract them or divide them (two ways each, because these operations don’t commute) → đ?&#x;Ś outcomes; • you could also use either number alone → đ?&#x;¤ outcomes; • or use no numbers at all to reach zero → đ?&#x;Ł outcome;

making 9 outcomes altogether.

As the show’s format—and humans—evolved, a third number was added to the numbers game, causing consternation among the audience of students and the elderly. This simple extension made the game ten times as difficult!

How to count

According to Williams’ First Law of Counting†, counting is hard —especially the bit about making sure you count every item exactly once.

It’s usually a good idea to come up with an estimate first. Suppose we want to combine three numbers using two operations. Starting with any of the numbers, there are two ways to pick its partner; as we saw above, each pair generates about six answers, making 12. There is one way to pick the final number to combine (with the existing 12 pairs), and each generates about six answers, making 72. Heuristically, this gives an estimate of (đ?‘› − đ?&#x;Ł)!đ?&#x;¨đ?‘›âˆ’đ?&#x;Ł ways to combine exactly đ?‘› numbers.

That estimate isn’t far off, but getting the right answer takes a bit more work. We need to get methodical.

In fact, there are not really four operations, there are only two. Subtraction and division are addition and multiplication, respectively, wearing funny hats—or, for the purposes of this article, ∗

â€

Surprisingly, Thog is Neanderthal for ‘Carol’. EA Williams, personal communication.

69

autumn 2020


chalkdust dressed in a circle. We’ll consider ⊕, meaning ‘addition or subtraction’, and ⊗, meaning ‘multiplication or division’, as operations (not necessarily binary) that result in sets of values.‥

Let’s start with a numerical example. The operation đ?&#x;¤ ⊗ đ?&#x;Ľ gives the set of values {đ?&#x;¤ Ă— đ?&#x;Ľ, đ?&#x;¤/đ?&#x;Ľ, đ?&#x;Ľ/đ?&#x;¤}. You can replace đ?&#x;¤ Ă— đ?&#x;Ľ with 6 if you prefer. Meanwhile, đ?&#x;¤ ⊕ đ?&#x;Ľ gives the set of values {đ?&#x;¤ + đ?&#x;Ľ, đ?&#x;¤ − đ?&#x;Ľ, đ?&#x;Ľ − đ?&#x;¤} , or {đ?&#x;§, đ?&#x;Ł, −đ?&#x;Ł}.

More generally, if đ?‘Ž and đ?‘? are single-valued numbers (of which more in a moment), the operation đ?‘Ž ⊗ đ?‘? gives the set of values đ?‘Ž đ?‘? đ?‘Ž ⊗ đ?‘? = {đ?‘Žđ?‘?, , } . đ?‘? đ?‘Ž Meanwhile, đ?‘Ž ⊕ đ?‘? gives the set of values {(đ?‘Ž + đ?‘?), (đ?‘Ž − đ?‘?), (đ?‘? − đ?‘Ž)}, or more parsimoniously, đ?‘Ž ⊕ đ?‘? = {(đ?‘Ž + đ?‘?), Âą(đ?‘Ž − đ?‘?)}.

This second element is an example of a double-valued number. We’re getting to it, don’t worry. If set đ??´ = {đ?‘Žđ?&#x;Ł , đ?‘Žđ?&#x;¤ , ‌ } and đ??ľ = {đ?‘?đ?&#x;Ł , đ?‘?đ?&#x;¤ , ‌ }, then đ??´ ⊕ đ??ľ and đ??´ ⊗ đ??ľ are the sets đ??´ ⊕ đ??ľ = ⋃ đ?‘Žđ?‘– ⊕ đ?‘?đ?‘— ,

đ??´ ⊗ đ??ľ = ⋃ đ?‘Žđ?‘– ⊗ đ?‘?đ?‘— .

đ?‘–,đ?‘—

đ?‘–,đ?‘—

In both cases, the resulting set is all the possible values that come from applying the operation to an element from đ??´ and an element from đ??ľ.

⊕ing and ⊗ing values and sets

‌in which we calculate some non-trivial examples.

Since you asked, I pronounce ⊕ as ‘oplus’ and ⊗ as ‘otimes’, but you are free to call them whatever you please. It makes later calculations more straightforward if numbers are considered as single-valued (like (đ?‘Ž+đ?‘?)) or doublevalued (like Âą(đ?‘Žâˆ’đ?‘?)). By assumption, the initial inputs into the calculation are all single-valued: there isn’t a Âąđ?&#x;Š card, for example. Nor is there a zero. Zero would really mess things up.

‘Can I have your single-valued number?’

Single-valued numbers are‌ special. Or, if you prefer, annoying. They need to be treated differently from doublevalued numbers.

If you ⊕ two single-valued numbers, the resulting set consists of a single-valued and a double-valued number. Any other combination of two numbers gives a set of two double-valued numbers. For example, đ?&#x;Š ⊕ Âąđ?&#x;Ľ = {Âą(đ?&#x;Š + đ?&#x;Ľ), Âą(đ?&#x;Š − đ?&#x;Ľ)}: you can combine 7 and Âąđ?&#x;Ľ to get 10, −đ?&#x;Łđ?&#x;˘, 4 or −đ?&#x;Ś. You can check other possibilities if you’re so inclined.

‥ For explanatory convenience, I’ll talk about these operations acting on sets or on elements; they act on elements as if the elements were really singleton sets.

chalkdustmagazine.com

70


chalkdust If you ⊗ two single-valued numbers, you get three single-valued numbers. Any other combination of two numbers gives three double-valued numbers. For example, đ?&#x;Ś ⊗ Âąđ?&#x;§ = {Âąđ?&#x;Ś Ă— đ?&#x;§, Âąđ?&#x;Ś/đ?&#x;§, Âąđ?&#x;§/đ?&#x;Ś}, and again I encourage you to check the other possibilities. Since we’re only counting, we don’t care precisely what the elements of an output set are—we’re interested in the number and type of elements involved. Rather than listing the elements, we can denote the sets as đ?‘ { }, đ?‘Ą where đ?‘ is the number of single-valued numbers in the set and đ?‘Ą the total number of values.

For example, the set consisting of the single-valued number 7 would be written as { đ?&#x;Łđ?&#x;Ł }: there is one single-valued number out of a total of one. The set consisting of the double-valued number Âąđ?&#x;Ľ is { đ?&#x;˘đ?&#x;Ł }: there are zero single-valued numbers out of one. Some examples of combining these sets: đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł { }⊕{ }={ } đ?&#x;Ł đ?&#x;¤ đ?&#x;Ł

đ?&#x;˘ đ?‘Ľ đ?&#x;˘ { } ⊕ { } = { }, for đ?‘Ľ ∈ {đ?&#x;˘, đ?&#x;Ł} đ?&#x;¤ đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł đ?&#x;Ľ { }⊗{ }={ } đ?&#x;Ł đ?&#x;Ł đ?&#x;Ľ

đ?‘Ľ đ?&#x;˘ đ?&#x;˘ { } ⊗ { } = { }, for đ?‘Ľ ∈ {đ?&#x;˘, đ?&#x;Ł} đ?&#x;Ł đ?&#x;Ł đ?&#x;Ľ

⊕ing two single-valued numbers gives a two-element set whose elements are a single-valued and a double-valued number; as with Âąđ?&#x;Ľ ⊕ đ?&#x;Š = {Âąđ?&#x;Łđ?&#x;˘, Âąđ?&#x;Ś}, ⊕ing a double-valued number with any other number gives a set of two double-valued numbers; ⊗ing two single-valued numbers gives a set of three singlevalued numbers; ⊗ing a double-valued number with any other number gives three double-valued numbers.

It turns out, when dealing with exactly two sets, the rules for ⊕ and ⊗ are: đ?‘Ž đ?‘Žđ?‘? đ?‘? { }⊕{ }={ } đ?‘? đ?&#x;¤đ?‘?đ?‘‘ đ?‘‘

and

đ?‘Ž đ?&#x;Ľđ?‘Žđ?‘? đ?‘? { } ⊗ { } = { }. đ?‘? đ?&#x;Ľđ?‘?đ?‘‘ đ?‘‘

Sadly, ⊗ is a bit messy when it comes to combining more sets.

2-calculations

‌in which we solve Protocountdown again.

Even though we’ve already solved the two-number case, let’s go through it with the new notation. If we use both numbers, there is only one way to pair the two single-valued numbers up (ie with each other), and two possible calculations to do it with. We’ve got: đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł { }⊕{ }={ } đ?&#x;Ł đ?&#x;¤ đ?&#x;Ł

and

đ?&#x;Ł đ?&#x;Ľ đ?&#x;Ł { } ⊗ { } = { }. đ?&#x;Ł đ?&#x;Ľ đ?&#x;Ł

In total, there are đ?&#x;¤ + đ?&#x;Ľ = đ?&#x;§ values, of which đ?&#x;Ł + đ?&#x;Ľ = đ?&#x;Ś are single-valued. That accounts for six ways (4 single-valued + 1 double-valued) to combine exactly two numbers, which is a relief. On top of 71

autumn 2020


chalkdust this, there are two ways to pick a single number, and one way to pick no numbers at all, making nine in all.

3-calculations

‌in which we extend the operations further.

With three numbers, there are two ways to proceed: firstly, we could combine them all in one go. If we ⊕ three single-valued numbers together, it works just as we’d expect: đ?&#x;¤ ⊕ đ?&#x;§ ⊕ đ?&#x;Łđ?&#x;Ľ = {đ?&#x;¤ + đ?&#x;§ + đ?&#x;Łđ?&#x;Ľ, Âą(đ?&#x;¤ + đ?&#x;§ − đ?&#x;Łđ?&#x;Ľ), Âą(đ?&#x;¤ + đ?&#x;Łđ?&#x;Ľ − đ?&#x;§) Âą (đ?&#x;§ + đ?&#x;Łđ?&#x;Ľ − đ?&#x;¤)}, or in our curly notation đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł { } ⊕ { } ⊕ { } = { }. đ?&#x;Ś đ?&#x;Ł đ?&#x;Ł đ?&#x;Ł

Unfortunately, ⊗ing several values is less well-behaved. Instead of the oproduct§ of three single-valued numbers being { đ?&#x;Ťđ?&#x;Ť }, it’s { đ?&#x;Šđ?&#x;Š }. In general, the recipe is to multiply the top values together, multiply the bottom values together, and multiply both by đ?&#x;¤đ?‘˜ − đ?&#x;Ł, where đ?‘˜ is the number of curly brackets you’ve ⊗ed together. Here, đ?‘˜ = đ?&#x;Ľ, which makes the multiplier 7: đ?&#x;Ł đ?&#x;Š đ?&#x;Ł đ?&#x;Ł { } ⊗ { } ⊗ { } = { }. đ?&#x;Ł đ?&#x;Š đ?&#x;Ł đ?&#x;Ł

Flickr user Pennr, CC BY-SA 3.0

Left: Sign o’ the Times. Right: Sign o’ the Otimes.

Alternatively, we could combine two of them using one operation and then combine this intermediate value with the final number using the other operation. Note that we can’t combine two values with one operation and then use the same operation for the third, because that’s the same as combining all three values at once. We have to insist on alternating ⊕ and ⊗.

Enumerating the total number of results is hardly arduous at this stage, but it’s a good time to introduce a shortcut: if the last calculation is a ⊕, we’re effectively ⊕ing a single-valued number to any possible 2-calculation generated by a ⊗. We’ve worked out how many of those there are— it’s { đ?&#x;Ľđ?&#x;Ľ }. In a parallel way, if our final calculation is an ⊗, we need to ⊗ a single-valued number (remembering all inputs are single-valued) with a 2-calculation which came from an ⊕. We can work out: đ?&#x;Ł đ?&#x;Ľ đ?&#x;Ľ đ?&#x;Ľ đ?&#x;Ł đ?&#x;Ł { } ⊕ { } = { } and { } ⊗ { } = { } . đ?&#x;¤ đ?&#x;¨ đ?&#x;¨ đ?&#x;Ľ đ?&#x;Ł đ?&#x;Ł These two answers happen to be the same, but that’s coincidence rather than anything deep.

In each case, there are three ways to pick which number comes last, so each of these { đ?&#x;Ľđ?&#x;¨ }s gives a đ?&#x;Ť }. final value of { đ?&#x;Łđ?&#x;Ş

The 3-calculations with ⊕ as their last operation give a total of đ?&#x;Ś + đ?&#x;Łđ?&#x;Ş = đ?&#x;¤đ?&#x;¤ values, including đ?&#x;Ł + đ?&#x;Ť = đ?&#x;Łđ?&#x;˘ single-valued ones. Those with ⊗ at the end give đ?&#x;Š + đ?&#x;Ť = đ?&#x;Łđ?&#x;¨ single-valued answers out §

We can live with oproduct, I think?

chalkdustmagazine.com

72


chalkdust of đ?&#x;Š + đ?&#x;Łđ?&#x;Ş = đ?&#x;¤đ?&#x;§. Altogether, that’s 47 answers, of which 26 are single-valued. That means 21 are double-valued, making a total of 68 different calculations you can do with exactly three numbers. If we choose to just use two numbers, there are three distinct pairs we could combine, each in six possible ways (making a further 18). With one number, there are three distinct single values to pick (a further 3), and with no numbers, there is only one way, making 90 altogether.

đ?‘›-calculations

‌in which we generalise.

When dealing with large �, it’s a big timesaver to consider the possible structures of an �-calculation before working them out. Any calculation will consist of some number of chains of operations of the same type. The key is to realise that the final calculation consists of some number of sets being operated on, and to ask how the inputs can be distributed between those sets. The ways of doing this correspond to the non-trivial partitions of �.

For example, with đ?‘› = đ?&#x;Ś, the non-trivial partitions are [đ?&#x;Ł, đ?&#x;Ł, đ?&#x;Ł, đ?&#x;Ł], [đ?&#x;¤, đ?&#x;Ł, đ?&#x;Ł], [đ?&#x;¤, đ?&#x;¤], and [đ?&#x;Ľ, đ?&#x;Ł] (but not [đ?&#x;Ś]). If the final calculation is ⊕, these correspond to: [đ?&#x;Ł, đ?&#x;Ł, đ?&#x;Ł, đ?&#x;Ł]

[đ?&#x;¤, đ?&#x;Ł, đ?&#x;Ł] [đ?&#x;¤, đ?&#x;¤] [đ?&#x;Ľ, đ?&#x;Ł]

We ⊕ the four inputs together, đ?‘Ž ⊕ đ?‘? ⊕ đ?‘? ⊕ đ?‘‘ .

We take the results from ⊗ing two of the inputs together and ⊕ them with the two remaining inputs, (đ?‘Ž ⊗ đ?‘?) ⊕ đ?‘? ⊕ đ?‘‘ .

We find the results of ⊗ing two of the inputs, then ⊗ing the other pair before ⊕ing the results together, (đ?‘Ž ⊗ đ?‘?) ⊕ (đ?‘? ⊗ đ?‘‘).

We generate all of the possible calculations with three inputs and ⊗ as the last calculation, and ⊕ the result with the remaining input.

A parallel thing happens when the last calculation is ⊗.

The recipe for enumerating the number of đ?‘›-calculations is: 1. List all of the non-trivial partitions of đ?‘›;

2. For each partition, ⊕ together all of the multiplicative calculation counts according to the numbers in the partition, and multiply by the number of ways the inputs could be arranged between the partitions;

3. Similarly, ⊗ together all of the additive calculation counts and multiply by the number of arrangements. 4. It is worth keeping track of the final sum of the additive and multiplicative counts, in case you want to work out the number of higher-� calculations. 73

autumn 2020


chalkdust 5. To find the total number of đ?‘›-calculations, add the additive and multiplicative counts together, and determine the total of single- and double-valued results. In the example of đ?‘› = đ?&#x;Ś:

distinct ways to arrange inputs

[đ?&#x;Ł, đ?&#x;Ł, đ?&#x;Ł, đ?&#x;Ł]

1

[đ?&#x;¤, đ?&#x;Ł, đ?&#x;Ł]

6

[đ?&#x;Ľ, đ?&#x;Ł]

4

[đ?&#x;¤, đ?&#x;¤]

3

total:

additive count đ?&#x;Ł { } đ?&#x;Ş đ?&#x;Łđ?&#x;Ş { } đ?&#x;Šđ?&#x;¤ đ?&#x;¤đ?&#x;Š { } đ?&#x;§đ?&#x;Ś đ?&#x;¨đ?&#x;Ś { } đ?&#x;¤đ?&#x;˘đ?&#x;˘ {

đ?&#x;Łđ?&#x;Łđ?&#x;˘ } đ?&#x;Ľđ?&#x;Ľđ?&#x;Ś

multiplicative count đ?&#x;Łđ?&#x;§ { } đ?&#x;Łđ?&#x;§ đ?&#x;Śđ?&#x;¤ { } đ?&#x;Şđ?&#x;Ś đ?&#x;Ť { } đ?&#x;Ľđ?&#x;¨ đ?&#x;Łđ?&#x;¤đ?&#x;˘ { } đ?&#x;¤đ?&#x;¨đ?&#x;Ś

+

{

đ?&#x;Łđ?&#x;Şđ?&#x;¨ } đ?&#x;Ľđ?&#x;Ťđ?&#x;Ť

=

đ?&#x;¤đ?&#x;Ťđ?&#x;¨ { } đ?&#x;Šđ?&#x;Ľđ?&#x;Ľ

Adding these up altogether gives, therefore, 296 single-valued and 437 double-valued numbers, making a total of 1170—which agrees with the Online Encyclopedia of Integer Sequences.œ However, this doesn’t take into account the possibility of using fewer numbers. We also have four ways to select three numbers (68 ways each), six ways to pick pairs (6 ways each), four ways to pick a single number (one way each) and one way to pick no numbers, for a total of 1483. The sequence we’re uncovering here is not, so far as I can find, in the OEIS.

Going further It’s possible—although a bit tedious and error-prone—to take this higher. I got the right answer for combining exactly six numbers (793,002) this way after a few missteps. Doing the same Pascal’s triangle steps as previously, this gives 974,861 ways to combine up to six numbers. OEIS points to a Chinese-language article by Zhujun Zhang that discusses finding the generating functions for inequivalent expressions under different circumstances (are you allowed division and subtraction? are you allowed a unary negative? are −đ?&#x;Ľ and đ?&#x;Ľ different?). The answer seems to be ‘it’s complicated’—Zhang introduces four coupled generating functions and solves them numerically, which is hardly cricket. It turns out our approximation of (đ?‘› − đ?&#x;Ł)!đ?&#x;¨đ?‘›âˆ’đ?&#x;Ł is pretty good for combining exactly đ?‘› numbers—at least for the cases in OEIS, it’s typically within about 30% of the correct answer. Âś

Readable link: https://oeis.org/A140606

chalkdustmagazine.com

74

Grasshoppers: hardly crickets


chalkdust

Back to the studio In any given Countdown numbers game, it is usually possible to reach only a small fraction of the full range of 6-calculations. For example, the analysis above would count the (arithmetic) calculation đ?&#x;¤ Ă— đ?&#x;¨ as a different calculation to đ?&#x;Ľ Ă— đ?&#x;Ś, even though the numerical answer is the same. Similarly, we’ve counted đ?&#x;Ł Ă— đ?&#x;¤đ?&#x;§ as an entirely different thing to đ?&#x;¤đ?&#x;§â€”and don’t get me started on the rule that forbids fractions. So how many possible Countdown numbers games are there using the actual rules? I’ll leave that as a conundrum for the interested reader. Colin Beveridge Colin is the author of Cracking Mathematics and The Maths Behind, written to prove that he has nothing to prove (by contradiction).

d colinbeveridge.co.uk a @icecolbeveridge My favourite application of maths

Weather forecasting Ellen Jolley

Today the weather forecast is something we hear all the time and probably take for granted, but actually it needs significant computational power to produce and was considered a major scientific challenge up until about halfway through the 20th century. I don’t know why it took them so long to realise it, but the secret to cracking it was, of course, maths. Since the atmosphere mostly consists of air and water (in various states of matter), that makes it a fluid, and fluids are governed by the Navier–Stokes equations. Add some small adaptations for interactions between water/ice particles and the air and the fact that the Earth is a rotating frame, shove some initial conditions (ie the current weather) into a computer, and voilĂĄ! The weather is forecasted. You may have noticed that you can’t ask Google what the weather will be like on 16 August 2053 (I’m planning a holiday). It’s those pesky initial conditions that let us down here, because unfortunately the atmosphere is a chaotic system, which means it has “sensitive dependence on initial conditionsâ€? (see pp 11–18). This essentially means that even tiny inaccuracies in measuring the current conditions will lead to huge differences in the eventual weather. This was discovered by Edward Lorenz in 1961, who coined the term “butterfly effectâ€?. Lorenz thought it was impossible to predict the weather with any degree of accuracy more than ten days in advance. These days, we can do a little better by using “ensemble forecastingâ€?: running many weather simulations and taking the average. But, as anyone who has tried to plan an outdoor event knows, it is still not perfect. /cast

75

autumn 2020


TOP TEN

This issue features the top ten maths-themed days out. To vote on the top ten calculator buttons, go to d chalkdustmagazine.com

At 10, it’s the scorpion enclosure at London Zoo.

At 9, why not take a punt on Cambridge’s mathematical bridge?

10

9

At 8, it’s Escher in the Palace in The Hague.

8

Don’t throw away your shot to visit the bridge where it happened: you’ll be back to see number 7, Broom Bridge in Dublin.

Enjoy a cracking day out at number 6, Bletchley Park: it’s the bombe!

5

6

4

The only safe cycling experience in New York is our number 4, at MoMath: the National Museum of Mathematics.

2

At 2, it’s one of the perfect places to walk one mile south, one mile east, then one mile north: the north pole.

At 5, it’s a visit to both Bletchley Park and the National Museum of Computing on the same day.

At 3, it’s a trip to the Lake District with a calculator.

3

Topping the charts for a record seven weeks, it’s a walking tour of Königsberg.

1

Pictures Escher in the Palace: Escher in het Paleis, CC BY-NC-SA 2.0; The National Museum of Computing: Adam Bradley, CC BY 3.0; MoMath: Beyond My Ken, CC BY-SA 4.0; Lake District: David Iliff, CC BY-SA 3.0.

chalkdustmagazine.com

7

76




Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.