IB Maths and GCSE Maths Resources from British International School Phuket. Theory of Knowledge (ToK). Maths explorations and investigations.  Real life maths. Maths careers. Maths videos. Maths puzzles and Maths lesson resources.

British International School Phuket

Welcome to the British International School Phuket’s maths website.  I am currently working at BISP and so I am running my site as the school’s maths resources website for both our students and students around the world.

We are a British international school located on the tropical island of Phuket in Southern Thailand. We offer a number of scholarships each year, catering for a number of national and international standard sports stars as well as for academic excellence. You can find out more about our school here.

BISP has a very proud tradition in mathematical excellence.  Our students have  achieved the top in Thailand awards for the Cambridge Maths IGCSEs 3 years in a row.  Pictured above are our world-class maths students for this year, Minjin Kang and Natchongrat (Oy) Terdkiatkhachorn.

Please explore the site – there is a huge amount of content!  Some of the most popular includes:

A large “Flipping the classroom” videos section for IB students.  This covers the entire IB HL, SL and Studies syllabus.

A new School Code Challenge activity which allows students to practice their code breaking skills – each code hides the password needed to access the next level.

Over 200 ideas to help with students’ Maths Explorations – many with links to additional information to research.

Enjoy!

Are you Psychic?

There have been people claiming to have paranormal powers for thousands of years.  However, scientifically we can say that as yet we still have no convincing proof that any paranormal abilities exist.  We can show this using some mathematical tests – such as the binomial or normal distribution.

ESP Test

You can test your ESP powers on this site (our probabilities will be a little different than their ones).  You have the chance to try and predict what card the computer has chosen.  After repeating this trial 25 times you can find out if you possess psychic powers.  As we are working with discrete data and have a fixed probability of guessing (0.2) then we can use a binomial distribution.  Say I got 6 correct, do I have psychic powers?

We have the Binomial model B(25, 0.2), 25 trials and 0.2 probability of success.  So we want to find the probability that I could achieve 6 or more by luck.

