You are currently browsing the category archive for the ‘Real life maths’ category.

**Modelling Radioactive decay**

We can model radioactive decay of atoms using the following equation:

**N(t) = N _{0} e^{-λt}**

Where:

**N _{0}**: is the initial quantity of the element

**λ**: is the radioactive decay constant

**t**: is time

**N(t)**: is the quantity of the element remaining after time t.

So, for Carbon-14 which has a half life of 5730 years (this means that after 5730 years exactly half of the initial amount of Carbon-14 atoms will have decayed) we can calculate the decay constant **λ. **

After 5730 years, N(5730) will be exactly half of N_{0}, therefore we can write the following:

**N(5730) = 0.5N _{0} = N_{0} e^{-λt}**

therefore:

**0.5 = e ^{-λt}**

and if we take the natural log of both sides and rearrange we get:

**λ = ln(1/2) / -5730**

**λ ≈0.000121**

We can now use this to solve problems involving Carbon-14 (which is used in Carbon-dating techniques to find out how old things are).

eg. You find an old parchment and after measuring the Carbon-14 content you find that it is just 30% of what a new piece of paper would contain. How old is this paper?

We have

**N(t) = N _{0} e^{-0.000121t}**

**N(t)/N _{0}** =

**e**

^{-0.000121t}**0.30** = **e ^{-0.000121t}**

**t = ln(0.30)/(-0.000121)**

**t = 9950 years old.**

**Probability density functions**

We can also do some interesting maths by rearranging:

**N(t) = N _{0} e^{-λt}**

**N(t)/N _{0}** =

**e**

^{-λt}and then plotting **N(t)/N _{0}** against time.

**N(t)/N _{0}** will have a range between 0 and 1 as when t = 0,

**N(0)**=

**N**which gives

_{0}**N(0)**/

**N(0)**= 1.

We can then manipulate this into the form of a probability density function – by finding the constant a which makes the area underneath the curve equal to 1.

solving this gives a = λ. Therefore the following integral:

will give the fraction of atoms which will have decayed between times t1 and t2.

We could use this integral to work out the half life of Carbon-14 as follows:

Which if we solve gives us t = 5728.5 which is what we’d expect (given our earlier rounding of the decay constant).

We can also now work out the expected (mean) time that an atom will exist before it decays. To do this we use the following equation for finding E(x) of a probability density function:

and if we substitute in our equation we get:

Now, we can integrate this by parts:

So the expected (mean) life of an atom is given by 1/λ. In the case of Carbon, with a decay constant λ ≈0.000121 we have an expected life of a Carbon-14 atom as:

E(t) = 1 /0.000121

E(t) = 8264 years.

Now that may sound a little strange – after all the half life is 5730 years, which means that half of all atoms will have decayed after 5730 years. So why is the mean life so much higher? Well it’s because of the long right tail in the graph – we will have some atoms with very large lifespans – and this will therefore skew the mean to the right.

**Could Trump be the next President of America?**

There is a lot of statistical maths behind polling data to make it as accurate as possible – though poor sampling techniques can lead to unexpected results. For example in the UK 2015 general election even though labour were predicted to win around 37.5% of the vote, they only polled 34%. This was a huge political shock and led to a Conservative government when all the pollsters were predicting a hung parliament. In the postmortem following the fallout of this failure, YouGov concluded that their sampling methods were at fault – leading to big errors in their predictions.

**Trump versus Clinton**

The graph above from Real Clear Politics shows the current hypothetical face off between Clinton and Trump amongst American voters. Given that both are now clear favourites to win their respective party nominations, attention has started to turn to how they fare against each other.

**Normal distribution**

A great deal of statistics dealing with populations is based on the normal distribution. The normal distribution has the bell curve shape above – with the majority of the population bunched around the mean value, and with symmetrical tails at each end. For example most men in the UK will be between 5 feet 8 and 6 foot – with a symmetrical tail of men much taller and much smaller. For polling data mathematicians usually use a sample of 1000 people – this is large enough to give a good approximation to the normal distribution whilst not being too large to be prohibitively expensive to conduct.

**A Polling Example**

The following example is from the excellent introduction to this topic from the University of Arizona.

So, say we have sample 1000 people asking them a simple Yes/No/Don’t Know type question. Say for example we asked 1000 people if they would vote for Trump, Clinton or if they were undecided. In our poll 675 people say, “Yes” to Trump – so what we want to know is what is our confidence interval for how accurate this prediction is. Here is where the normal distribution comes in. We use the following equations:

