The Standing Invitation

Posts Tagged ‘Maths

The Slippery Slope

with 4 comments

Let’s go back to school for a moment. A quick science question for you to think about: what causes the tides?

(Actually, the first answer I learned in school for that one was that God had made it that way, but the less said about that the better…)

So we all know the answer: the Moon. And we all probably have the same textbook picture in our minds of how this looks ­– something like this.

So there’s the Earth surrounded by its oceans, and the Moon’s gravitational pull attracts the water towards itself. We also know that the Sun is out there somewhere, and has its own gravitational pull. When the Moon and the Sun are in alignment, you get both forces combined and you get a very strong tide, a spring tide; and when the Sun and Moon are at right angles, you get a neap tide, which is weak.

So it’s mostly down to the Moon’s gravitational pull… right?

Well, actually…

The Moon is near, and the Sun is far away, so the Moon should have the biggest influence ­– but remember, the Sun is massive. In fact, it is two million times heavier than the Moon. How does this affect the balance? I won’t put up the equations here, but it’s actually quite simple to calculate, and it turns out that the Earth feels the Sun’s gravitational pull 177 times more than the Moon’s.

So if the Moon’s effect is so tiny, why do the tides track the Moon, and not the Sun?

What we need to understand here is the concept of a gravitational well.

This is a gravitational well. At the centre is some massive object ­– the Moon, say. We sit on the surface of the well and, if we’re not careful, we can slide down it, faster and faster, until we collide with whatever is at the centre. Key to this concept is the idea that the closer you are to the mass, the steeper the slope is.

When you’re near to the mass you are drawn towards it; if you’re a kilometre closer, you are drawn even more.

But how much that extra kilometre closer really matters depends on how far away you were to begin with. The Sun might be a huge attractor pulling you constantly, but if it’s 93 million miles away an extra step closer won’t really make much difference. The Moon is a much weaker attractor, but because you’re closer to it, distances really do matter.

So yes, we are all affected by the Sun’s gravitational pull, much more than we are by the Moon’s; but we are affected constantly, wherever on Earth we are. The Moon’s effect is much weaker, but much, much more local. It matters if the Moon is overhead or on the other side of the Earth; that extra difference represents a real change in pull, as opposed to the Sun’s stronger but uniform and therefore unnoticed pull.

That’s the gist of it, anyway.

But now we’ve got to thinking about it – look at the diagram again. What’s going on with that tidal bulge on the other side of the Earth to the Moon? We know that exists because we have two high tides every 24 hours, but why? It’s bulging away from the Moon. Surely that makes no sense?

Unfortunately that’s an even weirder story, and we’ll save it for another time.

Written by The S I

October 2, 2011 at 11:59 pm

Solving Traffic Problems With Dynamite

leave a comment »

It’s 2002. You are the mayor of Seoul. There is a major traffic crisis in the city, with congestion rising by as much as 5% yearly. You have £200 million to spend on solving the problem. What do you do? Surely you build more roads to ease the traffic… right?

Surprisingly, the mayor did the opposite: he spent the money demolishing roads.

Even more surprisingly, it worked. Because of the strange fact of Braess’s Paradox, shutting down roads can actually decrease traffic. Here’s how.

Imagine you live in a town called HOME, population 4000, and you and everyone else in HOME want to drive to WORK each morning. How long does your journey take? Obviously it depends on the route you choose, but if there is a lot of traffic, it also depends on which route everyone else chooses, too. There are five roads on the map. Let’s name them after what they go between.

Roads HOME->B and A->WORK are big, wide highways where traffic doesn’t really matter. Each one will take you 45 minutes to drive along.

Roads HOME->A and B->WORK have bridges on them, which create pinch points. The time taken crossing them depends on C, the number of cars on the road. If there are 100 cars, it takes an average of 1 minute to cross, but if there are 1000 cars, it takes 10 minutes.

Finally, there is a superfast expressway A<->B. This only takes 1 minute to drive down.

There is your information. Now, remembering that there are 4000 people at HOME, what is the best route for you?

You might base your strategy on avoiding bridges ­– these are pinch points, after all, and you don’t want to waste your time stuck in queues. So you choose the route HOME to B to A to WORK, making use of the superfast A<->B expressway. The total journey time is 91 minutes ­– quite a long time for a commute.

