## Levels and shifts in analysing games

So Nitin Pai and Pranay Kotasthane have a great graphic on how India should react to China’s aggressions on Doka La. While the analysis is excellent, my discomfort is with the choice of “deltas” as the axes of this payoff diagram, rather than levels.

Instead, what might have been preferable would have been to define each countries strategies in terms of levels of aggressions, define their current levels of aggression, and evaluate the two countries’ strategies in terms of moving to each possible alternate level. Here is why.

The problem with using shifts (or “deltas” or “slopes” or whatever you call the movement between levels) is that they are not consistent. Putting it mathematically, the tangent doesn’t measure the rate of change in a curve when you go far away from the point where you’ve calibrated the tangent.

To illustrate, let’s use this diagram itself. The strategy is that India should “hold”. From the diagram, if India holds, China’s best option is to escalate. In the next iteration, India continues to hold, and China continues to escalate. After a few such steps, surely we will be far away enough from the current equilibrium that the payoff for changing stance is very different from what is represented by this diagram?

This graph is perhaps valid for the current situation where (say) India’s aggression level is at 2 on a 1–5 integer scale, while China is at 3. But will the payoffs of going up and down by a notch be the same if India is still at 2 and China has reached the maximum pre-war aggression of 5 (remember that both are nuclear powers)?

On the flip side, the good thing about using payoffs based on changes in level is that it keeps the payoff diagram small, and this is especially useful when the levels cannot be easily discretised or there are too many possible levels. Think of a 5×5 square graph, or even a 10×10, in place of the 3×3, for example?—?soon it can get rather unwieldy. That is possibly what led Nitin and Pranay to choose the delta graph.

Mirrored here.

So the wife has done a kind of sociological analysis of who offers seats to baby-carrying people on the London Metro. Based on the data points she’s collected over the last three months we’ve been in London, she concludes that people who are most willing to give up their seats are those who have been beneficiaries of similar actions in the past – basically a social capital kind of argument.

I don’t have such an overarching thesis on who gives up seats, but one major observation based on my collection of data points. Most of my train rides with Berry have been between Ealing Broadway, the station closest to where we live, and St. Paul’s in Central London, close to Berry’s nursery and Pinky’s office.

The Central Line, which I take for this journey, is typically crowded in both directions, since most of my trips are during peak office commute hours. However, my experience in terms of people offering me a seat (I’ve never asked for it) has been very different in terms of where I’ve boarded.

What I’ve found is that people have been far more willing to give up their seats when I’ve boarded at St. Paul’s (or anywhere else in the city), than at Ealing. In fact, in about 30-40 train rides originating in Ealing when I’ve been carrying Berry, I only recall one occasion when someone has offered me their seat. On the other hand, it’s rare for me to board at St Paul’s and NOT have someone offer me their seat.

I have one major hypothesis on why it happens – on what goes into getting a seat, and a sense of entitlement. Essentially, Ealing Broadway is a terminus for the tube, and thus an originating station for journeys into town. And I’ve seen people work hard in order to get a seat.

So you have people who leave multiple trains in order to find one where they can find a seat. They get to the station well in advance of a train leaving so that they can get a place to sit. And having invested so much effort in occupying the seat, they feel entitled to the seat, and don’t want to give it up so easily.

On the other hand, St. Paul’s is right in the middle of the Central Line, and people who have seats when the train arrives there are typically those who got them somewhere along the way. Now, while there exist strategies to figure out where a seat might fall empty, and grabbing it, finding a seat in a non-empty train after you’ve boarded is more a matter of luck.

So if you think you got your seat by sheer luck, you feel less entitled to it, and are more than happy to give it up for someone who might have need it more!

Feel free to draw your own analogies!

## Coin change problem with change – Dijkstra’s Algorithm

The coin change problem is a well studied problem in Computer Science, and is a popular example given for teaching students Dynamic Programming. The problem is simple – given an amount and a set of coins, what is the minimum number of coins that can be used to pay that amount?

So, for example, if we have coins for 1,2,5,10,20,50,100 (like we do now in India), the easiest way to pay Rs. 11 is by using two coins – 10 and 1. If you have to pay Rs. 16, you can break it up as 10+5+1 and pay it using three coins.

The problem with the traditional formulation of the coin change problem is that it doesn’t involve “change” – the payer is not allowed to take back coins from the payee. So, for example, if you’ve to pay Rs. 99, you need to use 6 coins (50+20+20+5+2+2). On the other hand, if change is allowed, Rs. 99 can be paid using just 2 coins – pay Rs. 100 and get back Re. 1.

So how do you determine the way to pay using fewest coins when change is allowed? In other words, what happens to the coin change problems when negative coins can be used? (Paying 100 and getting back 1 is the same as paying 100 and (-1) ) .