We have μ representing the mean.

n = the number of people we asked which is 1000

p_{0} = our sample probability of “Yes” for Trump which is 0.675

Therefore μ = 1000 x 0.675 = 675

We can use the same values to calculate the standard deviation σ:

σ = (1000(0.675)(1-0.675))^{0.5}

σ = 14.811

We now can use the following table:

This tells us that when we have a normal distribution, we can be 90% confident that the data will be within +/- 1.645 standard deviations of the mean.

So in our hypothetical poll we are 90% confident that the real number of people who will vote for Trump will be +/- 1.645 standard deviations from our sample mean of 675

This gives us the following:

upper bound estimate = 675 + 1.645(14.811) = 699.4

lower bound estimate = 675 – 1.645(14.811) = 650.6

Therefore we can convert this back to a percent – and say that we can be 90% confident that between 65% and 70% of the population will vote for Trump. We therefore have a prediction of 67.5% with a margin of error of +or – 2.5%. You will see most polls that are published using a + – 2.5% margin of error – which means they are using a sample of 1000 people and a confidence interval of 90%.

**Real Life**

Back to the real polling data on the Clinton, Trump match-up. We can see that the current trend is a narrowing of the polls between the 2 candidates – 47.3% for Clinton and 40.8% for Trump. This data is an amalgamation of a large number of polls – so should be reasonably accurate. You can see some of the original data behind this:

This is a very detailed polling report from CNN – and as you can see above, they used a sample of 1000 adults in order to get a margin of error of around 3%. However with around 6 months to go it’s very likely these polls will shift. Could we really have President Trump? Only time will tell.

Cartoon from here

**The Gini Coefficient – Measuring Inequality **

The Gini coefficient is a value ranging from 0 to 1 which measures inequality. 0 represents perfect equality – i.e everyone in a population has exactly the same wealth. 1 represents complete inequality – i.e 1 person has all the wealth and everyone else has nothing. As you would expect, countries will always have a value somewhere between these 2 extremes. The way its calculated is best seen through the following graph (from here):

The Gini coefficient is calculated as the area of A divided by the area of A+B. As the area of A decreases then the curve which plots the distribution of wealth (we can call this the Lorenz curve) approaches the line y = x. This is the line which represents perfect equality.

**Inequality in Thailand**

The following graph will illustrate how we can plot a curve and calculate the Gini coefficient. First we need some data. I have taken the following information on income distribution from the 2002 World Bank data on Thailand where I am currently teaching:

Thailand:

The bottom 20% of the population have 6.3% of the wealth

The next 20% of the population have 9.9% of the wealth

The next 20% have 14% of the wealth

The next 20% have 20.8% of the wealth

The top 20% have 49% of the wealth

I can then write this in a cumulative frequency table (converting % to decimals):

Here the x axis represents the cumulative percentage of the population (measured from lowest to highest), and the y axis represents the cumulative wealth. This shows, for example that the the bottom 80% of the population own 51% of the wealth. This can then be plotted as a graph below (using Desmos):

From the graph we can see that Thailand has quite a lot of inequality – after all the top 20% have just under 50% of the wealth. The blue line represents how a perfectly equal society would look.

To find the Gini Coefficient we first need to find the area between the 2 curves. The area underneath the blue line represents the area A +B. This is just the area of a triangle with length and perpendicular height 1, therefore this area is 0.5.

The area under the green curve can be found using the trapezium rule, 0.5(a+b)h. Doing this for the first trapezium we get 0.5(0+0.063)(0.2) = 0.0063. The second trapezium is 0.5(0.063+0.162)(0.2) and so on. Adding these areas all together we get a total trapezium area of 0.3074. Therefore we get the area between the two curves as 0.5 – 0.3074 ≈ 0.1926

The Gini coefficient is then given by 0.1926/0.5 = 0.3852.

The actual World Bank calculation for Thailand’s Gini coefficient in 2002 was 0.42 – so we have slightly underestimated the inequality in Thailand. We would get a more accurate estimate by taking more data points, or by fitting a curve through our plotted points and then integrating. Nevertheless this is a good demonstration of how the method works.

In this graph (from here) we can see a similar plot of wealth distribution – here we have quintiles on the x axis (1st quintile is the bottom 20% etc). This time we can compare Hungary – which shows a high level of equality (the bottom 80% of the population own 62.5% of the wealth) and Namibia – which shows a high level of inequality (the bottom 80% of the population own just 21.3% of the wealth).

