Think of those occasions where you are moving house. You know that the volume of items you need to shift is enough to fill about twenty identical boxes – except that it would require far too much time and planning to work out what to put where. Instead, you go for the easiest method of packing, which is to put items at random into the first box, and, when the next item you pick up doesn’t fit, you seal up the box you have been filling and start on a new one. This is known as a ‘first-fit strategy’. How efficient is it? It turns out that, however unlucky you are with the order in which things come to hand, the number of boxes you need will always be within 70 per cent of what could be achieved with perfect allocation. So if your best possible is 20 boxes, you can reassure yourself that even the lazy first-fit method strategy should require at most 34 boxes. If this isn’t good enough – and, let’s be honest, 70 per cent is a bit of a waste, though this is the worst-case scenario – a strategy of packing the biggest things first and the smallest last always turns out to be within 22 per cent of the very best solution. This means a worst case of 25 boxes, instead of the optimal 20. And, since many of us tend to use a biggest-first strategy, especially when filling the car boot, this shows that when it comes to packing, common sense is a good substitute for deep mathematical thinking. […]

[T]he building needs thirty floors just to enable the lift to reach top speed for a few moments. And that’s assuming that the lift gets a clear run. In a busy building, a lift is likely to make lots of short trips, which means it will rarely have a chance to accelerate to high speed. Added to this, the time saved in speeding up the lift will be small compared with the time spent opening and closing the doors to let passengers in and out. In other words, making the lifts go faster has little impact on the overall waiting time.[…]

For example, imagine you are three floors down in the basement of a building with two lifts. The indicator tells you that there are lifts sitting on higher floors, one on the ground floor and one on the third floor. You call the lift, and notice that the one that comes to collect you is the one from the third floor – despite being twice as far away. Why didn’t the ground-floor lift come to you? The answer is that ‘intelligent’ lifts are often programmed to have a slight bias towards sticking to the ground floor, where most of the passengers get on. The intelligent lift may calculate that it’s worth sending a more remote lift to collect you if it means that it can keep a lift waiting at the ground floor, where a flurry of passengers could arrive at any moment. You are being sacrificed (modestly) for the greater good. Here is another possible sacrifice. An intelligent lift is seeking to keep down both the average and the maximum waiting time. A customer on Floor 6 calls a lift, but is dismayed when it bypasses them to collect somebody at Floor 9. The reason might be that the modern intelligent lift is aware that the Floor 9 person has already been waiting for a minute and is therefore top priority. With this urgent case on Floor 9, the lift reckons that you on Floor 6 can wait a few more seconds. […]

In fact the Black Death entered Europe when a Tartar army catapulted infected corpses into a Genoese trading post […]. […]

Proving Benford’s Law is tricky, but here is one way of seeing why it might be true. Imagine you are setting up a raffle, in which you will randomly draw a number out of a hat. If you sell only four raffle tickets, numbered 1, 2, 3, 4, and then put them into a hat, what is the chance that the winning number will begin with 1? It is 1 in 4, of course, or 25 per cent. If you now start to sell more raffle tickets with higher numbers 5, 6, 7, and so on, your chance of drawing the 1 goes down, until it drops to 1 in 9, or 11 per cent, when nine tickets have been sold. When you add ticket number 10, however, two of the ten tickets now start with a 1 (namely 1 and 10), so the odds of having a leading 1 leap up to 2 in 10, or 20 per cent. This chance continues to climb as you sell tickets 11, 12, 13… up to 19 (when your odds are actually 11⁄19, or 58 per cent). As you add the 20s, 30s and above, your chances of getting a leading 1 fall again, so that when the hat contains the numbers 1 to 99, only 11⁄99, or about 11 per cent, have a leading 1. But what if you put in more than 100 numbers? Your chances increase once more. By the time you get to 199 raffle tickets, the chance that the first digit of the winning ticket will be 1 is 111⁄199, which is over 50 per cent again. You can plot your chance of winning this game on a graph. On the vertical axis is the chance that the number you draw will begin with a 1, and along the bottom is the number of raffle tickets sold. Interestingly, the chance zigzags between about 58 per cent and 11 per cent as the number of tickets sold increases. You don’t know how many will be sold in the end, but you can see that the ‘average’ chance is going to be somewhere around the middle of those two, which is what Benford’s Law predicts. The exact chance that a number will begin with digit N as predicted by Benford’s Law is: log (N+1) – log (N), where log is the logarithm of the number to base 10 (the log button on most calculators). For N = 1, this predicts log (2) – log (1), or 0.301, which is 30.1 per cent. […]

In 1985, a poem entitled ‘Shall I die?’ was discovered in the Bodleian Library of Oxford University. On the manuscript were the initials WS. Could this be a forgotten Shakespeare work? The investigations began. One early analysis was based on the patterns of words that Shakespeare used as his career progressed. In each new work, it turned out, Shakespeare had always included a certain number of words that had never appeared in any of his earlier works. (Fortunately, computers are able to do all of the word counting to prove this. Imagine how tedious this sort of analysis was before the electronic age.) It was therefore possible to predict how many new words might be expected in a new work. If there were too many, it would be pretty clear that the author couldn’t be Shakespeare. No new words at all, and it would look suspiciously as though somebody had tried too hard to copy Shakespeare’s style. The mathematical prediction was that the poem ‘Shall I die?’ should contain about seven new words. In fact it contained nine, which was pretty close. This was used as evidence to confirm Shakespeare’s authorship.

Rob Eastaway, How Long Is a Piece of String?, 2002

Added to diary 26 June 2018