Sunday, 12 August 2018

Maths at the Library: How Six Students Took Vegas for Millions

Looking back since our first podcast, we've learnt a lot about the portrayal of mathematicians in movies, mostly as psychopaths or murderers; that most sports are played on rectangles (thanks, Donald Duck!); and that statisticians are mostly fat.

In our first ever podcast, we reviewed the movie "21". We generally found it a nifty and exciting movie documenting a little maths, and the dark forces of Las Vegas, and all enjoyed it. The basic plot involves a bunch of MIT students who use their memories and some team work, with some clever card-counting techniques to (perfectly legally) take the big casinos in Las Vegas for millions of dollars.

Recently, I read the book of the film, "Bringing down the House", which in many ways is even better than the film. The maths of card-counting, and how blackjack is a beatable game is summed up neatly in the book

Blackjack is the only game in the casino that is beatable over an extended period of time, because blackjack is subject to continuous probability. This simply means that what you see affects what you arre going to see. Blackjack is a game with a memory. If an ace comes out in the first round of a blackjack shoe, that means there is one less ace left in the rest of the deck. The odds of drawing another ace have gone down by a calculable fraction. In other words, the past has an effect on a the future....Blackjack is the only popular casino game where what you see affects what you are going to see.

We saw this again in Moneyball, where a statistician used the power of previous information on how baseball players had played to work out how they were going to play in the future.

Statistics, and it's related discipline Data Science, are everywhere these days. Websites use history about your previous buying habits to pepper you with adverts about what you are most likely to buy. Clinicians use previous results of drug trials to predict what the very best drug for any occasion will be. Self-learning cars are using tonnes of previous data to work out what to do in any dangerous situation.

Blackjack is not life- but the story about how, using elementary statistics and probability, as well as some acting skills, and some disguises, a bunch of students managed to win against one of the most sophisticated money-grabbing empires, is beautifully written, interesting, and exciting, and well worth a purchase for the mathematician in your life. See you in Vegas!

Friday, 13 April 2018

Friday 13th is an unlucky day in the UK. British people stay at home, don't make eye contact in public, and spend their day complaining, mostly about the weather.

Did you know, however, that the 13th is more likely to be a Friday than any other day? And also, coincidentally, Friday the 13th is the equally-most likely day number/day name combination to occur?

Why? We know the year for the Earth (the time it takes us to do one orbit of the Sun) is 365.242189 days. This is annoying for calendar makers, as we just can't put an extra 0.256 days into each year.
So what do we do? Well, we try and even it out over a 400 year cycle. We fix the year to have 365 days normally (remember the old rubbish rhyme: "30 days has September, April, June and November, all the rest have 31, except February...")

February has 28 days, except in a leap year, where it has 29. A leap year is defined as

any year which is divisible by 4 except

years divisible by 100 are not leap years except

years divisible by 400 are leap years.

If we repeat this on a 400 year cycle, then this means that the average year length is 365.2425 days (or very close to it)

If we work out the number of days in 400 years, then this is 146097 days; by chance this is divisible by 7, so it means that if a day is a Monday, the same day 400 years later will be a Monday. In other words, the minimum period the calendar cycles over is 400 years. Note that 146097/400=365.2425, very close to Earth's year.

We can then run a simple computer script to count the number of times that each number/day of week combination occurs in a 400 year cycle, and graph the results

This shows us that the 13th is a Friday 688 days out of every 400 year cycle, more than any other day. Also, we can see that Friday 13th is the joint most common number/day of week combination (all the yellow squares in the diagram). I have left off the 29th,30th and 31st just because it's a nicer pattern this way.

So is this important? No! But next time you have bad luck on Friday 13th remember, this day will happen 688 days in the next 400 years so you'd better get used to it...

Thursday, 5 April 2018

Although we provided a fun marking scheme at the end of every episode we decided to actually plot our opinions in the following quality graphs. Horizontal axes provide a measure of quality of the film, whilst vertical axes provide a a measure of quality of the maths.

Our first graph illustrates all of our differing opinions. Each film has a different marker and the colour of each marker links to a particular person's tastes.

We can clearly see that Interstellar was a favourite all round, whilst The Oxford Murders took a battering from all sides.

Equally, although Thomas and Ben agreed that Pi wasn't a good Liz seemed to enjoy it more than them (still not good, just not as bad!). Proof, was perhaps the most divisive amongst the team.

A couple of interesting points is that there are very few, if any, points in the Bad Film/Good Maths category, or the Good Film/ Bad Maths. This is, of course easy to explain. The Bad Film/Good Maths section would probably be inhabited by videos of mathematical lectures. Whilst, (good) non-science films would inhabit the Good Film/Bad maths quadrant.

