Monday, November 26, 2012

Brute Force (Part 2): hail the monkeys

Great ideas originate in the muscles
Thomas Edison

The phenomenal increase in computing power in recent times has allowed previously fanciful methods of attacking a problem to become feasible. Inspiration is no longer as prized as it once was since the perspiration can be off-loaded to the computer to silently toil away.

In many ways, this is a triumph for the monkey over Shakespeare; a case of the ape getting one over the bard. The famous analogy used to explain the concept of infinity is apt to explain the victory of brute force over sophistication too.

If a room full of an infinite number of monkeys (not a room I'd like to spend much time in) were each to bash away at a key board then they would surely come up with all of the works of Shakespeare, an infinite number of times indeed. This is a demonstration of the limiting case of a brute force approach ad nausium. Monkeys are representative in this scenario of unsophistication, of blind trial and error, or truly random attempts. But given enough monkey power, perhaps not an infinite amount, then we may still get something that resembles a half decent play. Or Jesus Christ Super Star, perhaps. This concession to approximation can be found everywhere in modern mathematics, statistics and computing and the results are often good enough for whatever question they are required to answer. In this analogy, monkeys equate to computing power, the blue collar work force of science. When monkeys are cheap labour why not just ring-up the job centre and hire some more, rather than spending time and effort trying to train one up. Monkey creative writing classes have taken a detrimental hit with this glut in cack-handed typists.


So, you may well ask is, what’s the big problem? Style has been usurped by strength but if it gets the job done as well or even better than before, isn’t that a good thing?

The answer to this question is not black and white, as is often the way.

On one side, the old way of doing things, which we’ll simply call the elegant way from now on, provided a deeper understanding of the problem. It forced us into delving deep and seeing thing that perhaps the cruder approaches wouldn’t. Being made to compare with other problems or think outside of the box has revealed the kind of connections and understanding that only comes from serious brain work.

On the other hand, simply getting down and getting on with it has allowed previously nightmare inducing problems to be combatted and defeated. Scientific impasses are not what they used to be. It’s fair to say that both approaches have their place. Like some slippery politician there really is no straight answer to which one to use. It depends. It’s just important to not get attached to doing things one way over the other without appreciating which tool is best for the job at hand. Sometime cracking a nut with a sledgehammer is just silly, unless the nut is as big as a house. But then maybe in the latter case we should really be worried about how big the squirrel is.

Sunday, November 25, 2012

Brute Force: The End of Elegance (Part 1) Intro

Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time.
 Thomas Edison


This is the story of how brawn has got one-over on brains, how the high school jock has come out on top over the class nerd. This is the story of how humans have been defeated by machines. But before you rush down into your bunkers and prepare yourselves for a rationed diet of baked beans and spam for the foreseeable future, I’m not talking about an I, Robot or Terminator kind of robot revolution overthrowing their human oppressors. What I am talking about is how the machine, the computer, has replaced much of the imagination, subtlety and beauty of human thought with sheer, bloody-minded elbow grease- The power to number crunch and calculate at breathtaking speeds that, had anyone suggested only a few years ago, would have been thought loonier than George Loony starring in Loonraker.

Some of the best mathematics, for whatever "best" means, is often referred to as elegant. To call something elegant in the mathematics world is high praise indeed. Elegance can mean the simple solution to a seemingly complex problem, or a surprising route from A to B, by-passing the ugly commuter towns of C, D, E, F and G. An elegant solution is often short, quick and tidy. It’s the mathematical form of efficiency but with style- Imagine a mix of German/Italian stereotypes (without the Fascism). An elegant solution is more likely to arise from some serious head scratching. By working the grey matter before even picking up a pencil or chalk then we hope to save time and resources, as well as creating something with an artistic bent. Like reading the Sky+ manual before plugging it in, the setting-up will be less painful. Less haste, more speed was the mathematician’s mantra. To mix metaphors, step back and survey the landscape before diving in.

In the days when the only thing at the mathematician’s disposal was the pen and paper, they had little choice but to mull over the problem at hand until they could spot a clever way to tackle it. This might include wrapping-up the problem in a form they were more familiar with and could get a better grip of, or approximating bits of the problem so the maths wasn't so impenetrable. Or in some of the most elegant cases, this meant looking at the problem from a whole new perspective, standing on one leg on the table with one eye shut. These kind of insights can produce the "eureka" moment. Unfortunately, such moments are unpredictable and the chin stroking approach can be frustrating and lead to whole estates of dead ends, regardless of how many hot baths you take or apple trees you sit under.

In the world of science in recent years, things have changed. When inspiration has long deserted the cause and perspiration is all that is left there is another option. Elegance and beauty have been replaced by raw power and brute force. Like Linford Christie replacing Carl Lewis or Drogba replacing Messi. Now, often the first port of call for a mathematician is to plunge straight into pummeling the numbers. Act first and think later, like a cop working outside of the law, set on revenge.

Saturday, November 10, 2012

Conditional Life Expectancy


I got a card on my last birthday that said

Birthdays are good for you. Statistics prove that the people who have the most live the longest
Larry Lorenzoni

I googled Larry and it turns-out he has a suspect background with children, but that aside it's a pretty good quote for a card. I then realised that this is actually an interpretation of conditional life expectancy that you get in life-tables. Most life-tables are life-expectancy from birth but as you get old by the simple fact that you've survived up to that point your life expectancy changes. You are more likely to live longer by having made it to another birthday. Its not just the birthday that you've just reached but your expected time of death will be nudged further off into the future too. The gap between now and the fateful day may get smaller but there'll always be a bit more life tagged-on to where you are today.

Looking at the quote another way, its a confusion with cause and effect. Its not that people who have the most birthdays live the longest but rather that people who live the longest have the most. A birthday is a consequence of ageing and not the other way around.

Then of course, you could just say that its a birthday card and stop sucking all the fun out of it. Unfortunately though, with age I think fun-sucking happens more and more.