# Colins Blog

Subscribe!

Previous posts:
Additionally, here are some earlier writings:

## 2017/09/16 - Radius Of The Earth Part Two

Some nine and a bit weeks ago I posted about a method of calculating (or estimating) The Radius Of The Earth using a stopwatch and watching the Sun at sunrise (or sunset). When "Mike the Sundial" told me the idea I was just stunned at the simplicity and elegance. Colin Beveridge took up the challenge, and you can read his account of his method here:

When I read that I was interested to see just how different his take was from mine.

## 2017/07/28 - Grep Timing Anomaly

Some considerable time ago - long enough that probably the details are no longer relevant, or accurate - I got seriously fed up with the spam filtering on my email service. There were so many false positives that I had to wade through the spam bin every day, pulling out obviously good emails that needed attention. It got so that it cost me more time to have it running.

## 2017/07/12 - The Radius Of The Earth

The talk/workshop I give about computing the distance to the Moon uses, it claims, nothing more than a pendulum and a stopwatch. And while it's sort of true that it uses nothing else, it's not really true, because it also uses the period of the Moon, and the size of the Earth.

Now it might be possible to persuade you that it's OK to use the period of the Moon, since you can simply look out the window and measure that for yourself, but to use the size of the Earth seems a bit of a stretch. Surely there's no way to compute that from your back garden.

## 2017/07/09 - This Works To Cure My Hiccoughs

It's many years ago that I was told about this trick. People rarely believe me, but it honestly works for me, and it has worked for others. So I thought I'd write it up.

Read more: This Works To Cure My Hiccoughs

## 2017/07/02 - Perhaps We Saved One

Many years ago a good friend of mine, Bill Mullarkey, organised a "Science and Technology Extravaganza" in Wigan. It was a fabulous two-day event with hundreds of teenagers and adults in attendance. The buzz of excitement was huge, and it was an honour to be part of the whole thing.

Read more: Perhaps We Saved One

## 2017/06/18 - Thinking About Mastodon

Some people are describing Mastodon as a decentralised Twitter, but that's rather misleading. It's better not to try to understand it like that.

## 2017/06/17 - Disappearing Trains On Virgin

This is part of the series on Virgin Train Ticket Search Oddities

Read more: Disappearing Trains On Virgin

## 2017/04/16 - The Independence Game

A few weeks ago I was honoured to be able to attend the gathering at the Royal Society where Rob Eastaway was given his Christopher Zeeman medal. He gave an excellent talk, full of interest and humour, the only downside being that he made us play a game. I don't remember if he gave it a name (Update: Rob calls it "Avoid the Neighbours") but I now think of it simply as "Rob's Dots". He said he didn't know how to play it optimally beyond 11 points, so I thought I'd have a go.

## 2017/04/03 - One Of My Favourite Puzzles

It is impossible to choose a single problem as my favourite. There are so many, each with their own attractions, each with their own charms. But there is one that I solved quickly, and then found that I had only just started to scratch the surface.

Read more: One Of My Favourite Puzzles

## 2017/03/08 - Thinking About Recursion

It has been said that there are two hard problems in computing:

• Cache Invalidation,
• Naming Things, and
• Off-By-One Errors.
Well, that's certainly true when you get into the practice of programming. But on the way to becoming a programmer we find that there are multiple levels of enlightenment.

## 2016/12/03 - Memorising The Tube

Recently I memorised the periodic table of elements. When I tell people that, the response has generally been a moderate pause, followed by a rather puzzled - "Why?" So I thought I'd explain.

## 2016/11/19 - Spikey Spheres

I've recently been working on an optimisation problem, and I've come to realise that I can consider it as wandering around on a smooth landscape in 1800 dimensions.

The problem is that while the error function may be "smooth," your intuition of what this means is wrong.

## 2016/10/06 - Surprisingly Quick

In the 1990s I had a job at Liverpool University doing research into how we might make it possible for non-computing specialists to use parallel computers. Even today, over 20 years later, this is still an unsolved problem, and the machines now are designed to be easier to use. The machine I was using was a Parsys SuperNode with 96 T800 transputers, hooked together with a reconfigurable switch, cunningly designed so that any 4-regular network could be realised.

## 2016/09/18 - An Unexpected Fraction

