What do the militant groups of Pakistan, the Irish Republican Army (IRA) and the Tamil Tigers have in common with the rash of murder/suicide US gunmen, including Roger Elliot, the young man who murdered half a dozen people in Isla Vista, and James Boulware, who launched a suicidal attack on a Dallas police station? Everywhere in the world, people can violently snap loose from the links that held them in place and do unthinkable things, and we call them insane. This is pure media shorthand; very rarely is there an actual or even postmortem diagnosis of any mental illness. It is commonly a nothing and nonsense phrase. For the most part, we call them madmen to protect ourselves. We imply that madness, like lightning, is a sort of unpredictable and inevitable — but thankfully — rare force of nature that strikes with deadly violence and then disappears as quickly as it came. We can then mourn the victims and move on. Because to stare into the abyss from whence they come is too horrible and hits too close to home; if they are not aberrations, if more monsters can be created at any time and leap at us from the shadows we cast, how would we ever sleep at night?There are genuine psychopaths everywhere but they are rare. But even those without inborn psychopathic tendencies can and do reach a point of no return where the threads that connect them to society and the wider world are cut by an effort of sheer rejection. Alienation, disenfranchisement, the perception that they have no stake in society; this lies at the root of brazen and suicidal violence. Being ties that must hold the world together, the bonds of the social contract turn out to be shockingly delicate. When they are severed, we behold the spectacle of what a person or a people become when they decide the fundamental agreements between citizen and society no longer apply. Almost every violent revolution, every modern death cult, every lone (disproportionately of US origin) gunman who wages a war against wider society with no concern for any life, including their own, begins with this internal act of separation. It is important to remember that, just like modern economics are concerned not with people’s needs but their wants, it is only the perception of separation from society that is needed. While it is not rare to find terrorists who are recruited because of their poverty and lack of education, with the bigger players it is far more often intangible concepts — injustice, inequality, persecution — that form the basis for this severing, this ultimate rejection of the status quo. It is not a daily struggle for survival. The aforementioned Roget Elliot wrote a lengthy manifesto and posted YouTube videos immediately before carrying out his deadly attacks. Despite being educated and having access not only to basic necessities but also to a largely luxurious life, he felt utterly rejected by society. Through the 100-plus pages of his manifesto, his inability to forge meaningful friendships and attract women — both things he clearly felt the world owed him but failed to deliver — filled him with hateful bile until he choked on it. Repeatedly, he writes that he does not want to do this, does not want to die, but the world had rejected him too many times and had denied him a pleasurable life while granting it to others he felt were less worthy than himself. It is a chilling but poignant insight into the minds of young school shooters. The FBI includes, in its threat assessment of possible school shooters, factors such as alienation at school, a closed social circle, unhealthy family dynamics, a feeling of otherness (including superiority) from other students and difficulty finding or accepting their role in the school’s social makeup. All of these factors indicate weak ties to society. It takes only a few other factors — a violent personality, access to weapons and negative influences — to create a true threat. James Boulware, the man who attacked the Dallas police department, felt his life was falling apart. He blamed the police for taking his child away but this was merely a pretext; he found nothing worthwhile remaining in the social contract, and severed it. Easy access to weapons did the rest. Miraculously, in this incident, only Boulware himself was killed. So, what do groups like the Taliban have in common with lone gunmen? In certain countries, the latter are recruits for the former: people who feel betrayed by the state and by society, who find indignity and inequality in the status quo, who feel that the world was formed without consideration for their place in it. Of course, there are others: the misguided few who truly believe they enjoy divine sanction and those so desperate for funds that they will commit any horror to save their families from ignoble starvation. However, a great many are inspired by their own alienation and discontent. How do the two differ? Lone gunmen are just that while terrorists typically find a group, a purpose, a community of their peers, financial and strategic support, all those things that they typically resented society for denying them. This newfound camaraderie is what makes the difference between a resentful gunman (lethal but alone) and an era-defining genre of terrorism. There are no simple equations for terrorism; if there were, they would long have been calculated. Ultimately, we may never be able to prevent men like Roger Elliot and James Boulware from their grisly decisions. Their perceived alienation and sense of persecution were largely self-inflicted and festered, predicated on their own actions. But there are grievances that are far more legitimate, particularly in our nation: access to justice without knowing the judge, the fair fruits of their labour, the hope that their own children can be more, tomorrow, than the servants of rich children today, good education as a solemn promise, not an unimaginable luxury, and not having to choose between food on the table and caring for their sick and their elderly. Perhaps, most importantly, we should make an unflinching vow that we will never again send in our men as nameless soldiers in secret wars only to abandon them, weapons still in hand, as they grow inconvenient. There is no greater alienation than to have been a sword for the state and then cast aside. In short, a social contract that has a dignified place for all, a society that holds its own basic end of the bargain.It will take a great many things to end terrorism, a great many parts of the equation. Nobody knows them all. However, I am confident that we cannot stop the flow of recruits without addressing the ways in which our society so badly fails so many. These daily injustices are open wounds in the social contract and we cannot rid ourselves of infection before we heal them. The writer is a freelance columnist based in Lahore