Unfortunately, dynamic programming doesn’t work in this case, since we cannot process in a linear order. For example, the optimal way to pay 9 rupees when negatives are allowed is to break it up as (+10,-1), and calculating from 0 onwards (as we do in the DP) is not efficient.

For this reason, I’ve used an implementation of Dijkstra’s algorithm to determine the minimum number of coins to be used to pay any amount when cash back is allowed. Each amount is a node in the graph, with an edge between two amounts if the difference in amounts can be paid using a single coin. So there is an edge between 1 and 11 because the difference (10) can be paid using a single coin. Since cash back is allowed, the graph need not be directed.

So all we need to do to determine the way to pay each amount most optimally is to run Dijkstra’s algorithm starting from 0. The breadth first search has complexity \$latex O(M^2 n)\$ where $M$ is the maximum amount we want to pay, while $n$ is the number of coins.

I’ve implemented this algorithm using R, and the code can be found here. I’ve also used the algorithm to compute the number of coins to be used to pay all numbers between 1 and 10000 under different scenarios, and the results of that can be found here.

You can feel free to use this algorithm or code or results in any of your work, but make sure you provide appropriate credit!

PS: I’ve used “coin” here in a generic sense, in that it can mean “note” as well.

## Moving towards a cashless economy

In any transaction, the process of payment is a pain. It is a necessary step, of course, in that payment is what completes the transaction, but the process of payment is not something that adds any value to the transaction. If money could be magically be transferred from buyer to seller at the end of a transaction, both transacting parties would be happy.

In this context, any chosen method of payment, be it cash or credit card or cheque or bank transfer, involves some degree of pain for the transacting parties.

In case of cash, there’s the problem of counting out the money, cross checking it, finding exact change, being able to handle currency without the fear of being robbed, and making sure the currency is not counterfeit. Cheques have a credit risk, since they can bounce, not to speak of the time it takes to write one, and the time it takes for the money to get transferred.

Bank transfer requires parties to have bank accounts, and the ability of transacting parties to tell each other their account details. Credit cards have the most explicit pain of transaction – the transaction fees the merchants need to pay the acquiring bank – apart from the time and pain of swiping, entering the PIN, etc.

The reason India has so far been a primarily cash economy is that the pain of transacting through cash has been far lower than the pain through other means. Apart from the pains mentioned above, cash also has the advantage of anonymity, speed of transaction and ability to hide from the tax authorities.

So if we have to turn India closer to a cashless economy, as the current union government plans to do, we need to either increase the pain of transacting in cash, or reduce the pain of transacting through another means. The Unified Payments Interface (UPI), which was launched with much fanfare earlier this year but has spectacularly failed to take off, seeks to reduce pain of cashless transactions. The government’s efforts to get people open bank accounts through the Pradhan Mantri Jan Dhan Yojana (PMJDY) also seeks to reduce pain in non-cash transactions.

The government’s recent effort to withdraw legal tender of Rs. 500 and Rs. 1000 notes, on the other hand, seeks to increase the cost of transacting in cash – 85% of the current stock of cash in India needs to get banked in the next 50 days. This, however, is not a repeatable exercise – it can simply remove confidence in the rupee and drive people to alternate (formal or informal) currencies.

So what can be done to move India to a more cashless economy? The problem with small change has already played its part, with most auto rickshaw and taxi drivers in Mumbai supposedly willing to accept payment in digital wallets such as PayTM. If the stock for the new Rs. 2000 and Rs. 500 notes released is low, and most people have to transact using Rs. 100 notes, that will again increase the pain of transacting in cash, since the cost of handling cash might go up.

Perversely, if crime and robberies increase, that will again make people wary of handling cash. In fact, as this excellent piece in the New Yorker claims, the reason Sweden has moved largely cashless is that people got scared of handling cash after a series of cash robberies a few years ago. The cost of higher crime, however, means this is not a desirable way to go cashless.

It’s been barely three days since the new Rs. 500 and Rs. 2000 notes have been released, and there are already reports of counterfeiting in these notes. Given the framework I’ve proposed in this blogpost, it is not inconceivable that these rumours have been planted – when people become more wary of receiving large currency (thanks to the fear of counterfeiting), they want to reduce the use of such physical currency.

It’s perverse, I know, but nothing can be ruled out! As I’ve repeatedly pointed out, increased use of cash has a fiscal cost (in terms of printing and maintaining currency, apart from people not paying taxes), so the government has an incentive to stamp it out.

## When is a war a war?

War is an inherently political instrument used to achieve a political objective, so a credible political adversary is necessary for war to be war.

As the US Presidential election race hots up (or gets more one-sided, depending upon your interpretation), people continue to refer to former President George W Bush leading the US into two “wars” in Iraq and Afghanistan. Thinking about it, I’m not sure the two can actually be classified as wars.

To use a chess analogy, real wars seldom end in checkmate – they most often end in resignation, or an agreed draw. War is an instrument that is used to achieve a political objective, to get the other party to do what you want them to do.