On 2016-09-09, @MEIMaths tweeted an image and said:

From the way it's phrased you'd expect the answer to be the same regardless of the quadrilateral chosen ...

## 2016/08/28 - You Have To Admire Their Optimism

Coming back from Australia, Rachel Wright and I landed at Heathrow (which we usually avoid) and caught trains back home. Our final leg was from Chester to home, and I had a look at the live departures board to see how things were looking.

## 2016/07/10 - Representatives Matter

My uncle has a Ferrari, and it has led him to make an interesting observation.

## 2016/06/08 - Pythagoras By Incircle

Some time ago I was working on a puzzle about incircles, and unexpectedly a proof of Pythagoras' Theorem dropped out! I'm sure it's well known to people who know lots about Pythagoras' Theorem, but I thought I'd share it.

## 2016/05/31 - A Puzzle About Puzzles

Some time ago a friend of mine, Adam Atkinson, mentioned to me what he referred to as "Semi-Chestnuts" - puzzles that should be classics, but are for some reason effectively unknown. Recently one of these caught the attention of the Twitter-verse.

## 2016/05/24 - How Not To Do Twitter

Recently I had an exchange on Twitter that beautifully exemplifies how companies get it so totally, totally wrong. Usually I don't name names, but on this occasion it's just spectacularly bad, and then they asked me to point them at a write-up, that I've decided to go ahead and do so.

## 2016/01/04 - Calculating 52 Factorial By Hand

Some time ago I gave a talk where I showed that something unexpected happening with a deck of playing cards. I had some volunteers try it, and while they did so I talked about just how many orderings there are for 52 cards. To do this I computed (an approximation to) $52!$ (52 factorial) by hand. It's not so hard - you just calculate $54!$ and then divide by 3000.

Read more: Calculating 52 Factorial By Hand

## 2016/01/02 - Small Things Might Not Be So Small

Twenty years ago (or thereabouts) there was a Christmas road safety campaign in which they said: "Wearing a seatbelt doubles your chance of surviving an accident." But that's obviously nonsense.

Read more: Small Things Might Not Be So Small

## 2015/12/20 - Not If You Hurry

On one occasion, when I was a teenager, I was in the car with my parents going somewhere.

We had to turn right (equivalent to turning left in the States) and hence had to cross a lane of traffic and merge into the far lane. My father was looking to the right to see if there was anything approaching in the lane we had to cross, and asked my mother - "Is there anything coming?"

Read more: Not If You Hurry

## 2015/12/17 - Factoring Via Graph Three Colouring

Occasionally someone comes to me and says that they have a polynomial time algorithm for solving an NP-Complete problem. More specifically, someone came to me and said they could Graph Vertex Three Colour (G3C) in polynomial time. They'd tried lots of example, and it always worked. So I produced a graph ... they never came back.

Read more: Factoring Via Graph Three Colouring

## 2015/12/16 - Another Proof Of The Doodle Theorem

So on the Doodle Theorem page we have a proof of, yes, you guessed it, the Doodle Theorem. Here, on a page entitled Another Proof of the Doodle Theorem we have, yes, you guessed it, another proof of the Doodle Theorem.

Read more: Another Proof Of The Doodle Theorem

## 2015/12/15 - When Obvious Is Not Obvious

There's an old story that goes something like this:

A math professor is teaching a class, and in the middle of a proof he says "Clearly we have the following." A student puts up his hand and says: "That's not clear to me."

Read more: When Obvious Is Not Obvious

## 2015/12/13 - Graph Three Colouring

Here is something you may have seen before. Take a map, any map, and colour the regions so that if two regions share a border, they must get different colours. There's more going on here than you might think.

## 2015/12/12 - The Doodle Theorem

The Doodle Theorem says:

• Any map drawn with a single pen stroke
that returns to its starting point
can be two-coloured.

Here's one proof.

## 2015/10/25 - Be Careful What You Say

Here's an amazing story. A young child writing to a popular television programme with wild claims and, quite frankly, ridiculous aspirations. The output is a lesson to us all.

Read more: Be Careful What You Say

## 2015/10/10 - The Mutilated Chessboard Revisited

