It's weird because the Simpsons only
have four fingers on each hand. The
Simpsons should occupy a base eight
world. The one thing I can tell you is
that there is one character in The
Simpsons who has five fingers, and this
is why they live in a decimal world.
A while ago I began to realise that the
Simpsons writers are very mathematical.
They drop in bits of maths in the series
over the last 25 years. And maybe the
most common bit of maths it pops up in
the Simpsons is pi. My favourite mention
of pi is in an episode called 'Marge in
Chains'; and the episode revolves around
the fact that Marge is accused of
stealing something from Apu's
Kwik-E-Mart. And she's put on trial and
Apu is the main witness and he's in
the witness box and Marge's attorney
tries to discredit him by saying that
his memory is not very good. Now Apu
responds by saying that in fact his
memory is so good that he can memorise
pi to forty thousand decimal places; and
the forty thousandth decimal place is 1.
When I met the writers I said, oh you
know so how did all of this happen? How
did it how did it work out? And one of
them, I think it was Al Jean, said that
he'd been aware of people's ability to
memorize pi. And the record at the time,
in 1993, was forty thousand decimal
places, so the reason why Apu
claimed forty thousand was because
that matched the record at the time. And
I said, well how- and who figured out that
the forty thousandth decimal place was 1?
Because this is kind of going back to
before Google and and having things on
tap. And he explained that what they did
was they contacted a mathematician who
works in this area, a chap called David Bailey,
who is a world expert in pi. And and
David Bailey has actually invented a
completely new way of calculating pi. But
before we do that maybe it's worth
looking at some of the old ways first?
(Brady: Let's do it.)
(What have you got that bucket for?)
To avoid my embarrassment at drawing circles,
here is a circle generator - whoops there
we go. Right, so if you want to measure pi
you need to know the diameter and you
need to know the circumference. Now the
diameter is kind of easy to measure but
the circumference is much harder. And I
think it was- oh I think it was
Archimedes who said, well, one way to
begin to get a handle on the perimeter is to
draw squares. So you draw a square around
the circle and you draw a square inside
the circle. Now it's quite easy to
measure the perimeters of a square, a
small square and a large square; and you
know that the perimeter of the circle
must be trapped between those two
numbers. And it's a very very rough and
ready calculation, it's really not a
clever way to measure pi. But then
imagine instead of using a square you'd
use an octagon, okay? And the same thing
you would do here, you put an octagon
inside like that. And so the more edges
that the polygon has, the more accurate
you can begin to home in on pi; and I
think Archimedes used 96 sided polygons
in order to home in on his value of pi.
But that still doesn't get us very far,
and so eventually people begin to
develop formulae for working out pi.
Leonard Euler, the 18th century
mathematician, came up with pi to the
fourth power over 90 equals 1 over 1 to
the power 4, plus 1 over 2 to the power 4,
plus 1 over 3 to the power 4, plus 1 over
4 to the power 4, and so on. And with this
kind of formula, and there are lots of of
them, the more terms you calculate the
more accurate your value of pi. Now
that's fine if you only need some of the
early digits; but if you want the 40,000th
digit, which is what Apu wanted, it's a
lot of work. And what David Bailey
invented which is really clever is
what's called a Spigot Algorithm. And a
spigot algorithm - a spigot is a kind of a
tap, an old-fashioned word for a tap. And
taps drip - drip, drip, drip, drip, drip. And a
spigot algorithm will drip you whichever
decimal place you want. So if you say,
well I want the 995th
decimal place of pi you tune the
spigot algorithm and the 995th
decimal place of pi
drops out. And so they called the right
guy, you know the Simpsons team were
talking to David Bailey, the real expert,
you want the 40,000th
digit? David Bailey will give it to you;
except his spigot algorithm only works
in hexadecimal.
So it only works in base 16. So if you want
pi written in base 16 to the 40,000th
decimal place then David Bailey can can
give you the answer. So so in the end
what they had to do was- well what David
Bailey did was he just printed out
40,000 digits of pi and sent them in the
post to the Simpsons office, and they
referred to that in order to
check that the 40,000th digit was indeed
1. - (The spigot algorithm sounds like a)
(work of genius. Is it very useful though?)
(What- what person ever wants a specific)
(digit of pi?) - Umm, that's a good question. I
mean, pi is- I mean there are two reasons
for doing mathematics: one reason is
to is to solve problems. You know, you
might call that applied mathematics and
engineers and scientists use it
everybody uses it in order to get
something done. But the other half of
mathematics is what we might call pure
mathematics and it's purely there for
the love of mathematics, for the
enrichment of mathematics. And I suspect
that a spigot algorithm is is really
done for the love of it, for trying to
understand this wonderful number we call
pi. Two other things worth mentioning
about about Apu; so Apu's in the
witness box, he's saying that he can
remember 40,000 digits of pi and that
the the 40,000th digit is 1. And the
Simpsons writers had got all this
information from David Bailey at NASA.
I tried to contact the writers of that
particular episode, a guy called Josh
Weinstein and Bill Oakley. And I I didn't
talk to Bill but I did speak to Josh, and
I said to Josh, oh you must
be really interested in maths to put
this in? And he's not a mathematician. And
it turns out that when he wrote the
script there was nothing about pi in it at all.
The attorney says to Apu, you don't have a
very good memory. And Apu's response
was nothing to do with pi; Apu's
response was, oh yes when I was in India
I was known as Mr. Memory and there've been
over 400 films made about my
fantastic memory. And so the original
script did not mention pi. But what
happens in the Simpsons is that once
you've done a draft script
you sit down around a large table with
eight or nine other writers and they
pitch in. And at that stage there were
one or two mathematicians who said, well
why don't we make Apu's memory-
why don't we define his memory by his
ability to remember pi? So it's the
mathematicians who then crowbarred that bit
of pi mania into the script.
The other interesting thing is that the
40,000th digit of pi is 1, 40,000th
decimal place of pi is 1. But that's
only in decimal. If you have other bases
you will have other digits popping up in
that place. So by this stage we're
thinking, well okay the Simpsons world is
a decimal world. And there's nothing
wrong with that; my world is decimal, your
world as decimal, the world seems to be
decimal. In the Simpsons however it's
weird because the Simpsons only have
four fingers on each hand. And if you
have four fingers, or three fingers and a
thumb, on each hand - let's do that - that's
eight digits. The Simpsons should occupy
a base 8 world. So why are they
messing around with pi in decimal, when
they should be messing around with pi in
base 8, in octal? So when I was over
in Los Angeles thinking about this and
talking to the writers, you know, why
why is it that the characters have got eight
fingers, why is this decimal? And you know
I soon realise that eight fingers in the
cartoon world is a given. Mickey Mouse
had eight fingers, Felix the Cat I think
at eight fingers - they all have eight
fingers. Because if you have five it
looks like a bunch of bananas apparently.
The one thing I can tell you is that
there is one character in the Simpsons
who has five fingers. And this is why
they live in a decimal world, because the
one character in the Simpsons who has
five fingers on both hands is God, and
God determines how numbers work and
therefore the numbers in the Simpsons
are decimal not octal.
In case you don't know, but you probably
do if you watch Numberphile, Simon has a
book out all about the Simpsons and
their Mathematical Secrets. It has not
one but two chapters about pi, so why not
check it out and I'll put a link in the
video description if you want to have a
peruse of some reviews and maybe make a
purchase. I've already got my signed copy.
And of course here at Numberphile we've
done loads of videos about pi in the
past and I'm sure we'll be doing more on
the future. I'll put a link on the screen
for anyone that wants to check some of
them out.