Friday, 30 August 2013

Two simple maths / cricket problems inspired by Aaron Finch

Aside: To comment on my recent Gresham College lectures please go to this blog entry. My most recent Gresham College lecture was on Monday 15 April.  I talked about proof, by human and by computer.  The lectures can be viewed on the Gresham College website.


******************************************

These problems were inspired by Aaron Finch's great innings last night.  Apologies that some knowledge of cricket is required.

In a Twenty20 match Australia bat first and score 261.  England's openers are A and B, who are both remarkably consistent.  A plays every ball he faces for 3, while B scores 2 off every ball he receives.  In an equally unrealistic manner, the Australian bowlers never bowl no-balls.

So the openers score an average of 2.5 runs per ball, and therefore over 20 overs England will expect to score 300.  But after how many balls will England win the match?

Second problem: Unfortunately England's top batsman, A, is unavailable for the next match and is replaced by C, who scores a single run off every ball he faces.  Clearly a loss of two runs per ball will make a big difference to England's total score.  How many fewer runs will they make off 20 overs when C, rather than A, opens the batting with B?


Aaron Finch
(Photo by Supun47 from Wikimedia Commons)

These questions were motivated by the observation that Finch faced more than his fair share of the bowling last night.  So was luck a factor in his making such a high score?  No, it wasn't, because a batsman who is scoring lots of boundaries will have much more of the strike than a batsman scoring in singles!

Sunday, 14 July 2013

The game theory of Jane Austen

Aside: To comment on my recent Gresham College lectures please go to this blog entry. My most recent Gresham College lecture was on Monday 15 April.  I talked about proof, by human and by computer.  The lectures can be viewed on the Gresham College website.


************

One of the most unexpected maths book titles of the year has to be Michael Suk-Young Chwe's Jane Austen, Game Theorist (published by Princeton).  For those of us who think of Jane only as an author of novels in which young men rip their shirts off and jump into pools, the idea that her fiction a systematic exploration of game theory comes as a bit of a surprise.

I haven't yet read more than a few pages of Chwe's book, which looks fascinating.  He is (I am sure) not arguing that Austen based her novels on pay-off matrices and Nash equilibria, but rather that she shows an intuitive understanding of the strategies that game theory proposes.

From one point of view this isn't really surprising.  Austen is (despite my crass characterisation of her fiction above) an astute observer of people.  Game theory describes ways in which people can play situations to their advantage, and one would expect an observant novelist to show this kind of understanding.  You don't need to write down numbers to use game theory effectively!

One of the problems with finding applications of mathematics in the real world is that maths is so effective.  The maths of differential equations can predict accurately where a thrown stick will land, but that does not mean that a dog which catches a stick is using maths in any meaningful sense.

Suppose that (as some suggest) the most pleasing ratio of length to height of a rectangle is the golden ratio.  Then an artist with a feel for beautiful design will naturally draw rectangles in this proportion, regardless of whether or not they are aware of the mathematics of the golden ratio.  So the appearance of golden rectangles in great art, while it might confirm the aesthetic judgment, does not demonstrate any intentional use of the mathematics in the painting.  Similarly, the discovery that some scenes in great novels can be expressed in game-theoretical terms is amusing and instructive, but doesn't necessarily indicate that the author had anticipated twentieth-century mathematics.

This is not intended in any way as a criticism of Chwe's book, which seems particularly interesting because his introduction argues that Austen's exploration of strategy is deliberate, systematic and methodical.  I'm looking forward to finding out whether I am convinced!

Sunday, 9 June 2013

What comes next in this sequence?

Aside: To comment on my recent Gresham College lectures please go to this blog entry. My most recent Gresham College lecture was on Monday 15 April.  I talked about proof, by human and by computer.  The lectures can be viewed on the Gresham College website.
*******************

Here's something which I found (presented in a different way) in a nice book by Anany and Maria Levitin, Algorithmic Puzzles (Oxford University Press, 2011).

Answers to all puzzles appear at the foot of the blog.

What is the next number in this sequence?

Puzzle 1: 
 1, 2, 3, 5, 7, 11, ... ?

The answer will come at the foot of this post, but think about it first!

What makes puzzles like this interesting?  They occur in IQ tests and psychometric tests which supposedly measure one's aptitude for a job.  But they are problematic.  If I were to ask a twelve-year old, "What comes next in the sequence 1, 2, 4, 8, ...?" I would expect the answer 16 - these are powers of 2.  If I were to ask a class of maths undergraduates, that answer would be too obvious - why would I be asking such a simple question - so they might deduce that something else was expected.  

Puzzle 2:
1, 2, 4, 8, ...?