Puzzle enthusiasts know that a really good puzzle is more than just a problem to solve. The very best problems and puzzles can provide insights that go beyond the original setting. Sometimes even classic puzzles can turn up something new and interesting.

Read more: The Mutilated Chessboard Revisited

## 2015/08/16 - A Mirror Copied

So earlier I asked: What do you get when you photocopy a mirror? But the real question, as I then expanded, is not "What do you get?" but: "Why must you get that?" Can we deduce from first principles, based only on what a good photocopier must do, what the result will be? I claim the answer is "Yes," although there are some who disagree.

## 2015/08/01 - The Other Other Rope Around The Earth

There's a classic problem:

Upon stretching a rope around the Earth, you find that you have 6 metres excess. So you join the ends, and then go around the Earth propping up the rope equally everywhere. How high will it be?

An alternative that's been suggested is that instead of propping it up equally everywhere, just prop it up as high as possible in one place.

But now Bill Mullins has asked me yet another variant:

Read more: The Other Other Rope Around The Earth

## 2015/07/29 - Photocopy A Mirror

• What do you get when you
photocopy a mirror?

There are actually (at least) three inter-related questions:

• What do you get?
• How does the photocopier
give you that?
• Why is that the right thing
for it to do?

## 2015/06/06 - The Point Of The Banach Tarski Theorem

There's a classic "Limited Audience" joke/riddle that goes:

• Q: What's an anagram of Banach-Tarski?
• A: Banach-Tarski Banach-Tarski

Now, if you already know what the Banach-Tarski theorem says, that riddle is really funny. If you don't then you're simply not in the audience, and you'll just go: "Huh?"

Read more: The Point Of The Banach Tarski Theorem

## 2015/05/24 - Sieve Of Eratosthenes In Python

One of the things we need to do when finding Perrin Pseudo-Primes is to recognise prime numbers so we can see if the numbers predicted by the Perrin test to be prime, are. So we need to generate primes. For small primes (for some definition of "small") this can be done quickly and efficiently by using the Sieve of Eratosthenes. In our case, instead of using a bit map of flags, we will use a dynamically generated collection of filters, one for each prime, and run down the list of all numbers, filtering as we go.

Read more: Sieve Of Eratosthenes In Python

## 2015/05/19 - Fast Perrin Test

So we've got scaffolding to look for Perrin Pseudo-Primes (PPPs), assuming any exist (which they do) but as we run the existing code we find that it's spending pretty much all its time in the test as to whether n divides k(n).

Now we look to speed that up ...

## 2015/05/18 - Russian Peasant Multiplication

Sometimes simply called "Peasant Multiplication," sometimes called "Ancient Egyptian multiplication," sometimes called "Ethiopian multiplication," sometimes called "Multiplication by Doubling and Halving," this algorithm is well-known to some, a mystery to others, and more useful than you might think, being applicable not just to multiplication of numbers, but also useful for exponentiation, and for matrices.

## 2015/05/17 - FindingPerrinPseudoPrimes Part2

So now we've got the scaffolding of a program to find these Perrin Pseudo-Primes. Here is the main loop of the code, with some simplistic timing added to it. (Note that this code is incomplete and won't run as is).

The output shows that when given 100 seconds to run it gets as far as n=42763, but more importantly, the timing shows that it overwhelmingly spends all of its time in the routine to test whether or not a number passes the "Perrin Test." So there are a few things we need to do.

## 2015/05/15 - FindingPerrinPseudoPrimes Part1

Some 20 years ago I was chatting with a friend of mine, and he said something like the following:

## 2015/05/13 - The Unwise Update

 One of the Greybeard Stories, extracted, and integrated into the bloggy thing.
This story passed on to me first-hand from the engineer involved. It's a true story about how insufficient knowledge among operating personnel about the operational consequences of new technology may have accidental effects.

## 2015/05/03 - Miles Per Gallon

I remember a while ago attending a talk that did something utterly bizarre with units of "miles per gallon." I don't remember much about it, but I thought I'd attempt to reconstruct the process in a post, just to see how far I get, what conclusion I reach, and whether people think it's as bonkers as I do. Here we go ...

## 2015/05/02 - Tracking An Item On Hacker News