Below we plot the average values of the above data in order to visualise the trends better.

What is most striking about this representation is that most of the films tend to cluster around The Line of Equal Quality. This means that a film portraying good maths is also likely to be a good film overall, equally, a film presenting poor maths is likely to be poor overall.

Again, this makes sense, as we have been focusing on such mathematical films, the mathematical content will be central to its subject matter. Thus, a lot of the films quality will rest upon the mathematics representation.

Of course the outlier from this theory is The Imitation Game. A gripping, if slightly embellished, story with actually very little mathematics presented.

Monday, 2 April 2018

A group of people with assorted eye colors (say 10 blue and 10 brown) live on an island.

Everyone can see the eye colour of everyone else, but they can't
communicate to each other to tell each other their eye colour.

Every night
at midnight, a ferry stops at the island. Any islanders who have
figured out the colour of their own eyes can leave the island.

One day a sailor from the ferry gets off the boat and says:

"I can see someone who has blue eyes".

Everyone
hears and understand the statement, but the sailor is immediately shot
dead for communicating with the islanders and no-one ever speaks again.
However, given this information some people are able to figure out their
eye colour.

Who leaves the island, and on what night?

The simple answer is that all 10 blue-eyed people leave on the tenth day. However, the thinking behind this answer is probably more important than the answer itself. Critically, this is a difficult puzzle. You need to have an extended chain of thinking, but, before we make a chain, let's start with a single link.

Let's make the puzzle as simple as possible. Suppose on the island there is only one person with blue eyes and a load of people with other colour eyes (it doesn't matter how many, or what colour, as long as they're not blue). This blue-eyed person would immediately realize that they had blue eyes
because they could see no one else with blue eyes. Therefore, that person
would leave on the first night.

Suppose, now, there are two people with blue eyes. They would both leave
on the second night, because they would each look at the other
blue-eyed person on the second morning and realize that the only reason
the other blue-eyed person wouldn't leave on the first night is because
they see another person with blue eyes. Seeing no one else with blue
eyes, each of these two people realize it must be them.

Carrying on this argument inductively we see that n blue-eyed people would leave on night n because on the n-1 previous night they cannot deduce that the other blue-eyed people are not leaving because of them.

This is a slightly hand-wavy proof, but can be made more rigorous, indeed Reddit has a very formal proof.

One part that still blows our mind is that everyone can always see everyone else's eyes. So in the case of 10 blue-eyed people on the island everyone knows that there are blue-eyed people on the island, so what information have they gained from the sailor?

Saturday, 10 March 2018

A group of people with assorted eye colors (say 10 blue and 10 brown) live on an island.

No one knows the color of their eyes as there are no mirrors on the island and the water is muddy so you can't use the reflection. For all each person knows, they could have green eyes!

However, everyone can see the eye colour of everyone else, but they can't communicate to each other to tell each other their eye colour.

Every night
at midnight, a ferry stops at the island. Any islanders who have
figured out the color of their own eyes can leave the island.

One day a sailor from the ferry gets off the boat and says:

"I can see someone who has blue eyes".

Everyone hears and understand the statement, but the sailor is immediately shot dead for communicating with the islanders and no-one ever speaks again. However, given this information some people are able to figure out their eye colour.

Wednesday, 7 March 2018

Suppose
you are going to play chess against two people: one person is really
good, one person is quite bad. You are going to play three games and you
always have to alternate your opponents. Namely, you can either choose
to play the opponents in the order

Good, Bad, Good,

or you can play the opponents in the order

Bad, Good, Bad.

Which of these two play sequences gives you the optimal chance of winning two consecutive games?

You can approach this problem using probability and tree diagrams. However a little logic goes a long way.

Specifically, in order to win two consecutive games you have to win the middle game. Thus, it is best to put your weaker opponent in the middle. Thus, Good, Bad, Good is the best strategy.

An alternative way of also seeing this answer it that you're probably going to lose against the good player, so the Good, Bad, Good play order gives you two chances to win against the good player, rather than just one.

Simple no?

If you want a bit more rigor then Ben has created a YouTube video solution.

Alternatively, you could try three player chess and team up with the
weak player to beat the good player. But that might be considered
cheating...

Friday, 2 March 2018

Suppose you are going to play chess against two people: one person is really good, one person is quite bad. You are going to play three games and you always have to alternate your opponents. Namely, you can either choose to play the opponents in the order

Good, Bad, Good,

or you can play the opponents in the order

Bad, Good, Bad.

Which of these two play sequences gives you the optimal chance of winning two consecutive games?

Tuesday, 30 January 2018