So it is unlikely that the answer to Puzzle 1 is simply 13, as if I was listing the primes and forgot that 1 is not a prime.

Here's another one, but don;t waste time on this one:

0, 4, 4, 8, 10, 9, 11, 15, ?

Well, even the wonderful On-Line Encyclopedia of Integer Sequences can't solve this one!  In fact these were the waiting times in minutes listed on the electronic display for the arrivals of the next ten buses when I arrived at my local bus stop yesterday evening.  The next two numbers were 18 and 18.  But this sequence was essentially random and it has no interest as a puzzle.

When I learned at school that you can fit any set of n data points by a polynomial of degree n-1, it seemed to make sequence questions trivial.  A natural answer for a mathematician would be simply to fit the polynomial of least degree so that, for example, to find the next term in the sequence "1, 2, 4, 8 ..." I would just find the quadratic equation that goes through the points (1,1), (2,2) and (3,4) .  It is (1/2)s^2 - (1/2)x + 1, which gives us 7 for the fourth term in the sequence.

But this has no predictive power whatsoever, because for any possible numerical value of the next term, there is a polynomial equation that fits it.  If, at the beginning of next season, I record the number of goals scored by my football team in their first 5 matches as 0, 0, 0, 0 and 0 (which is not unlikely), I might take comfort from the fact that the formula (n-5)(n-4)(n-3)(n-2)(n-1) has successfully predicted the goals in the first five matches and that therefore I can expect my team to score 120 in their sixth match.  But the existence of the formula is proof only of the power of mathematics in representing data.

So if there are formulae which can represent any sequence and suggest any term I like for the next one, what is the interest in these questions?  In "intelligence" tests, I would argue that they are often testing simply testing your understanding of the context: any answer can be justified but the "correct" answer is the one that the setter had in mind, and your task is to work out what kind of answer is expected.  A mathematically over-sophisticated answer fails the test, which is about your ability to fit in as much as it is about mathematics.

But as a puzzle, if I ask a colleague or a student for the answer to Puzzle 1 or Puzzle 2, the whole point is that the answer is not the most obvious one (primes or powers of two).  It's a sort of mathematical joke: the recipient is not expected to get the answer, but will be amused when they hear it.  The joke is that the same initial sequences arise in very different contexts.  Before I give solutions, here's one more, which is based on what I was once told is Whitfield' Diffie's favourite sequence puzzle.

Puzzle 3: What comes next in this sequence:
138, 125, 116, 110, 103, 97, 86, 77, 68, 59, 51, ?

The Encyclopedia of Integer Sequences won't help with this one either.

Solutions follow:
***************************************************************************************
SOLUTIONS

Solution to Puzzle 1: There are no more numbers in this sequence. These are related to McNugget Numbers - McDonalds' Chicken McNuggets are sold in boxes of 4, 6, 9 and 20.  You can order any number of McNuggets by choosing suitable combinations of boxes, except for 1, 2, 3, 5, 7, 9 and 11.   (Wikipedia's discussion of McNugget Numbers excludes boxes of 4, which are perhaps only available in the UK.  As a vegetarian, I do not have first-hand knowledge here.)

Solution to Puzzle 2: 15.  The number of ways you can cut a cake with n cuts (in three dimensions,without rearranging the pieces between cuts, and assuming, rather unrealistically, that the cuts are perfect and don;t create extra pieces in the form of crumbs) goes 1, 2, 4, 8, 15, 26, 42, 64, ... (See the Encyclopedia of Integer Sequences)

Solution to Puzzle 3: Grand Central Station.  The terms of the sequence are consecutive stops on the New York Subway, Line Four (Check here!).

Sunday, 12 May 2013

My favorite equation

Aside: To comment on my recent Gresham College lectures please go to this blog entry. My most recent Gresham College lecture was on Monday 15 April.  I talked about proof, by human and by computer.  The lectures can be viewed on the Gresham College website.


*****

I have been reading William Poundstone's excellent book about the interview questions asked by Google, Microsoft and co, Are You Smart Enough to Work at Google?  Amongst many others, he discusses how a candidate should answer the question "What is the most beautiful equation you have ever seen?"

For me, and I suspect a great many mathematicians, the natural answer is "Euler's formula e^i.pi+1=0" (which is much more beautiful when properly set out!)  (This is the special case of Euler's more general formula for e^ix.)  Why do we like this equation so much?  Well, first because it is astonishing.  I don't have any natural intuitive understanding of what it means to raise a number to an imaginary power, but this equation shows that doing so is amazingly powerful.  This equation demonstrates the relevance of "imaginary" numbers to the real world.  Who would have thought in the sixteenth century that imaginary roots of negative numbers could lead to the incredible developments in our understanding of the universe exemplified by Schrodinger's Equation, for example?  (Even if I'm not sure "understanding" is the right word when one is talking about quantum theory!)