A couple of weeks ago I had an exchange with a user on Hacker News about user "ages." I wrote that up in my previous post, and then submitted it. I was surprised that the item garnered enough attention to make it to the front page, but that was when a little foresight paid off. I don't usually bother with analytics on my site, but on this occasion I put a tracker on the page to count the number and times of page hits.

Read more: Tracking An Item On Hacker News

## 2015/04/19 - Hacker News User Ages

A few days ago I was reading Hacker News[0] and someone had posted a poll[1] with the following question:

Read more: Hacker News User Ages

## 2015/04/14 - Poking The Dusty Corners

In chatting with people about what a maths degree is, and what it does for you, I've often been intrigued by a particular response. I've shown them something that they expect to be true (or false) and then shown that their expectations can be confounded. When I do that, a common response is "Well, you're just being stupid."

Read more: Poking The Dusty Corners

## 2015/04/03 - There Is No Time For This

 One of my Random Writings
I'm finding these days that I just don't have the time to do everything myself. I need reliable sources that I can trust to do my input filtering, reliable advisors to whom I can entrust the task of doing some of the analysis of the huge flood of data available. I don't have time to evaluate everything on its merit, to research in depth the sources, and to compare details. Most likely people have done it before me, and some of them are better qualified, better informed, and better suited. Why should I throw away the information about their skills and redo their work less well than they did?

Read more: There Is No Time For This

## 2015/01/05 - Publically Sharing Links

For years I've been visiting, reading, and contributing to a site called "Hacker News[0]." About 3.5 years ago I basically withdrew[1], finding it increasingly frustrating, but I never really went away. Slowly I've returned and contributed again, although not at the same level, and generally just by contributing links and not often getting involved in the discussions. But once again I'm getting frustrated and want to leave, but where else can I share things I find, and then enter into discussions?

## 2014/12/14 - Learning Times Tables

Should primary school students be drilled on their times tables?

I first learned about graceful degradation from a colleague. He prefaced his story by saying that good people learn from their mistakes, but the best people learn from other people's mistakes. This is a bit like the saying in aviation circles that a good landing is one you can walk away from, an excellent landing is when they can use the 'plane again ...

## 2014/11/22 - Diagramming Maths Topics

An impossible task, but wouldn't it be useful to have some sort of diagram of topics in maths, connected somehow to show the links between topics? How could such a diagram been created? How could it be explored? How could it be dynamic? Maintainable? Usable?

## 2014/08/26 On The Rack

When travelling, I usually go as light as possible. Certainly when travelling by plane I try to go "hand luggage only", and when doing various mini-tours of talks, etc., I try to travel with just a single, small backpack. Sometimes it's not possible, but I usually manage. Here's a story of one time when this had unexpected consequences ...

## 2014/08/11 Square Root By Long Division

• Is the product of 4 consecutive
positive integers always one
less than a square?

Good question. The answer is yes, and I solved it using a technique the interlocutor didn't know.

Read more: Square Root By Long Division

## 2014/05/23 Beyond The Boundary

In which we show that 1+2+4+8+16+... is not equal to -1, and how that might both surprise us, and not surprise us.

## 2014/05/03 Fill In The Gaps

Recently I had an interesting conversation on twitter, insofar as one can have a conversation at all in that medium. It started with the following perfectly reasonable question ...


Q> Sorry for what may be a stupid question,
Q> but sin(x)/x has a limit of 1 as x -> 0,
Q> so does it not cross x=0 at 1?


Read more: Fill In The Gaps

## 2014/04/24 Software Checklist

During the second World War, fighter pilots would scramble to take off. As they bumbled down the grass runway, engines open at full throttle, trying to take off on a short, bumpy track with a full load of fuel and ammunition, their heart would stop when the engine mis-fired. Was the fuel mix too rich, or too lean? They'd look at the control for the mixture and wonder which way to turn it. The right way would increase engine power and make lift-off straight-forward. The wrong way would lose power, and there was rarely enough time to fix the mistake.

## 2013/02/10 NASA Space Crews

I was watching some documentaries on the NASA space missions, and I started to realise that in the Apollo missions many of the crew were experienced, but some were not. This made sense, because you need to train new people and give them experience, but equally, it was important that some experienced members be on each mission.

So I drew a diagram - see what patterns you see.

Read more: NASA Space Crews ...