Whereas Thomas and Ben are just about good enough understand their own mathematical fields Cat has a wide range of disciplines under her belt spanning both physics and movie effects. We couldn't ask for a better guest!

If you're interested in watching Interstellar you can follow the Amazon below.

Friday, 26 January 2018

Our Friday Factoid: Once in a blue moon is one tenth of donkey's years!

This
month sees a blue supermoon occurring at the same time as a lunar
eclipse. But how rare are these things compared to others? The Maths
at (mathsat.co.uk team investigate)

We
all know the phrase “Once in a blue moon”, but how long is this
period? We compare this periods with other well known periods to
enable better mathematical precision on these matters.

A blue
moon
Traditionally, a blue moon occurs when there are 13 moons in a year or, in a more recent definition when there are 2 moons in a calendar month…. Whichever moon we
designate as the blue moon, this occurs once ever 2.7145 years, or
once every 991.47 days.

Donkey’s years

Once in Donkey’s years is a common expresison, from the fact that
donkey’s ears are very long thing. The Guineess world record for the oldest donkey ever is 54 years,
but 25-30 years is more common. Thus "Once in Donkey’s years" is around once in 27.5 years, or once every 10044 days.

A super moon

This means that a full moon is closer in its orbit than at other
times. Not that rare at all- and occurs about 25% of all moons. This
term is not well defined, so this happens around once every 109
days.

A lifetime

A "once in a lifetime" experience clearly depends on how long someone lives, but from official UK statistics a newborn boy will expect to live 79.2 years and a girl 82.9 years.
Thus a man will have the advantage of experiencing a once in a
lifetime event slightly more often at once every 28927.8 days,
and a woman once every 30279.23 days. You may be lucky and
experience it more often!

Total Lunar
Eclipses

Eclipses occur very frequently, but total eclipses only rarely. Of
course, they’re not visible everywhere on Earth, but
somewhere. Encyclopedia Brittanica lists these as 66 per century, or once every 1.512 years or every 553 days.

A fortnight

A fortnight is something Brits use to confuse Americans, like rubbers and irony, and is defined in British law as the frequency of rural
buses, and is once every 14 days.

Super Blue Total
Lunar Eclipses

OK, for all these to occur together, these are quite rare. Forbesestimates this as once every 265 years, or around once every 10
Donkey’s Years, or once every 96791.25 days. The last one was on December 30, 1982. However,
just by chance, there’s another one coming along next year. Like
buses- none come for a fortnight, then two come at once.

Super Blue Total
Donkey Lunar Eclipses

Now you’re just
being silly. This won't happen in a month of Sundays. This is mathematics- are you paying attention, as it
will be on the test?

A month of
Sundays.This is a way of
saying never, colloquially. Every ∞
days.

Biannually

This means once every six months, or once ever 182.75 days.

Biennially

Who invents these things? This means once every two years, not to be confused with the above,
or once every 731 days.

Time immemorial

Defined in English Law to be since before the reign of King Richard 1st, 1189, or longer ago than anyone
can remember. There’s over 828 years or around 302,600
days.

Conclusion: "Once in a blue moon" is a well defined phrase. A
blue moon happens 10 times in donkey years, or about once every 71
fortnights, or about 30 times in a lifetime. It never happens in a
month of Sundays, but has happened around 305 times since time
immemorial.

For these and other interesting mathematical facts, listen to
Dr Thomas Woolley and Dr Ben Parker, as well as the mysterious Liz,
on the popular Maths podcast “Maths at:”, available at
mathsat.co.uk, iTunes, and wherever you get your
podcasts.

Wednesday, 10 January 2018

What is the probability that the next person you meet will have an above average number of ears?

Although most people have two ears, there are those with only one. Thus, the average number of ears is just below two.

However, since people with only one ear are quite rare this means you are most likely to meet a person with two ears next, meaning that the probability is nearly 1! We can't say it is exactly 1, because the next person you meet, although unlikely, may have a damaged ear.

Of course, if you live with a person with only one ear then your probability is significantly lower, because you'll likely bump into that person next.

It's all about the assumptions!

Listen to our Flatland podcast to hear more about this problem and learn why clarifying the averages we talk about have important consequences regarding the interpretation of the question.

Monday, 1 January 2018

Yes, Christmas maybe over, but the puzzles still remain! During our Christmas episode Thomas provided the following puzzle.

In the song "12 days of Christmas" how many presents do you get over all?

Note the lyrics are given below, but the main idea is that you are adding up consecutive triangular numbers. Namely, on the first day you get 1 present. On the second day you get 3 = 2+1 more presents, making 4 overall. On the third day you get 6 = 3 + 2 + 1 more presents, meaning 10 overall. Thus, in total, how many presents do you get?