Category: The Best

# How to prevent death and injury in stampedes – Part 1

Only a few days ago, many people lost their lives in a stampede on the banks of the Ganga river.  There is a structural solution that can save lives on crowded sloped paths.  The mechanism is described in the image.

It’s actually quite simple.  The force that can result from a crowd of people falling increases with the slope and with the number of people up above that point.

The number of people above a point is proportional to the length of the path above the point.  By cutting up the path with barriers like the ones I have shown in the picture, you can control that length and keep it from becoming excessive.

When I described this solution to my colleague Saravanan (this was back when I was interning in Bangalore four years ago), he suggested a simpler solution (which doesn’t involve barriers).

Anybody want to take a guess how a simpler solution might look and work?

# Method for moving an ambulance at high speed through crowded traffic

The frequency with which I see ambulances impeded by slow-moving traffic in Bangalore led me to wonder if something can be done to speed up their progress.

Studies have shown that in India, the capacity of a standard two-lane road is approximately 1700 pcu (PCU stands for Passenger Car Unit and is a unit of measurement of road capacity) in each direction, which is pretty good.

However, in cities, there just aren’t enough roads in a given direction, or traffic gets slowed down by conflict at intersections.

Whatever the case may be, the slow movement of traffic on roads can impede the progress of ambulances through a city.  Here, we propose one solution to the problem (a solution that requires a minimum of two-lanes).

Each ambulance carries a device to trigger the traffic lights ahead so that they prevent any vehicles from entering the road ahead of it (in both lanes).

There are openings in the median to allow a vehicle to change lanes (as shown in the image).  Once an ambulance has entered a road, it uses these openings to switch to the lane going in the opposite direction (as shown in the image).  Then it enters the next road in the normal manner, and repeats the process.

This method uses the fact that if traffic is stopped, the vehicles don’t usually fill up the road.  It will work as long as traffic can be stopped sufficiently soon, so that the roads ahead are no more than half-full of cars.

# Algorithms to combat poverty

Causes of Extreme Poverty

An excellent study of poverty and its causes may be found in a book by the name of “The End of Poverty” by Jeffrey Sachs.

One of the examples that Jeffrey uses to explain the phenomenon of extreme poverty is a family farming a plot of land that is too small to feed it.

Because the plot is too small to even feed the family, there is no excess food to sell, and consequently, no way to build up any savings.

Without savings there is no way to make any investments that could result in more crops (like fertilizer) or in developing other skills (like education).

So, a family on a very small plot of land ends up trapped in a cycle of poverty – one that it cannot escape the cycle without external aid.

Extreme Poverty in India

Could such a scenario ever materialize in India?  Could a family ever come to have so little land that it does not suffice for its own needs?

It seems so.

In India, by tradition, land is divided equally among children.  So, as the population grows, the average size of land farmed by a family decreases.

The danger is also difficult to spot ahead of time.

When a person inherits a plot of land too small to support a family on, (s)he is usually already an adult and it is too late for him/her to leave farming for another profession.

That is a model that could explain both the huge disparities in income and the widespread poverty that exist in India.

In some other parts of the world, land holdings are inherited by only one child of a farmer, usually the first-born.  The other children need to “go out into the world” to “earn their fortune” by becoming apprenticed to a tradesman, or by becoming a soldier, or by entering the priesthood.

In such a system (which is called primogeniture), there is a built-in safety mechanism that guards against the danger of  land holdings becoming too small for a family.  In each generation, the land only feeds as many people as it did the generation before.  So, there is always a guaranteed surplus of money with which to pay for the training of other children into other professions.

With the Indian system of inheritance, on the other hand, all of the children of a well-off land-owner could find themselves inheriting holdings that are too small, at a time when they are too old to go back to school.

Whatever be the cause of the problem, it seems reasonable for us to assume that as of today, there are around 400 million people living in abject poverty in India because they have plots of land so small that they cannot feed a family, and no skills other than that of a farmer.

Education as the Solution

