Thursday 29 December 2016

A curious cat and another curious error

The first mathematics book written in English was the snappily-titled, anonymous An introduction for to lerne to recken with the pen, or with the counters accordyng to the trewe cast of Algorisme, in hole numbers or in broken, newly corrected..., first published in the 1530s.  A few years ago the British Library paid £95,000 for a copy of the first edition.  Happily, a facsimile (of the second edition) is now cheaply available in the wonderful series produced by TGR Renascent Books.

The book concludes by presenting lots of interesting problems and their solutions.  One is a version of the Josephus problem, in which fifteen out of thirty merchants are to be cast overboard to save an overloaded galley in a storm: the reader is given a mnemonic for arranging the merchants so that the right fifteen (the Christians rather than the Saracens, as one would expect for the time) are saved.  The mnemonic is a Latin verse, which seems a little odd for a book whose selling point was that it was in English!  Presumably the author was padding his book out with whatever came to hand, not very carefully, as we shall see.

Another example asks about travellers going in opposite directions between London and Paris and when they will meet, or at least I think that is the intention: but since in the book one traveller is going between Paris and London, and the other between Paris and Lyon, they are unlikely to meet unless one of them gets badly lost.  It seems that our author was trying to make the problem more relevant to an English readership but didn't carry his intention through.

The most curious of the problems, to my mind, is "The rule and questyon of a Catte". The problem presented (transcribed from a 1546 edition) is,


"There is a catte at the fote of a tre the lēght of 300 fote / this catte goeth upwarde eche day 17 fote, and descendeth the nyghte 12 fote.  I demaunde in howe ōge tyme that she be at ŷ toppe."

Or in today's spelling, "There is a cat at the foot of a tree of height 300 feet.  This cat goes upward each day 17 feet, and descends each night 12 feet.  I ask, how long a time will she take to reach the top?"  It's good to see that even as far back as the sixteenth century, authors of maths textbooks were presenting realistic real-life problems to their students.

Luckily our author provides the solution:

"Answere.  Take by and abate the nyghte of the day, that is 12 of 17 and there remayneth 5, there fore the catte mounteth eche daye 5 fote / deuyde now 300 by 5 and thereof cometh 60 dayes then she shall be at the toppe.  And thus ye maye do of all other semblable."

That is, "Subtract the night from the day, that is 12 from 17: this gives 5, therefore the cat mounts each day 5 feet. Divide now 300 by 5 and you get 60 days: then she shall be at the top.  And thus you may do all other similar problems."

Which is very neat and useful.  But unfortunately the answer is wrong.  After sliding down 12 feet on the 57th night, the cat will be at a height of 285 feet and will reach the top of the tree after 58 days, not 60.

What is curious about this is that the author seems to have missed the point of the puzzle.  It is interesting, surely, only because it is a trick question, but the author has fallen for the trick. What has happened?

A historian friend with whom I discussed this had a plausible idea.  The author was probably taking his problems from a continental book.  This book may have presented the problem of the cat, and first derived the incorrect solution as above, but then went on to say something like, "But in fact this is not the correct answer, because ..." and explained the trick.  However the unwary writer of An introduction ... didn't read any further, and reproduced the problem with the incorrect solution.  Who knows how many generations of English students were bemused by their cats gaining the top of the tree two days earlier than they had calculated as a result of this carelessness?

Friday 2 December 2016

Learning from the audience at my Prisoners' Dilemma talk

Today I had the privilege of taking part in an excellent "Mathematics in Action" day at which around 700 school students heard a series of talks about maths.  I was talking about one of my favourite subjects, the Prisoners' Dilemma (PD) (I gave a rather different talk about the same material at Gresham College a few years ago.)  I was in amazing company: the other speakers were David Acheson, James Grime and Hannah Fry, and we were wonderfully compered by Sarah Wiseman.  It was a delight to talk to such an enthusiastic audience.

