US mathematician John Nash, who inspired the Oscar-winning film A Beautiful Mind, was killed in a car crash on Sunday.

Nash was famous for his work in game theory – a discipline that studies the mechanics of strategic decision making. It has applications in the real world from playing rock, paper, scissors to the Cold War nuclear face-off between the US and the former USSR.

He won his Nobel Prize in economics in 1994 for theorising the Nash Equilibrium, which describes a situation where, in a situation with multiple stakeholders, any one person’s optimum strategy does not depend on what the other stakeholders are doing. The most famous thought experiment which uses the Nash Equilibrium is the Prisoner's Dilemma, explained very simply in this video.

This situation where, no matter whether the Blue prisoner snitches or not, either way, it is logical for Red to snitch, is called the Nash Equilibrium.

Without maybe knowing it, we’ve all seen this thought experiment be performed in one of the biggest movies of recent times: The Dark Knight.

Remember that scene towards the end where there are two ferries, one with honest Gothamites and the other with convicts? And the Joker sets things up so that each ferry can blow the other up? Well, that’s basically Prisoner’s Dilemma with the punishment of a longer jail sentence, in the video above, being replaced, Nolan-style, with incineration as the Joker cackles in the background.

The fact that no one blows the other up in the Dark Knight shows that the Nash Equilibrium might be the most logical solution but it’s not always followed because, well, we’re human. We have morals, social bonding and other such nice emotions which prevents us from only thinking of maximising our personal gain.