**How unequal is the world?**

We can apply the same method to measure world inequality. One way to do this is to calculate the per capita income of all the countries in the world and then to work out the share of the total global per capita income the (say) bottom 20% of the countries have. This information is represented in the graph above (from here). It shows that there was rising inequality (i.e the richer countries were outperforming the poorer countries) in the 2 decades prior to the end of the century, but that there has been a small decline in inequality since then.

If you want to do some more research on the Gini coefficient you can use the following resources:

The intmaths site article on this topic – which goes into more detail and examples of how to calculate the Gini coefficient

The ConferenceBoard site which contains a detailed look at world inequality

The World Bank data on the Gini coefficients of different countries.

This is a classic puzzle which is discussed in some more detail by the excellent Wired article. The puzzle is best represented by the picture below. We have a hunter who whilst in the jungle stumbles across a monkey on a tree branch. However he knows that the monkey, being clever, will drop from the branch as soon as he hears the shot being fired. The question is therefore, at what angle should the hunter aim so that he still hits the monkey?

(picture from the Wired article – originally from a UCLA physics textbook)

The surprising conclusion is that counter to what you would expect, you should actually still aim at the monkey on the branch – and in this way your bullet’s trajectory will still hit the monkey as it falls. You can see a video of this experiment at the top of the page.

You can use tracking software (such as the free software tracker ) to show this working graphically. Tracker provides a video demo with the falling monkey experiment:

As you can see from the still frame, we have the gun in the bottom left corner, lined up with the origin, the red trace representing the bullet and the blue trace representing the falling monkey.

We can then generate a graph to represent this data. The red line is the height of the bullet with respect to time. The faint blue line (with yellow dots) is the height of the monkey with respect to time. We can see clearly that the red line can be modeled as a quadratic. The blue line should in theory also be a quadratic (see below):

but in our model, the blue line is so flat as to be better modeled as a linear approximation – which is shown in pink. Now we can use regression technology to find the equation of both of these lines, to show not only that they do intersect, but also the time of that intersection.

We have the linear approximation as y = -18.5t + 14.5

and the quadratic approximation as y = -56t^{2}+39t +0.1

So the 2 graphs will indeed intersect when -18.5t + 14.6 = -56t^{2}+39t +0.1

which will be around 0.45 seconds after the gun is fired.

(A more humane version, also from Wired – where we can throw the monkey a banana)

**Newtonian Mathematics**

The next question is can we prove this using some algebra? Of course! The key point is that the force of gravity will affect both the bullet and the falling monkey equally (it will not be affected by the different weights of the two – see the previous post here about throwing cannonballs from the Leaning Tower of Pisa). So even thought the bullet deviates from the straight line path lined up in the gun sights, the distance the bullet deviates will be exactly the same distance that the monkey falls. So they still collide. Mathematically we have:

The vertical height of the bullet given by:

y = V_{0}t – 0.5gt^{2}

Where V_{0} is the initial vertical speed, t is the time, g is the gravitational force (9.8)

The vertical height of the monkey is given by:

y = h – 0.5gt^{2}

where h is the initial vertical height of the monkey.

Therefore these will intersect when:

V_{0}t – 0.5gt^{2} = h – 0.5gt^{2}

V_{0}t = h

V_{0}/h = t

And for any given non-zero value of V_{0} we will have a t value – which represents the time of collision.

Well done – you have successfully shot the monkey!

If you like this you might also like:

Throwing cannonballs off the Leaning tower of Pisa – why weight doesn’t affect falling velocity

War Maths – how cannon operators used projectile motion to win wars

**How to Design a Parachute**

This post is also inspired by the excellent book by Robert Banks – Towing Icebergs. This book would make a great investment if you want some novel ideas for a maths investigation.

The challenge is to design a parachute with a big enough area to make sure that someone can land safely on the ground. How can we go about doing this? Let’s start (as in the last post) with some Newtonian maths.

**Newton’s Laws:**

For an object falling through the air we have:

p_{s}gV – p_{a}gV – F_{D} = p_{s}Va

p_{s} = The density of the falling object

p_{a} = The density of the air it’s falling in

F_{D} = The drag force

g = The gravitational force

V = The volume of the falling object

a = The acceleration of the falling object