Is there a better route? What if you use the opposite strategy, and take both bridges? This is fine, as long as it’s only you on the road. Each extra car slows the journey down more. But hey – even if all 4000 people take the route HOME to A to B to WORK, the journey time will be 81 minutes. So even in the worst case scenario, taking both bridges gets you to work faster.

So everybody takes both bridges, incurring the maximum traffic delay, but still getting there faster than they would by avoiding them.

Now imagine dynamiting the superfast A<->B expressway, blowing it to smithereens. With that gone, which route should you take?

Actually, it doesn’t matter. You can choose either HOME A WORK or HOME B WORK, but either way you’ll face one bridge and one highway. Since both routes will take the same time, the choice is even. Half the traffic, 2000 cars, will go via A; the other 2000 will go via B.

The average journey time? 65 minutes. A 16 minute saving off everyone’s journey time has been achieved simply by destroying the fastest, most efficient road in the city.


Written by The S I

September 6, 2011 at 11:59 pm

A Toy Universe

leave a comment »

Conway’s Game of Life is truly a wonderful thing. It’s a computer program that models a whole universe, albeit a very simple one.

(There’s a Java version here. Have a play with it. If you want to do more, you might download Golly, found here.)

This simulated universe is two-dimensional, and consists of millions of cells arranged in squares. Each cell can be either ON (black) or OFF (white). At the start of the simulation, the user clicks some cells on or off in whatever pattern he likes, then presses ‘GO’. The computer does the rest, playing out the universe’s future step by step.

These black and white cells are governed by four simple rules:

1)   Any ON cell with fewer than two ON neighbours turns OFF in the next instant (underpopulation).

2)   Any ON cell with two or three ON neighbours remains ON in the next instant (survival).

3)   Any ON cell with more than three ON neighbours become OFF (overcrowding).

4)   Any OFF cell with three ON neighbours becomes ON (reproduction).

That’s all: these are the laws of physics of this simulated universe, much simpler than our laws about gravity and entropy. These rules are just as unbreakable in Life as in our world; it is a deterministic universe, and in that sense limited if you want to see it that way. But look what can be done within these limits.

Everything that happens is the result of these simple rules operating on cells, turning them ON or OFF, and on that level the game is uninteresting: we always know what will happen. But zoom out a bit and the cells become too small to see. Instead we see patterns of cells. Some of these patterns are not long-lived and disappear or change dramatically; but others, the interesting ones, preserve their identity, and have emergent properties of their own.

Take the ‘glider’ shown above. When this pattern appears, it cycles through four steps, eventually returning to its original shape but shifted one cell down and to the side. You could of course see it as individual cells turning ON and OFF, but it looks quite a lot like a persistent, self-contained object that flies diagonally across the screen until it hits something.

The parallels with our own world, our own lives, are striking. The atoms that make up our bodies come and go, and yet we remain. We are the patterns, not the atoms that we happen to consist of at the time.

There are people, both hobbyists and serious mathematicians, who spend their time charting the ecology of these toy universes. They have discovered or made ‘guns’ that periodically spit out gliders, or ‘puffers’ that move in one direction emitting a stream of debris.

What’s even more fascinating is that these ‘guns’ can send binary information to each other in the form of a string of gliders (a glider representing 1, the absence of one representing 0). The gliders can interact to produce logical operators – AND gates, XOR gates. In fact, it has been shown, mathematically, that it is possible to build a whole computer in Life.

Of course such a computer would be gigantic, consuming millions or billions of cells. But just think: this computer would itself be capable of running a version of Life. A simulated world inside a simulated world…


Written by The S I

September 4, 2011 at 11:59 pm

A Bit of News

leave a comment »

Information is news. But what is information? A note, written in pencil on a page, contains information; but information is not made out of graphite deposited on cellulose. A TV broadcast is information; but information is not made out of radio waves, and it is not the vibration in the air molecules between the radio and your ear.

It is formless, shapeless, intangible. Nevertheless, it can be measured, quantified, treated mathematically.