If there are just two people in a room, it's very unlikely that they will have the same birthday. On the other hand, if there are 1000 people in a room, it's absolutely certain that there will be shared birthdays, as there simply aren't enough days to go round without repeats. So as we add people to a room the chances of a shared birthday rise from 0 to 1, and at some point will pass through the halfway mark.

When? And what does this have to do with cryptographic hash spaces?

## 2012/04/17 The Trapezium Conundrum

Clear, precise, unambiguous and useful definitions are hard to come by in the real world. In maths we have the luxury of creating definitions that we want, and then chasing down the consequences. If the definition doesn't produce what we want, we can change it.

But even things, things aren't always as easy as we might hope.

Read more: The Trapezium Conundrum ...

## 2012/02/20 Revisiting The Ant

So last time in The Ant And The Rubber Band we were talking about an infinitely patient ant walking on an infinitely stretchy rubber band. If you haven't already, you'll need to read that.

So here's what's happening:

Read more: Revisiting The Ant ...

## 2012/02/09 The Ant And The Rubber Band

There's a 1 metre long rubber band, and an ant, standing on it at one end. The ant starts walking along it at a speed of 1 cm/min. Every minute the rubber band is stretched (uniformly and instantaneously) to be one metre longer. The question is this: Will the ant ever get to the far end?

Read more: The Ant And The Rubber Band ...

## 2011/12/20 Irrationals Exist

For this post I thought I'd have a quick diversion into talking about the so-called "Real Numbers." Upon reflection, however, I found that there was so much I wanted to say that there was no way to fit it sensibly into a single post. So instead I'll put some preliminary comments here, and then expand on them later.

In particular, I'll give an explicit proof that for every interval you choose of non-zero length, there is an irrational in it.

## 2011/11/15 Multiple Choice Probability Puzzle

 If you choose an answer at random, what is your probability of being correct? A: 25% B: 50% C: 60% D: 25%
Recently this puzzle was running around the 'net. Have a think about it for a moment.

The immediate thought is - there are four options, so if I pick one at random then each has a one in four chance of being chosen. That means the answer is 1/4, or 25%.

But that doesn't work ...

Read more: Multiple Choice Probability Puzzle ...

## 2011/10/28 Random Eratosthenes

Why do people think of the primes as somehow being "random"? What does that mean? How can we investigate?

In this post I'll talk about a way of generating primes, and then see what happens when we toss in some randomness, just for fun.

## 2011/09/13 Wrapping Up Square Dissection

We now have five valid dissections, and one "dissection" that might be regarded as invalid. So what do we mean by "a piece" and just how many dissections are there?

Read more: Wrapping Up Square Dissection ...

## 2011/08/08 Dissecting A Square Part 2

So we return to the square. It's simple enough to cut it up into identical pieces so that all the pieces touch the centre.

But in how many ways?

I rapidly got 5 (or 6, depending on a technicality), and I started to wonder about a proof that 5 (or 6) was all of them. I posted a badly worded question on an internet forum, and rightly got flamed for it, but in the answers was a shock.

There was an infinite family of solutions.

Read more: Dissecting A Square Part 2 ...

## 2011/07/26 Dissecting A Circle

So last time I talked about the three possibilities we have when we dissect a square:

• Exactly one piece touches (and hence contains) the centre point
• There's more than one piece and they all touch the centre point
• Two or more pieces touch the centre point, but some don't.

Now, what about the circle. If we just cut it like a pizza then we get all the pieces touching the centre. No problem there.

Read more: Dissecting A Circle ...

## 2011/06/01 Dissecting A Square (Part 1)

Some time ago, mid-2009 I think, I was given a challenge that I found fascinating. You might choose to have a think about it, and here is the way I introduce it to people:

• Given a square, you can dissect it into congruent pieces such that they all touch the centre point.

Read more: Dissecting A Square ...

## 2011/05/24 An Oddity In Tennis

(Part 3 of Decision Trees In Games)

... in which we discover that the techniques we've developed over the past two posts lead to an apparent anomaly in the behaviour of the scoring system, and ask "Why is it so?"

Read more: An Oddity In Tennis (Part 3 of Decision Trees In Games)

## 2011/05/18 Decision Tree For Tennis