Euler's equation is remarkable because it involves five very special numbers, zero, one, i, pi and e, and it includes  the fundamental mathematical operations of addition, multiplication, exponentiation as well as the notion of equality.

So is Euler's formula my favourite?  Well, some of my favourites change over time.  Is my favourite composer Bach, Schubert, or Monteverdi?  At different times I would have answered any of these, and it depends on my mood (as well as who's performing).  On the other hand, I can't imagine ever changing my favourite football team, however depressing their results (and I fear that the Pars' sensational 6-1 win yesterday in the relegation / promotion play-off semifinal has just set us up for greater disappointment in the final).  I feel that Euler's as favourite equation is probably more permanent than Schubert but may be less lifelong than my love for the Pars.

But apparently Euler's is not the right answer for Google - it's not original enough.  (Understandably.)  So i wanted to be provocative I'd have to give another favourite equation.  And I think I might put forward John McKay's equation.  Here is the equation, written by McKay himself in my visitor's book.  


McKay's equation

So what is this about?  The equation 196884 = 196883+1 is certainly plausible, but why is it any more interesting than any other trivial arithmetic sum?

Well, McKay works on sporadic simple groups, the existence of the largest of which, the Monster, was conjectured in 1972 and confirmed in 1980.  The smallest non-trivial irreducible representation of the Monster has degree 196883.  McKay's wife works in the area of modular forms (a quite different area of mathematics) and McKay happened to see that she had written down an equation which included the coefficient 196884.

McKay thought the similarity of the two numbers could not be coincidental.  It turns out that the other coefficients in the elliptic modular function also relate to the representations of the Monster.  McKay's observation has led to the discovery of very deep (and very obscure) connections between apparently totally different branches of mathematics.  This whole area has been given the evocative name "Monstrous Moonshine".  It's much too difficult for me, but I believe considerable progress is being made, although at the time he wrote his formula in my visitor's book, McKay told me that he thought it likely the matter will never be fully understood - there being little likelihood of anyone ever having deep enough knowledge of both of these two subjects to be able to investigate the connection.

So McKay's formula may not be as immediately beautiful as Euler's, but it has something of the same spirit (and perhaps even importance).  It demonstrates a very deep connection between group theory and modular forms; it's mysterious and hard to understand, and it's inspiring important mathematics.  And it says a lot about the serendipity which lies behind insights even in a subject as apparently logical and rigorous as mathematics.   If I can't use Euler's equation then when Google ask me this question I'll go for McKay.

Wednesday, 3 April 2013

A book which changed my view of linear algebra

Aside: To comment on my recent Gresham College lectures please go to this blog entry. My most recent Gresham College lecture was on Monday 15 April at 6pm at Barnards Inn Hall, near Chancery Lane tube station, central London.  I talked about proof, by human and by computer: all readers of this blog are very welcome.  The lectures can be viewed on the Gresham College website.

*****