Information reduces uncertainty. Toss two coins in the air – a penny and a pound coin, say ­– and catch them in your hand without looking at them. You are uncertain about whether they are heads or tails. This uncertainty is measurable: if you had to guess the outcome of the toss, you’d have a 25% chance of getting it right.

But you peek at your hand. You see that the pound coin has come up tails, but you can’t see the penny. With this new knowledge of the state of one of your coins, you have a 50% chance of guessing right. The information has doubled your chances; the uncertainty has dropped by half.

Information is measured in bits. One bit, short for binary digit, lowers your uncertainty about the world by one half. It reduces the number of yes/no questions you have to ask in life by one.

Note that the information content of a fact, measured in bits, depends on how uncertain you were to begin with. If I tossed a double-headed coin and told you it came out heads, that statement contains no information. It was always going to happen; no uncertainty reduced. Conversely, if I tell you I rolled a die and it came out six, that fact is worth 2.6 bits ­– more than one bit, because one yes/no question would not have been enough to remove the uncertainty. Identifying a card pulled from a pack of 52 cards is worth 5.7 bits.

How much information is contained in the expression “It will rain in the UK tomorrow”? Not much ­– the answer isn’t surprising. You could have guessed anyway.

After a week trapped in a mineshaft, a woman is rescued. The news report quotes her as saying “She is glad to be out.” Not much information. You would be surprised to hear her say, “Actually I preferred it down there.” That would be information.

But if that was what she’d said, would the journalist report it? Information-rich or not, does it make a good story? Or would the journalist have quietly turned off the camera, choosing not to show those bits?

The tanks of liberation roll into a bombed-out city. A flak-jacketed war correspondent films crowds of people welcoming the brave soldiers who have freed them, cheering them on. Surely very surprising, very information-rich. But how photogenic would the opposite case have been? A crowd of angry shopkeepers whose lives have been wrecked ­– would that footage be aired? Perhaps not. Regardless of what happened, it is likely that any images shown will be positive. Positive, and unsurprising. Information content low.

Information is news – but not all news is information.


Information theory stuff from Richard Dawkins’s essay “The Information Challenge” as found in The Devil’s Chaplain; definitely worth a read.

Written by The S I

August 19, 2011 at 11:59 pm

Doing Maths Without Numbers

with 3 comments

Define ‘one’. Go on, try.

Well, ‘one’ is what you have when there’s only one of something. You have one duck. There – one. But that’s circular. You still need to define ‘one’ for you to have one duck.

All right, it’s one more than zero. ‘One’ more? Circular again, and what’s this ‘zero’ you’re talking about now?

Half of two? Okay, fine, but what’s two? Well, that’s twice one, isn’t it? Circular again. People trust mathematics with their lives, and yet all it seems to rest on is circular arguments. Can’t we do better than this?

Let’s start at the very beginning, with something really fundamental: “things are what they are.” A duck is a duck. A submarine is a submarine.  “It is what it is” is a property shared by all things. Let’s call this the property of identity, of being identical with itself – the property of being what it is.

Everything is identical to itself. If you grouped together everything that is identical to itself, the set would have everything in it. And the set of everything not identical to itself would be empty.

We have defined an empty set – a group with no members. The set of four-sided triangles is empty, because nothing is both a triangle and four-sided. So is the set of things that are not identical to themselves, because nothing is.

Now we’re used to the idea of sets, consider this: what does the set of three ducks have in common with the set of three triangles? Call it the cardinality of the set ­– a measurement of how much is in it.

Imagine the set of all empty sets. What do all these empty sets have in common? Let’s call it zero ­– the cardinality of an empty set. We have now defined zero. If something is the same as zero, then it has the same cardinality as the set of all things not identical to themselves.

Now that we know what zero is, how many things are identical to zero? There’s just one thing that’s identical to zero: zero. If you filled a set with things identical to zero, there would only be one thing in it. The cardinality of the set of all things that are identical to zero, is one.

And the cardinality of the set of all things that are identical to ‘one’ or ‘zero’ is two. And the cardinality of the set of all things that are identical to ‘zero’ or ‘one’ or ‘two’ is three, and so on and so on and so on.

To break the circularity of mathematics, Bertrand Russell defined ‘I have two hands’ as:

“There is such an a such that there is a b such that a and b are not identical and whatever x may be, ‘x is a hand of mine’ is true when, and only when, x is a or x is b.”

And this is how you do maths without numbers.



The BR quote was from A History of Western Philosophy (1945); also see My Philosophical Development (1959).

The layout of the above argument was from a YouTube video on mathematical logic, but I can’t remember where it is; I’ll update this if I find it.

Written by The S I

August 9, 2011 at 10:00 pm

Posted in Science

Tagged with , , ,

Maths With Morals

leave a comment »

The S I is proud to present Bayes’ theorem, a mathematical treasure and ethical dilemma all in one:

This equation gives us a mathematical formalism for updating old opinions with new evidence.

We begin with our initial hypothesis, H, and the probability, in our opinion, that H is true, p(H). Say you’re sitting next to a young man on a bus. Does this man want to kill you? Probably not, you think. Most people are not killers, so the chance of having one sitting next to you is very slight ­– p(H) is low. Note that this number p(H) is a knowable fact: it comes from crime statistics.

But then he reaches into his briefcase and pulls out a sharpened axe. This provides new evidence, E: our man has an axe.

Now, not everyone who carries an axe is a killer. Some are, some are not. But it certainly changes your assessment of the situation. What is your new assessment? In the equation, it is written as p(H|E) ­– the probability of hypothesis H being true given new evidence E. We base the calculation on one more term, p(E), which basically translates to ‘how often killers carry axes with them’. This number is also a fact, and can be found from case studies of murders.

Putting these numbers together allows you to determine, with mathematical exactness, just how worried you should be when your scary-looking travel companion starts to grin at you and make suggestive slashing motions.

Bayes’ theorem is used all the time in science, finding uses in artificial intelligence, drugs testing, even searches for archaeological ruins. So why did I say it was an ethical dilemma? The answer is easy enough to see when you repeat the story given above, but change E. You are sitting by yourself on the bus when someone sits next to you. Probably not dangerous. But you look up and learn new information: the man is ­– well, pick your prejudice. Black? White? Muslim? Christian? Homeless?

Isn’t it the case that Bayes theorem takes knowable facts about the world, and turns them into a kind of statistically valid and logically justified racism?

No. Yes, the reasoning is sound, and in some cases when time and resources are extremely scarce it is unfortunately necessary to treat people as representatives of groups rather than individuals.* But this is always evil ­– sometimes necessary, but always evil. And what makes the racists different is that they are content with it. If, facing a selection of candidates for a job, with all the time in the world do make a decision, you don’t look at their CVs because you are satisfied with what race alone tells you – that is racism, and rotten to the core.

As is so often the case, Hitchens says it best:

“It especially annoys me when racists are accused of ‘discrimination.’ The ability to discriminate is a precious facility; by judging all members of one ‘race’ to be the same, the racist precisely shows himself incapable of discrimination.”


Christopher Hitchens ­– Letters to a Young Contrarian

Also Richard Dawkins’s chapter on racism in The Ancestor’s Tale is highly recommended

* Blood donation is a good example. In the UK, people from South America are not allowed to give blood because of their higher probability of carrying Chagas disease. This is a decision to treat everyone from one ethnic group in the same way. Of course the ideal solution would be to test everybody for the disease wherever they come from; but in a world of scarce resources, time spent testing is time that could also be spent collecting more blood from ‘safe’ groups. So high-risk groups are eliminated out of hand, ignoring the individuals, so that lives can be saved. Evil, but necessary.

Written by The S I

July 28, 2011 at 8:30 pm

The World In Ten Dimensions

leave a comment »

Just a quick one for you today, folks.

By now people are used to the idea that we need four dimensions to describe the universe: length, breadth and depth providing information about space, and a fourth dimension, time. But in the world of really high-level theoretical physics, people are finding that four dimensions are just not enough to give the full picture. You often hear physicists talking about numbers of dimensions that are just plain silly. Why? Isn’t four enough for them?

Here is a lovely video in two parts that gives an interesting explanation. In order to describe the world fully ­– really­ fully ­– we need to use ten-dimensional space. Make yourself a nice cup of tea, and enjoy.





Written by The S I

July 22, 2011 at 8:30 pm

Posted in Science

Tagged with , ,