Professional Documents
Culture Documents
-------------
Tony Knight
The Maths Notebook
Love Dad
Contents
Page
Introduction 3
Chapters
Credits 131
Index 133
1
2
Introduction
Mathematics, whether you love or hate it, is the cornerstone of many day
to day subjects. Mathematics is fundamental to the science of
mechanics, nuclear physics, chemistry, astronomy, geology and biology.
It can explain why buses come in threes, why apples fall on your head
and why your chances of winning the National Lottery are seven times
less than being killed by lightning. Mathematics is woven into nature
itself. It describes how the sections of DNA link together, why there are
102 women for every 100 men on planet Earth and why black holes
react chaotically.
I think there are two main reasons. Firstly, it is the way mathematics is
taught (although this applies to most subjects) and, secondly, the fact
that most maths textbooks have fewer pictures than most books in favour
of (sometimes rather complicated) formulae. The majority of
maths books drown in detail and the interesting topics never get a
chance to surface.
3
exotic Ferrari, nor do you have to be able to play the guitar to appreciate
rock music. It follows that you don’t have to be an expert to understand
and appreciate the diverse subject of mathematics.
This book is not a maths textbook, although a few formulae are included
for those of you who want to have a deeper understanding of the
problems we tackle. It’s also not a novel; you can dip into any chapter
without having read the ones before. The subjects themselves follow no
particular order and are simply a collection of the subjects I have found
interesting over the last 30 years. I hope you find them interesting too.
4
Chapter 1
Sequences and Series
From our infancy we are taught to look for patterns in lists of numbers.
By the age of three most children can count to 10. By the time we leave
Primary School we should all know our “times tables” up to 12. So you
should have no problem guessing what comes next in the sequences
below:
1, 2, 3, 4, 5 …
3, 6, 9, 12, 15 …
2, 4, 8, 16, 32 …
The first two of these sequences are “Add” (or Arithmetic) sequences,
where the difference between each number is fixed (add 1 and add 3
respectively). The third is a “Multiply” (or Geometric) sequence, where
each number is 2 times the last. If you have ever tried an “IQ” test you
will have seen these types of sequence. They are sometimes combined,
for example :
2, 5, 11, 23, 47 …
This uses “multiply by 2 and add 1”. Note that the difference between
the numbers gives some clues. The differences are 3, 6, 12 and 24,
hinting that there is a “multiply by 2” involved. This by itself always
leaves you short by 1, and the “add 1” is the final step.
3, 4, 7, 16, 43 …
5
Fibonacci’s rabbits
When the numbers start getting larger, it’s easier to use a diagram to
keep track of all the rabbits !
The pattern that Fibonacci spotted was that the next number is the sum
of the previous two. So the next number is 13 + 21 = 34. This has a
nice feeling to it, as the rabbits don’t breed immediately and so don’t
quite double in numbers each year; there is a built in delay which means
that only those rabbits that have been around a year get the chance to
double in numbers.
6
Interestingly, Fibonacci’s numbers arise in nature not just with rabbits.
On many plants the number of petals is a Fibonacci number. Next time
you see a daisy count the petals and there’s a good chance it will have
21, 55 or 89 petals. Pine cones are worth a look at too; if you look at
one from the base you should find that the number of spirals of seeds is a
Fibonacci number.
Not all sequences diverge, though. What comes next in this sequence.
1, ½, ¼, 1/8 …
Unfortunately our hopping friend never makes it. He gets close, but
each time he jumps he still has that distance again to cover. After 8
jumps he is less than one centimeter from his goal. Another 3 jumps and
he’s within a millimeter. After 60 jumps he’s within the width of an
atom (10-18 metres) of the side. But he’ll never get there.
What the frog does demonstrate is that the sequence, if you add it up far
enough, gets very very close (or converges) to 2. So we can say that :
7
1 + ½ + ¼ + 1/8 + 1/16 + ···· = 2 (for “····” read “going on for
ever”)
We can see that each term in the series is 1 divided by a power of 2. For
example:
Incidentally, frogs are pretty stupid animals. If you put a frog in a pan of
cold water and start to heat it up, the frog won’t jump out. They cannot
detect changes in heat so think the water is still cold, despite being
boiled alive !
The kangaroo starts off by jumping 1 metre, then ½ metre, then 1/3
metre, then ¼ metre. His 10th jump will cover 1/10 metre, or 10 cm. And
his 100th jump 1/100 metre, or just 1cm. How far do you think his
jumping journey will take him ?
1 + ½ + 1/3 + ¼ + 1/5 + … +
8
You might think that the kangaroo is not going to get very far. Maybe a
little further than Froggy in the previous series, but not across Australia !
To get an idea where this series is going, let’s work out the sum of the
first few terms using a computer.
10 terms 2.92897
100 terms 5.18738
1,000 terms 7.48547
10,000 terms 9.78761
So after 10,000 jumps our kangaroo has not yet covered 10 metres.
However, the kangaroo will get across Australia given enough jumps !
You don’t believe me ? Well, to prove this, we can compare the series
of jumps to a series of smaller jumps that is a whole lot easier to add up.
If the smaller series gets as big as we need (in this case the width of
Australia) then the kangaroo series will too.
Jump 1 1 1 1
Jump 2 ½ ½ ½
1
Jump 3 /3 ¼ } ½
Jump 4 ¼ ¼ }
1 1
Jump 5 /5 /8 }
1 1
Jump 6 /6 /8 } ½
1 1
Jump 7 /7 /8 }
1 1
Jump 8 /8 /8 }
1 1
Jump 9 /9 /16 }
··· ··· ··· } ½
1 1
Jump 16 /16 /16 }
In jumps 3 and 4 the kangaroo jumps 1/3 and ¼ of a metre. This is more
than ¼ and a ¼, i.e. ½ metre. In jumps 5, 6, 7 and 8, the kangaroo jumps
9
1
/5, 1/6, 1/7 and 1/8, which is more than 1/8, 1/8, 1/8 and 1/8, i.e. ½ metre.
Similarly, the eight jumps from jump 9 to jump 16 are more than eight
jumps of 1/16 of a metre, i.e. more than ½ metre.
Some sequences can be used to work out the value of π (pi), the ratio of
a circle’s circumference to its diameter. Did you know that the
following series totals pi ?
4
/1 – 4/3 + 4/5 – 4/7 + 4/9 - ··· = π
Also,
6
/1 + 6/4 + 6/9 + 6/16 + 6/25 + ··· = π2
The first series is called “Liebnitz formula for pi” (named after the 17th
Century German Gottfried Leibnitz). If you try this one on your
computer you will find it takes a very long time to converge on pi;
oscillating above and below the true figure. After five million terms the
sum is right to only 5 decimal places ! The second one is a little faster.
10
Chapter 2
Magic squares
6 1 8
7 5 3
2 9 4
Try adding any row (left to right) or column (north to south) of the sets
of numbers shown in the table. They all add to 15. Even the diagonals
add to 15! It’s no surprise that these squares are called “Magic Squares”!
History is peppered with references to these squares and their mysterious
properties. The earliest reference to magic squares was in Chinese
literature dating from as early as 2800 B.C. A Magic Square known as
the "Loh-Shu", or "scroll of the river Loh", was invented by Fuh-Hi, the
mythical founder of Chinese civilization. It is the oldest example of a
magic square.
The Loh-Shu is shown below, together with its modern day equivalent
(counting the numbers of dots). In Loh-Shu, the odd numbers are
expressed by white dots (yang symbols, the emblem of heaven). The
even numbers are represented by black dots (yin symbols, the emblem of
earth).
4 9 2
3 5 7
8 1 6
11
The Loh-Shu magic square is the same as the first square shown except
that it has been rotated by 180 degrees. There is only one 3 x 3 magic
square.
16 3 2 13
5 10 11 8
9 6 7 12
4 15 14 1
All rows and columns add to 34. The two main diagonals also add to 34.
Most magic squares are fairly “robust” and you can play about with
them without messing up the magic. For example a magic square will
remain magic if you:
12
• Add any number to every number of a magic square.
14 19 12 8 18 4 2 9 4
13 15 17 6 10 14 7 5 3
18 11 16 16 2 12 6 1 8
You can also swap the quadrants of any even magic square and it will
still obey the rules. Make sure that the quadrant is moved rather than
reflected. For example, with “Melancholia” we can swap the four
quadrants to get.
16 3 2 13 7 12 9 6
5 10 11 8 14 1 4 15
9 6 7 12 2 13 16 3
4 15 14 1 11 8 5 10
13
There is a 5 x 5 square, and there are squares for any odd number (so
there is a 99 x 99 one too !). One simple way to construct odd x odd
magic squares is called the “pyramid method”, as described below.
Each of the rows, columns and the diagonals adds up to 75. Nice !
14
The further reading section gives more information if you want to follow
this further but, for now, I will leave you with a special 9 x 9 magic
square. It is referred to as a “pan-magic” or “pan-diagonal” magic
square as all broken diagonals also add up to the “magic sum” (in this
case 369). For example, the diagonal 13, 32, 11, 54, 70, 49 then
continuing 56, 21, and 63 also adds to 369. It’s amazing that a square
this side has such flexibility in the ways that the numbers can be totaled
to the same answer !
15
All about A4 paper
If you have ever folded a piece of A4 in half you might know why.
Folding A4 in half produces another rectangle that is exactly the same
shape as A4. This means that the ratio of height to length is maintained.
What you produce is A5 paper, a mini A4 ! And folding A5 in half
produces A6, which is the same shape as A4 and A5, just smaller still !
A6 A6
A5 folded halfway
A5 becomes A6.
If you’ve ever seen a sheet of A3, you can check that this works in the
opposite direction too; a sheet of A3 is exactly the same shape and size
as two sheets of A4 stuck together along the long edges.
16
1.5, then folding in half would give 15cm x 20 cm, a ratio of 1.333. The
sheets would not be the same shape.
H cm
H / 2 cm
W cm
Now we know that they must be the same shape so the ratios of the two
sides must be the same. So we have :
h / w = w / (h/2), and
h2 = 2 w2, or h = √2 w
The table below shows the whole range of paper from the largest size,
A0, to the smallest, A8. Sizes are in metres.
17
Okay, now we know how they combine together but we still haven’t
answered the question of why 29.73 cm x 21.02 cm ? We could choose
A4 to be a different size, so long as we maintain the ratio of height =
width x √2. For example we could choose A4 to be 30 cm x 21.21 cm.
18
Chapter 4
The human calculator
Do it in your head !
There are few things more impressive than the ability to multiply
together big numbers without a calculator. But you don’t have to be
superhuman to do it ! There are a few “shortcuts” and, with practice,
your friends will soon be convinced that you are a human calculator !
Squaring numbers
Numbers ending in 0
Anything ending in zero should be pretty easy. Just ignore the 0 and add
two 0s on the end after squaring. So for 120 x 120 just read 12 x 12 and
add two zeros, giving 14,400. If your original number ends in n zeros
then ignore them all but add 2n zeros at the end. So 120,000 (4 zeros)
squared is 14,400,000,000 (8 zeros)
Numbers ending in 5
abc2 = ( 10 x ab + c ) 2
19
100 (ab) x (ab + 1) + 25.
So all you need to do is multiply together the first two digit number by
one higher and add a 25. An example will help clarify this.
Example
115 x 115.
ab = 11, c = 5.
(ab +1) is 11 + 1 = 12.
11 x 12 = 132.
Finally add 25 on the end and hey presto, the answer. 13225 !
Try another. What is 305 x 305 ? The only tricky part is 30 (first two
digits) x 31 (add 1) which breaks down to 30 x 30 = 900 plus another 30,
so 930. And add a 25 on the end. So we have
If you can remember a few of the higher powers of 2, then this can be
very impressive.
With this in mind, what is 2,565 x 2,565 ? Okay, we are now in 4 digits
but the process is still the same. Ignore the last 5, and multiply the first
three digit number by itself + 1 :
256 x 257 = 2562 + 256 = 65536 + 256 = 65792. Add a 25 and we get
No one will believe you until their calculator confirms your are correct !
20
Numbers ending in 6 or 1
(n+1)2 = n2 + 2n + 1,
we can then add on twice the number ending in a 5 and add 1 more.
If our number ends in 1, the same process is used, for example for 111 x
111 we have
Numbers ending in 4 or 9
What if we have to multiply 114 x 114 ? Well we use the technique for
6s and 1s but we subtract, rather than add, step 2. As, for any number n,
(n-1)2 = n2 - 2n + 1
21
Numbers ending in 2, 3, 7 and 8
These are only slightly trickier. They are two away from the easy
numbers 5 and 0 so you have to add or subtract a little more. As it turns
out, you need to add on four times the number between your target
number and the nearest multiple of 5. As always, a couple of examples
will help.
If you are faced with a more difficult calculation, say 321 x 654, don’t
reach straight for the calculator or pen & paper - there is still a way to
perform the calculation in your head !
22
Let’s take 321 x 654 as our example.
321
x 654
As I’ve said, it takes some practice but it works with any two numbers.
You are only limited by your ability to remember the two numbers and
the answer as it is generated !
23
Chapter 5
Pythagoras’s Triples and Fermat’s last Theorem
Pythagoras of Samos, Greece, was born nearly 2,700 years ago around
650 BC. One of the world’s first mathematicians, his life was spent
following religious and scientific pursuits in broadly equal amounts.
Little was recorded of his work as his “followers” were sworn to secrecy
! Later biographies, however, rightly credit Pythagoras with many
discoveries in Mathematics, Astronomy and Physics.
Pythagoras of
Samos, circa
630 BC
“for a right angled triangle, the sums of the square of the hypotenuse
(the longest side) is equal to the sum of the squares of the two
smaller sides”.
24
4) So the big shaded square also has area = c2 + 4(ab/2).
Although this holds true for ALL right angled triangles, the more
interesting ones are those with sides that are all whole numbers. These
are known as “Pythagorean triples”, or “triples” for short. These are
triangles with sides length a, b and c such that :
The best known triple that you may have encountered is the ( 3, 4, 5 )
triangle shown on the next page.
25
The ( 3, 4, 5 ) triangle
Sum of squares of
smaller sides = 25 =
sum of square of longest
side
With trial and error (or using your PC) you can soon work out all the
triples with sides of 25 or less. Those marked with a “M” are not so
special as they are just a multiple of an earlier triple.
(3, 4, 5)
(5, 12, 13)
(6, 8, 10) M
(7, 24, 25)
(8, 15, 17)
(9, 12, 15) M
(12, 16, 20) M
(15, 20, 25) M
Pythagoras found that there was a formula to generate triples and proved
that all triples (excluding multiples) would be generated this way. The
theorem is stated overleaf. If you don’t understand it all don’t be put
off, it’s easier than it appears !
26
How to generate Pythagorean triples
a>b
a ≠ b mod 2,
In plain English, to generate a triple just feed in two numbers, call them
a and b, into the equations 2ab, a2-b2 and a2+b2. The triangle generated
by these numbers (2ab ,a2-b2, a2+b2) will be a triple. And all triples will
be generated this way, there are no others (this is what the reference to if
and only if means).
• a and b must be coprime. This means that they must not both be
divisible by the same whole number (other than 1). So you can’t use
9 and 6, for example (both divisible by 3), but you can use 7 and 4.
• a and b must be odd and even, or even and odd, with a greater than
b. But they must not be both odd or both even. This is the same as
saying a ≠ b mod 2, meaning that a and b must not have the same
remainder after you divide by 2 (all even numbers would have
remainder 0 and all odd numbers 1).
2 1 4 3 5 ( 3, 4, 5 )
3 2 12 5 13 ( 5, 12, 13 )
4 1 8 15 17 ( 8, 15, 17 )
4 3 24 7 25 ( 7, 24, 25 )
5 2 20 21 29 ( 20, 21, 29 )
5 4 40 9 41 ( 9, 40, 41 )
27
The first four are the same as previously listed excluding the multiples
(“M”s).
Try the formula for yourself. You will see that the sizes get large quite
quickly. There are only 16 triples where all the sides are less than 100.
Fermat’s Theorem
Pierre de Fermat,
here immortalized
on a 2001 French
Stamp.
In the 17th century, Fermat was a leader in the field of number theory.
He is usually remembered for his claim that
At the time he claimed to have solved the theorem, rather than set out a
full proof Fermat left only a comment in his notes that :
28
Fermat died shortly after this claim and his proof, if he indeed had one,
went with him to his grave. The theorem was immortalized as “Fermat’s
last theorem” and is despite three subsequent centuries of mathematical
attack by many of the world’s best number theorists, Fermat’s last
theorem remained unproven until it was finally proved to be correct in
1994 by Englishman Andrew Wiles. Wiles had read about the theorem
as a ten year old and had devoted his entire life to solving this famous
theorem. Now that’s dedication ! Wiles also suspects that Fermat had
established a proof for a easier, intermediate, result rather than the full
theorem, but we will never know !
29
Chapter 6
How big is infinity ?
Thirty years in and we pass the (American) billion mark. There are over
100 billionaires in the world including, at the current top slot, Microsoft
founder Bill Gates (with around $ 50 billion). If you counted Bill’s
fortune in $ 50 bills it would take you this long (31 years) ignoring any
interest ! But let’s continue on...
5 billion years is the estimated time before our star, the Sun, runs out of
hydrogen. By then the Earth will be a very cold place, or might even
have been swallowed by the Sun as it balloons into a Red Giant. So let’s
carry on from the warm comfort of our spaceship. Time is almost
irrelevant now as we count higher and higher but there are still some
interesting numbers to pass.
30
Number Comment
There is one more number to pass before we head out into the unknown
on our never ending quest. There is an equation concerning the
distribution of prime numbers that, in 1912, was proven to fail
“eventually”. In 1933, a mathematician called Skewes showed that it
would fail before the number below. To make it easier to type, read “^”
as “to the power of”. So a Google is 10 ^ 100. And a Googleplex is 10
^ 10 ^ 100.
With his investigation into primes, Skewes did refer to even higher
numbers called Skewes’ second number, Skewes’ third number, and so
on. By any imagination, this is a big number. You can’t even describe
it by saying “1 with so many zeros on the end”. Even with the number
of Atoms in the Universe as zeros, you are nowhere close, nor are you
with “atoms squared”, or more. It’s surprising that we can describe the
number with just eleven typewriter characters.
What we have shown is that taking powers of powers soon adds up.
Even with the simple, and relatively small, 2 ^ 2 ^ 2 ^ 2 :
2 ^ 2 ^2 ^ 2 = 2 ^ 2 ^ 4 = 2 ^ 16 = 65536
31
With 3s, it becomes :
Infinity ∞
No matter what number you pick, there is always a bigger one. And if
you ever played the “name a bigger number” competition at school,
there was only one Top Trump. Infinity. By the way, the infinity sign,
∞, is called a Lemniscate.
Okay, someone would always then say infinity + 1, and then you would
reply infinity plus 2. At the blurred edge of infinity, however, the usual
rules of mathematics don’t apply. You see :
Infinity + 1 = Infinity
The two are the same quantity. Mind bending, isn’t it ? If you are going
to count forever, it doesn’t matter if someone has started a few numbers
ahead of you. You will both count forever.
2 x Infinity = Infinity
Googleplex x Infinity = Infinity
Infinity x Infinity = Infinity
The above equalities tell us that the following sequences have the same
number of terms. Remember in each case you are counting forever.
32
What happens if we look at the set of fractions, or rational numbers ?
As well as 1, -3 and 10 the rationals includes ½, ¾ and - 844/701. Surely
this set cannot be the same size as the set of natural numbers 1, 2, 3 … ?
After all, the space between 0 and 1 contains an infinite number of
fractions ! It must be a lot bigger ?
The rationals turns out to be the same size as the naturals. To understand
this you need to appreciate how mathematicians compare infinities.
They look for a rule, a “one to one” relationship (or bijection) that links
the two sets together. If there is one, the infinities are the same size (or
have the same cardinality).
This contains all the possible fractions (and, by definition, all the natural
numbers). We can put them in a one to one order with the natural
numbers 1, 2, 3 as follows. Working in diagonals running top right to
bottom left, start at the top left with 1/1 and then count down through 2/1
and 1/2, then across again to 3/1, 2/2 and 1/3. As we have a one to one
link they are the same size or cardinality, each set can’t “out count” the
other.
Just when you think we have reached the maximum, along comes a
genuinely bigger set. The set of real numbers, which include numbers
like √2 and π, is a lot bigger than the rationals. So big, in fact, that you
can’t establish a one to one system like the above. So how do we refer
to this new champion of infinities ?
33
Alephs
The first, most basic infinity, is known as Aleph 0, or . The set of real
numbers is bigger and is called Aleph 1 ( ). In your classroom battle,
Aleph 1 is a lot bigger than plain old infinity. Your battle is won. But is
there such a thing as Aleph 2 (and higher) ?
Having come this far you will be interested to learn that there is no
maximum Aleph. They too go on forever and there is an easy way to
establish the next Aleph from the one before. To get the next Aleph,
construct a set of all possible combinations of numbers from the
previous set. For example, looking just at the numbers 1, 2 and 3 we
would construct the seven possibilities
The power set of the rational numbers is exactly the same size as the real
numbers (Aleph 1). And the power set of the real numbers is a whole
new infinity (Aleph 2) bigger than anything else we have encountered,
including imaginary numbers.
So keep counting Alephs and your playground battle will carry on and
on and on …
34
Chapter 7
Actuarial science - the mathematics of mortality
Actuaries are modern day crystal ball gazers. Whilst accountants add up
what has happened in the past, actuaries forecast what might happen in
the future based on the evidence they have to hand. Most actuaries work
within the insurance industry. Virtually everyone over the age of 18 has
life insurance (or, to use its correct description, life assurance) and
actuaries work out the premiums to charge for any particular level of
cover.
With all this money at stake and with payment for assurances
determined (or stopping) upon survival (or death), actuaries need to
know how long people will live for. Now we can’t work this out
individually, no-one can, but we can have a good guess if we have a
group of people and this leads us on to :
35
Mortality tables (or your chances of dying).
Based on the data collected, we start with a group of 100,000 men, who
were all born in the same year. So at age 0 we have 100,000 lives.
By the time our men are aged 1, 586 of them have died and we are left
with 99,414. As we progress through ages 2, 3, 4 the number of deaths
drops dramatically. Being born can be traumatic and many deaths in the
age group 0 to 1 occur within the first few hours of life. If you make it
through birth without complications, you are pretty safe through ages 2,
3 and 4. We only have 60 deaths in nearly 100,000, equivalent to a
0.06% chance of death in this three year band.
Through the ages 7, 8 and 9 your chances of dying are about as low as
they get. Most children this age have a good diet and don’t tend to do
anything that puts their lives at risk.
By 17 though, the numbers start to rise. Look at the rise from 15 to 18,
nearly a three fold increase. Examining the causes of deaths reveals that
most deaths in the 17 to 20 year group are road traffic related. Passing
your test and getting a car (or worse, a motorbike) increases your
mortality substantially. You have been warned !
By your 40s, health problems start to play the major part. Lung disease,
heart problems and cancer claim their victims. And the numbers rise
rapidly though 50, 60 and 70.
36
Expected
Probability of
Age Lives left deaths next
dying
year
0 100000 586 0.586%
1 99414 41 0.041%
2 99373 26 0.026%
3 99347 18 0.018%
4 99329 16 0.016%
7 99287 11 0.011%
8 99276 10 0.010%
9 99266 11 0.011%
15 99177 26 0.026%
16 99151 36 0.036%
17 99115 53 0.053%
18 99062 75 0.075%
19 98988 71 0.072%
20 98917 81 0.082%
26 98429 83 0.085%
27 98345 86 0.087%
30 98077 94 0.096%
40 96894 164 0.170%
50 94470 384 0.406%
60 88703 959 1.081%
70 74683 2087 2.795%
80 45866 3614 7.880%
90 12176 2315 19.009%
100 521 130 24.933%
Just before 80 we see that we have 50,000 lives left. Half our population
has died and half remain. Equivalently, we can say that from birth one
has a 50/50 chance of getting this far.
By 90, 12% of our population are still alive. But by 100, less than 1% of
the starting 100,000 are still alive. Beyond 100 the sample data becomes
scarce but by 110 everyone bar a handful of either very fit, or very
lucky, men will be alive.
37
Medical advances
If evidence of medical advances were ever needed then just take a look
at the graph below. Three mortality curves are shown based on
survivorship data from
Mortality curves
100000
90000
80000
70000
Number alive
60000 2000
50000 1924
40000
1880
30000
20000
10000
0
100
10
15
20
25
30
35
40
45
50
55
60
65
70
75
80
85
90
95
0
5
Age
Comparing the deaths in the first year of life reveals some alarming
numbers. We have 586 deaths in 2000, but 11,538 in 1924 and an
astonishing 25,000 in 1880 ! In the late 19th century most Victorian
families were large. Having 10 or more children was commonplace and
in the absence of good hospital care, deaths during or shortly after birth
were all too frequent. Childbirth was also the biggest cause of female
deaths. If problems occurred during labour you couldn’t rush into the
nearest hospital for a caesarian section.
Look also at where the mortality curves cross the half way line of 50,000
deaths. In 2002, this is at age 79. In 1924, it was 66. But the 1880s
were, for most people, a very hard time in which to live; only half the
men born made age 38.
38
between the above curves. 1880 to 1924 saw a huge leap forward. The
main improvement was in infant mortality resulting from better
management of diseases and epidemics. The late 1800s also saw the
development of London’s sewers; until then open sewers lined the
streets and London’s plague rats outnumbered people.
Insurance
Now we have a table of average death rates, we can apply the figures to
calculate the cost of life assurance. What would be the cost of providing
£ 10,000 life assurance to a man aged 20 should he die before age 30 ?
From our first table, we know that of the 98,917 men alive aged 20,
98,077 were still alive at age 30. The difference, 840, is the number of
deaths between these ages. So the chance of death over the 10 years is
If we add on £ 50, say, as the cost of setting up the policy and £ 10 for
profit, then ignoring any interest we might earn on the premiums we
need to charge £144.92 over ten years, so we might charge £ 15 per
annum as a premium for the £ 10,000 cover. We would also ask, before
we provide cover, that the individual is fit and well at the time cover is
taken out. If not, we might be insuring someone who knows they are
about to die. Reducing and managing risk in this way is called
underwriting.
Using statistics in this way, actuaries calculate premiums for virtually all
risks, whether it is life assurance (deaths), car insurance (crashes) or
39
house insurance (burglaries). Actuaries are also employed at Lloyd’s, in
London, to assess larger individual risks, such as insurance for oil super-
tankers or insurance for insurance companies in the event of a bad year
of claims (e.g. the storms of 1987).
40
Chapter 8
The Towers of Hanoi
According to the myth, once they achieve their goal the temple will
crumble and the world will come to an end. The only rule is that the
priests have to move one disc at a time and that a bigger disc cannot be
placed on a smaller disc.
The Towers of
Hanoi, with 9
discs shown.
A bigger disc
cannot be
placed on a
smaller disc.
The priests work quickly and without error, moving one disc every
second. Even so, it will take them a long time to finish their task,
18,446,744,073,709,551,615 seconds or just over 580 billion years. If
the legend is true, at least we have some time to say goodbye to our
loved ones !
41
Edouard Lucas,
creator of the
Tower of Hanoi,
or “end of the
World” puzzle.
Three discs
Back to Lucas’ problem and we’ll start off nice and easy with just three
discs. I’ll refer to the three poles as A, B and C with the discs starting
on pole A.
The next diagram shows the steps involved (assuming you don’t make a
mistake!)
Note that steps 4 to 7 are similar to steps 1 to 3. Once the big disc is on
pole C we move the remaining stack (of 2 discs) back onto the big disc
in the same way as we moved them off. It takes us 7 moves in all.
42
Starting point
Step 2 – medium
disc to pole B
Step 6 – medium
disc to pole C
If we try four discs the procedure is similar except that we move the
smallest disc to pole B rather than pole C. Try it for yourself with four
coins of different sizes; it should take you 15 moves if you don’t make
any mistakes.
By now you might have noticed two things. Firstly, that the number of
moves is 2 to the power of the number of discs, less 1. Secondly, that to
move 4 discs can be broken down into moving 3 discs and the new
43
largest disc. With this last point in mind, the solution to moving four
discs is shown below.
Four discs
Starting point –
4 discs.
Steps 1 to 7
move the three
discs to pole B.
Step 8. Move
the largest disc
to pole C.
Steps 9 to 15
move the three
discs to pole C.
To move 5 discs we use the solution to moving 4 discs (twice) with the
middle move moving the new largest disc across. And we can continue
this approach to solving how to move 6, 7 or more discs. Generally, we
have shown that ANY number of discs, n, can be moved, without
breaking the basic rules of the puzzle, in 2n-1 moves.
a) Prove that the theory works for a particular number (in our case
3 discs)
b) Prove that if it works for number n, that it will work for number
n+1.
44
Showing a) is like knocking down the first of a line of dominoes.
Showing b) tells us that knocking down a domino will knock down the
next one. Together, a) and b) tell us that ALL the dominoes will fall (i.e.
our theorem works for all numbers). Applying this to the Towers of
Hanoi we can prove it works for any number of discs as shown below.
45
We have moved k+1 discs, so have proved b) to be true. With both a)
and b) proven, we have shown, by proof by induction, that we can move
any number of discs.
We can also prove that the number of moves required for k discs is 2k-1.
Again, let’s use induction. So we have to show that :
We just need to show b). Using the k+1 discs diagram above we can see
that it takes :
(2k – 1) + 1 + (2k – 1)
= 2(2k) – 1
= 2k+1 – 1. We are done !
Despite proving that we can do the puzzle with any number of discs, it
remains a difficult task to do manually. Try it with 6 or 7 discs and
you’ll appreciate how hard it is. However, the sequence of moves it
easy to program on a computer and there are several programs on the
internet that will let you sit back and watch the solution unfold.
46
Chapter 9
The five most important numbers
If you had to choose the five most important numbers, which would you
choose ?
First number
Zero is the only number that isn’t positive, or negative, and lies in the
middle of the set of natural numbers ( … -3, -2, -1, 0, +1, +2, +3 …).
Most equations are solved by setting the answer to zero. You can think
of it as the starting point for pretty much anything to do with
mathematics.
Also, if you have ever seen a roulette wheel, zero is also the only
number that is colour coded green (rather than black or red).
Second number
This is 1 (one).
47
4/4 =1
(4/4)+(4/4) =2
(4+4+4)/4 =3
How far can you get ? You can use any function / character shown on
the keyboard, including +, -, x, /, factorials (see help page) and decimals.
My answers are shown in the further reading section.
Third number
This is π (pi).
First of all, it doesn’t (as most people think) equal 22/7. This fraction
works out as a recurring decimal, of 3.142857142857142857 ….
Anyone could recite 100 decimal places of 22/7. But pi is not that
simple.
3.141592653589793238462643383279502884197169399375105820974
9445923078164062862089986280348253421170679
If you have ever tried to remember pi to more than 20 places you will
know how fiendishly difficult it is. The sequence is random – you can’t
48
generate the next place by a clever number trick. Reciting pi is
acknowledged, worldwide, as an ultimate test of memory. The accolade
of the world’s best pi-man (or woman) has changed hands many times in
the last 30 years for ever increasing number of places. The current
record is held by a Japanese man at 40,000+ places. It took him over 8
hours to recall !
If you are going to spend half your life devoted to memorizing a number
there must be something special about it. And pi is very special. It
crops up everywhere in the most unusual places.
Fourth number
But this left mathematicians with a problem. What about the solutions
to x2 = - 4 ? No real number multiplied by itself will produce a minus
number. This required some imagination.
49
The easiest way to imagine each imaginary number is in two parts; one
as a real number and one as a real number multiple of √-1,or “i”. All the
numbers you know, like 1, ½ or pi, are just a tiny snapshot of the real
number line slicing across the plane of imaginary numbers. The number
2 is just 2 + 0i. Likewise, pi is just π + 0i. It works very well with a few
rules.
You add imaginary numbers by adding together the real and imaginary
bits, for example:
( 2 + 3i ) + ( 1 – 2i ) = 3 – i
You multiply imaginary numbers by multiplying out each part of the two
numbers, for example:
( 2 + 2i ) x ( 3 – i ) = ( 2 x 3 ) + ( 2 x - i ) + ( 2i x 3 ) + ( 2i x – i )
= 6 – 2i + 6i - 2i2
= 8 + 4i (as i2 = -1)
Sample complex
numbers shown
on a real-
imaginary grid
If you want to add together two numbers just add the real and imaginary
parts.
50
Adding complex numbers
( 2 + 3i ) + ( 1 – 2i ) = ( 3 + i )
Adding together
complex numbers
( 2 + 2i ) x ( 3 – i ) = 8 + 4i
Multiplying
complex
numbers
51
same as the square of the length of the line to 2 + 2i multiplied by the
square of the length of the line to 3 – i.
Given that you can’t buy 3i apples or 4i beef burgers, “i” is a difficult
number to get to grips with. But its importance can’t be understated.
For mathematics and physics to be complete sciences we need complex
numbers and our imaginary friend i.
Fifth number
Like pi, it is also one of those special transcendental numbers and also
pops up in many mathematical formulae and solutions. And if you are
wondering why call it “e”, the number e was named after Leonard Euler,
a famous 18th century mathematician responsible for many
breakthroughs in number theory.
The main reason why e is important relates to the function ex. This
curve describes many day to day things, from the unrestricted, or
exponential, growth of amoebas multiplying in an unlimited food supply
to the decay of matter via atomic radiation. The length of the strings of
a piano also follows the exponential curve.
The derivative of ex is also ex. And it’s the only function that has this
property. This also means that the integral is also the same. Integrals
and derivatives sound rather complicated and, if you haven’t seen one
before, I’ll give you a real world example.
The Rocket
Imagine that the speed of a rocket follows the function 20x, where x is
the number of seconds since launch and we measure speed in metres per
second. It will fly for 10 seconds until it self-destructs. So at launch
(x=0) the speed is 20 times 0, which is 0. After 1 second it’s traveling at
20 metres per second and at 10 seconds (just before it explodes) at 200
metres per second.
52
We want to know how fast the rocket is accelerating and how far it
travels.
To find out what targets we can “hit” before it self destructs, we find the
integral, or integrate the function. Integrating speed gives us distance.
The integral of 20x is 10x2 (again, trust me) and with x = 10 seconds we
have 10 times 10 squared, or 1000 metres. So we can blast anything
within 1000 metres.
The nice thing about ex is that the differential and integral of ex are also
ex. So if our rocket was traveling at speed ex then the acceleration and
distance traveled is also ex. It’s a simple function to work with.
The function ex also has the property that it is the inverse of the function
ln x, or logex, the natural logarithm of a number, or “logs to the base e”.
You can also find ln x on your calculator. Punch in any number and ex
it, then ln x, and you’re back to where you started.
There are a number of series that add to e (or some multiple of e) and e
can be calculated from the series :
ex = ∑ xn / n! = 1 + x + x2 / 2! + x3 / 3! + x4 / 4! + ··· +
53
Finally, just for the record, the first 15 decimal places of e are
2.718281828459045 …..
Our five numbers and the equation that links them all !
It seems very unlikely that there is a neat equation that links all five of
these numbers. After all, π and e are transcendental, so won’t solve any
nice neat polynomial equations. And i doesn’t even exist in the real
world !
eiπ + 1 = 0
The result is a little easier to see when you look at another equality used
in the field of imaginary numbers.
Cos and Sin are well known functions for working out sides of right
angled triangles. They are infinite series themselves, and are defined as
:
Sin x = x – x3 / 3 + x5 / 5 – x7 / 7 …
Cos x = 1 – x2 / 2 + x4 / 4 – x6 / 6 …
54
eix = ∑ (ix)n / n! = 1 + ix + i2x2 / 2! + i3x3 / 3! + i4x4 / 4! + ··· +
= 1 - x2 / 2! + x4 / 4! + ···
+ ix - ix3 / 3! + ix5 / 5! + ···
(as i2 = - 1, i3 = -I and i4 = 1)
= cos x + i sin x.
The function eix is one of the most widely used functions in mathematics
and physics. Despite it’s relative simplicity, it locks together our five
important numbers in a way that few other functions can.
55
Chapter 10
Unbelievable statistics
Birthdays
You are in a room with lots of other people. How many people need to
be in the room for you to be 50/50 certain that two of the people have
the same birthday ?
There are 365 days in the year. But 366 in a leap year, so lets work
on 366 to be on the safe side.
Okay, this has some logic to it but it’s not the right answer.
The right answer is 23. Just twenty-three people are needed for you to
be 50/50 sure that at least two people present have the same birthday. If
you work with a group of 50+ people, or of you have 50+ in your class
at college or school, ask everyone to write down their birthdays. You’ll
be virtually guaranteed that two or more will share a birthday.
It’s an easy one to prove but the result is pretty spectacular. Take it a
person at a time. Rather than look at the chances of the same birthday,
let’s look at the chances of everyone having different birthdays. Again
we assume that there are 366 days in the year.
Person 1 This person can have any birthday. This doesn’t tell
us anything.
Person 2 This person can have any birthday except Person 1’s.
We don’t know on which day Person 1 was born but
there are 365 days out of 366 available on which
Person 1 wasn’t born on. So the chances of different
birthdays for Person 1 and Person 2 is 365 / 366, or
99.73%.
56
Person 3 This person can have any birthday except Person 1
and Person 2’s. We don’t know on which days
Person 1 or Person 2 were born, but we know they
were born on different days as we are investigating
everyone having different birthdays. There are 364
days left out of 366 that Person 1 and Person 2
weren’t born on (they were born on the two
remaining). So the chances of different birthdays for
the three are (365 / 366) x (364 / 366), or 99.18%.
What this tells us is that the chances of different birthdays is less then
50%, so the chance of the same birthday is more than 50%. By 30
persons the chance of the same birthday is more than 70%. And by 50 it
is 97%. The chances fall more and more quickly and by 183 the
probability (of having 183 people in a room with different birthdays) is
astronomically slim, in the region of 1 in a million million million
million.
Dice at a fair
Imagine you are at a local fair. You stop at the stall of a chap who
seems to be giving money away. His bet is simple and depends upon the
outcome of three (fair) dice.
You bet £ 1, throw the three dice together and win as follows :
57
With one die, there is a one in six chance of rolling a six (or any other
number). So with three dice you should have a three in six, or 50/50
chance, of winning; you will win half of the time. Half the time you will
lose £ 1 but half the time you will win at least £ 2 (as two or three sixes
pay more than £ 2). Play it long enough and you will win, right ?
Probabilities
Armed with the above rules, to see if the dice conclusion is right we first
need to look at the chances of rolling each (equally likely) combination
of outcomes. The roll 1 – 6 – 3 for example has the same chance as 4 –
2 – 5. Each number on each die is a 1 in 6 chance, and as the dice are
independent (one dice doesn’t dictate the result of another) the chances
of things happening together is found by multiplying together the
separate probabilities. So each roll has a 1 in 6 x 6 x 6 chance, or 1 in
216. And there are 216 different combinations from 1 – 1 – 1 all the
way to 6 – 6 – 6.
The number of rolls with exactly three sixes is easy. There is only one,
6 – 6 – 6.
The number with exactly two sixes is trickier, but we know that we must
have another number (1, 2, 3, 4 or 5) on one die, call it number n. There
are three die, so let’s look at the chances of rolling n – 6 – 6. This is 5 in
6 multiplied by 1 in 6 multiplied by 1 in 6, which is 5 x 1 x 1 in
6 x 6 x 6, or 5 in 216. Similarly, the chance of rolling 6 – n – 6, and 6 –
6 - n, is also 5 in 216. Each of these results are different outcomes from
the same event, so we add the probabilities. This gives us 15 out of 216.
58
Finally, we need to calculate the chances of exactly one six. Like the
two sixes result, we need to roll either 6 – n – n, n – 6 – n or n – n – 6.
Taking the first possibility (6 – n – n), each of these has a chance of
1 in 6 multiplied by 5 in 6 multiplied by 5 in 6, or 25 in 216. Again we
add the result of the different outcomes, so we have 75 in 216.
To find out expected, or average, win, we look at how much we will win
on 216 rolls.
The total win from 216 rolls (costing us £ 216) is therefore £ 4 + £45 +
150 = £ 200. So our chance of winning, on average, is 200 in 216, or
92.6%. We lose a little over 7 pence for every £ 1 wagered. Despite our
initial guess, this is not a game to try at the fair ! But if you do feel
lucky remember that the 7 pence is an average, you can only lose £1 or
win £1, £2, or £3. Over a few rolls, you will either win or lose, just
don’t play it for too long !
Many years back, a US quiz show host asked the following question.
“In front of you are three doors. Behind one of them is a gold bar.
Behind the other two are dustbins. You choose a door and keep
whatever you find behind it.
But there is a twist. Once you have chosen a door, I will open one
of the remaining two and show you a dustbin, leaving two doors
unopened. You then have the choice to stick with your original
choice or swap doors”.
What is the best strategy and what is your chance of winning the gold
bar ?
59
The host knows where the gold bar is and, given that there are two
dustbins, he can always show you one of them. Does this influence the
odds ?
You might think that your odds of winning are 1 in 2, or 50%. After all,
there are two doors remaining and it must be behind one of them ! It
seems that all the host has done is narrow the odds a little, from 1 in 3
(33.3%) to 1 in 2 (50%).
It is easier to see if you imagine having 100 doors. You can choose one,
the host will open 98 of the remaining 99, and offer you a chance to
swap. The chance of the gold bar being behind your first choice is 1 in
100 with the chance of it being behind the remaining doors 99 in 100.
Swapping gives you access to this second group (with all but one door
unopened) and a chance of 99 in 100 of winning.
60
Chapter 11
Phi (φ) – the golden number
Like pi (π), phi (φ) has a short mathematical description. Take a line A
and divide it into two sections B and C so that the ratio of A to B is the
same as B to C. The ratio will be phi, or 1.61803 to 1.
Line A
Line B
Line C
In nature, phi abounds. If you look at the human body, for example, the
ratio of the length of certain body parts is very close to phi. If you stand
up with your arms at your sides and get a friend to measure from the top
of your head downwards, you should find that the following ratios equal
phi:
See the diagram on the next page and you’ll appreciate what I mean !
61
Ratios of phi in
the human body
The ratio of the length of your arm (including hand) to your forearm is
also phi, as is the successive ration of the lengths of the bones in your
fingers (try it and see !).
It also works for animals, plants and shells. Next time you are at the
beach, take a close look at a spiral shaped seashell. If you measure
outwards from the centre you will find that each successive “curl” is phi
greater in diameter than the last.
62
Phi in Architecture (Notre Dame).
The first special mathematical property of phi is that one divided by phi
equals phi minus 1, or 0.61803. Sometimes phi is quoted as being this
lower number, or it is referred to with a capital letter (Phi) for 1.61803
and a lower case letter (phi) for 0.61803.
0, 1, 1, 2, 3, 5, 8, 13, 21, 34 …
To find the nth term of the series, you use phi in the following equation:
In fact, just φn / √5 will get you pretty close. In essence, the terms of
Fibonacci’s series differ by a multiple of φ give or take a small error
which gets smaller as you proceed down the sequence.
63
Blaise
Pascall’s
famous
triangle
If you look at a certain diagonal across the triangle and add up the
numbers that are crossed you get the Fibonacci series !
64
Chapter 12
The World in four (or more) dimensions
Our world is three dimensional. We smell it, see it, hear it, taste it and
touch it. In 1770 when (Sir) Isaac Newton held an Apple in his hand
contemplating gravity the forces of the world were tangible and
relatively easy understood.
Some two hundred years later an Austrian chap with wild white hair
turned the three dimensional world on its head. Albert Einstein
formulated that we do not live in three dimensions, but that we live in
four dimensional space time. Subsequent theoretical physicists now
believe that we actually live in 11 (or more) dimensional space.
Subjects like superstring theory and worm-holes to other universes just
don’t work in simple 3D. It’s all way too complicated for the man in the
street (author included) but there is a simple way to understand the
world outside 3 dimensions.
In the 1D world we simply have a line. If you have three towns on the
line, Town C, Town D and Town E, with Town D in the middle, you
must pass through Town D when traveling from Town C to Town E.
65
If our township moves to 2D it can include towns that lie off the line, for
example Town F. We can also imagine a border which all persons must
cross, say a straight line running down the middle of the country. In 2D,
all people crossing West to East must cross the line.
Our traveler has another trick up his sleeve. He just adds another
dimension and moves into the three dimensional world we know so well.
Getting close to the Border in the flat world of 2 dimensions, he simply
jumps over the border, which has no height as there is no such thing as
height in 2D (only length and breadth). Arriving on the other side he
continues to Town E. Everyone in 2D World see the traveler disappear
for a moment and reappear on the other side in a fashion akin to a
conjurer’s disappearing trick.
66
Moving to 4D
Remarkably, as we travel faster and faster time slows down. This was
first postulated by the most famous physicist of all, Albert Einstein.
Einstein realized that the world did not operate simply as Newton has
thought three hundred years earlier, but that objects (and time) move
relative to other objects.
67
This was a truly amazing result but one predicted by Einstein. The
difference in time was exactly as he had calculated. At slow speeds you
need very accurate clocks to see the difference and, before planes, even
Newton would have struggled to confirm this prediction, if indeed he
had imagined it.
The slowing of time was implied by Einstein’s thought that nothing can
move faster than light. The speed of light is 300,000 kilometres per
second, equivalent to 7 times around the earth in just one second, and
Einstein referred to the speed of light as “c”. With this maximum speed
for anything, Einstein thought about the following question. Imagine a
spaceship traveling at 75% of the speed of light. A spacemen, on the top
of the spaceship, then fires a bullet in the same direction. The bullet’s
speed from the gun is 50% of the speed of light. Is the bullet now
traveling at 125% of c, i.e. more than the speed of light?
Well this just can’t be, nothing is faster than c. Einstein got around this
by saying that the speed is always relative, giving rise to his theory of
relativity. From an onlooker standing on Earth, the speed of the
spaceship is 75% of c. And from the spaceman’s point of view the
bullet is traveling away from him at 50% of c. But from the onlooker’s
viewpoint, the bullet is traveling not at 125% of c but at 91% of c.
Time, and therefore speed (which is distance divided by time) is
distorted at high speeds and this means nothing can go faster than c.
Einstein’s formula for the ratio of the time spent in the spacecraft to the
time which passes on Earth is shown below :
√ ( 1 - ( v2 / c2 )).
With v at 200 m/s (the speed of a plane, say) the ratio is 0.9999991, so
0.9999991 seconds pass in the spacecraft for 1 second on Earth. But as
speed increases time in the spacecraft, relative to the time on Earth,
passes slower and slower.
68
Speed Time ratio 1 year on Earth
So time travel seems possible in a diluted way, at least you can slow
time down. However, there are two more hurdles to cross before we can
take advantage of these “longer days”.
69
scales should be called a “mass measuring machine” rather than a
weighing machine!
As with the time dilation table, you have to be close to the speed of light
to notice any real difference. But by 86.6% of c, you will have twice the
mass you have at rest. And by 99.9999% of c your mass will be over
700 times as much as at rest. As your speed and mass increase as you
approach c, it would eventually take an infinite amount of energy to
propel your virtually infinite mass the extra 1 m/s you need to break the
speed of light. This is why nothing can travel faster than the speed of
light.
70
Chapter 13
Squaring the square
The problem of “squaring the square” was tackled in the last 1930s by a
team of students at Cambridge University which included Professor W T
Tutte. Their starting point was to try and square a rectangle, i.e.
construct a rectangle out of different sized squares. The tackled this
problem by building up a rectangle using two different sized squares of
side x and y, and then looking at the equations that must link x and y to
make the squares fit as a rectangle. This is illustrated below.
Looking at the line AB, we know that (3x + y) + (3x – y ) = (14y – 3x).
This gives y = 9 and x = 16, and gave the students their first squared
rectangle below. It was very nearly a squared square, measuring 176 by
71
177 ! This first rectangle contained 16 different sized squares and so
was said to have “order” 16.
72
They hoped that this “hit and miss” process would eventually lead to a
squared square but, after many hundreds of rectangles, the squared
square remained undiscovered.
In line with the basic laws of electrical networks (Kirchoff’s laws), the
sum of the lengths of the sides (the “currents”) equaled zero at each
node.
73
The diagram below shows the network diagram equivalent of the
squared rectangle of order 9 above.
74
Arrangement number 1
75
Arrangement number 2
The students realised that if they could rewire the internals of the
electrical diagrams but keep the overall electrical potential the same,
they might be able to generate two rectangles of the same size with
different internal squares. Even if the two rectangles have one square in
common, they might still be able to generate a squared square using the
approach previously described.
Eventually, the students’ work paid off and they generated two
rectangles of order 20 with a single square in common.
76
Since the first discovery, more squared squares have been found,
including the one below of order 21. It has since been proven that this is
the smallest possible square that can be squared. If you have a large
supply of wooden blocks, it makes a rather difficult puzzle !
A squared square
77
Chapter 14
Catastrophe Theory
A ship is sailing through choppy seas and is rolling from side to side.
As the sea gets rougher and rougher the waves hit the ship with
increasing force and the ship rolls further to the left and right. At the
height of the storm the ship rolls starboard to 31 degrees but just
manages to right itself and the crew are saved.
The next night the same ship runs into another storm. This time the
strongest wave that hits the ship is a fraction stronger, pushing the ship
over to 32 degrees starboard. This time the ship doesn’t right itself. It
has passed the point of no return and tips over completely. There is a
catastrophe ! Only prompt action by the RNLI saves the crew !
Mr Jones gets up and heads off to work. Let’s think of his stress level as
a length of lit fuse attached to a stick of dynamite. Anything that annoys
him shortens the fuse, but happy events lengthen it.
78
In both the above cases the events are catastrophic. The effect of the last
tiny piece of stimulus, in these cases the extra push to the ship or
Mr Jones’ last spot of bad luck, causes a reaction that seems completely
out of proportion to the cause. This is catastrophe theory.
Catastrophes, diagrammatically !
There are many ways to describe the way in which catastrophes work,
but the simplest one is shown below. Think of it as a piece of paper
which is flat at the back edge but curved into an “S” shape at front. The
labels in this case reflect Mr Jones’ bad day above.
79
Mr Jones is on this three dimensional surface. The height of the curve
represents his mood, so the lower down he is the shorter his fuse or the
angrier he gets. The x and y coordinates represent his frustration (to the
right) and anxiety (to the left).
During his day Mr Jones moves around freely on the surface. As long as
he stays away from the edges of the “S” of the curve, there are no
catastrophes. We can represent Mr Jones’ “danger areas” around the
“S” by looking down from above to get a two dimensional “shadow” of
the 3d curve above; this looks like an upside down letter v and I refer to
this as the cusp.
As his shadow crosses the first line of the cusp, he is moving underneath
the “S” curve. No fireworks so far. But as his shadow crosses the
second line of the cusp he falls off the boundary and, in the process of
getting back on the surface higher up, has a catastrophic release of
mood. In other words, he loses his temper big time !
Tantrum finished, Mr Jones moves from the top right level of the upper
surface (and from the right of the v shaped cusp) backwards, as his
frustration subsides. Away from the front of the 3d surface, he might
head left to indulge in a spot of self pity.
Pumpkinseed Fish
Let’s have another example of the second line of the catastrophe cusp
care of some small but tenacious little fish.
On the sea bed, each fish has a small circular territory. Pumpkinseed
fish are very territorial and, if an “invader” moves into a fish’s territory,
the fish defends his territory ferociously.
80
With all these little hot-headed fish around, you would think that fights
are commonplace. And it would be all too easy to wander slightly off
track and unwittingly enter the edge of another fish’s grounds. But the
fish have devised a cunning solution to keep the peace.
Rather than having a set boundary, each fish has two boundaries which
overlap slightly with their neighbours’ territories. Their inner boundary
is 13cm, and the outer border is 18cm. They make best use of the
ground available by arranging the circles as follows:
Pumpkinseed
Fish territories
If a foreign fish moves within 18cm, they watch the potential invader but
do not attack. Only if the invading fish moves within the 13cm
perimeter does our Pumpkinseed fish attack. He battles and fights until
he moves the invader out beyond 18cm. This will inevitably cause his
neighbouring Pumpkinseed fish to attack, and so on. The attacking fish
is fought out of the whole neighbourhood!
The Pumkinseed fish avoid attacking each other because they know
where their boundaries are. They are free to move within the 13cm to
18cm curtain without a fight and this “no man’s land” enables the
colony to exist without self destruction!
81
up a plane. This more complex surface is referred to as the “Butterfly”
catastrophe curve and is shown on the next page.
Early on, along line AA, the hijacker threatens actions and makes
demands. The skill of the negotiator lies in ensuring that the path of
negotiation follows the smooth surface of the curve and avoids the edges
of what is now quite a complicated double “S”. By line BB the patience
of the hijacker is running out. There are two options here. Head left
into negotiation or head right across the two lines of the right hand edge
of the cusp, which will cause a catastrophe; shoot one of the hostages.
82
By line CC, as time and patience are virtually at and end, the left line of
the cusp represents complete surrender whilst the right represents
blowing up the entire plane. There is also a middle section on the
surface which appears to float in mid air. This represents an ultimatum;
shortly it will be impossible to stay on this section and the hijacker will
have to move, catastrophically, to either surrender or to blowing up the
plane.
Catastrophe theory has many other real world applications and can be
used to describe and understand the successful treatment of bulimia, the
world of politics and the behaviour of many dynamical systems. But
above all, just remember that if you are having a bad day, take a deep
breath, lengthen your fuse and watch out for the cat!
83
Chapter 15
Fractals
Snowflakes
The snowflake looks star shaped, and zooming in on one of the “points”
reveals the same snowflake pattern within the point. Zooming in on this
structure you find yourself looking at exactly the same pattern, just on a
smaller scale.
84
A 3 sided
snowflake
Perimeter = 3
Taking one of the sides we remove a middle section and add a triangle.
We repeat this on the other two sides. We end up with a six pointed
snowflake made up of 12 lines a third of the length of the original sides.
12 sided
snowflake
Perimeter = 12 / 3 = 4
85
We now repeat the process, removing the middle third of all sides and
adding smaller triangles with sides one-ninth of the original on the
triangle.
48 sided
snowflake
Perimeter = 48 / 9 = 5.333
The table below shows how the perimeter grows as we add the finer and
finer detail.
1 3 3 3.000
2 12 12 / 3 4.000
3 48 48 / 9 5.333
4 192 192 / 27 7.111
··· ··· ··· ···
10 786,432 786,432 / 19,683 39.955
··· ··· ··· ···
100 1.21 x 1060 1.72 x 1047 7.02 x 1012
86
Even after just 100 iterations the snowflake has a perimeter of over 7
million kilometers (assuming the original triangle had sides of 1mm).
What this tells us is that the length of the sides of a snowflake is infinite.
In practice, the sides are governed by the thickness of the water
molecules but, nevertheless, the length of the sides of a snowflake is
pretty big, well into the kilometers range. Remember next time you
catch one on your tongue!
Where n copies are required each time we zoom in and k is the size of
the new side. For example the snowflake has n = 4 and k = 3 (each side
is replaced by four smaller ones which are three times smaller) so has
dimension log 4 / log 3 = 1.262
Sierpinski’s carpet
Sierpinski’s
carpet
87
Sierpeinski’s carpet has dimension log 8 / log 3 = 1.893.
Cantor’s
set
88
Other real world fractals
- The large scale nature of the universe also follows the fractal rules.
You may be able to create some of your own. The principle is easy; just
repeat whatever you do in progressively smaller proportions.
89
Chapter 16
Cryptography – making and breaking codes
Ever since the evolution of the written word, people have had reason to
keep certain information private. If a “top secret” is leaked it usually
has dire consequences. It could lead to you being fired for sending a
rude email about your Boss. It could result in you having your bank
account cleaned out by an e-mail thief after you send your account
details over the Internet. Or it could be worse; for Mary Queen of Scots
it meant execution when her coded letter to Anthony Babington
conspiring to kill Queen Elizabeth I was intercepted and deciphered.
Substitution ciphers
Even if you can’t crack the code because you haven’t got the key, it is
pretty easy to crack a long message by counting the number of times that
a particular letter occurs. The frequency distribution of normal English
is such that the letter e is the most common (occurring 12.7% of the time
90
on average), then t (9.1%), o (7.5%), i (7.0%), and n (6.7%). The least
common are j and x (both 0.2%) and q and z (both 0.1%). Analysis of
letter frequencies can be used to help fill in the most popular and
unpopular letters and common sense will help fill in the missing parts of
the key. However, this won’t work for short pieces of text.
Blaise de Vigenère was a 16th Century French diplomat who was able to
take the substitution cipher to the next level. Vigenère has seen earlier
work where the alphabet key was described by moving the letters along
by a fixed number of letters (e.g. “a” to “K”, “b” to “L”, “c” to “M”).
This could be cracked by frequency distribution methods. But what if a
number of different keys were used at the same time to hide the
frequency spikes ?
91
Vigenère cipher keys for keyword “BEN”
“please send food now” would become “QPRBWR TIAE JBPH APA”
Using your home computer and a downloaded program, you can now
crack even sophisticated substitution ciphers. These ciphers also have a
major drawback – both parties need to know the key, or keyword. If the
key is intercepted, the code can be cracked.
In 1976, a two stage approach was adopted which in its current form
protects and verifies virtually all email transactions and coded messages.
It also bypassed the need for both parties to have access to the keyword.
Public key cryptography was born.
Public key cryptography works by giving each user of the system two
keys, a public one and a private one. The public ones are available to
everyone. So if Ben wants to send a message to Sam, he looks up Sam’s
public key and encodes the message. But for Sam to read it he needs to
use his own private key, to which no-one else has access. The public
and private keys need to be linked in some way or it would be
impossible to decode the message. Anyone is free to try and find out
this link but the keys are designed with this in mind.
92
The designers prevent people cracking the keys by linking them together
using prime numbers. Even with a supercomputer it is very time
consuming to factor a number, i.e. find its prime number components.
Small numbers are easy, for example 143 is 13 x 11. But numbers
above 600 digits cannot be solved as easily. Leading companies in this
field, such as RSA security, offer large prizes ($200,000+) for anyone
who can factor a selection of numbers of this size and above. This
ensures RSA’s public and private keys stay a step ahead of the code
crackers.
In the same way that the key of a substitution cipher works, the
mathematics of public key cryptography hinges on creating a unique one
to one relationship, or bijection, between the text to be coded and the
encoded text. Computers represent letters and other characters by
numbers so the task is to generate a bijection for numbers which is hard
to crack. This is done using carefully selected public key numbers,
combinations of certain prime numbers and working in modulo format.
4 + 3 = 1 (mod 2)
4 + 3 = 4 (mod 3)
3 x 4 = 2 (mod 5)
For codes, to make the function hard to crack we work using powers and
modulos and functions of the form
x k mod N
93
x 0 1 2 3 4 5 6 7
x13 mod 46 0 1 4 9 16 21 36 43
8 9 10 11 …
18 35 38 17 …
coded number 0 1 2 3 4 5 6 7
x17 mod 46 0 1 18 39 2 15 12 19
8 9 10 11 …
36 3 40 37 …
Note that 13 and 17 are both prime numbers. Note also that 46 is the
product of two primes, 2 and 23.
So knowing the number N (46) and the public key 13, Ben can code a
message to Sam, but for Sam to decode it he needs to know his private
key, 17 in this instance. The bijection works because of a connection
with these two keys multiplied together (giving 221) and the number
used in the modulo (46). I won’t go into further detail here as it’s
complex stuff, but I hope you get the flavour !
In theory, it is easy to find the “reverse” code. All the hackers have to
do is break up N into its prime factors (2 and 23 in our example) and use
this information and their knowledge of modulo functions to obtain the
private key code 17. However, as we have already said, factoring big
numbers into two large primes is not easy and for this reason the
encryption remains safe, so long as Sam keeps his private key to
himself.
94
Chapter 17
Prime and perfect numbers
Before we get any further, a quick reminder should you need it. A prime
number is defined as
The first breakthrough in prime number theory came around 200BC care
of Greek Mathematician Eratosthenes. He invented a “sieve” method to
discover primes, forever after known as the “Sieve of Eratosthenes”.
To use the sieve method, you first need to write out as many numbers as
you wish to investigate. Take the first one hundred numbers as an
example:
95
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 100
Next, circle 2, then cross out every multiple of 2 that follows. The top
lines will read as follows :
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
Continue by circling the next number along and by crossing out all the
multiples that follow. So circle 3 and cross out 6 (already done), 9, 12
(already done), 15 etc. The top lines will now show
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
The next available number is 5 (4 has been crossed out), so circle 5 and
cross out 10, 15, 20 etc. Most will already have been crossed out. You
only need to go as far as the next available number (which is 7, as 6 has
already been crossed out) and you are finished. The final sieve is shown
on the next page.
96
1 2 3 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50
51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70
71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90
91 92 93 94 95 96 97 98 99 100
However may numbers you wish to sieve, you only need to go as far as
the square root of the final number. In the above example this gives 10,
but if the last number isn’t prime you can move backwards even further
to the last prime before that number, in this case 7.
45 = 2 x 3 x 5
100 = 2 x 2 x 5 x 5
199 = 199 (199 is prime)
5,917 = 61 x 97
Imagine that there isn’t an infinite number of primes. Then there must
be a biggest prime and we could write out a list of all the primes from 2
up to the biggest prime. For the sake of example, let’s say the biggest
prime is 11 and the list of primes is therefore:
2, 3, 5, 7, 11
97
If we multiply these together, and add 1, we get another number. It is
easy to see that this must also be prime. In the example, we get 2 x 3 x 5
x 7 x 11 + 1 = 2,311. If this isn’t prime, it must be made up of the
product of primes (see fundamental theorem above). However, if we
divide 2,311 by any of the list of primes (2, 3, 5, 7, 11) we will, by its
very construction, get remainder 1. So 2,311 must be prime and this
contradicts the assumption we made at the start, i.e. that there isn’t an
infinite number of primes. Consequently, there must be an infinite
number of prime numbers.
Mersenne primes
Despite working nearly three hundred years before the invention of the
computer, Mersenne was not put off by the size of the number as p
increased. He examined all numbers up to p = 257, a truly amazing feat
given that 2257-1 has 78 digits !
98
Perfect numbers
Before we leave Mersenne, his primes are also used to construct perfect
numbers. A perfect number is a number where all the divisors of the
number add up to the number itself. The first two perfect numbers are 6
and 28, as :
It’s not too difficult to show that if you use a Mersenne prime of the
form 2p-1, then you can multiply it by 2(p-1) to get a perfect number. The
first few are shown below.
2 3 2 3 x 2 = 6, perfect
3 7 4 7 x 4 = 28, perfect
5 31 16 31 x 16 = 496, perfect
7 127 64 127 x 64 = 8,128, perfect
11 2,047 (not prime)
13 8,191 4,096 8,191 x 4,096 = 33,550,336.
perfect
There are a number of problems in the world of prime numbers that have
yet to be proved. Until they have been proved they cannot be referred to
as theorems but only as conjectures. The feeling is that they are right -
all the conjectures below work for many millions of numbers already
tested - but a proof that they hold for all numbers remains out of reach.
If you can solve any of these, your name will go down in mathematical
history!
99
The Goldbach conjecture
This has so far been tested up to 1014 (i.e. 100 million million).
Unfortunately, this is no guarantee that it will always hold.
This states that there are infinitely many pairs of prime numbers
(differing by 2). The first few pairs are shown below.
As with the Goldbach conjecture, this has been tested well into the
millions. The frequency of the pairs falls as the numbers rise but current
thinking is that they stay sufficiently frequent to occur infinitely.
This is the Holy Grail of prime number problems. There are hundreds of
mathematicians across the world either working on this problem or
waiting eagerly to pounce on the results that will follow should the
hypothesis be proved true. Equally, should the Riemenn hypothesis turn
out to be false, many others would fail.
100
correlation between the number of primes less than a number N, say, and
the logarithm of N. But there was always a small error.
A hundred and fifty years on, today’s mathematicians are still trying to
prove Riemann’s formula one way or the other. It may still be many
decades before the primes give up their final secret and this ultimate
problem is solved.
101
Chapter 18
The game of Nim
The standard layout of coins consists of three rows. The top row has 7
coins, the middle 5 and the bottom row 3. Call this the 7 – 5 – 3 set up.
When it is your turn, you can remove as many coins as you like but only
from one row at a time, so you can’t take two coins from the top and one
from the middle in the same turn. You are allowed to change rows on
your next turn if you wish. You can remove an entire row of coins in
one move but you must take at least one coin per turn.
Let’s work backwards from the simplest combinations and build up our
library of winning combinations !
102
The pairs combination
If you take your turn and leave just two rows each with the same number
of coins you have won. To see this, look at the 2 – 2 combination.
The 2 – 2 combination
If your opponent takes on coin from one of the rows, you take both coins
in the other row to leave the last coin. And if your opponent takes two
coins, you take one of the two coins on the remaining row, again leaving
one coin. So 2 – 2 is a winning combination.
If you leave your opponent with two rows with the same number of
coins you will eventually return to the 2 – 2 result, and so win. Let’s say
you take your turn to leave your opponent with four coins in each of two
rows (4 – 4). All you need to do is match what he takes, which will
either lead to 2 – 2 or will end up with your opponent taking an entire
row, in which case you do the same but leave one coin behind to win.
1–1–1
In this case, he can take only one coin, leaving 1 – 1 and you can only
take one coin to leave the winning coin behind.
103
3–2–1
Whatever your opponent takes will leave you with a move to leave
either the pairs or 1 – 1 – 1 combinations. Note that the order of the
rows doesn’t matter, so for 3 – 2 – 1 also read 1 – 2 – 3, or 2 – 1 – 3 etc.
5–4–1
Secondly, try adding 2 coins to one row and 1 coin to one other row.
This gives you six combinations as shown below. These all have their
problems though, and your opponent might make a move to secure a
winning combination we already know.
5–3–1 2–3–1
4–4–1 Pair of 4s
3–4–1 3–2–1
3–3–3 Pair of 3s
5–2–2 Pair of 2s
4–2–3 1–2–3
104
Still no joy !
Thirdly, we can try adding two coins to each of two rows. You have
three combinations :
3–4–3 Pair of 3s
5–2–3 1–2–3
5–4–1 No immediate win !
Your opponent cannot reach one of the winning combinations above and
more importantly you are guaranteed to reach one on your move !
6 – 4 – 2 and 7 – 5 – 3
You can follow the above theory to establish the next two winning
combinations; 6 – 4 – 2 and 7 – 5 – 3. I’ll leave it to you to agree that
these are the only other two combinations.
What we have shown is that, despite there being 15 coins and hundreds
of combinations, you only need to remember five combinations and the
initial set up of 7 – 5 – 3. Remember them and you’ll soon be on to your
first free pint !
Advanced Nim
You can use the strategy of three row 7 – 5 – 3 Nim to develop your own
strategy for any number of rows and coins. This develops a simple
game into something aspiring to Chess.
105
Start off by asking your opponent to decide on a number of rows, say 5.
You each take it in turns to decide the number of coins in each row. The
person who chooses the number of coins in the last row has to allow his
opponent to move one coin from any row to any other row, if he so
wishes.
So you could end up with this sample “board”. Would you go first of
second ?
Break the rows into manageable chunks. You can see a 5 – 4 – 1, and
this is a winning combination of left, so you’re left with 7 – 6. If you
take one coin from the 7 row then you leave a 6 – 6, and 5 – 4 – 1, both
winning combinations, so you are guaranteed to win !
Few people outside China play this game so give it a go. I guarantee
that you will never need to buy your own drinks again !
106
Chapter 19
Fascinating formulae
This section is for the real number-heads out there. Some of these
formulae are simple to prove and some are very difficult. The good
news is that they are all easy to demonstrate and that’s all I aim to do
here; to show you the beauty of numbers, patterns and sequences.
Take the numbers 1 to k (any number you care to think of). Add up all
of these numbers and multiply the answer by itself. Write your answer
down.
Next, cube each number from 1 to k (i.e. multiply it together three times,
so 2 becomes 2 x 2 x 2 = 8). Then add them all up. Write down the
result, which will be the same as your answer above !
( 1 + 2 + 3 + ··· + k ) 2 = 1 3 + 2 3 + 3 3 + ··· + k 3
( 1 + 2 + 3 + 4 ) 2 = 10 2 = 100 = 1 3 + 2 3 + 3 3 + 4 3 = 1 + 8 + 27 +
64
Not wanting to waste the cubes you have worked out above, add
together the digits of each cube and, if the answer is not a single digit,
add the digits again and repeat as necessary. This gives you the digital
root of the number. You will always end up with the answer 1, 8 or 9.
Even nicer is the fact that the order is repeated cyclically !
107
Calculation Result
13=1 1
23=8 8
3 3 = 27. 2 + 7 = 9 9
4 3 = 64. 6 + 4 = 10. 1 + 0 = 1 1
5 3 = 125. 1 + 2 + 5 = 8 8
6 3 = 216. 2 + 1 + 6 = 9 9
7 3 = 343. 3 + 4 + 3 = 10. 1 + 0 = 1 1
8 3 = 512. 5 + 1 + 2 = 8 8
9 3 = 729. 7 + 2 + 9 = 18. 1 + 8 = 9 9
10 3 = 1000. 1 + 0 + 0 + 0 = 1 1
11 3 = 1331. 1 + 3 + 3 + 1 = 8 8
12 3 = 1928. 1 + 7 + 2 + 8 = 18. 1 + 8 = 9 9
3. Adding up. 1 + 2 + 3 + … .
1 + 2 + 3 + ··· n = n x ( n + 1 ) / 2
108
4. Generating prime numbers ?
No-one has yet discovered a formula to generate the primes. But these
come close.
Let’s try x 2 + x + 11
x 0 1 2 3 4 5 6 7
x2 + x + 11 11 13 17 23 31 41 53 67
8 9 10
83 101 121
The formula works as far as x = 9 but then fails. Not bad ! NB It does
miss some primes out on the way (e.g. 29)
Let’s try x 2 + x + 17
x 0 1 2 3 4 5 6 7
x2 + x + 17 17 19 23 29 37 47 59 73
8 9 10 11 12 13 14 15 16
89 107 127 149 173 199 227 257 289
x 0 1 2 3 4 5 6 7
x2 + x + 41 41 43 47 53 61 71 83 97
8 9 10 11 12 13 14 15 16
113 131 151 173 197 223 251 281 313
17 18 19 20 21 22 23 24 25
347 383 421 461 503 547 593 641 691
26 27 28 29 30 31 32 33 34
743 797 853 911 971 1033 1097 1163 1231
109
35 36 37 38 39 40
1301 1373 1447 1523 1601 1681
Is it correct all the way to 39, but fails at 40. Despite being discovered
by Leonard Euler over 200 years ago, this remains the best simple
formula yet devised to generate primes.
5. Powers of 2
Take the number 2 and keep multiplying it by itself so you get higher
and higher powers of 2. You end up with the following sequence.
2
4
8
16
32
64
···
17,179,869,184
34,359,738,368
68,719,476,736
···
You may have noticed that the last digit of any power is always a 2, 4, 8
or 6.
What you may not know is that if you look at the second to last digit, the
chances of it being a 1 are the greatest, followed by 2, then 3, etc, with
the chances of it being a 0 the least.
This also holds true for the third to last digit, the fourth to last and so on.
But the probabilities get progressively closer together.
110
6. All about 1s
1x1=1
11 x 11 = 121
111 x 111 = 12,321
1,111 x 1,111 = 1,234,321
11,111 x 11,111 = 123,454,321
111,111 x 111,111 = 12,345,654,321
1,111,111 x 1,111,111 = 1,234,567,654,321
11,111,111 x 11,111,111 = 123,456,787,654,321
and
111,111,111 x 111,111,111 = 12,345,678,987,654,321 !
Also,
1 x 9 + 2 = 11
12 x 9 + 3 = 111
123 x 9 + 4 = 1,111
1,234 x 9 + 5 = 11,111
12,345 x 9 + 6 = 111,111
123,456 x 9 + 7 = 1,111,111
1,234,567 x 9 + 8 = 11,111,111
12,345,678 x 9 + 9 = 111,111,111
123,456,789 x 9 + 10 = 1,111,111,111
1+3=4
1+3+5=9
1 + 3 + 5 + 7 = 16
1 + 3 + 5 + 7 + 9 = 25
1 + 3 + 5 + 7 + 9 + 11 = 36
1 + 3 + 5 + 7 + 9 + 11 + 13 = 49
1 + 3 + 5 + 7 + 9 + 11 + 13 + 15 = 64
111
8. Digits of pi
9. 1,089
1,089 is one of those strange numbers that has some curious properties.
For example,
You can add in 9’s in the middle and this still works, so for example :
Also
1 / 1,089 = 0.00091827364554637281 ..
and if you look closely you can see that the digits after the 0.000 are
multiples of 9 (9, 18, 27 and so on).
112
Chapter 20
Computer Cards
Back in the 1970s computers were very basic machines. There was no
Internet, no email and no CD Roms (or CDs !). Computers were
hundreds, rather than billions, of times faster than Humans and the
surface of their potential was only just being scratched.
It’s sorted !
Some old computer cards have a code on the top of the card. Holes on
the top give the number of the card in binary. In case you are not
familiar with binary, or base 2, I’ll give you some examples.
If you take the number 713, as you usually see it, this means 7
“hundreds”, 1 “ten” and 3 “1s”. Each “hundred” is worth 10 times more
than a “ten” because we work in “base 10”. Similarly, a “ten” is worth
10 times more than a “unit”. Obviously, there are ten possible
combinations for each number from 0 to 9.
In binary we have just two possible numbers, 0’s and 1’s. Rather than
“hundreds”, “tens” and “1s” we have “fours”, “twos” and “1s”. So we
have :
113
111 in binary (base 2) = 4 + 2 + 1 = 7 (base 10)
1010 in binary = 8 + 2 = 10
110110 in binary = 32 + 16 + 4 + 2 = 54.
If you are restricted to a limit of five binary digits the biggest number
you can make is 11111, which in base 10 is 16 + 8 + 4 + 2 + 1 = 31. If
you have 31 computer cards you can imagine them listed as follow
Card 1 00001
Card 2 00010
Card 3 00011
Card 4 00100
Card 5 00101
Card 30 11110
Card 31 11111
Remember, it’s the holes and slices in the card that these old computers
read.
What is interesting is that the cards are very easy to sort into order. So if
you shuffle the cards together, or drop them on the floor, there is a
114
surprisingly easy way to sort them back into order. All you need is a
pencil !
Put the pencil through the first set of holes and slices on the right, which
is the “units” column in binary. Then lift up your pencil and put the
cards to the back of the pile. The cards with a hole will be caught, but
the pencil will slide through and leave behind all the ones with a slice.
Next, put your pencil through the “twos” holes / slices. Again, move the
cards to the back of the pile.
Continue with the “fours”, “eights” and finally the “sixteens”, putting
each set of cards to the back. You now have all the cards in order from
1 to 31 (or 00001 to 11111) ! But why does this work ?
To see why, imagine card number 31, or 11111 in binary. This has five
holes in it and, as all other cards will include at least one “0”, no other
card has as many holes. Card 11111 will be moved to the back on every
occasion and so must end up at the back of the pack.
What about 00000 ? This has five slices and so will never be picked up
by your pencil. All other cards will move at least once, so 00000 will be
the front card.
It’s easy so far, but what about 01110 (card 14) and 10001 (card 16)?
How do they get themselves in order ?
As card 16 has a hole in the last part of the sorting operation (the
“sixteens”) and card 14 doesn’t, card 16 will end up behind card 16.
And if we look at 01111 (card 15) we can see that this gets moved at the
same time as card 14 except that it also gets moved on the “units” part of
the sort (when card 14 doesn’t). So card 15 must be behind 14, but in
front of 16.
Although there are other ways of sorting the cards, the “pencil and hole”
method is pretty efficient. Imagine that you have a million cards. In
binary, a million is 11110100001001000000. With twenty digits, it uses
a lot more ink to write than it does in base 10 (1000000). But we know
from our previous sorting exercise that we need only lift our pencil once
for each binary digit of the biggest number to order the cards. So it will
take only twenty lifts of the pencil to reorder one million computer cards
from one to a million. That’s a quick way to reorder so many cards !
115
Chapter 21
The day you were born
In this final chapter, I shall reveal how you can work out what day of the
week any particular day falls on without resorting to a diary or using a
computer. As an example, my birthday is 25th February 1967, which
was a Saturday. It’s not too difficult and with practice you should be
able to do most days in ten seconds or less. So here’s how to do it !
2) The last two digits of the year, which is 67, giving 92, then add on :
3) The number of leap years in the last two digits of the year, which is
the same as the number of times four will divide into that number.
For me this is 16, so our total is now 108. Then add on
5) Now find the remainder when you divide the total by 7. For me this
is 6.
Month number
The month number starts at 0 for January. January has 31 days, which is
4 weeks and 3 days. Ignore the weeks so we have 3, which is our
February number.
February has 28 days (ignore leap years for now) and adding these on
still leaves us with 3 days left over (remember, ignore the weeks). So
March’s number is 3.
116
The month number table
Month Month
number
January 0
February 3
March 3
April 6
May 1
June 4
July 6
August 2
September 5
October 0
November 3
December 5
Leap years
As it happens, this is quite easy to do, just knock 1 off the total at the
end if you have a leap year and if the day you are looking at is less than
1st March.
Leap years are (usually) every four years. Just check that the last two
year digits are a multiple of four; if they are then you have a leap year. I
say usually because they are not, as is commonly believed, every four
years without fail. See further reading for more details !
117
Getting rid of the weeks !
1) Take the day of the month, i.e. 25. Knock off 21, leaving 4. Add
this to :
2) The last two digits of the year, which is 67, less 63, which gives 4,
so our total is 8. But we can knock another 7 off this, giving 1.
Then add on :
3) The number of leap years in the last two digits of the year. This is
16, less 14 gives 2, so our total is now 3. Then add on
5) Now find the remainder when you divide the total by 7. We’re
already done ! 6 is Saturday.
Other examples
Try 1st January 1900. Following steps 1 to 5 above, you should get the
following :
1) Day = 1
118
Forwards and backwards through the Centuries !
The formula above works for all days in the 1900s. But it’s easy enough
to adjust the formula forwards and backwards to cope with earlier or
later centuries.
For 2000 to 2099, work out as above but then deduct one day. 1st
January 1900 was a Sunday but 1st January 2000 was a Saturday.
Deducting one day copes with this difference and it all runs the same
thereafter. Similarly, add one day for 1800 to 1899, two days for 1700
to 1799 etc.
119
120
The “help” page
Every subject has its rules and mathematics is no different. But despite
what you may be thinking, there are fewer rules and notations for maths
than most other subjects. So few, in fact, that I can put all the ones used
in this book in the next couple of pages.
Powers
These are the “little” numbers you sometimes see at the top right of
another number. This is shorthand for “multiply the bigger number by
itself” and the power is the number of times you do it.
As examples :
23=2x2x2=8
32=3x3=9
1 Million = 1,000,000 = 10 x 10 x 10 x 10 x 10 x 10 = 10 6
1 Trillion = 1,000,000,000,000 = 10 12
1+2x3
(1+2)x3
is 9, as you must do the bracket sum 1 + 2 before you multiply the result
by 3.
121
Taking away, or subtraction, ranks on par with adding, or addition.
Dividing, or division, ranks on par with multiplication, so
1+3x5–4/2
is 14, as we must do the 3 x 5 (15) and the 4 / 2 (2) first and then add 1 +
15 – 2.
As a final example :
( 1 + 3 ) x 6 / 2(7 – 5)
4 x 6 / 22
∑ n
it’s just shorthand for add up all the numbers (or n for short), starting
with 1. In this case :
122
If you ever see a little number above and below the ∑ then just add up
between those numbers, so
1
∑ n
6
is 1 + 2 + 3 + 4 + 5 + 6 = 21.
123
124
References and further reading
Please note that web addresses are current at the time of release of this
book and may be subject to change.
General
The University of St Andrews has a great web site that gives the
biographies of over 1,000 mathematicians. The site also gives links to
each mathematician’s discoveries so is an ideal starting point when
browsing the web. Check out http://turnbull.mcs.st-and.ac.uk/history/.
There are quite a few, increasingly complicated, series that total pi, or
some multiple of pi. A few more are shown below.
Machin’s formula
Wallis’s formula
125
Abraham Sharps’ formula
Beckmann’s formula
Ramanujan’s formula.
There is actually a set way of writing some even larger numbers that are
finite. Donald Knuth set out an “up arrows” notation for working out
powers of powers of powers and so on. Knuth’s methods is as follows :
Skewes number is actually less than 4^^5, so big numbers are created
very quickly. You can read more by visiting http://www-
users.cs.york.ac.uk/~susan/cyc/b/big.htm.
126
7. Actuarial science - the mathematics of mortality
How far did you get with the four 4s problem ? Here’s my solution.
Note that some of the sums use .4444…, or .4 recurring. This is written
in mathematics as .4 but with a dot on top of the 4. We have a dot on the
keyboard, so I’m not cheating and it only uses one 4, but it’s not easy to
type a dot above the 4 and I’ve used bold type to illustrate where I mean
.4 recurring, i.e. .4
1=4/4 26 = 4 ! + √4
2=(4+4)/4 27 = 4 ! + √4 + ( 4 / 4 )
3=(4+4+4)/4 28 = 4 ! + 4
4=4 29 = 4 ! + 4 + ( 4 / 4 )
5 = 4 + (4 / 4 ) 30 = ( 4 + 4 + 4 ) / .4
6 = 4 + √4 31 = 4 ! + 4 / .4 - √4
7=4+4–(4/4) 32 = 4 x ( 4 + 4 )
8=4+4 33 = 4 ! + 4 / .4
9=4+4+(4/4) 34 = 4 x ( 4 + 4 ) + √4
10 = 4 = 4 + √4 35 = 4 ! + √4 + 4 / .4
11 = 4.4 / .4 36 = 4 x ( 4 + 4 ) + 4
12 = 4 / .4 + √4 37 = 4 ! + 4 + 4 / .4
13 = 4.4 / .4 + √4 38 = ( 4 x 4 ) / .4 - √4
14 = 4 + 4 + 4 + √4 39 = not possible ?
15 = 4 x 4 – ( 4 / 4 ) 40 = 4 x ( 4 + 4 + √4)
16 = 4 x 4 + 4 - 4 41 = not possible ?
17 = 4 x 4 + ( 4 / 4 ) 42 = ( 4 x 4 ) / .4 + √4
18 = 4 x 4 + √4 43 = not possible ?
19 = 4 ! – 4 – ( 4 / 4 ) 44 = 4 x 4.4 / .4
20 = 4 x ( 4 + 4 / 4 ) 45 = not possible ?
21 = 4 ! - √4 – ( 4 / 4 ) 46 = √4 x 4 ! - √4
22 = 4 ! - √4 47 = √4 x 4! – ( 4 / 4 )
23 = 4 ! – ( 4 / 4) 48 = √4 x 4!
24 = 4 ! 49 = √4 x 4! + ( 4 / 4 )
25 = 4 ! + ( 4 / 4 ) 50 = √4 x 4! + √4
127
16. Cryptography – making and breaking codes
Mersenne primes. If you want to help find the next Mersenne prime
then you can join the Great Internet Mersenne Prime Search, or
“GIMPS”. Your spare computing power joins forces with that of
thousands of other users to produce the most powerful computer in the
world !
There are prizes if your computer is the one that finds the next prime.
For more details, visit GIMPS web site at
http://www.mersenne.org/prime.htm.
Leap years are not every four years. The earth takes 365.25 days to orbit
the Sun, which defines our year, and adding on one day every four
allows for this. However, it is not exactly 365.25 days and a further
correction is needed every 100 or 400 years.
The full rules for determining whether a year is a leap year or not are as
follows:
If the number of the year can be divided by four with no remainder then
it is a leap year, otherwise it isn’t a leap year.
128
For years after 1600 AD.
So 1892 and 1896 were leap years but 1900 wasn’t. 1992, 1996 and
2000 were all leap years. 2300 won’t be but 2400 will be !
As well as leap years, there are also leap seconds ! These were
introduced in 1971 to reconcile astronomical time, which based on the
Earth’s rotation, with physical time, as measured on today’s super
accurate clocks. These seconds are inserted every few years as a 61st
second, usually at midnight on 31st December.
For more information about leap seconds you visit Markus Kuhn’s site
at http://www.cl.cam.ac.uk/~mgk25/time/leap/.
129
130
Credits
Having spent many enjoyable hours writing this book, I’ve arrived at the
“thank you” section. My favourite books, whether fact or fiction,
always seem to have one and there are a few people who I would like to
thank. So here goes.
Sam and Ben. My dudes ! For reminding me daily what life is all
about. You’ve already achieved so many things; continue to enjoy
whatever you do in life and follow your dreams; I will always be proud
of you !
Vanessa. My wonderful wife and soul mate. For making the Knight
family watch tick with Swiss efficiency and for bringing out the best in
all of us. For reading all my scribblings and allowing me the time and
space to get this book written.
Dad (a.k.a King Sudoku!) For lighting my mathematical fire. For all
those hours on the ICL mainframe calculating pi, my first calculator, the
punched computer cards and the huge printout of the moon. Above all,
for your support, problem solving tenacity and for making maths fun.
Mum. For using correctly the English language (at least when needed!)
and for bestowing in me the same affinity. For the 24 hour hotel, taxi,
laundry and curry service ! And for showing dedication to others without
reward, you will always be an inspiration.
Thanks also to …
Joe Satriani. The modern man’s Mozart. For making amazing music
and for breaking the “never meet your heroes” rule. One day I will
manage the Crystal Planet solo and ending (we all have dreams ..!).
Keith Floyd. The culinary forefather! For all those great TV programs
which inspired me to become the showboating, cider drinking, use all
the pans, occasionally talented but can never remember what I put in it,
amateur chef I am today.
131
132
Index
133
Fibonacci, 6 Kirchoff’s laws, 73
Fibonacci’s sequence, 6, 63
Four dimensions, 65 Leap Year, 117, 128
Four fours, 47, 127 Leibnitz, Gottfried, 10
Fractals, 84 Lemniscate, 32
Fractions, 33, 47 Life assurance, 35
Frequency distribution, 90 Life expectancy, 38
Frogs, 7 Life insurance, 35
Fuh-Hi, 11 Loh-Shu, 11
Fundamental theorem of Logarithms, 53, 87, 101
arithmetic, 99 Lucas, Edouard, 41
134
Pascall’s triangle, 63 Sega, 20
Perfect numbers, 95, 97 Sequences, 5, 125
Phi (φ), 61 Series, 5, 8, 125
Pi (π), 10, 48, 112 Sets, 33
Pine cones, 7 Sharpe’s Formula, 126
Plants, fractals in, 89 Siepinski’s carpet, 87
Polynomials, 48 Sieve of Eratosthenes, 75
Power function, 34 Sigma, 7, 122
Power sets, 34 Sine function, 54
Powers, 121 Sixteen bit processors, 20
Powers of 2, 110 Skewes numbers, 31, 126
Prime numbers, 41, 94, 97, 109 Snowflakes, 84
Probabilities, 57 Sorting, 113
Proof by contradiction, 77 Space time, 65
Proof by induction, 44 Speed of light, c, 68
Psychology, of a hijacker, 82 Square numbers, 111
Public key cryptography, 91 Square of a sum, 107
Pumpkinseed fish, 80 Square roots, 47
Pyramid method, 14 Squared rectangles, 71
Pythagoras of Samos, 24 Squared square, 77
Pythagoras’s theorem, 24 Squaring numbers, 19
Pythagorean triples, 25 Squaring the square, 71
Statistics, unbelievable, 56
Queen Elizabeth I, 90 Strange numbers, 112
Streptococcus bacteria, 42
Rabbits, 6 Substitution cipher, 90
Rabinowitz and Wagon’s Sum of cubes, 107
Formula, 126 Sum of odd numbers, 111
Ramanujan, Srinivasa, 126 Survival (probabilities of), 36
Rational numbers, 33, 47
Real numbers, 33, 47 Thom, René, 78
Red Giant, 30 Time, 67
Relativity, 49, 68 Time, slowing of, 67
Riemann, Bernhard, 100 Towers of Hanoi, 41
Riemann hypothesis, 100 Transcendental, 48
Roulette wheel, 47 Trillion, 121
RSA, 93 Triples, Pythagorean, 24
Tutte, Prof W T, 71
Scissors method for Twin prime conjecture, 100
multiplication, 22
Scroll of the river Loh, 11 Underwriting, 37
Sea shells, 62 Unsolved prime problems, 99
135
Up arrows notation, 126
Yang, 11
Vigenère, Blaise de, 91 Yin, 11
Vigenère cipher, 91
Zeeman, Christopher, 78
Wallis’s Formula, 125 Zero, 47
Wiles, Andrew, 29 ZX Spectrum, 20
136