post

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

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

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...

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!

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 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...

Happy birthday to me…

post

Donald in Mathmagic Land

Made by Disney and released in 1959, Donald in Mathmagic Land is an educational movie featuring the famous cartoon duck who discovers the beauty of mathematics and realises that there is much more to it than just numbers. The film was rolled out to school teachers to present to their class, and it proved to be one of the most popular of all educational films. Perhaps you are one of those teachers, or maybe, like me, you’ve seen it for yourself as a school child. I still remember being shown a few clips of it when I was just a teenager. I loved it so much that a few years later, I just had to watch the whole movie!

A pentagram. The coloured edges are related by the golden ratio.

A pentagram. The coloured edges are related by the golden ratio.

Moreover, Donald Duck became my favourite Disney character, all thanks to this one film! After all, he starts off thinking maths is only “for eggheads”, but by the end of the video he understands how useful (and fun!) mathematics is. That is why I am convinced that there is so much more to Donald than the grumpy, foolish persona we see in the other Disney cartoons—and why it breaks my heart whenever I hear someone call him “stupid”.

Donald in Mathmagic Land spends much of its time showing the power of the golden ratio, first by demonstrating how it appears in a pentagram; not just once, but many times over. There is even a shape based on this beautiful proportion, and it is called the golden rectangle. But the golden ratio does not only turn up in abstract shapes—you can also find it in buildings, paintings, shells, trees, ferns and in us, too!

A petunia, star jasmine and starfish.petunia: Andrew Bossi, CC BY-SA 2.5; star jasmine: Philippe Teuwen, CC BY-SA 2.0; starfish: Paul Shaffner, CC BY 2.0

A petunia, star jasmine and starfish.
petunia: Andrew Bossi, CC BY-SA 2.5; star jasmine: Philippe Teuwen, CC BY-SA 2.0; starfish: Paul Shaffner, CC BY 2.0

Donald himself doesn’t fit the golden proportion, though he does manage to get “all pent up in a pentagon”! Speaking of which, nature has plenty of pentagons on offer, too: the petunia, the star jasmine and the starfish are only a few such specimens. There are thousands more examples out there.

It’s all too easy to forget that mathematics also crops up in many kinds of games. If you spent your summer watching the Euros or the Olympics, then you have seen many different geometrical areas, but probably took them for granted! For example, basketball is chock full of circles, spheres and rectangles; baseball is played on a diamond; even chess and hopscotch are games of squares. The narrator also presents a trick behind the game of billiards which relies on…you guessed it—maths!

The conic sections.Magister Mathematicae, CC BY-SA 3.0

The conic sections.
Magister Mathematicae, CC BY-SA 3.0

And then there is my favourite part of the entire movie: the mind games. Before starting, it is hilarious to see how cluttered Donald’s mind is but, once it’s cleared, he goes on a roll! He starts out with just a circle and a triangle. Donald discovers numerous inventions including magnifying glasses, wheels, propellers, gears, springs, telephones, pistons and many more—far too many to cover in one blog post! He also comes across the conic sections, from the ellipses that make up the planetary orbits to the parabolae seen in searchlight reflectors.

Yes, mathematics plays an important part in scientific discoveries and technological advances. Plenty of these doors have already opened, but there are still many more that remain locked. When I first saw the film, I was part of the next generation, waiting to unlock the doors of the future. Now it’s my turn to start unlocking and, who knows, maybe someday you will open one of those doors, too. Just remember, the key to the doors is none other than mathematics.

But don’t just take my word for it—have a look at the film for yourself. Oh, and watch out for Lewis Carroll and the visual pun on square roots!

If there is one way to end this blog post, it would be with the quote from Galileo at the end of Donald in Mathmagic Land

“Mathematics is the alphabet with which God has written the universe”.