Tuesday, August 10, 2010

The right to refuse service

Isn't it irritating when you hail a cab, tell the driver where you want to go, only to watch him drive away with an indifferent look on his face? Most of us would agree. The question is whether this is justified? Well, the law certainly agrees. If you were to lodge a complaint against the driver, he would certainly be fined. There's no point looking at the legality of this issue. But is it fair? I think the best way to decide that is by looking at similar situations. Two things that first came to my mind are:

The Railway

Ever wondered, why you never see a train almost empty when it is half way through its journey. According to the railway's reservation system, there are a certain number of seats reserved for passengers who travel longer distances. This is done using a well thought out quota plan. So, once a certain proportion of seats have been booked by passengers traveling short distances, any additional tickets to such destinations will be put under a waiting list (even though there are vacant seats on the train).

Internet service providers

When you ask certain ISP's for a new internet connection, they do something called a "feasibility check". Now that's a misnomer. It's actually more of a "profitability check" which looks at the setup charge required to get you the connection as opposed to the expected payoff (rent collected from each subscriber times the number of expected subscribers). If the numbers don't add up, your internet connection becomes infeasible (for you) and unprofitable (for them).

Now if you compare these examples to what a rickshaw/cab driver does, you can see the correlation. They are both CHOOSING their customers in order to maximize profits. It is also obvious that doing this optimizes resource utilization. In fact, this in turn helps reduce prices for the customer as well.

There are two basic but contradictory ways to look at it

  • When there is a service being offered, it should be offered to every customer irrespective of his requirements.
  • The provider of a service decides who he serves based on his own interests

Whichever philosophy you believe in, you need to apply it everywhere and not selectively. That would be fair.

PS : If you want to know more about the railway reservation quota system, here's a link that explains it in greater detail.

Friday, August 6, 2010

Why should Google be interested in cab companies?

You’re new to the city and plan to go to a movie theatre on a Saturday evening. You have no idea where this theatre is because chances are you’ve booked the tickets online. So you do what anyone with a computer and an internet connection would do. That’s right ...Google Maps. You go through the drill ... point A, point B, get directions and you have it, the shortest path, the distance and expected time right in front of you. There’s just one problem, I think in our cities we need to start measuring how far places are in terms of time rather than distance. But doing that conversion requires knowledge of way too many parameters like time, day of the week, road conditions, traffic patterns, weather, construction projects and even events like political rallies, festivals etc all of which vary from place to place.

Well the problem and the causes are pretty obvious, what we need is a cheap and effective solution, cheap being the keyword. One thing that is common between every street in every city is the ubiquitous TAXI. Recently, in India, we have seen private companies entering this business. The interesting thing is most of the taxis owned by these companies are equipped with a GPS. Basically, if you look at it another way, you’ve got thousands of these GPSs crawling all over the city’s roads 24*7 and that is going to generate a lot of useful data.

Here is how it can work, all the data from the GPS’s is uploaded to a main server. This effectively gives you a snapshot of the city map with lots of dots corresponding to positions of all the taxis. Now let’s take these ‘snapshots’ at regular intervals (let’s say every 2 minutes). Comparing successive snapshots, find how much every dot on the map (or taxis) moves in the 2 minutes.

Then we use that wonderful equation that we all learned in 2nd grade. Speed = distance/time. That’s it!!
Here is a sample of a simple city and two taxis that gives us the instantaneous speed for two streets

At 7:00 pm At 7:02 pm
Do this for the whole city and you now have the average speed of traffic on every city road at that instant. Now if you do this, let’s say at 7pm on a Wednesday then it’s pretty obvious that these values of speed would hold good every Wednesday at 7pm.

That brings me to the next part, if the above calculations are repeated every 2 minutes for an entire year; you would get a good idea of variation in average speed over the year (for e.g, streets in low lying areas would show a drastic reduction in the rainy season). That takes weather out of the equation. 26th July 2010 will have the same weather pattern as 26th July 2011. Basically the longer you observe, more patterns start showing up.

One instant: road conditions
One day: rush hour traffic pattern
One week: daily pattern i.e. weekends vs weekdays
One year: weather patterns

Additional features
A graphical representation of avg. speed data would show congested roads (low avg speed) in red, clear ones in green..etc. Once you have a good database of traffic patters, say after 2 years or so, a time varying traffic map can be made. You drag a pointer on a timeline and the map varies accordingly.
Once, this is achieved, the applications could be huge. Other than obvious ones like traffic management and city planning etc there are environmental benefits as well.

Down to business
Isn't it always about the money? More often than not, for something to work, someone needs to make a lot of money out of it. Who pays for the server setup, the software applications, system maintenance, the GPS etc?



An interested group would be real estate developers (to do a quick analysis of how convenient a place is). Railways could adjust train timings to suit traffic flow. In the future, if we are able to make smart cars, their developers would certainly be interested in data like this. (I'm allowed one lame example). But, imagine a car that downloads data from one of these servers about the route with the best traffic flow and then drives you through it.

On a more serious note, here's one scenario, cab companies agree to share GPS data with let’s say, Google for a hefty fee. Google then uses this data in its maps application to give you a very good estimate of TIME taken to go from your home to the theatre based on data collected on a Saturday evening last July and you find out, the “shortest” route is not that short after all.

What’s in it for Google?
It adds relevance to Google map’s results as they now take into consideration local factors

What’s in it for the cab companies?
Money out of nothing!