(Part 2 of Decision Trees In Games)

In the last post we analysed a simple "First to Two" (or "Best of Three") game of probability. More interesting, and more difficult, is something like tennis, which adds the complication of "Deuce." In tennis, the winner of a game is the person who not only has at least 4 points, but is also at least 2 ahead of their opponent. When you each have 3 points the next winner of a point doesn't win the game - they need to get two in front.

Read more: Decision Tree For Tennis (Part 2 of Decision Trees In Games)

## 2011/05/15 - Decision Trees In Games (Part 1)

A fairly standard exercise in probability is to ask who, under a given scoring system, will win a game given the probability of each move. For example, suppose we toss a coin, and I get a point for every head, and you get a point for every tail. Winner is first to 2.

It's easy if the coin is fair, because the game is symmetrical. It's easy if it's a two headed coin, or a two tailed coin, because then the winner is certain.

But if the coin shows head with probability p (and tail with probability q=1-p ) then it's harder.

Read more: Decision Trees In Games (Part 1)

## 2011/05/09 - A Matter Of Convention

A friend of mine, James Grime, is becoming quite well known both for his mathematics presentations, as well as for his videos on YouTube. He's really quite good, but recently he complained that he was getting a lot of requests to settle a matter. He didn't really want to talk about it, but it's this:

What is the value of 6/2(2+1) ??

Read more: A Matter Of Convention

## 2011/04/21 - Do You Nourish Or Tarnish

There are people I know who are like the sunshine in the morning of a Spring day. They illuminate, warm, nourish, and make one's life better.

There are others, though, who aren't like that. They see only what's theirs, ...

Read more: Do You Nourish Or Tarnish

## 2011/04/18 - Binary Search Reconsidered

"Binary Search" was made popular as an interesting test problem by Jon Bentley in his book Programming Pearls. There he says that it's an interesting problem, and baits the hook ...

I was stupid - I claimed: "There is a simpler invariant and simpler code that together have a few advantages" ...

## 2011/04/14 - Two Equals Four

Here's a cool puzzle.

Consider the equation and suppose we want to solve it for x.

Because the exponential tower is infinite, we can also write it as

But the part in brackets is the same as the whole, and hence is equal to 2. Thus we have 2=x2

## 2011/04/11 - The Lost Property Office

Last week I gave a talk in Stroud. Well, three talks, actually. Two were my regular juggling talk, and one was a maths talk. They seemed to go well, with lots of nice comments from both the teachers and the students.

It was a warm, sunny day, so as my host was going to be busy for an hour or so before taking me back to the station (an arrangement we had agreed in advance, and with which I was perfectly content) I decided to walk, ...

Read more: The Lost Property Office

## 2011/04/05 - The Forgiving User Interface

Recently as I was changing the time on the radio alarm clock in my bedroom to make the adjustment for British Summer Time, I was struck by the placement and labelling of the buttons. For years I have found myself pressing the wrong buttons, and thinking I'm just stupid (or at least, half asleep). But I had a closer look and was a little surprised at what I found. Let me show you ...

Read more: The Forgiving User Interface

## 2011/04/03 - Setting Up RSS

After saying that I would be Withdrawing From Hacker News I posted a note there saying so, and pointing people at my "blog" in case they wanted to read what I write in the future. Then someone asked if I could set up an RSS feed, so I've attempted to do so.

## 2011/04/03 - Withdrawing From Hacker News

866 days ago I came across some essays by Paul Graham. I was interested in and impressed by some of the articles, but also realised that they were interconnected. To explore their interconnectedness I extracted all the links between them, graphed the connections, and computed a Google-like ranking. The results weren't actually that interesting because the essays don't cross-link much, but I sent them to Graham in case he thought they were interesting or useful. Maybe he would put more cross-links in, which might make the essays more of a resource than they already were.

Slightly surprisingly, I got a reply, in which he suggested that I submit the link to Hacker News. I'd never heard of Hacker News, but had a look, thought it interesting, and submitted the link.

Read more: Withdrawing From Hacker News

## 2011/04/02 - Colin's Blog

I've been rethinking and reorganising my "blog". I've decided that each entry should be a separate page, and then the pages can chain forward, backward, and give a list of recent posts.

We'll see how that goes.