Cutting my birthday cake

Guess what? Today’s my birthday. I’ve invited my friends, I’ve got the cake, and I’ve blown out the candles. There’s only one thing left to do: cut the birthday cake. As I pick up the knife, ready to cut the cake for my hungry guests and me, a question suddenly pops into my head: what is the maximum number of pieces I can get by cutting my cake $c$ times?

Well, first things first, there’s loads of ways you could cut your cake. So our first ingredient for the answer to this question will be a handful of assumptions. In this blog post, I’m going to chop up a square cake with a normal knife. All cuts will be perfectly straight, and will go across the entire cake (so we won’t be starting from its centre). Also, the pieces you get after cutting the cake do not have to be the same size! And finally, we’ll pretend our cake is a two-dimensional object—a humble square.

Let’s suppose that $p_c$ is the maximum number of pieces you can obtain by cutting your cake in $c$ slices, and see what happens for different choices of $c$.

Start with the easiest case where $c=0$. In this case, you haven’t cut your cake yet, so of course you still have the whole cake. This is a single piece in its own right, therefore zero cuts give you one piece only ($p_0=1$).

Next, make a long, straight cut across your cake (this is $c=1$). I guarantee you will cut your cake into two, ie $p_1=2$.

Let’s make one big cut down the middle

Now we’ll cut the cake a second time ($c=2$). Your best bet is to make sure the second cut passes through both pieces, so you end up with four pieces. In other words, $p_2=4$.

Now let’s make a second cut

Time for a third cut. It turns out you can obtain a maximum of seven pieces ($p_3=7$).

And a third cut…

Now, if we make one more cut (ie $c=4$), how many slices can we make? The answer is in fact eleven. Don’t believe me? Have a look at the picture below and count up the bits for yourself

A fourth cut gives us 11 pieces… count them!

Let’s summarise what we know so far. As shown in the graph below, our sequence (starting from $c=0$) is $p_c=1,2,4,7,11,$ etc. This sequence does indeed have a formula, but before I reveal it, see if you can spot the pattern. Give up?

The number of pieces follows a familiar sequence…

The best way to see the pattern is to take one away from each term in our sequence, we are left with $0,1,3,6,10,$ and so on. That’s right: these are the triangle numbers! Remember, since we started our sequence from $c=0$, we also have the zeroth triangular number, which is nothing but zero.

Recall that the $c$th term for the triangle numbers is $c(c+1)/2$, so we can write out a formula for the number of pieces we get from $c$ cuts. It’s…$\frac{c(c+1)}{2}+1.$This expression will work for any $c=0,1,2,3,…$. If we try the formula for, say, $c=8$, then the formula tells you that you can get at most 37 pieces. So, the next time you have 36 friends at your birthday party, see if you can make one piece each for you and all your friends in just eight cuts!

But why does the formula work? Perhaps the easiest way to begin tackling this question is by writing down the differences between two consecutive terms. We get the numbers 1,2,3,4,…. More generally, the difference from $(c-1)$ cuts to $c$ will be just $c$. Anything familiar about these differences? They match up perfectly with the triangle numbers, and you can obtain $p_c$ by adding up all the first $c$ differences and one. In other words,$p_c=1+\sum_{i=1}^ c i=1+ \frac{c(c+1)}{2},$which we expected anyway. So we have proved the general formula. But why do we get these differences? To find out, we are going to gather some intuition, so let’s take a step away from the sequence and back to the cake. Suppose you just did $(c-1)$ cuts. If you want to maximise the number of pieces after your next cut, the trick is to line up your knife so that it will pass through all $(c-1)$ cuts exactly once. By doing so, you will cut your way through $c$ pieces, splitting each bit into two smaller slices. Hence you will end up with $c$ new pieces.

Our formula is for a square cake. Actually, it also works if your cake is a circle. But will the formula work for any two-dimensional cake you could think of? The answer is no; it turns out that the formula is only useful for convex shapes. As a rule of thumb, if your cake is not convex, you can look forward to even more pieces of cake! For example, it is possible to get as many as six slices from a crescent-shaped cake in two cuts. Try it yourself! If you haven’t got a crescent-shaped cake, sketch a crescent on a piece of paper and draw straight lines on it instead.

That’s one puzzle to try out. How about a few more…?

• What happens if the cuts don’t have to be straight? Do you still get the same formula for $c$ cuts, or will it be different?
• Earlier I assumed that the individual pieces you get after cutting do not have to be the same size. It is quite easy to make the pieces the same size for one or two cuts, but can you do it for, say, three cuts?

But that’s enough talk for today. Now, where’s that cake?

Happy birthday to me…

Issue 05

Our latest edition, Issue 05, is available now. Enjoy the articles online or scroll down to view the magazine as a PDF.

Features

• In conversation with Bernard Silverman

We chat to the chief scientific advisor to the Home Office about the role of scientists and mathematicians in politics
• Linear algebra… with diagrams

Rediscover linear algebra by playing with circuit diagrams
• Debugging insect dynamics

Explain the strange dynamics of certain insects using game theory
• Variations on Fermat: an agony in four fits

