Blog Trails

Creating new paths for thoughts

Wednesday, November 30, 2005

traffic views

Every foreigner who has visited India, at some point of time, has given a thought to the traffic situation in Indian cities. One look at the traffic and they really must think we are brilliant drivers to be able to navigate around cows lying on the street, careless drivers cutting across our path, public transport buses competing with two wheelers for space, and incoming traffic in the same lane as outgoing traffic. My reference point for traffic would be Bangalore, and it seems that Bangalore seems to be the reference point for foreigners in the IT field too. I was reading a book called "Beginning Algorithms" by Simon Harris and James Ross, and I quote an explanation on use of heuristics in designing algorithms.

"A rather lighthearted example of a heuristic involves crossing the street in different countries of the world. In North America and most of Europe, vehicles drive on the right-hand side of the road. If you’ve lived in the United States your whole life, then you’re no doubt used to looking left and then right before crossing the street. If you were to travel to Australia, however, and looked left, saw that the road was clear, and moved onto the street, you would be in for quite a shock because in Australia, as in the United Kingdom, Japan, and many other countries, vehicles drive on the left-hand side of the road.

One simple way to tell which way the cars are traveling irrespective of which country you’re in is to look at the direction of the parked cars. If they are all lined up pointing left-to-right, then chances are good you will need to look left and then right before crossing the road. Conversely, if the parked cars are lined up pointing right-to-left, then you will need to look right and then left before crossing the street. This simple heuristic works most of the time. Unfortunately, there are a few cases in which the heuristic falls down: when there are no parked cars on the road, when the cars are parked facing in different directions (as seems to happen quite a lot in London), or when cars drive on either side of the street, as is the case in Bangalore."

I rest my case...


Post a Comment

<< Home