This was my second such event, and this time I had enough confidence to ask the audience (by show of hands) how they would play the games I was discussing.  I had hoped to win more than my fair share of the "Rock, Paper and Scissors" games, but the audience out-thought me (it probably didn't help my cause that, thanks to a clicker malfunction, my choice was revealed to the audience earlier than I had intended).

But the really interesting thing was when I asked whether the audience would co-operate or defect in the Prisoners' Dilemma.  To my surprise, the vast majority of the audience chose to co-operate: to my even greater surprise, those who defected were loudly hissed by many in the audience!  This made a point that I was coming to (very briefly) at the end of my talk: games like the PD give us insights not just into games but into issues like trust and reputation.  If defecting in a PD results in this kind of opprobrium, then the benefit of a shorter prison sentence may be negated by the damage to one's reputation, and this kind of peer pressure makes co-operation a more profitable choice than defection.

But then when I asked the audience about the "Cold War arms race" PD - should a superpower invest its resources in more and bigger nuclear weapons rather than in health research and education? - the response was different.  People who would co-operate in the standard PD, rather than betray their friend, chose to build up their nuclear arsenals.  Furthermore, there was no hissing.  (To be fair, the way I asked the questions may have had a lot to do with the answers, so I am not claiming that the audience behaviour proves anything at all, only that it is suggestive.)

So basically it appears that we frown upon people who are selfish in their dealings with individuals, but when it is selfishness at national level, our response is quite different.  If this reading is correct, then there ia a real challenge to achieving co-operation between nations because we perceive that kind of co-operation as fundamentally different from people interacting as individuals, and we don't feel the same social behaviour to be nice to other nations as we do when we interact with people.

As Martin Nowak says in his fascinating book Super Co-operators, "… Our analysis of how to solve the [Prisoners'] Dilemma will never be completed.  This Dilemma has no end."

Tuesday 29 November 2016

A curious error

One of the happy outcomes from the recent MathsJam conference (See my previous post) was that I was able to get my copies of two recent maths books signed by their authors.  (It would have been three had my copy of Matemagia not already been signed.)  One was Problems for Metagrobologists by the mathematical puzzles expert David Singmaster.  This is a collection of mathematical puzzles, with a lot of fascinating insights and historical comments.  (I'm not convinced David's title will maximise sales of this excellent book: using a word which many of your target audience may not understand is probably not the most effective marketing technique.)

I was interested in Singmaster's discussion of his puzzle 196 ("Not so likely").  He quotes a 1977 magic book which indicates a good bet - you ask your dupe to cut a pack of cards into three and bet even money that there is an Ace, a Two or a Jack at the bottom of one of the piles.  Apparently the original author indicates that there is about a two-thirds probability that you will win - Singmaster not only asks you whether this is right (it isn't!) but also invites you to speculate on how the author went wrong.

I was interested because I had recently acquired a 1964 book on mathematical magic, and had opened it at exactly the same problem (well, in this case the winning cards are an Ace, a Four and a Jack). But this author (whose blushes I will spare by not naming him) gives a different answer, albeit also wrong.  This book indicates that the chance of winning is 36 in 52,   There are twelve ways the bottom card of the first pile can win, twelve winning cards for the bottom card of the second pile, and twelve for the third pile: a total of 36.  I will leave the reader to identify the fallacy in this argument.