Fermat's Last Theorem with complex powers, wrapped in a story every mathematician can relate to
• Slide rules: the early calculators

When slide rules used to rule... find out why they still do

Factorisation is often used in cryptography. But there's something even simpler which turns out to be just as hard.
• Origami tesseract

Folding origami, building networks, making projections and multiple dimensions!
• Florence Nightingale, statistician

What is the real story behind the lady with the lamp?
• Roots: Mary Somerville

Mary Somerville fights against social mores to become one of the leading mathematicians of her time.
• On the cover: dragon curves

Read more about the fire-breathing curves that appear on the cover of issue 05

Fun

• Prize crossnumber, Issue 05

Win £100 of Maths Gear goodies by solving our famously fiendish crossnumber
• What’s hot and what’s not, Issue 05

Mathematical fashion advice for an ever-changing world
• Dear Dirichlet, Issue 05

Prof. Dirichlet tackles political arguments and werewolves in answering your personal problems
• Comic: The Inverse Homotopy, part 4

Part 4 of our mathematical comic's adventure
• Puzzles, Issue 05

Solve the puzzles that appeared in Issue 05.

• Which mathematical object are you?

Are you feeling ideal? In your prime? Discover your inner mathematical object (plus handy term explainer).
• How to make: a slide rule

Make calculations easy with this simple-to-make slide rule
• Top Ten: Parts of a circle

The definitive chart of the circle's greatest parts
• Top ten vote issue 05

Vote for your favourite geometry instrument
• Puzzle Solutions, Issue 05

The answers to the puzzles that appeared in issue 05

or

In conversation with Bernard Silverman

It’s been said that a degree in mathematics opens many doors, but to many this might seem a slight exaggeration. Bernard Silverman, however, is an excellent example of a mathematics graduate who has indeed done it all. Silverman is currently the chief scientific advisor to the Home Office, a statistician, and an Anglican priest. These are just a few examples of his many achievements, starting from the gold medal he won at the 1970 International Mathematics Olympiad—the only person to do so from the western side of the iron curtain—at the beginning of his mathematical career. He went on to read mathematics at university, and eventually obtained a PhD in data analysis in 1977. “I was always interested in maths, but as time went on I became keen on doing it in a way that has applications in different things, and that is what drew me to statistics.” He jokingly adds that he felt he was never good enough to be a pure mathematician. In the course of our conversation with him, he took us on a journey through the diverse areas in which he has applied his statistical approach. Continue reading

Linear algebra… with diagrams

A succinct—if somewhat reductive—description of linear algebra is that it is the study of vector spaces over a field, and the associated structure-preserving maps known as linear transformations. These concepts are by now so standard that they are practically fossilised, appearing unchanged in textbooks for the best part of a century.

While modern mathematics has moved to more abstract pastures, the theorems of linear algebra are behind a surprising number of world-changing technologies: from quantum computing and quantum information, through control and systems theory, to big data and machine learning. All rely on various kinds of circuit diagrams, eg electrical circuits, quantum circuits or signal flow graphs. Circuits are geometric/topological entities, but have a vital connection to (linear) algebra, where the calculations are usually carried out.

In this article, we cut out the middle man and rediscover linear algebra itself as an algebra of circuit diagrams. The result is called graphical linear algebra and, instead of using traditional definitions, we will draw lots of pictures. Mathematicians often get nervous when given pictures, but relax: these ones are rigorous enough to replace formulas.

Variations on Fermat: an agony in four fits

Fermat’s Last Theorem has been a source of fascination and the motivation for an enormous amount of mathematics over the last few centuries, both in attempts (eventually successful) to prove it and as the inspiration for other related questions.

This is the story of how an algebraic question inspired by Fermat’s Last Theorem morphed into an analytic question, which subsequently turned out to be expressed best as a geometric question, which could be answered using basic methods of plane geometry.

Slide rules: the early calculators

Believe it or not, I never leave home without my trusty slide rule in my pocket. In the years before 1970, this would have been totally normal for any engineer, with the slide rule being the archetypal symbol of the engineering profession, much like how the stethoscope remains that of the medical profession. However, with the advent of the pocket calculator, the slide rule has completely vanished from public view and its demise is a wonderful example of a paradigm shift, as described by Thomas S Kuhn in The Structure of Scientific Revolutions.

I often get asked “What are you doing with that thing?” when I grab my slide rule to convert miles to kilometres or, once I’ve finished refuelling, to calculate my fuel economy. Most of my students have never seen a slide rule and are at first quite incredulous when I show them my Faber–Castell 62/82N. Not that I’ve ever managed to convince one of them to switch to a slide rule, but at least I normally manage to instil some interest in them for these mathematical instruments.

Seven things you didn’t notice in Issue 04

With just a few days to go until we launch issue 05, we thought it’d be fun to share a few bits and pieces that we hid around issue 04. If this gets you excited for issue 05, why not come to the launch party on Tuesday?!

Scorpions

Since we published the horoscope in issue 03, scorpions have been running around all over Chalkdust HQ. Three of them managed to sneak into issue 04.