One solution to the problem would be some form of retraining to equip the 400 million people with skills that would enable them to obtain alternate employment (by that I mean just anything that does not include laboring on a farm).

The government admits that between 300 and 400 million people in India are illiterate (they cannot write or read).  The number of the innumerate is probably far higher.

The most straightforward solution seems to be to pool some money and set up a number of schools for people in rural areas, staffed with teachers.  Supposing we knew what to teach and were able to find the teachers, would we have solved the problem?  Let’s do the math (starting with some assumptions).

Assume we have 1000 teachers, and that each of them can teach a class of some 100 pupils.

Assume further that it takes 3 years to train a person into a new profession.

With this setup, how many years will it take to retrain 400 million students?

12,000 years.

Now that must come as a shock to some.  What if we instead had 100,000 teachers?

It would still take us 120 years, not counting the time it would take to train 100,000 teachers.

Lack of Government Investment in Education

We played a bit more with the numbers to see what would happen if the government doubled the annual allocation for education.  The allocation for education in 2011 was 11 billion dollars.

For another 11 billion dollars, the government could hire just around another 1 million teachers (assuming an annual salary of around 5 lakh rupees per annum) and solve the problem in around 12 years (not counting the number of years of training the teachers would need).

In fact, the total allocation for education across the board in India has been of the order of 3.5% of GDP.  Most Western countries, with far higher per-capita incomes than India, allocate approximately 8% of GDP to education.  India in reality needs to allocate somewhere close to 10% of its GDP to education.

And just as a digression, every time you read in the news that the Indian government is about to import military equipment for between 5 billion and 11 billion USD – Dr. Manmohan Singh’s government paid that sort of money for Sukhoi fighters in 2011, for an aircraft carrier and planes for it in 2012 and for 10 military transport planes in 2013, while Mr. Modi’s government paid a similar sum for six submarines in 2014, and for 36 fighter planes in 2015 – take a moment to pause and think about the amount of money that is being misspent, because that money is comparable to the federal education budget of India, and a better use for that money would have been education.

So, one obstacle in the way of prosperity in India, is that the government of India refuses to spend the money collected as taxes from Indians on education for Indians.

The Difficulty of Skills Planning

Another problem is that appointing more teachers may make people more literate, and even numerate, but not necessarily more employable.

The reason is that the skills that make a person employable are not just basic reading and writing skills.

Higher skills that would enable the students to earn money – perhaps engineering skills or a craft (a friend of mine recently helped out with a government program that taught web development skills at scale) – would be needed.

One problem with a brute-force approach is that there would be no feedback from the market in the beginning as to what skills would be needed and in what quantities.

An investment would have to be made blindly in teachers equipped to teach certain skills, and it would only be decades later that we would know if we had picked the right skills in the right quantities.

So, there is a chance that this method wouldn’t work out very well for the students in terms of equipping them with marketable skills.

Apprenticeship and Skills Development

But is there another way to skill up such a large number of people?

Well, it turns out that there is.  And the method was used in Europe for hundreds of years.

It is called apprenticeship.

Consider a system where one person trains a small number of people, say 10 people, and each of them in turn trains another 10 people.    Assume further that these ten trainees work for the trainer and get paid while they are being trained.

This is how people learnt a trade in Europe for hundreds of years.

Under this model, if each person trains only once and then needs train people no more, 1 becomes 11 in 3 years.  11 becomes 111 in another 3.  111 becomes 1111 at the end of nine years.  In about thirty years, all 400 million people would have been completely retrained, with no massive initial financial investment and with market forces deciding at every stage what skills might be needed most in the coming years.

So, you have an algorithm that can reskill a large number of people at scale in about 30 years.

The Complexity of an Algorithm

Why does one method work so much better than the other?

The brute-force method of skilling people (using traditional schools and a large number of teachers) is what we call an algorithm of complexity O(n).

What that means is:  should the size of the problem double, the time to solve the problem also doubles.

Apprenticeship is what we call an algorithm of complexity O(log n).  In an algorithm of this sort, when the size of the problem grows exponentially, the time to solve the problem only gets multiplied by the exponent.