The probability of getting exactly 6 right is 0.16.  Working out the probability of getting 6 or more correct would take a bit longer by hand (though could be simplified by doing 1 – P(x ≤ 5).  Doing this, or using a calculator we find the probability is 0.38.  Therefore we would expect someone to get 6 or more correct just by guessing 38% of the time.

So, using this model, when would we have evidence for potential ESP ability?  Well, a minimum bar for our percentages would probably be 5%.  So how many do you need to get correct before there is less than a 5% of that happening by chance?

Using our calculator we can do trial and error to see that the probability of getting 9 or more correct by guessing is only 4.7%.  So, someone getting 9 correct might be showing some signs of ESP.  If we asked for a higher % threshold (such as 1%) we would want to see someone get 11 correct.

Now, in the video above, one of the Numberphile mathematicians manages to toss 10 heads in a row.  Again, we can ask ourselves if this is evidence of some extraordinary ability.  We can calculate this probability as 0.510 = 0.001. This means that such an event would only happen 0.1% of the time. But, we’re only seeing a very small part of the total video. Here’s the full version:

Suddenly the feat looks less mathematically impressive (though still an impressive endurance feat!)

You can also test your psychic abilities with this video here.

Medical Data Mining

It’s worth watching the video above, where Derren Brown manages to flip 10 heads in a row.  With Derren being a professional magician, you might expect some magic or sleight of hand – but no, it’s all filmed with a continuous camera, and no tricks.  So, how does he achieve something which should only occur with probability (0.5)10 ≈ 0.001, or 1 time in every thousand?  Understanding this trick is essential to understanding the dangers of accepting data presented to you without being aware of how it was generated.

At 7 minutes in Derren reveals the trick – it’s very easy, but also a very persuasive way to convince people something unusual is happening.  The trick is that Derren has spent the best part of an entire day tossing coins – and only showed the sequence in which he achieved 10 heads in a row.  Suddenly with this new information the result looks much less remarkable.

Scientific tests are normally performed to a 5% confidence interval – that is, if there is a less than 5% chance of something happening by chance then we regard the data as evidence to reject the null hypothesis and to accept the alternate hypothesis.   In the case of the coin toss, we would if we didn’t know better, reject the null hypothesis that this is a fair coin and conjecture that Derren is somehow affecting the results.

Selectively presenting results from trials is called data mining - and it’s a very powerful way to manipulate data.  Unfortunately it is also a widespread technique in the pharmaceutical industry when they release data on new drugs.  Trials which show a positive effect are published, those which show no effect (or negative effects) are not.  This is a massive problem – and one which has huge implications for people’s health.  After all, we are prescribed drugs based on scientific trials which attest to their efficiency.  If this data is being mined to skew results in the drug company’s favour then we may end up taking drugs that don’t work – or even make us worse.

Dr Ben Goldacre has written extensively on this topic – and an extract from his article “The Drugs Don’t Work” is well worth a read:

The Drugs Don’t Work

Reboxetine is a drug I have prescribed. Other drugs had done nothing for my patient, so we wanted to try something new. I’d read the trial data before I wrote the prescription, and found only well-designed, fair tests, with overwhelmingly positive results. Reboxetine was better than a placebo, and as good as any other antidepressant in head-to-head comparisons. It’s approved for use by the Medicines and Healthcare products Regulatory Agency (the MHRA), which governs all drugs in the UK. Millions of doses are prescribed every year, around the world. Reboxetine was clearly a safe and effective treatment. The patient and I discussed the evidence briefly, and agreed it was the right treatment to try next. I signed a prescription.

But we had both been misled. In October 2010, a group of researchers was finally able to bring together all the data that had ever been collected on reboxetine, both from trials that were published and from those that had never appeared in academic papers. When all this trial data was put together, it produced a shocking picture. Seven trials had been conducted comparing reboxetine against a placebo. Only one, conducted in 254 patients, had a neat, positive result, and that one was published in an academic journal, for doctors and researchers to read. But six more trials were conducted, in almost 10 times as many patients. All of them showed that reboxetine was no better than a dummy sugar pill. None of these trials was published. I had no idea they existed.

It got worse. The trials comparing reboxetine against other drugs showed exactly the same picture: three small studies, 507 patients in total, showed that reboxetine was just as good as any other drug. They were all published. But 1,657 patients’ worth of data was left unpublished, and this unpublished data showed that patients on reboxetine did worse than those on other drugs. If all this wasn’t bad enough, there was also the side-effects data. The drug looked fine in the trials that appeared in the academic literature; but when we saw the unpublished studies, it turned out that patients were more likely to have side-effects, more likely to drop out of taking the drug and more likely to withdraw from the trial because of side-effects, if they were taking reboxetine rather than one of its competitors.

The whole article is a fantastic (and worrying) account of regulatory failure.  At the heart of this problem lies a social and political misunderstanding of statistics which is being manipulated by drug companies for profit.  A proper regulatory framework would ensure that all trials were registered in advance and their data recorded.  Instead what happens is trials are commissioned by drugs companies, published if they are favourable and quietly buried if they are not.  This data mining would be mathematically rejected in an IB exploration coursework, yet these statistics still governs what pills doctors do and don’t prescribe.

When presented data therefore, your first question should be, “Where did this come from?” shortly followed by, “What about the data you’re not showing me?”  Lies, damn lies and statistics indeed!

If you enjoyed this post, you might also like:

How contagious is Ebola? – how we can use differential equations to model the spread of the disease.

Tetrahedral Numbers – Stacking Cannonballs

This is one of those deceptively simple topics which actually contains a lot of mathematics – and it involves how spheres can be stacked, and how they can be stacked most efficiently.  Starting off with the basics we can explore the sequence:

1, 4, 10, 20, 35, 56….

These are the total number of cannons in a stack as the stack gets higher.  From the diagram we can see that this sequence is in fact a sum of the triangular numbers:

S1 = 1

S2 1+3

S3 1+3+6

S4 1+3+6+10

So we can sum the first n triangular numbers to get the general term of the tetrahedral numbers. Now, the general term of the triangular numbers is 0.5n2 + 0.5n therefore we can think of tetrahedral numbers as the summation:

$\bf \sum_{k=1}^{n}0.5k+0.5k^2 = \sum_{k=1}^{n}0.5k+\sum_{k=1}^{n}0.5k^2$

But we have known results for the 2 summations on the right hand side:

$\bf \sum_{k=1}^{n}0.5k =\frac{n(n+1)}{4}$

and

$\bf \huge \sum_{k=1}^{n}0.5k^2 = \frac{n(n+1)(2n+1)}{12}$

and when we add these two together (with a bit of algebraic manipulation!) we get:

$\bf S_n= \frac{n(n+1)(n+2)}{6}$

This is the general formula for the total number of cannonballs in a stack n rows high. We can notice that this is also the same as the binomial coefficient:

$\bf S_n={n+2\choose3}$

Therefore we also can find the tetrahedral numbers in Pascals’ triangle (4th diagonal column above).

The classic maths puzzle (called the cannonball problem), which asks which tetrahedral number is also a square number was proved in 1878. It turns out there are only 3 possible answers. The first square number (1) is also a tetrahedral number, as is the second square number (4), as is the 140th square number (19,600).

We can also look at something called the generating function of the sequence. This is a polynomial whose coefficients give the sequence terms. In this case the generating function is:

$\bf \frac{x}{(x-1)^4} = x + 4x^2 + 10x^3 + 20x^4 ...$

Having looked at some of the basic ideas behind the maths of stacking spheres we can look at a much more complicated mathematical problem. This is called Kepler’s Conjecture – and was posed 400 years ago. Kepler was a 17th century mathematician who in 1611 conjectured that there was no way to pack spheres to make better use of the given space than the stack above. The spheres pictured above fill about 74% of the given space. This was thought to be intuitively true – but unproven. It was chosen by Hilbert in the 18th century as one of his famous 23 unsolved problems. Despite much mathematical efforts it was only finally proved in 1998.

If you like this post you might also like:

The Poincare Conjecture – the search for a solution to one of mathematics greatest problems.

Hailstone Numbers

This is a post inspired by the article on the same topic by the ever brilliant Plus Maths. Hailstone numbers are created by the following rules:

if n is even: divide by 2

if n is odd: times by 3 and add 1

We can then generate a sequence from any starting number.  For example, starting with 10:

10, 5, 16, 8, 4, 2, 1, 4, 2, 1…

we can see that this sequence loops into an infinitely repeating 4,2,1 sequence.  Trying another number, say 58:

58, 29, 88, 44, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 4, 2, 1…

and we see the same loop of 4,2,1.

In fact we can use the generator in the Plus Maths article to check any numbers we can think of, and we still get the pattern 4,2,1 looping.  The question is, does every number end in this loop?  Well, we don’t know.  Every number mathematicians have checked do indeed lead to this loop, but that is not a proof.  Perhaps there is a counter-example, we just haven’t found it yet.

Hailstone numbers are called as such because they fall, reach one (the ground) before bouncing up again.  The proper mathematical name for this investigation is the Collatz conjecture. This was made in 1937 by a German mathematian, Lothar Collatz.

One way to investigate this conjecture is to look at the length of time it takes a number to reach the number 1.  Some numbers take longer than others.  If we could find a number that didn’t reach 1 even in an infinite length of time then the Collatz conjecture would be false.

The following graphic from wikipedia shows how different numbers (x axis) take a different number of iterations (y axis) to reach 1.  We can see that some numbers take much longer than others to reach one.  For example, the number 73 has the following pattern:

73, 220, 110, 55, 166, 83, 250, 125, 376, 188, 94, 47, 142, 71, 214, 107, 322, 161, 484, 242, 121, 364, 182, 91, 274, 137, 412, 206, 103, 310, 155, 466, 233, 700, 350, 175, 526, 263, 790, 395, 1186, 593, 1780, 890, 445, 1336, 668, 334, 167, 502, 251, 754, 377, 1132, 566, 283, 850, 425, 1276, 638, 319, 958, 479, 1438, 719, 2158, 1079, 3238, 1619, 4858, 2429, 7288, 3644, 1822, 911, 2734, 1367, 4102, 2051, 6154, 3077, 9232, 4616, 2308, 1154, 577, 1732, 866, 433, 1300, 650, 325, 976, 488, 244, 122, 61, 184, 92, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1…

so investigating what it is about certain numbers that leads to long chains is one possible approach to solving the conjecture. This conjecture has been checked by computers up to a staggering 5.8 x 1018 numbers. That would suggest that the conjecture could be true – but doesn’t prove it is. Despite looking deceptively simple, Paul Erdos – one of the great 20th century mathematicians stated in the 1980s that “mathematics is not yet ready for such problems” – and it has remained unsolved over the past few decades.  Maybe you could be the one to crack this problem!

If you liked this post you might also like:

Friendly Numbers, Solitary Numbers, Perfect Numbers – a look at some other number sequence problems.

Stellar Numbers Investigation

This is an old IB internal assessment question and so can not be used for the new IB exploration – however it does give a good example of the sort of pattern investigation that is possible.

The task starts off with the fairly straightforward problem of trying to find the nth term formula for the triangular numbers:

Method 1

There are a number of ways to do this, probably the easiest is to notice that the second differences are always constant (+1 each time).  Therefore we have a quadratic sequence in the form an2 + bn + c

We can now substitute the known values when n = 1, 2, 3 into this to find 3 equations:

a(1) + b(1) + c = 1

a(2)2 + b(2) + c = 3

a(3)2 + b(3) + c = 6

this gives us:

a + b + c = 1

4a + 2b + c = 3

9a + 3b + c = 6

We can then eliminate using simultaneous equations to find a, b, c.  In fact our job is made easier by knowing that if the second difference is a constant, then the a in our formula will be half that value.  Therefore as our second difference was 1, the value of a will be 1/2.  We then find that b = 1/2 and c = 0.  So the formula for the triangular numbers is:

0.5n2 + 0.5n

Method 2

We can also derive this formula by breaking down triangular numbers into the following series:

1

1+2

1+2+3

1+2+3+4

Therefore we have the sum of an arithmetic series, with first term 1, common difference 1 and last term n, and so we can use the sum of an arithmetic series formula:

Sn = 0.5n(a1 + an)

Sn = 0.5n(1 + n) = 0.5n2 + 0.5n

Once this is done, we are asked to find the nth term for the 6-stellar numbers (with 6 vertices) below:

which give the pattern 1, 13, 37, 73

Method 1

Once again we can use the method for quadratic sequences.  The second difference is 12, giving us an2 + bn + c with a = 12/2 = 6. Substituting values gives us:

1 = 6(1)2 + b(1) + c
13 = 6(2)2 + b(2) + c

This simplifies to:

1 = 6 + b + c
13 = 24 + 2b + c

Therefore we can eliminate to find that b = -6 and c = 1.

which gives 6n2 – 6n + 1

Method 2

A more interesting method makes use of the triangular numbers.  We can first note a recurrence relationship in the stellar numbers – each subsequent pattern contains all the previous patterns inside.  In fact we can state the relationship as:

S1

S2 = S1 + outside star edge

S3 = S2 + outside star edge

S4 = S3 + outside star edge

The outside star edge of S2 can be thought of as 6 copies of the 2nd triangular number

The outside star edge of S3 can be thought of as 6 copies of the 3rd triangular number, but where we subtract 6×1 (the first triangular number) because we double count one of the internal points six times. We also subtract 6 as we double count each vertex.

The outside star edge of S4 can be thought of as 6 copies of the 4th triangular number, but where we subtract 6 x 3 (the second triangular number) because we double count three of the internal points six times. We also subtract 6 as we double count each vertex.

The outside star edge of S5 can be thought of as 6 copies of the 5th triangular number, but where we subtract 6 x 6 (the third triangular number) because we double count six of the internal points six times. We also subtract 6 as we double count each vertex.

Therefore we can form a formula for the outside star:

6(0.5n2 + 0.5n) – 6(0.5(n-2)2 + 0.5(n-2)) – 6

which simplifies to:

12(n -1)

We can now put this into our recurrence relationship:

S1 = 1

S2 = 1 + 12(n -1)

S3 = 1 + 12((n-1) -1) + 12(n -1)

S4 = 1 + 12((n-2) -1) + 12((n-1) -1) + 12(n -1)

Note that when we substituted the nth term formula for S2 into S3 we had to shift the n value to become n-1 as we were now on the 3rd term rather than 2nd term.

So:

S1 = 1

S2 = 1 + 12(n -1)

S3 = 1 + 12(n-1) + 12(n-2)

S4 = 1 + 12(n-1) + 12(n-2) + 12(n-3)

So:

S1 = 1 + 0

S2 = 1 + 12

S3 = 1 + 12+ 24

S4 = 1 + 12 + 24 + 36

So using the formula for the sum of an arithmetic Sn = 0.5n(a1 + an) we have

Sn = 1 + 0.5(n-1)(12 + 12(n-1))

Sn = 6n2 – 6n + 1

Quite a bit more convoluted – but also more interesting, and also more clearly demonstrating how the sequence is generated.

Generalising for p-stellar numbers

We can then generalise to find stellar number formulae for different numbers of vertices.  For example the 5-stellar numbers pictured above have the formula 5n2 – 5n + 1.  In fact the p-stellar numbers will have the formula pn2 – pn + 1.

We can prove this by using the same recurrence relationship before:

S1

S2 = S1 + outside star edge

S3 = S2 + outside star edge

S4 = S3 + outside star edge

and by noting that the outside star edge is found in the same way as before for a p-stellar shape – only this time we subtract p for the number of vertices counted twice.  This gives:

p(0.5n2 + 0.5n) – p(0.5(n-2)2 + 0.5(n-2)) – p

which simplifies to

2p(n-1)

and so substituting this into our recurrence formula:

S1 = 1

S2 = 1 + 2p(n-2)

S3 = 1 + 2p(n-2) + 2p(n-1)

S4 = 1 + 2p(n-3) + 2p(n-2) + 2p(n-1)

We have the same pattern as before – an arithmetic series in terms of 2p, and using Sn = 0.5n(a1 + an) we have:

Sn= 1 + 0.5(n-1)(2p + 2p(n-1) )

Sn = pn2 – pn + 1

Therefore, although our second method was slower, it allowed us to spot the pattern in the progression – and this then led very quickly to a general formula for the p-stellar numbers.

If you like this you might also like:

The Goldbach Conjecture – The Goldbach Conjecture states that every even integer greater than 2 can be expressed as the sum of 2 primes.  No one has ever managed to prove this.

Making Music With Sine Waves

Sine and cosine waves are incredibly important for understanding all sorts of waves in physics.  Musical notes can be thought of in terms of sine curves where we have the basic formula:

y = sin(bt)

where t is measured in seconds.  b is then connected to the period of the function by the formula period = 2π/b.

When modeling sound waves we normally work in Hertz – where Hertz just means full cycles (periods) per second.  This is also called the frequency.  Sine waves with different Hertz values will each have a distinct sound – so we can cycle through scales in music through sine waves of different periods.

For example the sine wave for 20Hz is:

20Hz means 20 periods per second (i.e 1 period per 1/20 second) so we can find the equivalent sine wave by using

period = 2π/b.

1/20 = 2π/b.

b = 40π

So, 20Hz is modeled by y = sin(40πt)

You can plot this graph using Wolfram Alpha, and then play the sound file to hear what 20Hz sounds like.  20Hz is regarded as the lower range of hearing spectrum for adults – and is a very low bass sound.

The middle C on a piano is modeled with a wave of 261.626Hz.  This gives the wave

which has the equation, y = sin(1643.84πt).  Again you can listen to this sound file on Wolfram Alpha.

At the top end of the sound spectrum for adults is around 16,000 – 20,000Hz.  Babies have a ability to hear higher pitched sounds, and we gradually lose this higher range with age.  This is the   sine wave for 20,000Hz:

which has the equation, y = sin(40,000πt). See if you can hear this file - warning it’s a bit painful!

As well as sound waves, the whole of the electromagnetic spectrum (radio waves, microwaves, infrared, visible light, ultraviolet, x rays and gamma rays) can also be thought of in terms of waves of different frequencies.  So, modelling waves using trig graphs is an essential part of understanding the physical world.

If you enjoyed this post you might also like:
Fourier Transforms – the most important tool in mathematics? - how we can use advanced mathematics to understand waves – with applications for everything from WIFI, JPEG compression, DNA analysis and MRI scans.

Surviving the Zombie Apocalypse

This is part 2 in the maths behind zombies series. See part 1 here

We have previously looked at how the paper from mathematicians from Ottawa University discuss the mathematics behind surviving the zombie apocalypse – and how the mathematics used has many other modelling applications – for understanding the spread of disease and the diffusion of gases. In the previous post we saw how the zombie diffusion rate could be predicted by the formula:

In this equation Z(x,t) stands for the density of zombies at point x and time t. Z0 stands for the initial zombie density – where all zombies are starting at the same point (x between 0 and 1). L stands for the edge of the domain.  This is a 1 dimensional model – where zombies only travel in a straight line.  For modelling purposes, this would be  somewhat equivalent to being trapped in a 50 metre by 1 metre square fenced area – with (0,0) as the bottom left corner of the fence. L would be 50 in this case, and all zombies would initially be in the 1 metre square which went through the origin.

We saw that as the time, t gets large this equation can be approximated by:

Which means that after a long length of time our 50 metre square fenced area will have an equal density of zombies throughout. If we started with 100 zombies in our initial 1 metre square area (say emerging from a tomb), then Z0 = 100 and with L = 50 we would have an average density of 100/2 = 2 zombies per metre squared.

When will the zombies arrive?

So, say you have taken the previous post’s advice and run as far away as possible.  So, you’re at the edge of the 50 metre long fence.  The next question to ask therefore, how long before the zombies reach you? To answer this we need to solve the initial equation Z(x,t) to find t when x = 50 and Z(50,t) = 1.  We solve to find Z(50,t) = 1 because this represents the time t when there is a density of 1 zombie at distance 50 metres from the origin.  In other words when a zombie is standing where you are now!  Solving this would be pretty tough, so we do what mathematicians like to do, and take an approximation.  This approximate solution for t is given by:

where L is the distance we’re standing away (50 metres in this case) and D is the diffusion rate.  D can be altered to affect the speed of the zombies.  In the study they set D as 100 – which is claimed to be consistent with a slow, shuffling zombie walk.  Therefore the time the zombies will take to arrive is approximately t = 0.32(50)2/100 = 8 minutes. If we are a slightly further distance away (say we are trapped along a 100 metre fence) then the zombies will arrive in approximately t = 0.32(100)2/100 = 32 minutes.

Fight or flight?

Fighting (say by lobbing missiles at the oncoming hordes) would slow the diffusion rate D, but would probably be less effective than running – as the time is rapidly increased by the L2 factor.  Let’s look at a scenario to compare:

You are 20 metres from the zombies.  You can decide to spend 1 minute running an extra 30 metres away (you’re not in good shape) to the edge of the fence (no rocks here) or can spend your time lobbing rocks with your home-made catapult to slow the advance.  Which scenario makes more sense?

Scenario 1

You get to the edge of the fence in 1 minute.  The zombies will get to the edge of the fence in t = 0.32(50)2/100 = 8 minutes.  You therefore have an additional 7 minutes to sit down, relax, and enjoy your last few moments before the zombies arrive.

Scenario 2

You successfully manage to slow the diffusion rate to D = 50 as the zombies are slowed by your sharp-shooting.  The zombies will arrive in 0.32(20)2/50 = 2.6 minutes.  If only you’d paid more attention in maths class.

If you liked this post you might also like:

How contagious is Ebola? – using differential equations to model infections.

Modelling for Zombies

Some mathematicians at the University of Ottawa have just released a paper looking at the mathematics behind a zombie apocalypse.  What are the best strategies for avoiding being eaten?  How quickly would zombies spread through the population?  This may seem a little silly as zombies aren’t real – but actually the mathematics behind how diseases spread through a population is very useful – and, well, zombies are as good a way as any to introduce this.

The graphic above from the paper shows how zombie movement can be modelled.  Given that zombies randomly move around, and any bumping would lead to a tendency towards finding space, they are modelled in the same way that we model the diffusion of gas.  If you start with a small concentrated number of particles they will spread out to fill the given space like shown above.

Diffusion can be modelled by the diffusion equation above.  We have:

t: time (in specified units)

x: position of the x axis.

w: the density of zombies at time t and point x.  We could also write w(t,x) in function notation.

a: a is a constant.

The “curly d” in the equation means the partial differential.  This works the same as normal differentiation but when we differentiate we are only interested in differentiating the denominator letter – and act as though all other letters are constants.  This is easier to show with an example.

z = 3xy2

The partial differential of z with respect to x is 3y2
The partial differential of z with respect to y is 6xy

So, going back to our diffusion equation, we need to find a function w(x,t) which satisfies this equation – and then we can use this function to model the spread of zombies through an area.  There are lots of different solutions to this equation (see a list here).  One of the easiest is:

w(x,t) = A(x2 + 2at) + B

where we have introduced 2 new constants, A and B.

We can check that this works by finding the left handside and right handside of the diffusion equation:

Therefore as the LHS and RHS are equal, the diffusion equation is satisfied. Therefore we have the following zombie density model:

w(x,t) = A(x2 + 2at) + B

this will tell us at point x and time t what the zombie density is.  We would need particular values to then find A, B and a.  For example, we can restrict x between 0 and 1 and t between 1 and 5, then set A = -1, B = 21, a = 2 to give:

w(x,t) = (-x2 + -4t) + 21

This begins to fit the behavior we want – at any fixed point x the density will decrease with time, and as we move further away from the initial point (x = 0) we have lower density.  This is only very rough however.

A more complicated solution to the diffusion equation is given above.  In this equation Z(x,t) stands for the density of zombies at point x and time t. Z0 stands for the initial zombie density – where all zombies are starting at the same point (x between 0 and 1). L stands for the edge of the domain.  This is a 1 dimensional model – where zombies only travel in a straight line.  For modelling purposes, this would be  somewhat equivalent to being trapped in a 50 metre by 1 metre square fenced area – with (0,0) as the bottom left corner of the fence. L would be 50 in this case, and all zombies would initially be in the 1 metre square which went through the origin.

Luckily as t gets large this equation can be approximated by:Which means that after a long length of time our 50 metre square fenced area will have an equal density of zombies throughout. If we started with 100 zombies in our initial 1 metre square area (say emerging from a tomb), then with Z0 = 100 and with L = 50 we would have an average density of 100/2 = 2 zombies per metre squared.  In other words zombies would be evenly spaced out across all available space.

So, what advice can you take from this when faced with a zombie apocalypse? Well if zombies move according to diffusion principles then initially you have a good advantage to outrun them – after-all they will be moving randomly and you will be running linearly as far away as possible. That will give you some time to prepare your defences for when the zombies finally reach you. As long as you get far enough away, when they do reach your corner their density will be low and therefore much easier to fight.

Good luck!

If you liked this post you might also like:

Surviving the Zombie Apocalypse – more zombie maths.  How long before the zombies arrive?

How contagious is Ebola? – using differential equations to model infections.

Maths Puzzles

These should all be accessible for top sets in KS4 and post 16.  See if you can manage to get all 3 correct.

Puzzle Number 1

Why is xx undefined when x = 0 ?

Puzzle Number 2

I multiply 3 consecutive integers together. My answer is 8 times the smallest of the 3 integers I multiplied. What 3 numbers could I have chosen?

Puzzle Number 3

You play a game as follows:

1 point for a prime number
2 points for an even number
-3 points for a square number

(note if you choose (say) the number 2 you get +1 for being a prime and +2 for being an even number giving a total of 3 points)

You have the numbers 1-9 to choose from. You need to choose 6 numbers such that their score adds to zero. How many different ways can you find to win this game?

When you have solved all 3 puzzles, click here to find out the solutions.

If you like this post, you might also like:

A Maths Snooker Puzzle. A great little puzzle which tests logic skills.

Visualising Algebra Through Geometry.  How to use geometry to simplify puzzles

The Chinese Postman Problem

There is a fantastic pdf resource from Suffolk Maths which goes into a lot of detail on this topic – and I will base my post on their resource.   Visit their site for a more in-depth treatment.

The Chinese Postman Problem was first posed by a Chinese mathematician in 1962.  It involved trying to calculate how a postman could best choose his route so as to mimise his time.  This is the problem that Kuan Mei-Ko tried to solve:

How could a postman visit every letter on the graph in the shortest possible time?

Solving this requires using a branch of mathematics called graph theory, created by Leonard Euler.  This mathematics looks to reduce problems to network graphs like that shown above.  Before we can solve this we need to understand some terminology:

Above we have 3 graphs.  A graph which can be drawn without taking the pen off the paper or retracing any steps is called traversable (and has a Euler trail).  Graph 1 is not traversable.  Graph 2 is traversable as long as you start at either A or D, and Graph 3 is traversable from any point that you start.  It turns out that what dictates whether a graph is traversable or not is the order of their vertices.

Looking at each letter we count the number of lines at the vertex.  This is the order.  For graph 1 we have 3 lines from A so A has an order of 3.  All the vertices on graph 1 have an order of 3.  For graph 2 we have the orders (from A, B, C, D, E in turn) 3, 4, 4, 3, 2.  For graph 3 we have the orders 4,4,4,4,2,2.

This allows us to arrive at a rule for working out if a graph is traversable.

If all orders are even then a graph is traversable.  If there are 2 odd vertices then we can find a traversable graph by starting at one of the odd vertices and finishing at the other.  We need therefore to pair up any odd vertices on the graph.

Next we need to understand how to pair the odd vertices.  For example if I have 2 odd vertices, they can only be paired in one way.  If I have 4 vertices (say A,B,C,D) they can be paired in 3 different ways (either AB and CD or AC and BD or AD and BC) .  The general term rule to calculate how many ways n odd vertices can be paired up is (n-1) x (n-3) x (n-5) … x 1.

So now we are ready to actually solve the Chinese Postman Problem.  Here is the algorithm:

So, we can now apply this to the Chinese Postman Problem below:

Step 1:  We can see that the only odd vertices are A and H.

Step 2:  We can only pair these one way (AH)

Step 3 and 4: The shortest way to get from A to H is ABFH which is length 160.  This is shown below:

Step 5 and 6: The total distance along all the lines in the initial diagram is 840m.  We add our figure of 160m to this.  Therefore the optimum (minimum) distance it is possible to complete the route is 1000m.

Step 7:  We now need to find a route of distance 1000m which includes the loop ABFH (or in reverse) which starts and finishes at one of the odd vertices.  One solution provided by Suffolk Maths is ADCGHCABDFBEFHFBA.  There are others!

The Bridges of Konigsburg

Graph theory was invented as a method to solve the Bridges of Konigsburg problem by Leonard Euler.  This was a puzzle from the 17oos – Konigsburg was a Russian city with 7 bridges, and the question was, could anyone walk across all 7 without walking over any bridge twice.  By simplifying the problem into one of connected lines, Euler was able to prove that this was in fact impossible.

If you like this post you might also like:

Knight’s Tour – This puzzles dates over 1000 years and concerns the ways in which a knight can cover all squares on a chess board.

Game Theory and Tic Tac Toe – Tic Tac Toe has already been solved using Game Theory – this topic also brings in an introduction to Group Theory.

Website Stats

• 1,275,896 views