The author goes on to say that, of one cut the deck into four piles, one would have an overwhelming 48 in 52 chance of winning.  (Did he try it?  It wouldn't take too many attempts to cast doubt on that claim.)

I find it astonishing that the author didn't go one step further, and comment that if one divided the deck into five piles, one would have 60 chances of winning out of 52.  At that point it becomes clear that something is very wrong with the argument.

So why didn't the author take that step, and see that he had made an error?  Did he do so, realise there was a problem, and give up, hoping his readers wouldn't notice?   Did the author really believe his answers?  Is the whole thing some sort of joke?  Probability is a difficult subject and it is easy to go wrong.  But this author is not only well-read but also well-connected (he thanks Martin Gardner for advice in his introduction).  Could he really be unaware that he had got this example so badly wrong? Whereas Singmaster in his book gives a plausible guess as to how his author arrived at his erroneous two-thirds figure, I find it puzzling that my author didn't carry his argument that one step further and see that he had gone wrong.

I'm not quite sure what moral to draw from this!

Tuesday 15 November 2016

The impossibility of blogging about MathsJam

I thought I would do a blog post on the MathsJam weekend conference which I have just attended. This was two days of short (five-minute maximum)  talks about interesting maths, delivered by a wide variety of speakers.  Although by definition anything presented at MathsJam is recreational, topics varied from very pure mathematics to very applied, with statistics, operational research, computing and communication all included (and also art and poetry).  I think I say this every year, but 2016 was the best MathsJam yet.

My plan for this blog post was to describe three or four highlights and ideas I had taken away.  But after a quick look at my notes I find that that would be impossible,  There were too many highlights to mention: no small selection could be fair.  So all I'm going to do is refer readers to the website which, we are promised, will in due course make the presentations available, and thank the organisers and participants for providing such an amazing, inspiring, friendly weekend.

Saturday 15 October 2016

Puzzles - to be solved, or to be admired?

The composer Howard Skempton once said to me that there are three kinds of piano music: music to be read, music to be played, and music to be listened to.  I think something similar is true of mathematical puzzles.

Certainly one ought to attempt most mathematical puzzles for oneself, before looking at the solution. But I think there are some examples where one can admire the solution without attempting the puzzle oneself.  One example might be the 100 prisoners problem - the solution is beautiful and I don't think that I would have gained anything by spending a long time thinking about the problem before looking it up.  I don't feel too bad about looking up how to solve the 5x5x5 Rubik cube - I did work out how to solve the 3x3x3 one by myself (albeit almost 40 years ago: I might not be able to do that now) so I didn't feel that I had to prove anything to myself, and I felt that I had better things to do with my time.  (On the other hand, the fact that I am writing this self-justifying post may suggest that I do feel some guilt about this!)

Anyway, here is one problem that is certainly in the "to be solved for oneself" category.  It was knew to me: I came across it, surprisingly, in a literary novel - Ethan Canin's A Doubter's Almanac, one of the small category of novels in which the principal character is a Fields Medallist.  (The only other one I can immediately think of is Peter Buwalda's Bonita Avenue - if you know of any others, please tell me!)
A mathematician buys a lottery ticket, choosing six different integers between 1 and 46.  She (it's "he" in the book) chooses her numbers so that the sum of their base-ten logarithms is an integer.  How many possible choices are there?

Sunday 24 July 2016

The Murdered Mathematician



One of my interests is mathematicians in fiction - fictitious mathematicians tell us something about how the extra-mathematical world views us (of course there have been great novels by mathematicians too).  There is crime fiction in which mathematicians are murderers or detectives. I particularly like Hector Hawton's Murder by Mathematics (HT John Sharp who told me about it), in which the Head of the Mathematics Department in a London university gets murdered, and it turns out (implausibly, I hope) that everybody in his professional and personal life wanted him dead.

Perhaps the strangest such novel is Harry Stephen Keeler's The Murdered Mathematician.  Keeler (1890 - 1967) was an eccentric novelist many of whose (decidedly unusual) works are, wonderfully, available from Ramble House Press (http://www.ramblehouse.com/) whose service is excellent.  There is an entertaining Wikipedia article.

In The Murdered Mathematician the victim is an eccentric professor, "Radical Luke" (whose radicalness is exemplified by his refusal to use Greek letters in doing mathematics).  The murder is solved by Quiribus Brown, who is 7 foot 6 tall, and has been taught higher mathematics by his father. The book contains an exam paper of Radical Luke's, and Brown uses some fairly sophisticated mathematics to identify the murderer.  It is certainly unlike any other book I have ever read!  I'm now reading the further adventures of Quiribus Brown in The Case of the Flying Hands.

Saturday 9 July 2016

Maths and Tennis (Again)

I wrote about mathematics and tennis at this time of year four years ago: specifically on the decisions about reviews and about the curious fact that, against a stronger opponent, you are more likely to break serve from 30-15 down than from love all.  I had completely forgotten about that post, but was stimulated to return to the topic by a comment on the BBC web coverage of yesterday's semifinal between Raonic and Federer.  Raonic was 40-love up on his service, and according to the report, rather than follow the standard tactic of playing a safe second service that is almost certain to avoid a double fault, Raonic chose to attempt to serve aces on first and second serves, backing himself to be successful in one of his six opportunities.

So is this a good strategy when you are 40-love up on your service?  How much better than your second serve does your first serve have to be to make this tactic optimal?

Sunday 19 June 2016

Maths my father taught me

Today being Father's Day, I thought I would write about a piece of mathematics my father showed me many years ago.

I have been reading Erica Walker's inspiring book Beyond Banneker: Black Mathematicians and the Paths to Excellence, a study of three generations of Black mathematicians in the USA, the obstacles they faced, and the networks and structures which supported them.  It was interesting that, although few of them had any professional mathematicians in their families, many of the mathematicians Walker writes about were stimulated in their early childhood by a family member with an interest in puzzles, or engineering, or some kind of applied, non-academic mathematics.

I've had a very privileged life.  I had access to excellent schools and the best universities and was taught by outstanding teachers.  But why was I interested in mathematics as a child?  I had no close relatives who had studied mathematics (or indeed science) beyond school level to influence me.  (My father and grandfathers studied classics and law, my mother social work, my aunt history, and (unlike me) everyone was very musical.)

As a child I was obsessed by football.  I was no good as a player but I loved games about football.  I played Subbuteo Table Football with my friends (who were all better than I was, but I didn't mind losing: in retrospect my interest was in the modelling.  I used to simulate tournaments with random numbers, trying to get realistic results.  (It really upset me that a football game we had called "Wembley", in which match scores were decided by dice, gave lower division teams playing away in the cup a dice with a 5 on it, while no other team could score more than 4.  A one in six chance of Rochdale scoring five at Old Trafford?  I couldn't take that game seriously.)

And so I needed to create fixture lists for football leagues - n teams each having to play every other team home and away.  How could I draw up the weekly fixtures?  Trial and error wasn't going to work for the 18 teams in the then Scottish First Division,

Clearly if n is even, if teams play every Saturday (only), it requires at least (n-1) Saturdays for every team to play every other once. Perhaps the first sophisticated mathematical question I asked was "Can it always be done in n-1 Saturdays?  I remember thinking it wasn't clear to me that we could always draw up a fixture list that worked, with every team playing every week,

Anyway, I asked my father, and he told me how to do it.  Number the teams 1 to n. In week 1, team 1 plays team 2, team 3 plays team n-1, team 4 plays team n-2, team 5 plays team n-3 and so on.  This pairs all the teams except team n/2 and team n who play each other.  In week 2, team 1 plays team 3, team 4 plays team n-1, team 5 plays team n-2, and so on: team 2 is left to play team n.  In week k, team 1 plays team k, team 2 plays team k-1, team 3 plays team k-2, and so on: then team k+1 plays team n-1, k+2 plays n-2, k+3 plays n-3, and so on.  The unmatched team in the middle of one of these sets of pairings plays team k.  

This algorithm works, and shows that it is always possible to play all the matches in n-1 rounds.  If n is odd, then one team is necessarily idle each week: the algorithm can be modified by adding an extra team called "bye", and we see that a league with 2n-1 teams can play all their fixtures in 2n-1 weeks.  (A league with an odd number of teams is unusual but in the Scottish League of my childhood, Division Two contained 19 teams.)

It's only recently that it has occurred to me that this solution to a childhood problem is a serious combinatorial algorithm.  So where did my father get it from?  Presumably not the mathematical literature! I asked him recently and he said that he worked it out for himself.

So although I may not have had professional mathematicians in my family,  But my father was capable of working out for himself a nice algorithm to solve a tricky combinatorial problem (even if he had no idea he was doing mathematics).  So my own interest in mathematics didn't come from nothing: my father could think mathematically and solve mathematical problems, even although at the time neither he nor I knew that that was what he was doing.


Monday 30 May 2016

Game Theory and "Beau Geste"

I wrote a post some time ago about Michael Suk-Young Chwe's book Jane Austen, Game Theorist, which argues that Austen's works are a systematic exploration of game theory ideas.  I have to say that I was not entirely convinced.  For me, game theory is about players thinking about their choices and their opponents' choices, and thinking about what opponent is thinking is important.  The examples in Austen of strategic thinking didn't, for me, capture that aspect of game theory.

But I recently reread Beau Geste, P.C. Wren's 1920s adventure story of the French Foreign Legion with a tragic denouement at Fort Zinderneuf.  Let me say straight away that the book shows all the unpleasant racism of its time.  It also presents an old-fashioned view of the code of duty which I fear, as a child, I took more seriously than it deserves.  (Wren's sequel, Beau Sabreur, is much more ambivalent in this regard, or perhaps I just missed the irony in Beau Geste.)

In these matters Beau Geste is very much of its time.  In its own terms, it is a rattling good adventure story.  And, unlike Austen, it presents real game theory dilemmas (I am trying not to give significant spoilers) .  The problems the heroes face require them to think through the consequences of their actions and how others will react.  Both in the matter of the theft of the jewel which sets up the adventure, and in taking sides in the potential mutiny at Fort Zinderneuf, they are thinking not only about their own actions but about the other parties'.  The mutiny is interesting because, thanks to the characters' interpretation of the demands of their duty and loyalties to their comrades, everyone on both sides has full information, so it really is a nice example of strategic game theory thinking.