**Time to simplify things**

Things look a little complicated at the moment – luckily we can make our lives easier through a little simplification. p_{a} will be many magnitudes smaller than than p_{s} – as the density of air is much smaller than the density of objects like cannonballs. Therefore we ignore this part of the equation, giving an approximate equation:

p_{s}gV – F_{D} ≈ p_{s}Va

We now rewrite things to make it easier to substitute values in later.

p_{s}V = m, where m = mass of an object (as density x volume = mass)

This gives:

mg – F_{D} ≈ ma

and as mg = W (mass x gravitation force = weight) we can rewrite this as:

W – F_{D} ≈ (w/g)a

Now, the key information to know when looking at a parachute design is the *terminal velocity *that will be reached when the parachute is open – that means the maximum velocity that a parachutist will potentially be hitting the ground traveling.

Now, when a person is traveling at terminal velocity their acceleration is 0, so we can set a = 0 in the equation above to give:

W – F_{D} = 0

Now we need an equation for F_{D} (the drag force).

F_{D} = 0.5p_{a}C_{D}AU^{2}

where

p_{a} = density of the air

C_{D} = the drag coefficient

A = area of parachute

U = velocity

So

when the parachutist is traveling at their terminal velocity with the parachute open we have:

W – F_{D} = 0

W = 0.5p_{a}C_{D}AU^{2}

OK, nearly there. Next thing to consider is what is the maximum velocity we want someone to be traveling when they hit the ground. This is advised to be around 5 m/s – similar to jumping from a 2 metre ladder. Much more than this and you would risk breaking a bone (or worse!)

So we are finally ready to solve our equation. We want to find what value of A (the area of the parachute) will make us land safely.

We have:

p_{a} = 0.6kg/m^{3} (approximate density of air at 3000m)

C_{D} = 1.40 (a calculated drag coefficient for an open parachute)

U = velocity = 5m/s (this is the maximum velocity we want to want to avoid injury)

W = 100kg (we will have this as the combined weight of the parachutist and the parachute)

So,

W = 0.5p_{a}C_{D}AU^{2}

100 = 0.5(0.6)(1.40)A(5)^{2}

A = 9.5m^{2}

So if we had a circular parachute with radius 1.7m it should slow us down sufficiently for us to land safely.

**Galileo: Throwing cannonballs off The Leaning Tower of Pisa **

This post is inspired by the excellent book by Robert Banks – Towing Icebergs. This book would make a great investment if you want some novel ideas for a maths investigation.

Galileo Galilei was an Italian mathematician and astronomer who (reputedly) conducted experiments from the top of the Tower of Pisa. He dropped various objects from in order to measure how long it took for them to reach the bottom, coming to the remarkable conclusion that the objects’ weight did not affect the speed at which it fell. But does that really mean that a feather and a cannonball would fall at the same speed? Well, yes – as long as they were dropped in a vacuum. Let’s have a look at how we can prove that.

**Newton’s Laws:**

For an object falling through the air we have:

p_{s}gV – p_{a}gV – F_{D} = p_{s}Va

p_{s} = The density of the falling object

p_{a} = The density of the air it’s falling in

F_{D} = The drag force

g = The gravitational force

V = The volume of the falling object

a = The acceleration of the falling object

To understand where this equation comes from we note that Newton second law (Force = mass x acceleration) is

F = ma

The LHS of our equation (p_{s}gV – p_{a}gV – F_{D}) represents the forces acting on the object and the RHS (p_{s}Va) represents mass x acceleration.

**Time to simplify things**

Things look a little complicated at the moment – luckily we can make our lives easier through a little simplification. p_{a} will be many magnitudes smaller than than p_{s} – as the density of air is much smaller than the density of objects like cannonballs. Therefore we ignore this part of the equation, giving an approximate equation:

p_{s}gV – F_{D} ≈ p_{s}Va

Next, we can note that in a vacuum F_{D} (the drag force) will be 0 – as there is no air resistance. Therefore this can also be ignored to get:

p_{s}gV ≈ p_{s}Va

g ≈ a

But we have a = dU/dt where U = velocity, therefore,

g ≈ a

g ≈ dU/dt

g dt ≈ dU

and integrating both sides will give:

gt ≈ U

Therefore the velocity (U) of the falling object in a vacuum is only dependent on time and the gravitational force. In other words it is independent of the object’s mass. Amazing!

