Sunday, 19 November 2017

MathsJam

Here is my overdue post on last weekend's MathsJam gathering.  MathsJam is always a wonderfully exciting and enjoyable weekend, and this one was particularly good.  I can honestly say that I enjoyed every talk, and was entertained, surprised and educated in roughly equal measures.

I'm nervous about selecting highlights, because almost everything was a highlight, and my list inevitably leaves out many excellent talks. There is a list of all the talks on the MathsJam website but here are some I particularly remember (in the order in which they were presented):

• Simon's 3D-printed robot which solves Rubik's cube (time-lapse video shown here with Simon's permission);
• Matt on logical deduction games, which brought back memories of playing Eleusis when I was a student and introduced others I need to find out about;
• Noel-Ann on data and how to it can be represented (and misrepresented);
• Zoe's poem about e, which (understandably) seems to be on everybody's highlight list;
• Matthew's amazing recreation of a problem from Captain Scarlet about the bongs of Big Ben;
• Andrew's paradoxical balloon monkey, which although made from a single balloon, has an underlying graph which is not semi-Eulerian;
• Angela's poem;
• Rachel on spinning yarn;
• Alison on illogical units, and Dave on illogical scales;
• Will on non-binary cellular automata;
• Miles finding striking similarities between mountaineering and mathematics;
• Glen showing how many holes a constructed object (equivalent to a T-shirt) possessed (most of MathsJam seem to have got it wrong, going for four rather than three!);
• Paolo using a pack of cards to find two numbers from their sum and difference;

And of course the "extra-curricular" puzzles, games and magic, Tiago showing me how to tie a knot with one hand, and the spectacular mathematical cakes.

So once more a memorable MathsJam, with an excellent range of speakers and talks, friendly atmosphere and fascinating and surprising mathematics.  The organisers once again did an amazing job!

Wednesday, 8 November 2017

Looking forward to MathsJam

With only three days to go till the MathsJam Gathering - the best weekend of the year, I've been thinking of some of my favourite MathsJam discoveries. Sticking to pure mathematics, here are my memories of three gems.  I could have chosen many others, but perhaps because these happen to relate to my current teaching, and I showed two of them to my graph theory students immediately upon my return from the gathering, they are the first that come to mind.  Since I believe all MathsJam presentations are available online, further details should be readily available.

• Colin Wright's amazing talk on graph colouring, which started by asking us to complete a partially-completed 3-colouring of a small graph, and turned into a more-or-less complete proof, within a 5-minute talk, that there is no polynomial-time algorithm for 3-colouring a graph.
• Ross Atkins's talk about Braess's Paradox - a simple situation in which adding an extra road to a network, with no increase in traffic, results in longer average journey times.  I should have known about this counter-intuitive result so I'm very glad to have found out about it, and especially with the wonderful demonstration with a network of springs that showed a mechanical realisation of the paradox.
• David Bedford's "What's my polynomial?"  I love this because it is arguably what the late Raymond Smullyan called a "monkey trick".  David asked you to think of a polynomial p(x) with non-negative integer coefficients, and, for a single value of x of your choice, greater than any of the coefficients, tell him both x and p(x).  He would then tell you your polynomial.  Knowing that one needs n values to determine a polynomial of degree n, I was taken in by this!

I could have chosen many more examples: I'm certainly not ranking these presentations or any others. On another day I might have chosen a completely different set!  But I'm certainly looking forward to coming across more wonderful mathematics this weekend!

Wednesday, 1 November 2017

Black Mathematician Month

One of the best things to have happened for mathematics in the UK recently is the arrival of Chalkdust magazine - an exciting, witty magazine with a unique style.  (It's very different in feel from the equally admirable, and much missed, iSquared, which is happily preserved online.)

And the best thing that Chalkdust has done is the Black Mathematician Month which has just finished - a month of interviews, conversations and activities "promoting black mathematicians, and talking about building a more representative mathematical community".  The stories that were told were sometimes shocking, sometimes horrifying, often inspiring, and very important. I was lucky enough to be one of the large audience for the final event, an excellent talk about the Black Heroes of Mathematics by Nira Chamberlain (and I was particularly pleased that several undergraduates from the University of Greenwich were also there).   Nira told us about a number of great black mathematicians: despite his own negative experiences as a young black man wishing to become a mathematician, and the obstacles in his way, his presentation was overwhelmingly positive in tone and his passion communicated strongly with the audience.

I myself was a very privileged mathematics student.  I had an adequate grant and did not need to work while I was studying.  I had a supportive family.  Both my parents went to university (probably quite unusual for the time although I didn't realise that), as did my father's sister (I believe the first woman from her school to do so) and all my siblings.  I was supported not only by their academic expectations but by their understanding of university education.  I was well prepared by excellent schoolteachers.  Careers advisers encouraged me to study maths, not to forget that ambition and aim to be a boxer (as Nira was advised) or a singer (as Nira's son, alarmingly recently, was told).

I understood some of that privilege at the time.  But of course, I was also white and male.  It is only now, when I look at the achievement of people like Nira, and many of our students at Greenwich who have overcome enormous obstacles, that I am beginning to understand just how that contributed to my privilege.  My mathematics cohort as an undergraduate was almost all white (possibly even entirely white: I don't remember any exceptions) and largely male.  When I look at my classes (and colleagues) at Greenwich, I feel very glad to have the opportunity to work with such diverse people.

Chalkdust's reflections on Black Mathematician Month deserve wide circulation.  This feels like an important initiative, which hopefully will help all potential mathematicians, whatever their race or gender, have the opportunity to follow their dreams, inspired by people like Nira and the other mathematicians featured.

Saturday, 14 October 2017

Monty Hall

Two weeks ago, on Saturday 30 September, two big names in mathematics died.  Vladimir Voevodsky, who was only 51, made huge contributions to mathematics.  I became aware of his importance to contemporary mathematics when reading Michael Harris's wonderfully stimulating book Mathematics without Apologies and regret that I do not know much about him and his work.

The other, Monty Hall, was not a mathematician but a game show host, who has given his name to one of the most famous recreational mathematical puzzles.  A lot has been written about the Monty Hall Problem: I recommend Jason Rosenhouse's book (called, surprisingly enough, The Monty Hall Problem, which gives an excellent account of the embarrassing (for male mathematicians) l'affaire Parade which brought the puzzle to public notice - see http://marilynvossavant.com/game-show-problem/ for the correspondence.

In Monty Hall's game show, a contestant had to choose one of three boxes.  One contained a car: the other two each contained a goat.  After the contestant had made their choice, Monty (who knew which box contained the car) would sometimes open the door of an unchosen box to reveal a goat, and then offer the contestant the chance to change their choice.  Should the contestant switch?

I remember, as a schoolboy, discussing with my friends a problem in one of Martin Gardner's books.  Three prisoners, A, B and C, are told that on the next day two of the three will be executed: which two has already been decided randomly.  (As I get older I increasingly find the rather bloodthirsty settings of puzzles like this in very poor taste: why do so many mathematical puzzles involve the abuse and execution of prisoners?)  A knows that his chance of survival is 1/3.  The guard won't answer any question which would give him information about whether or not he has been chosen for execution.  But A points out to the guard that at least one of the other two is going to die, so if the guard identifies to A one of the others who will die, then that cannot give any information about A's fate: whichever two have been selected, the guard can answer this question without revealing whether A has also been chosen.

So the guard tells A that C is going to die.  A is now happy: his survival chance was 1/3 but has now gone up to 1/2 since it is either him or B who will survive.

Of course (on certain assumptions) A is wrong: it is B whose survival chance has gone up to 2/3.  A's chance is unchanged at 1/3.  If A and B were selected to die, the guard would tell A that B was ill-fated.  If it was A and C to die, then the guard would answer "B".  Bit if B and C are both going to die, then the guard could answer either "B" or "C", and if one assumes the guard chooses randomly which to name, then enumerating the cases shows that when the guard answers "C", two times out of three it was A rather than B who is also selected for death.

This led me to get the Monty Hall Problem wrong when I first read about it in a newspaper article (the Independent, perhaps around Christmas 1990?)  Knowing that in the Gardner problem A's chances haven't changed, I assumed that the quiz show contestant can't improve their chance of winning by switching.  This is plain wrong, but I wonder if memories of Gardner's puzzle led astray many of the mathematicians who on first seeing it got the Monty Hall Problem wrong?  Although my initial answer was wrong, on careful reading of the analysis I did quickly come to agree that the contestant should switch, and verified this by computer simulation.

In fact, the problems are very closely related.  What Monty Hall is doing is essentially saying to A, "C is going to die - would you like to change places with B?"  And since B has a 2/3 chance of survival, A should certainly accept that offer.  (On certain assumptions.)

But the assumptions are critical (and most recent presentations of the Monty Hall Problem do make this clear.)  The 2/3 probability of winning if the contestant switches assumes that the host will always carry out the procedure, and that, when the contestant has initially chosen the box with the car, that the host will choose one of the other boxes to open with equal probability.  (If the host simply always opens the nearer box with the goat, then on the occasions when the host opens the further away box, the contestant will know that a switch guarantees success.)   And the host might not go through this procedure every time. If the host wants to save his employers money, then he might only offer the switch option on those occasions when the contestant has initially chosen the winning box.  If the host likes the contestant, he might only offer the switch option when the initial choice is losing.

In fact (according to, for example, the Wikipedia entry for Month Hall, in the real game show Monty did not always offer the choice.  He was playing a psychological game with the viewer, and, when "The Monty Hall Problem" became famous, he was well aware that the conditions necessary for the mathematical puzzle did not in fact apply to his game show.  I find it very pleasing that the game show host had a better understanding of the mathematics problem than many of the mathematicians whose instinctive answer, like mine, was wrong.

Saturday, 23 September 2017

How I won a jar of sweets

I was the proud winner of the Greenwich University MathSoc "guess how many sweets in the jar" competition at the Welcome Fair this week.

I was delighted to win because of the method I used, based on the "Wisdom of Crowds", which provided far superior to my colleagues' misguided attempts to estimate the volume of the jar and the average volume of the sweets.

With a problem like "how many sweets in the jar", no individual is likely to be able to make a particularly accurate estimate.  Some will guess in the right ballpark, while some will wildly over- or under- estimate.  The theory is, however, that if one averages many independent guesses, the result is likely to be close to the solution.

I tried this for my competition entry.  I could see seventeen previous entries, so I added them up (rounding to simplify the addition of seventeen three-digit numbers while talking to the MathSoc team at their stand) and divided by 17.  This gave me 337, which was my entry.  The exact solution was 336, which is a striking vindication of the Wisdom of Crowds.

Of course, this method isn't guaranteed to work.  For example, if one had asked people to guess how many points Leicester City would win in the English Premier League in 2015/16, and taken the average, one would not have been close!

Monday, 12 June 2017

Greenwich Maths Time - a Festival of Mathematics

Since it's only two weeks until the IMA Festival of Mathematics and its Applications at the University of Greenwich, which I am helping to organise, it's time I wrote something about it here. This national Festival presents, over two days, about 50 talks, workshops and activities, showcasing the diversity of mathematics and mathematicians.  Visitors can learn about applications of mathematics in statistics, cryptography, numbers, fashion, medicine, fire safety engineering, and many more: they can learn how to make boomerangs and they can walk on custard.  There is something for everybody!

The Festival has been generously sponsored by the IMA, the University of Greenwich, FMSP, GCHQ, the OR Society, the London South East and Kent & Medway Maths Hubs, and FDM,  For information about the sponsors, click on the logos on the Festival website.

I've been delighted that so many top presenters have agreed to take part in the Festival.  If you can get to Greenwich on either of these days, you'll have a wonderful time exploring lots of exciting mathematics!

Tuesday, 9 May 2017

A Champions League Mathematical curiosity

(Apologies for any reader who doesn't share my interest in football.  You don't have to read on.)

When I'm fed up marking, like so many other middle-aged men, I turn to the computer game Football Manager.  And a disaster for my team last night made me aware of a curiosity regarding the tie-break rules in the Champions League.

This is the situation.  It's the last minute of the last match of the group stage and my team, Arsenal, are losing 2-1 at home to Olympiakos (we haven;t had much luck and the  red card early in the first half for our midfielder Victor Wamyama has cost us).  But it's OK - Bayern Munich (who are losing in Lyon) will win the group and we will come second, qualifying for the knock-out stages, while Olympiakos will be out.

But what's this?  Bayern have scored a last-minute equaliser against Lyon!  They were going to win the group anyway, so presumably we still finish in that all-important second place.

But no - Olympiakos are now above us: we are down to third and we are out!  A goal in the other game, which doesn't change the position of the teams in that game, has caused Arsenal and Olympiakos to swap positions, with disastrous results.

It's all to do with tie-break rules.  Without Bayern's late goal, all four teams would have had eight points,  The tie-break rule looks at the scores in matches involving all the teams which have tied on points.  In this case Bayern (who scored six at home to Olympiakos) had the best goal difference, with Arsenal (who had played well until the last match, despite early red cards ion three matches) second best, and so they finish first and second.  But Bayern's equaliser means they have nine points, and Arsenal and Olympiakos are tied for second place: and since the two teams drew in Greece and Olympiakos won in London, the Greeks are above Arsenal.  That last-minute goal in the other match really has moved Olympiakos above Arsenal.  (If you want to check for yourself, I give all the scores below.)

This consequence of the mathematics of the tie-break rules is something I was vaguely aware of, though I didn't realise the peril my team were in until about ten game-minutes before Bayern's goal.  But it is slightly counter-intuitive that a goal in match B can cause the teams in match A to change positions.  (In fact in my game, before the goal Lyon had been in third place above Olympiakos, so conceding the goal caused them to drop to fourth, but a slightly different set of results could have meant that a game in match B could leave the two teams in that match in the same position while inverting the order of the other two teams.)

Here, for anyone who cares, are the complete results:
Game 1 - Arsenal (2) 2 Bayern (0) 0; Lyon (0) 1 Olympiakos (0) 0
Game 2 - Bayern (0) 0 Lyon (0) 0; Olympiakos (0) 1 Arsenal (0) 1
Game 3 - Lyon (0) 1 Arsenal (1) 3; Olympiakos (0) 1 Bayern (0) 1
Game 4 - Arsenal (0) 0 Lyon (0) 0; Bayern (3) 6 Olympiakos (0) 0
Game 5 - Bayern (0) 1 Arsenal (0) 0; Olympiakos (0) 1 Lyon (0) 0
Game 6 - Arsenal (0) 1 Olympiakos (0) 2; Lyon (3) 3 Bayern (0) 3

Monday, 1 May 2017

Something I'd forgotten

One of my parents daily rituals was to change the date on a device on top of the bureau which displayed the day, date and month.  My equivalent is to change the date on my Rubik's cube-style calendar , which also gives the day, ate and month: the month in three-letter form ("Jan", "Feb", "Mar" etc).  It's nice that the names of the months in English make this possible (though www.puzl.co.uk, where I got my calendar cube, have also sold French and German versions).

But I was astonished to find in the cellar yesterday that I had made something similar myself, 35 years ago.  I have absolutely no recollection of this at all (but the handwriting is mine), but I am quite impressed by my ingenuity.

In my final year as a student, I played backgammon regularly with my friend Karen.  It appears that I constructed this device to keep track of the cumulative score.  It's rather the worse for wear, and has lost one of the corner cubies.  But I assume that it still records the final state of play when we had played our last game - which shows that, if you want to win at a gambling game, it is best not to play against a future professor of psychology.

Saturday, 1 April 2017

How to use number theory to help bus travellers

Living in London, I use buses a lot.  Each day I catch a 180 or 199, ignoring the 188, 286 and others whcih don't take me home.  I have a good memory for all the different buses in the parts of central London that I frequent, but wouldn't it be easier if the bus number told me where it was going?  If, rather than 180 arbitrarily designating a route between Lewisham and Belvedere, the number itself indicated where the bus goes?

So today I am going to unveil my scheme for taking advantage of the properties of numbers to do exactly that.  I will start off with my first idea, and then show enhancements.

The Fundamental Theorem of Arithmetic tells us that any number can be expresssed as the product of prime numbers in an essentially unique way.  So my first scheme allocates to every destination a different prime number.  For example, we might assign 2 to Waterloo, 3 to Euston and 5 to London Bridge.  Then the bus route serving these three places would be number 30.  All you need to do, as a passenger, is know the number assigned to your destination.  If you want to go to Waterloo, you know that any even-numbered bus will take you there: if you are heading for London Bridge then any bus whose number ends with 0 or 5 will do,

You might object that it is easy to tell when a number is divisible by 2 or 5, but less easy if your destination's number is, say, 17.  But there are tricks: to test whether a number is divisible by 17, one simply tests the number obtained by subtracting five times the last digit from the rest (so for 374, we subtract 20 from 37, getting 17: that tells us 17 divides 374).

But this method has a glaring weakness.  It doesn't tell us the order of the stops.  I want to be able to distinguish the route Euston - Waterloo - London Bridge from Euston - London Bridge - Waterloo since I want to travel direct from Euston to Waterloo, and going via London Bridge would take much longer.  So my improved proposal uses Godel numbering.  If a bus visits destinations a, b, c, ... in that order, its number is 2^a times 3^b times 5^c times ...  And this can be dynamically adjusted during the journey: when the bus has left Euston, the number changes to reflect that the next stop is Londo Bridge.  Now, I can find out not only whether the bus takes me to Waterloo, but how many stops there are first.  In my example, if I am at Euston, bus number 288 (2^5x3^2) will take me to London Bridge and then Waterloo, while 1944 (2^3*3^5) will go to London Bridge via Waterloo.

But my final scheme is even better.  In this one, The bus number is the product of the primes representing the places it visits, each raised to the power of the number of minutes it is expected to take to get there.  If a bus doesn't call at destination p, then the number is not a product of p.  So if I want to get to Waterloo, and bus number n arrives, I check to see what is the largest power of 2 which divides n: that is how many minutes it will take to get there.  Of course, this is adjusted dynamically, in the same way as London's bus stops now tell us how long it will be before the next bus arrives.

You might object that this system assumes bus passengers can carry out mental arithmetic.  But of course, there will be apps to do this for those who are not confident.  I will just point my smartphone at the front of a bus, and the app will read the number (say 7200) and tell me that it will be at Waterloo (destination 2) in 5 minutes (since the highest power of 2 dividing 7200 is 2^5 = 32).

Yet another way in which mathematics can make our lives easier!

Sunday, 12 March 2017

Puzzles from my grandmother

I have been reading the autobiography of one of my heroes - the great popular mathematics writer, Martin Gardner, who along with my school maths teachers Jimmy Cowan and Ivan Wells, inspired me with the excitement of mathematics.  I have come late to Gardner's autobiography, Undiluted Hocus-Pocus, which was published a few years ago, partly because of luke-warm reviews, and while I enjoyed many of the anecdotes, I wouldn't regard it as essential reading even for those who, like me, admire Gardner enormously.  But I'm glad to have read it.

One of Gardner's stories reminded me of my own childhood.  Gardner recounts his uncle telling him a riddle.  "There was one duck with two ducks behind it; one duck with two ducks in front of it; and one duck between two ducks.  How many ducks were there?"

SPOILER ALERT: Gardner notes that his uncle began by saying, "There were three ducks", which gave away the answer.

This reminded me of my paternal grandmother giving me two puzzles when I must have been perhaps in the upper levels of primary school.  I had to make sense of the following:

First riddle:

11 was a race-horse.
22 was 12.
1111 race.
22112.

Second riddle:

If the B MT put : .
If the B . putting : .

(I have just googled the first of these, and curiously it is described on one website as a tongue-twister, which it isn't!)

SOLUTIONS

The first riddle reads as "One-one was a race-horse.  Two-two was one too.  One-one won one race. Two-two won one too."

The second is "If the grate be empty, put coal on.  If the grate be full, stop putting coal on."

Monday, 2 January 2017

Why (some) mistakes are interesting

Having recently put up here a couple of posts about mistakes, I feel I should perhaps say why I find (some) mistakes fascinating.

As you would expect, there are a number of reasons.

Perhaps a mistake casts interesting light on someone's thought processes, revealing the way a mathematician was approaching a problem or what was in their had as they tackled it.

Perhaps it is simply a cautionary example: seeing how someone else has erred helps one avoid making the same mistake.

Yet another reason is not exactly schadenfreude (though that may be part of it) but that seeing better people than me make errors is encouraging: I make lots of mistakes and it's helpful to realise that most other people do too!

Now, I worked for many years as a software engineer, working on safety-critical systems, and I have taught software engineering.

Errors occur too often in software, and the better we understand how we make errors, the more likely we are to be able to reduce their frequency.

When I was writing software, I felt that there were lessons to be learnt from railway accidents, particularly those where a remarkable combination of circumstances defeated what had seemed to be an infallible system.

You might have had considerable faith in the Tyer electric tablet system, which for many years after its introduction prevented the dreadful collisions on single-track lines which had occurred when two trains travelling in opposite directions entered the same section: but at Abermule in 1921 the combination of many tiny lapses by several individuals subverted what had appeared to be an infallible system.

Equally unlucky was the Hull Paragon accident in 1927, when two apparently independent slips by signalmen interacted in an extremely unlikely way to subvert the signalling system which protected the trains (the photo above comes from www.railwaysarchive.co.uk).

As a software engineer,I felt there was a lot to be learnt from thinking about such system failures: could I be confident that my own system could not fail in some unlikely combination of circumstances, when the accidents at Abermule and Hull Paragon show how even apparently the most secure systems can fail?

Rhese are some reasons I think (some) mistakes are worth our study.