And so war ends when one side has established such an utter dominance over the other that the counterparty decides that to resign, or “surrender” is superior to continuing fighting the war.

For this to happen, however, the counterparty needs to have a political leadership that is able and willing to take a decision, following which the war actually stops. In the absence of such a political leadership, the war will continue indefinitely until “checkmate”, and assuming that the losing side’s force “decays exponentially”, it can take a really long time for it to actually get over.

So based on this definition that war is a political instrument used to achieve a political objective, I’m not sure what happened in Iraq and Afghanistan can actually be classified as “war”.

The “government” of the day in Afghanistan (Taliban), for example, would have never come to the negotiating table with the US, so short of complete annihilation, there was no other “objective” that the US could achieve there.

Iraq, on the other hand, possessed credible political leadership (Saddam Hussein) when the US invaded, but by actually killing him, the US denied themselves the chance of a “real victory” in terms of a negotiated settlement. A game of chess might end when the king is mated (remember that the king never “dies”, only trapped), but in a situation such as Iraq, the battle will rage until each member of the opposing force is taken out.

And so fighting continues to this day, over a decade since it started, with no hope of it ending in the near future. Real wars never go on indefinitely.

## Water, IPL and the ease of doing business

The latest controversy surrounding the just-about-to-start ninth edition of the IPL (a court case challenging its staging in Maharashtra while farmers are dying in Vidarbha) is a clear illustration of why the ease of doing business in India doesn’t look like it will improve.

At the bottom of it, the IPL is a business, with the IPL and teams having invested heavily in team building and marketing and infrastructure. They have made these investments so far hoping to recover them through the tournament, by way of television rights, gate receipts, etc.

Now if the courts were to suddenly decide that the IPL should not take place in Maharashtra, it will mean that alternate arrangements will have to be found in terms of venues and logistics, teams which have prepared grounds in Nagpur, Pune and Mumbai will have to recalibrate strategies, and most importantly, the people of these cities who have bought tickets (they clearly believe that the value of these tickets is higher than the price) will also end up losing.

Farmers dying for lack of water is a real, and emotive, issue. Yet, to go after a high-profile event such as the IPL while not taking other simpler measures to curb fresh water wastage is a knee-jerk reaction which will at best have optical effects, while curbing the ability of businesspersons to conduct legitimate business.

There has been much talk about how policy measures such as the retrospective taxation on Vodafone or Cairn have been detrimental to investor sentiment and curbed fresh investments in India. This court case against the IPL days before it began is no different, and a strong signal that India’s policy uncertainty is not going away quickly.

Unless the political class manages to fix this, and provide businesses more stable environments to operate in, it is unlikely we’ll see significant increase in investments into India.

## The land above the tracks

Almost exactly a year ago, we were on our way from Vienna to Budapest and ended up reading the Vienna Hauptbahnhof Railway Station some three hours early. It had been snowing that morning in Vienna (it was April 1st, and supposed to be spring), and not wanting to go anywhere in that shit weather, we simply got to the railway station. It didn’t help matters that our train (which was coming from Munich) had been delayed by a further hour.

We were not short of options for entertainment in at the railway station, though. In fact, it hardly looked like a railway station, and looked more like a mall – for there were no tracks to be seen anywhere. We spent the four hour wait shopping at the mall (it was just before Easter, so there were some good deals) and having breakfast and lunch at what could be considered to be the mall food court. And when it was time for our train to arrive, we simply took one of the escalators that went down from the mall, which deposited us at our platform.

Each platform had its own escalator going down from the mall, which had been built on top of the railway tracks. It can be considered that the entire Vienna Hbf station was built on the “first floor”, making use of the land above the railway tracks. Land that would otherwise be wasted was being put to good use by building commercial space, which apart from generating revenues for the Austrian Railways, also made life significantly better for passengers such as us who happened to reach the station insanely early.

This is a possible source of revenues that Indian Railways would do well to consider, especially in large cities. The Railways sit on large swathes of land above and around the rail tracks, especially at stations (where such tracks diverge). Currently, the quality of experience in Indian railway stations is rather poor. If a swanky mall (and maybe other commercial space) were to come up above the tracks, it could completely transform the railway experience.

There will be considerable investment required, of course, but given the quality of real estate on which most Indian railway stations sit, it is quite likely that private developers can be found who will be willing to invest in constructing these “railway station malls” in return for a share of subsequent rent realisation. There is serious possibility for a win-win here.

As the Vienna Hbf website puts it,

The BahnhofCity Wien Hauptbahnhof features 90 shops and restaurants occupying 20,000 m² of floor space. A fresh food market, textile shops, bakeries and cafés are designed to make BahnhofCity a meeting place. During the week, it will be opened until 21:00 and many shops will also open on Sundays. Excellent public transport links and 600 parking spaces complement the offer.

An idea well worth considering for the Indian Railway Ministry.