This might be difficult to believe – as it is quite unintuitive. So if you’re not convinced you can watch the video below in which Brian Cox tests this out in the world’s largest vacuum chamber.

If you liked this post you might also like:

War maths – how modeling projectiles plays an essential part in waging wars.

**The Coastline Paradox and Fractional Dimensions**

The coastline paradox arises from the difficulty of measuring shapes with complicated edges such as those of countries like the Britain. As we try and be ever more accurate in our measurement of the British coastline, we get an ever larger answer! We can see this demonstrated below:

This first map represents an approximation of the British coastline with each line representing 200km. With this scale we arrive at an estimation of around 2400km. Yet if we take each line with length 50km we get the following:

This map now has a length of around 3400km. Indeed by choosing ever smaller measuring lengths we can make it much larger still. Coastlines have similar attributes to fractals – which are shapes which exhibit self similarity on ever smaller scales.

We can attempt to classify the dimension of fractals by using decimals. Just as 1 dimension represents a straight line and 2 dimensions represents a surface, we can have a pattern with dimension (say) 1.32. These dimensions make sense in terms of classifying fractal. A fractal with dimension close to 1 will be close to a straight line, one with a dimension close to 2 will be very “crinkly” indeed.

We can use the graph above, which was used by one of the founding fathers of fractal mathematics – Mandelbrot – to help expand his early ideas on the subject. The x axis is a log base 10 scale of the length chosen to measure the coastline in. The y axis is a log base 10 scale of the subsequent coastline length. So for example if we take our first estimate of the British coastline, i.e measurements of 200km, which achieved an estimate of 2400km – then we would plot the coordinate ( log(200), log(2400) ) For our second estimate this achieves the point (log(50), log(3400) ).

We can see that countries with steeper slopes (i.e those whose coastline greatly increases with ever smaller measuring scales) will have a more jagged coastline and so can be regarded as having a higher dimension. Mandelbrot assigned the coastline dimension as related to the gradient of the slope.

**Finding the gradient of a log-log graph**

However to find the gradient of the lines above is slightly complicated by the fact that we have a log-log plot. There is a formula we should use:

In the formula above, m is the gradient and F_{1} and F_{2} are the corresponding y values to x_{1} and x_{2}. So using our coordinate values ( log(200), log(2400) ) and (log(50), log(3400) ) we would get a slope of:

log(2400/3400)/log(200/50) = -0.251

We then take the absolute value of this and add 1 – which gives a coastline dimension of 1.251 for Britain’s West coast.

We can also read off the approximate values from the graph. If we take the points (1.5, 3.3) and (2.7, 3) then we have a slope of:

log(3/3.3)/log(2.7/1.5) = -0.162 which gives a coastline dimension of 1.162.

Actually, with a more accurate reading of this scale Mandelbrot arrived at a coastline dimension of 1.25 for Britain – agreeing with our previous working out.

**The coastline dimensions of other countries**

The coastline of the German land frontier was assigned a dimension of 1.15 – i.e it is not as jagged as that of Britain. Meanwhile below we can see the South African coast:

This has a very smooth coastline – and as such the log-log graph looks to have an almost flat gradient. As such it has a dimension of 1.02.

If you liked this post you might also like:

Mandelbrot and the Koch Snowflake: An exploration of fractal patterns

Julia and Mandelbrot sets: How to use complex numbers to generate pictures of infinity

**How to Win at Rock, Paper, Scissors**

You might think that winning at rock, paper, scissors was purely a matter of chance – after all mathematically each outcome has the same probability. We can express the likelihood of winning in terms of a game theory grid:

It is clear that in theory you would expect to win, draw and lose with probability 1/3. However you can actually exploit human psychology to give yourself a significant edge at this game. Below is a report of a Chinese study on the psychology of game players:

*Zhijian and co carried out their experiments with 360 students recruited from Zhejiang University and divided into 60 groups of six players. In each group, the players played 300 rounds of Rock-Paper-Scissors against each other with their actions carefully recorded.*

*As an incentive, the winners were paid in local currency in proportion to the number of their victories. To test how this incentive influenced the strategy, Zhijian and co varied the payout for different groups. If a loss is worth nothing and a tie worth 1, the winning payout varied from 1.1 to 100.*

*The results reveal a surprising pattern of behavior. On average, the players in all the groups chose each action about a third of the time, which is exactly as expected if their choices were random.*

