The wonder of it all
Thursday 7 March 2024
Monday 19 February 2024
The Impossible Chessboard Puzzle
That is the general format of the puzzle and the two inmates have to devise a strategy whereby Joe can reveal the location to Donald.
The problem, of course, is to work out how Joe can somehow manage to tell Donald the location of the key. They know nothing in advance of the disposition of heads and tails, and no further communication between them is allowed.
- Joe computes the colour of the given board b as a t-bit binary number x
- Joe converts the position of the key as a t-bit binary number y
- Joe calculates z = x + y and flips the bit at position z of the board, giving a new board d
- Donald computes the colour of the board d. This is a t-bit binary number w that identifies the position of the key.
Thursday 18 January 2024
My friend Nelson Stephens
My friend Nelson Stephens died peacefully, with family members at his side, on 8 January 2024. He had a wonderful sense of humour and he would have enjoyed the ambiguity in the previous sentence. That humorous side of him was evident on many occasions: as limerick writer on the blackboard in the Mathematics common room in Cardiff, in his gentle takedowns of self-important colleagues, in his ability to find absurdity in the most prosaic of situations, and in his delighted grin when he managed to lull you into an error. All benign, none malign.
I met Nelson in 1972 when he joined the department of Computing Mathematics at University College, Cardiff. I warmed to him immediately and for 10 years we were close friends, played badminton and Othello together, enjoyed our families meeting for dinner, and we went on many outings together. I particularly remember the occasion when Fred Lunnon led a walk to the Waterfall Country around Ystradfellte in the Neath Valley. We had to make a number of tricky river-crossings that Nelson struggled cheerfully with (he had a life-long foot problem that must have affected his balance).
The department specialised in using computers to solve problems in Pure Mathematics. This was Nelson's forte and he had already done significant work both in his PhD studies and at the Atlas Computing Laboratory in Number Theory where he was an expert in elliptic curves. This esoteric subject eventually became very important in cryptography and Nelson remained an active researcher in the field throughout his academic career. Luckily for me his expertise and interests were much wider than that and I knew I was fortunate to have a colleague that I could discuss mathematics with.
In 1975 I attended a series of lectures he gave to our Masters students, largely working through some of the chapters of Hopcroft and Ullman's new book which became very influential in the young field of data structures and algorithms. I learnt a great deal from these lectures and particularly enjoyed the lectures on the Finite Fourier Transform and Matrix Multiplication. Nelson and I began to think about the general context for these two topics: the computation of several bilinear forms. This this led to our publishing two papers that are still being cited. I remember how this research was kick-started. Nelson met me in the department one morning excited by an idea he'd had in bed: it involved solving a generalised eigenvalue equation and we both knew it was a breakthrough.
I left Cardiff in 1982 but we remained very close friends with me visiting him several times over the years. Whenever we met we slipped back into an easy familiarity sharing our personal pleasures and problems. On one of my visits he took me to his bridge club in Cardiff. I was nothing like as good a player as him but that evening we had a very good game together topping the field and winning about £40.
We never published together again although there was one year when I managed to interest him in an algebraic problem. In a very short time he produced a computer program that generated a large amount of useful data that we pored over together making various conjectures. Nelson then applied for and received a small grant from the UK Engineering and Physical Science Research Council to enable us to visit one another. Unfortunately this never came to fruition because I emigrated to New Zealand.
Nelson left Cardiff after about 20 years to become Professor of Computing at Goldsmiths College, London. He did not give up his home in Cardiff and undertook the challenging London-Cardiff commute. On the only occasion I visited him at Goldsmiths I had the impression that he was coping with the new challenges there but it was very hard work.
Throughout his life Nelson took a keen interest in politics. He was a staunch member of the Labour party and I can attribute my own passage from the political centre to the political left partly to him. I remember once joking with him that the Labour party was his natural home as he shared his birthday with Tony Blair.
One of the things I particularly admired in him was his personal modesty. We both deplored that new breed of academic who have unbounded egos. Nelson was not like that. He spoke frankly when it was warranted but never rudely. He listened attentively rather than switching off and using the time you were speaking to prepare his next statement about himself. As a result conversation with him was a delight.
Farewell, my good friend. You leave me with a treasure trove of wonderful memories.
Tuesday 5 December 2023
An original SIN
Sunday 20 August 2023
Sums of three squares
When I turned 62 my daughter Susanna informed me that 62 was the sum of three squares in two different ways: 12 + 52 + 62 and 22 + 32 + 72.
She had looked up this fact with a keyword search such as "Interesting facts about the number 62". I certainly did find that interesting but for 15 years I didn't take the matter any further. I did however know that there was a characterisation of numbers which were representable as the sum of three squares and this characterisation indicated that, while 62 was the smallest example of a number having two representations, it would not be the only such number. In writing this note I researched this question more thoroughly and discovered that very much more is known including asymptotic results on the number of such representations. This note has little information to add to the question but, at least, I hope it will be easy reading.Recently I observed that 2, 3, 7 were (modulo 8) the negatives of 1, 5, and 6. This "explains" Susanna's fact as an example of the following observations. Given 3 squares a2, b2, and c2 the equation
a2 + b2 + c2 = (m-a)2 + (m-b)2 + (m-c)2
will be true (by elementary algebra) ifm = (2a + 2b + 2c)/3.
If a=1, b=5, c=6 (the first of Susanna's triples) we would have m=8 and then
m-a = 7, m-b = 3, m-c = 2: the second triple.
This gives immediately the existence of many pairs of triples whose sums of squares are equal. For example, with a = 3, b = 4, c = 8, we have m = 10, m-a = 7, m-b = 6, m-c = 2. Therefore 101 is the sum of 9, 16, and 64 as well as the sum of 49, 36 and 4. This trick of obtaining a second triple does not always work. There are some cases where the triple (m-a, m-b, m-c) is the same (to within a rearrangement} as (a, b, c). Such cases are easily seen to be when a, b, c are in arithmetic progresion.A more serious barrier to the trick producing a second triple is that m might turn out not to be an integer. For example 32 + 62 + 72 = 94. Here m=32/3 and we find that
m-a = 23/3, m-b = 14/3, m-c = 11/3
whose squares do sum to 94 but they are not integers. In this case there is, nevertheless, a second solution, namely the triple (2, 3, 9) whose squares sum to 94. However I do not see a general pattern suggested by these two solutions.Thursday 2 February 2023
Goodness as an absolute quality
If you were to ask anyone (Donald Trump, Adolf Hitler, Pope Pius X, Myra Hindley, Mother Theresa - name anyone you like) whether they thought they were good people then, any false modesty aside, they would surely answer "Yes". Now ask a random person whether they agreed: no such uniformity of assent would be forthcoming. On some of the names on that list it is possible that no-one would say they were good.
What can we make of that? What if we ask about particular issues: is slavery bad, is homosexuality bad, is unfaithfulness to ones spouse bad, is eating battery-farmed chicken bad? (to name just a few moral positions) we would not find universal agreement either. It is possible that some answers might be of the kind "Well, it depends on the circumstances, the time era of the issue). Even those who give answers that are qualified in this way will likely still feel that, if the question could be made more precise, then they should be able to give a clear cut answer.
Why is this? We have got very used to the idea that these questions should have definite answers. Our society often legislates the answer, or the prevailing moral climate determines an answer. So we are loath to believe that such questions have no answer. Indeed you may very well suspect that, unless a society had an agreement on the worth of an answer to these complex questions, the society would collapse in significant way because we could all behave as we felt like at the time. You might even think that, on an issue such as homosexuality, where society had legislated an answer that you didn't agree with, you would feel duty-bound to go along with the consensus rather than disrupt your society by public disagreement.
The conclusion I want to draw from these examples is that the idea of absolute good or absolute evil is too nebulous to sustain. This conclusion is unpalatable to many of us because it contradicts the way we have been educated to behave. We want to feel that we are good people who act as we do because of some absolute imperative that tells us how to behave. We have been conditioned to think like this sometimes because our parents have had to instil into us a model of behaviour that allows to rub along with our fellow humans, or our church has had offered us divinely inspired moral guidance, or our law-makers have offered absolutist reasons for certain behaviours, or important role models in our lives have set a strong example.
Yet most, if not all, of our moral positions are unsustainable as absolute positions - we cannot agree on them and it is not always just crazy people, or hardened contrarians, who cannot agree. My conclusion is simple: "goodness" or "evil" are not concepts that exist in an absolute sense.
I must add immediately that this does not mean one can therefore act as one pleases because the concept of acting as a good individual is meaningless. More of that later.
I believe that one cannot build "good" societies by first identifying the "good" qualities that one would like the society to have because the idea of a "good" quality is too elusive as we saw in the examples above. My model of societal growth is more chaotic than that. Societies grow from very small collections of people into the complex societies that we see all around us today. This growth has some features in common with the development of species arising generation by generation by random events. Some developments will arise and quickly fade away because they have not been conducive to the survival of the society - and some developments will cause long term thriving. In other words societies are complex systems whose future is a product of fortunate accidents (and the more fortunate the accident the longer will its consequences be felt). As an example, early Greek democracies (to be accurate, very crude quasi-democracies) arose more by accident than design - yet it was a a fortunate societal accident producing a prototype organisation which has lasted a very long time. An example on the other side is the National Socialist experiment of Germany in the 1930s and 1940s - again arising by the conjunction of exceptional conditions - this was not a successful accident as it only lasted two decades.
To repeat: "good" societies do not arise because of "good" qualities. On the contrary, it is the other way round. When a society has arisen it is legitimate to ask what about the society is good. Consider the society of the Roman republic and early imperium and ask that question. The Patricians would claim they lived in a wonderful society, economically prosperous, and intellectually vibrant; the Plebs would answer very differently. Yet both of them enjoyed an urban existence that was the envy of neighbouring tribes. I would judge that society to be relatively good - it certainly lasted for centuries. When it did collapse it left an intellectual legacy that people looked back on as "good" times. As that society developed into a mighty empire one can perhaps guess at the reasons for its longevity: perhaps it was the way that early consuls were appointed or, later, the rigorous training undergone in the legions, or the mild climate of the era. Romans themselves might say "we have a good way of appointing our consuls, or we have a very good army, or the gods have given us many good harvests". In other words, the judgement of whether Roman society was "good" is a post-hoc judgement rather than a template for why their society flourished.
I think one should look at our current societies in this way.
Consider the example of the modern USA. The Americans promote the myth that their national society was the result of deliberate design by the founding fathers. But I think that is far too simplistic. The awful things in their society were obviously not deliberately planned. But the successful aspects of it were either lucky (great natural resources, guns which enabled them to steal their land from the native population, the entrepreneurial spirit that was enabled by the natural wealth in resources and human capital) was also not deliberately planned. What has grown up has been a mixture of successes and failures and, quite naturally, they celebrate their successes and forget their failures, while pretending that the "American dream and their manifest destiny" are designed either by god or by their national spirit.
British society is an older and longer lasting example. For nearly a millenium (since the Norman conquest) it has evolved in a way where accidents have been largely responsible for the way it has changed. Magna Carta for example was definitely not the result of planned good government. The Hundred Years war was a mish-mash of successes and reverses (successes="good", reverses="bad"). The foundation of the British Royal Society in 1660 which ushered in an era of brilliant scientists was "good" but who among its founders could have foreseen that? These and many other examples make it very implausible that an intial set of good design principles are responsible for modern British society. On the other hand we can look at contemporary British society and observe some things that work very well (examples: the National Trust organisation, the rich artistic and cultural life in the big centres, the ancient beautiful buildings (ruined or not) etc. none of which were planned to develop as they have).
Finally, I will return to a point I mentioned above. Just because there is no such thing as absolute good doesn't mean that we should behave as moral delinquents. We can look around our society, spot the things that work well, and then do our best to push the successful parts of our society. For example, those parts of our society where there are undesirable actions, such as outright crime or tax-dodging, are sections of society which do not contribute to the smooth functioning of the society: this suggests that we avoid crime and tax-dodging.
It's really not very difficult. Don't appeal to those unreliable authoritative concepts which assume that goodness is an absolute concept. Instead, think about which parts of your society are successful, those likely to grow into societal success, and do your best to support them.
Sunday 21 February 2021
Hospital tribulations
This post is a departure from my usual style of blog entries because it is a personal record of a series of unfortunate events about my passage through the New Zealand public health system during my treatment for prostate cancer.
The story started with the surgery to remove my prostrate in January 2018 at the Dunedin hospital. When sewing me back together the surgeon stitched the tube that drains the wound into me so securely that it required a further operation under general anaesthetic to remove the drain. Well, these things sometimes happen and I would have thought no more about it if only the surgeon had had the grace offer his apologies for a clear error.
I seemed to recover well until, in late 2020, my PSA readings began to rise and a consultation was scheduled with my urologist in November 2020. This was a different person to the one who had conducted the surgery and I will suppress their names so as not to embarrass them. The consultation was by telephone and lasted about 10 minutes. In principle I have no objection to consultations by telephone but they have the unfortunate effect of not leaving the patient to make notes conveniently. I have since learnt that a transcript is prepared by the consultant which contains useful information for the patient. It is a matter of policy not to use email to forward it to the patient and I did not receive a letter by regular mail. Instead a letter is sent to the patient's GP.
The main conclusion from this consultation was that I should go to Christchurch for a PET scan and the surgeon undertook to notify Christchurch Pacific Radiology for them to schedule an appointment. PET scans, by the way, are not funded by the public health system and I was fortunate to have some private insurance for the $3000 fee. I was told that I should hear something soon.
Nothing then happened for several weeks and in the second week of January I phoned the Urology department at Dunedin hospital. It was clear from the reaction that the consultant had not notified the radiologists and he had now gone on leave. A flurry of activity by a very competent administrator resulted in a PET scan appointment for me on 21 January.
Since the appointment was at 11.00am my wife and I rose at 4.15am that day to drive to Christchurch. It was a smooth journey until we reached Timaru some 250kms from Dunedin. Then we received a telephone call from Pacific Radiology to cancel the appointment as the radio-active pellet required had not been loaded onto the plane. This was a somewhat low psychological moment and we had to return to Dunedin with another appointment arranged for the following week.
The PET scan happened on 28 January. I was told that the results would be sent to my consultant and GP within a day or two, and I asked for a copy for myself.
Two weeks then passed and I heard nothing so made another phone call to the Urology department. They had received the results but would not give me any details. I was aware of a level of embarrassment when I said I had heard nothing from them - and they told me I would see the consultant on 8 March, and they would write to confirm (email confirmation again being impossible but, mirabile dictu, my GP would receive a letter).
A further week passed and still no letter so I made another phone call. More embarrassment and I was told the letter would be sent immediately.
The very next day I received a phone call to say that the consultant would actually be on leave on 8 March but they could offer me a phone consultation on 24 February. I agreed to this with some misgivings and after receiving assurances that all would be confirmed by letter. Possibly I was being alarmist but I had absolutely no idea about the seriousness of my condition and I was uneasy about having to react over the phone to some possibly challenging news.
The next day I received the confirmation that my 8 March consultation was arranged (the one that had been cancelled the previous day) but I recognised that this had most likely been sent before the cancellation.
I write this on 21 February and will update the saga as it continues to develop.
24 February: I waited patiently by the phone from 30 minutes before the appointment time of 1.40pm. No call. After an hour I called the Urology department to ask what was going on - and received the message that this was outside their business hours (mid-afternoon). Then I texted the Urology department, received no reply, and one hour and twenty minutes after the appointment time, still not having heard, had to leave. At 5.40pm the consultant called. The PET scan had been inconclusive and he recommended to just monitor the PSA levels and that he would write to my GP about the next PSA test.