Tuesday, December 09, 2008

Complexity and Randomness

If you're into coding, you'll know that generating random numbers is not a trivial thing to do with a computer.

If you are into statistics, you might know that statisticians used to use random number tables to get random numbers for their work.

In both cases however, the numbers are not really random at all. They are generated by mathematical formulae and algorithms which are designed to produce a sequence of numbers that appear to be random. In other words, any one looking at these number will think them random. More importantly, the numbers will pass the tests of statistical randomness by following the kind of frequency distributions expected of randomness.

If you knew the algorithm, you could pretty much predict what the random numbers coming out of such systems will be. But the algorithms tend to be sufficiently computationally complex that the numbers appear totally random to the observer.

This is a crucial point - this link between complexity and randomness.

Whenever a thing is sufficiently complex, an observer will declare its behavior as unpredictable or random. But the behavior is only unpredictable because we do not understand the factors that are causing it. If we could know them, we could predict the behavior.

Consider a (somewhat simplified) example. If you are standing on a roadside watching cars drive past on a busy intersection in a location you have never been before, the flow will appear totally random to you. Sometimes you get a whole lot of traffic, and sometimes the road becomes nearly empty. At some hours the road appears to have more of smaller cars, and at others it seems to have more large sedans.

You stand there for a while, and conclude that there is no pattern here, no predictability. Cars just appear at random.

But then you start to find out a little about the area. Oh, so there is school around the corner and it breaks at noon - that's why there were so many smaller cars going past at that time. And is that a large office complex 10 blocks away ? That would explain the many large cars in the morning. And is it nearing the time for the local festival ? Oh, so that's why there are so many foreign looking cars, these must be tourists.

Armed with this knowledge, you can now proceed to forecast much more accurately what kinds of and how many cars to expect at what times. But if you are joined at the roadside by another new arrival to town, he might remark:"the traffic in this town is totally random". To him the situation is still complex, and hence random.

Complexity, and randomness, like beauty, also only appear to be in the eye (and mind) of the beholder.

Let's go a step further. Armed with your new found local knowledge, you are now predicting traffic patterns with good accuracy, but you can still not be 100% sure. The movement of individual cars is still unpredictable. "Oh sure", you say, "I know the main traffic trends, but the actual individual cars that show up at any point in time are still random, some cars come early, some late - that's just the way it is".

Well, actually, even this is not really random. If you knew the driver of each car, and the state of mind he was in that morning (in a hurry, relaxed, etc) and the condition of his car, and the amount of fuel he was carrying, and so on, you would be able to tell precisely when each car will show up. But the data needed to make this kind of prediction is getting astronomical, and even if you had it, the computations needed to process that data would be huge, and difficult - and complex.

And so, we face complexity again at a new level of detail - and with it comes randomness. Since we cannot discover all this data and cannot even dream of processing it even approximately, the situation starts to appear random again at this level of detail.

Is it safe to say then, that there is no such thing as randomness ? only unresolved complexity ?

I really couldn't say, but I've found that it is useful to think of these two together in many situations. Because complexity still leaves you hope: you can gather more data, run more tests and get closer to the truth. Randomness is the equivalent of throwing up your hands walking away.

1 comment:

  1. So if;

    Randomness is lack of knowledge.
    Lack of knowledge is ignorance.
    And ignorance is bliss.


    Randomness is bliss. No? Maybe I need just a little 'more' info! :o)

    And so the cycle continues...