*But a closer inspection of their behavior reveals something else. Zhijian and co say that players who win tend to stick with the same action while those who lose switch to the next action in a clockwise direction (where R → P → S is clockwise).*

So, for example if person A chooses Rock and person B chooses Paper, then person B wins. Human nature therefore seems to mean that person B is more likely to stick to a winning strategy and choose Paper again, whilst person A is more likely to copy that previous winning behaviour and also choose Paper. A draw.

So you can exploit this by always moving anticlockwise i.e *R → S → P. *To look at our example again, person A chooses Rock and person B chooses Paper, then person B wins. This time person A follows his previous pattern and still chooses Paper, but person B exploits this new knowledge to choose Rock. Player B wins.

You can play against a Wolfram Alpha AI player here. This program will track your win percentage, and will also adapt its behavior to exploit any non-random behavior that you exhibit. Even though you may not be conscious of your biases, they probably will still be there – and the designers of this simulator are confident that the program will be beating you after about 50 games. Have a go!

There are some additional tips for winning at rock paper scissors – if you are in a single game competition then choose paper. This is because men are most likely to choose rock, and scissors are the least popular choice. Also you should try some reverse psychology and announce what you will throw. Most opponents will not believe you and modify their throw as a result.

**Rock, Paper, Scissors, Lizard, Spock**

You can of course make the game as complicated as you wish – the version above was popularised (though not invented by) The Big Bang Theory. The grid below shows the possible outcomes for this game:

And of course, why stop there? Below is a 15 throw version of the game

If you’ve honed your strategy then maybe you could compete in the a professional rock, paper, scissors tournament – here you can watch the final of a $50,000 Las Vegas competition.

If you liked this post you might also like:

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.

Does it Pay to be Nice? Game Theory and Evolution. How understanding mathematics helps us understand human behaviour

**Elliptical Curve Cryptography**

*This post builds on some of the ideas in the previous post on elliptical curves. This blog originally appeared in a Plus Maths article I wrote here. The excellent Numberphile video above expands on some of the ideas below.
*

On a (slightly simplified) level elliptical curves they can be regarded as curves of the form:

y² = x³ +ax + b

So for example the curve below is an elliptical curve. This curve also has an added point at infinity though we don’t need to worry about that here. Elliptical curve cryptography is based on the difficulty in solving arithmetic problems on these curves. If you remember from the last post, we have a special way of defining the addition of 2 points.

Let’s say take 2 points A and B on y² = x³ -4x + 1. In the example we have A = (2,1) and B = (-2,1). We now want to find an answer for A + B which also is on the elliptical curve. If we add them as we might vectors we get (0,2) – but unfortunately this is not on the curve. So, we define the addition A + B through the following geometric steps.

We join up the points A and B. This line intersects the curve in one more place, C.

We then reflect the point C in the x axis. We then define this new point C’ = A + B. In this case this means that (2,1) + (-2,1) = (1/4, -1/8).

Trying another example, y² = x³ -5x + 4 (below), with A = (1,0) and B = (0,2) we have C = (3,-4) and C’ = (3,4). Therefore (1,0) + (0,2) = (3,4).

We also need to have a definition when A and B define the same point on the curve. This will give us the definition of 2A. In this case we take the tangent to the curve at that point, and then as before find the intersection of this line and the curve, before reflecting the point. This probably is easier to understand with another graph:

Here we used the graph y² = x³ -5x + 4 again. This time point A = B = (-1.2, 2.88) and we have drawn the tangent to the curve at this point, which gives point D, which is then reflected in the x axis to give D’. D’ = (2.41, -2.43). Therefore we can say 2A = D’, or 2(-1.2, 2.88) = (2.41, -2.43).

Now addition of points is defined we can see how elliptical curve cryptography works. The basic idea is that given 2 points on the curve, say A and B, it takes a huge amount of computing power to work out the value a such that aA = B. For example, say I use the curve y² = x³ -25x to encrypt, and the 2 points on the curve are A = (-4,6) and B = (1681/144 , -62279/1728). Someone who wanted to break my encryption would need to find the value a such that a(-4,6) = (1681/144 , -62279/1728). The actual answer is a =2 which we can show graphically. As we want to show that 2(-4,6) = (1681/144 , -62279/1728) , we can use the previous method of finding the tangent at the point (-4,6):