(Just in case any of my students are reading this: just because I didn't use to much like linear algebra doesn't mean you won't!)

When I was an undergraduate I wasn't very excited about linear algebra.  It was worthy stuff, but it wasn't as attractive as group theory and combinatorics were.  Even when I was employed to write mathematical modelling software and relied heavily on matrix methods, I felt the applications of linear algebra were useful but not really very interesting.  Even when the founders of Google have made millions by exploiting the Power Method, I still found it hard to be wildly enthusiastic about this (very important) area of mathematics.

But I have just read a wonderful book which has changed my mind completely.  It's Jiri Matousek's Thirty-three Miniatures: Mathematical and Algorithmic Applications of Linear Algebra.

Thirty-three Miniatures book cover

The book consists of (you've guessed it!) thirty-three chapters, generally of four to six pages, each describing an entertaining problem which can be solved by linear algebra.  The applications are staggering - this isn't boring applied mathematical modelling or billionaire-making search engines, but REAL mathematics - combinatorics, geometry, coding, probabilistic algorithms.

For example: we begin by finding the formula for Fibonacci numbers.  We show that there are no four points in the plane such that the difference between any pair is an odd integer.  We learn about turning ladders around in a finite field.  We have the wonderful matrix-tree theorem which counts the spanning trees of a graph. There is the wonderful account of the information that can be transmitted by a secret agent whose only means of communication is to choose the colour of umbrella he uses each day, to be photographed by a satellite which can't tell the colours apart.   And my favourite - how do you tell whether a given binary operation on n objects is associative?  It appears you have to test n cubed cases.  Even if you only want a probabilistic answer, sampling doesn't appear to help us much: if the operation has one non-associative triple, you have to sample half the triples to have an even chance of detecting the offending triple.  But no - there is an ingenious algorithm which does very much better.

The amazing thing for me is that we are using linear algebra in all these diverse areas of pure mathematics where its relevance seems quite unexpected.  This is a sensational book!

Sunday, 3 March 2013

Advancing Women in Mathematics

Aside: To comment on my recent Gresham College lectures please go to this blog entry. My next Gresham College lecture is on Monday 15 April at 6pm at Barnards Inn Hall, near Chancery Lane tube station, central London.  I will be talking about proof, by human and by computer: all readers of this blog are very welcome.  The lectures can be viewed on the Gresham College website.

*****
On Wednesday 27 February the London Mathematical Society launched a report "Advancing Women in Mathematics".  There are too few female mathematicians.  While this may be because women are too sensible to want to do mathematics, I believe that mathematics has enriched my life and given me opportunities and I am dismayed that these benefits are being taken up in the UK largely by representatives of only one half of the population.  Only 6% of professors of mathematics in the UK are women.  (Most other countries do a lot better.)

There are some promising signs.  There are now sufficiently many successful mathematicians to show conclusively that women can do mathematics at the highest level. But they face obstacles.  Chris Good and I recently did a project about "Being a Professional Mathematician", which produced resources including interviews with mathematicians, and the interviews with Gwyneth Stallard and Sue Merchant, in particular, have interesting insights into their lives as female mathematicians.

Women now make up 40% of undergraduate mathematicians (and were a slightly smaller proportion of the speakers at the recent undergraduate conference Tomorrow's Mathematicians Today).  But the proportion of women in mathematics drops as one lists PhD students, postdocs, academics and professors.  Even 40% of undergraduates could be seen as a rather disappointing proportion when more women than men go to university.

The LMS report contains useful examples of initiatives and actions which may help.  The LMS and its excellent Women in Mathematics Committee is to be congratulated for so publicly raising this issue and for its commitment to improving the situation.

Sunday, 17 February 2013

Tomorrow's Mathematicians Today 2013

(To comment on my recent Gresham College lecture please go to this post.)


TMT 2013 Conference Logo


Yesterday the University of Greenwich hosted the second UK conference for mathematics undergraduates. Tomorrow's Mathematicians Today 2013.  (The first TMT was also held at Greenwich, in 2010.)  About 150 students attended, and there were 30 student speakers from 15 different universities, as well as an excellent keynote address by Robin Wilson.  The conference was sponsored by the Institute of Mathematics and its Applications, GCHQ (a big employer of mathematicians) and the publishers Taylor and Francis, and the OR Society was also present.

I thought it was a wonderful day.  (The programme and abstracts can be found on the conference website.)  The atmosphere was remarkable - friendly and supportive of the speakers.  The contents of the talks varied enormously.  Some students were simply telling us about mathematics that excited them: others were reporting on their own original individual or collaborative work.  Some talks were relatively elementary, others sophisticated.  But there wasn't a single dud in the sessions I attended.  (Sadly, with parallel sessions, one couldn't attend all the talks.)  

In the first morning session I learned about applications of category theory in computer science, "funny functions" which show up misconceptions and misintuitions in analysis, and the applied group theory of "speedcubing" - how to find the most ergonomically efficient ways to solve Rubik's cube quickly.  Later in the morning I attended talks on Shor's algorithm and the threat quantum computers pose to conventional cryptography, and Conway's Angel and Devil game on an infinite chessboard - a simple game which took thirty years to solve.

In the afternoon I heard three fascinating talks about applications of mathematics in biology and medicine - the strengths and weaknesses of models in epidemiology and in the study of how bacteria move - and about financial mathematics and students' perception of GCSE mathematics.  The afternoon ended with Robin Wilson's keynote talk about Euler's life, labours and legacy.  The audience was enthusiastic throughout.  

The prize for the best paper, sponsored by GCHQ, went to Jason Young of Cardiff University for his talk on "Understanding the Effect of Individual Behaviour in Hierarchical Queues" - about how individuals' selfish or unselfish behavour affects queuing times for everyone.  It was an excellent example of interdisciplinary work with real practical consequences leading to insights which might, for example, reduce waiting times for medical treatment.


It was a wonderfully stimulating day. I am sure I am not the only person there who found myself unusually exhausted early last evening.  Thinking about mathematics, even as enjoyably as yesterday, is hard work!