We can then check with Geogebra which shows that B’ is indeed (1681/144 , -62279/1728). When a is chosen so that it is very large, this calculation becomes very difficult to attack using brute force methods – which would require checking 2(4,-6), 3(4,-6), 4(4,-6)… until the solution (1681/144 , -62279/1728) was found.

**NSA and hacking data**

Elliptical curve cryptography has some advantages over RSA cryptography – which is based on the difficulty of factorising large primes – as less digits are required to create a problem of equal difficulty. Therefore data can be encoded more efficiently (and thus more rapidly) than using RSA encryption. Currently the digital currency Bitcoin uses elliptical curve cryptography, and it is likely that its use will become more widespread as more and more data is digitalised. However, it’s worth noting that as yet no-one has proved that it* has* to be difficult to crack elliptical curves – there may be a novel approach which is able to solve the problem in a much shorter time. Indeed many mathematicians and computer scientists are working in this field.

Government digital spy agencies like the NSA and GCHQ are also very interested in such encryption techniques. If there was a method of solving this problem quickly then overnight large amounts of encrypted data would be accessible – and for example Bitcoin currency exchange would no longer be secure. It also recently transpired that the NSA has built “backdoor” entries into some elliptical curve cryptography algorithms which have allowed them to access data that the people sending it thought was secure. Mathematics is at the heart of this new digital arms race.

If you enjoyed this post you might also like:

RSA Encryption – the encryption system which secures the internet.

Circular inversion – learn about some other geometrical transformations used in university level mathematics.

**Elliptical Curves**

Elliptical curves are a very important new area of mathematics which have been greatly explored over the past few decades. They have shown tremendous potential as a tool for solving complicated number problems and also for use in cryptography. (This blog is based on the article I wrote for Plus Maths here).

Andrew Wiles, who solved one of the most famous maths problems of the last 400 years, Fermat’s Last Theorem, using elliptical curves. In the last few decades there has also been a lot of research into using elliptical curves instead of RSA encryption to keep data transfer safe online. So, what are elliptical curves? On a simple level they can be regarded as curves of the form:

y² = x³ +ax + b

So for example the following is an elliptical curve:

If we’re being a bit more accurate, we also need 4a³ + 27b² ≠ 0. This stops the graph having “singular points” which cause problems with the calculations. We also have a “point at infinity” which can be thought of as an extra point added on to the usual x,y plane representing infinity. This also helps with calculations – though we don’t need to go into this in any more detail here!

What makes elliptical curves so useful is that we can create a group structure using them. Groups are very important mathematical structures – again because of their usefulness in being applied to problem solving. A group needs to have certain properties. For example, we need to be able to combine 2 members of the group to create a 3rd member which is also in the group. This is how it is done with elliptical curves:

Take 2 points A and B on y² = x³ -4x + 1. In the example we have A = (2,1) and B = (-2,1). We now want to find an answer for A + B which also is on the elliptical curve. If we add them as we might vectors we get (0,2) – but unfortunately this is not on the curve. So, we define the addition A + B through the following geometric steps.

We join up the points A and B. This line intersects the curve in one more place, C.

We then reflect the point C in the x axis. We then define this new point C’ = A + B. In this case this means that (2,1) + (-2,1) = (1/4, -1/8).

Trying another example, y² = x³ -5x + 4 (above), with A = (1,0) and B = (0,2) we have C = (3,-4) and C’ = (3,4). Therefore (1,0) + (0,2) = (3,4).

We can also have elliptical curves as a collection of discrete points. We start with the curve y² = x³ +x+1, above, and just look at the positive integer solutions mod 7. For example, when x = 1,

y² = 1³ +1 + 1

y² = 3

So this has no integer solution.

Next, when x = 2 we have:

y² = 2³ +2 +1 = 11.

However when we are working mod 7 we look at the remainder when 11 is divided by 7 (which is 4). So:

y² = 4 (mod 7)

y = 2

When x = 3 we have:

y² = 3³ +3 +1 = 31

y² = 3 (mod 7)

which has no integer solutions.

In fact, all the following coordinate points satisfy the equation (mod 7):

(2,2), (0,1), (0,6), (2,5).

Even though all this might seem very abstract, these methods of calculating points on elliptical curves form the basis of elliptical cryptography. The basic idea is that it takes computers a very long time to make these sorts of calculations – and so they can be used very effectively to encrypt data.

If you enjoyed this post you might also like:

RSA Encryption – the encryption system which secures the internet.

Circular inversion – learn about some other geometrical transformations used in university level mathematics.