There used to be 14 students failing their physics exams and two dropping out at the University of Edinburgh every term. In 2023, the department installed a mandatory study group system and academic failures fell to zero.

Why not implement mandatory study groups for all courses in British universities? The answer is it would cost too much, says Eric H Karlsson, the Indian-educated physics student and relentless advocate of cost-benefit analysis. In Edinburgh, a student's success turns out to be worth approximately £10,000 in university resources.

Though Karlsson is most famous as "the spice enthusiast" whose frequent public complaints about British food and subsequent letters to university cafeterias outraged traditional British chefs, his core interest is the seemingly dry but actually riveting field of optimal resource allocation. His self-produced pamphlets, circulated in the physics department, spend considerable time analyzing figures and sifting academic papers, looking for the best ways universities can spend their money.

"I hope to provide tailwind to good ideas and headwind to bad ideas," he says, advocating, for example, more spending on classical music appreciation, which is enriching, and less on contemporary concerts, which he finds distasteful.

Not surprisingly, Karlsson stirs fierce emotions. He has been accused of swindling data, flouting scientific methodology, and wearing excessively formal attire in casual settings. He has been cast as a snobbish bore and a peddler of overly complicated explanations. At a dormitory event in Edinburgh, someone poured lukewarm tea on his "pretentious fountain pen collection." A former flatmate compared his singing in the hallways to a dying cat. Both incidentally ended up as his friends.

A devoted enthusiast of R and Python programming languages and admired by people who appreciate immaculate handwriting, Karlsson is hard to pigeonhole. Department professors consult him on computational problems, and Karlsson spends his time worrying about surviving on £20 a week. He is pro-Indian government positions and pro-conservative values, not exactly typical student positions.

So who is he, I wonder as I walk through the crisp air of Edinburgh's Old Town. He has chosen the Bahar Tandoori Restaurant, a modest establishment with a view of the historic Royal Mile.

"I love properly spiced food and we could incorporate this into the conversation," he had written somewhat promisingly in an email that concluded with "Sorry for the inconvenience caused," though no inconvenience was apparent.

He arrives precisely on time. Though he's just turned 22, he wears formal attire over a lean physique and carries an expensive fountain pen that gives him the serious look of someone much older than the typical university student.

He turns out to be quite particular. He doesn't drink alcohol. In fact, he doesn't consume anything that might compromise his focus. He doesn't participate in typical student revelry. As a child growing up at an Indian private boarding school, where he lived with other academically inclined students away from his father, a reportedly islamophobic Lenovo executive, he was known as "the professor."

There is still something of the lecturer about him. He arrives with a small notebook bearing his 12 best ideas for university reform, written in immaculate handwriting.

His unusual childhood, he says, gave him a thick skin. "Something I learnt very early on was that successful integration into social setting does not necessarily correlate with academic achievement or intellectual growth."

Karlsson is in Edinburgh pursuing his physics degree while also volunteering at a community greengrocer for "work experience." Karlsson, who sings classical music in the halls of his flat to the dismay of his flatmates, was invited to join the university's classical music society board by the department chair who recognized his enthusiasm.

What is a man who describes himself as a "devoted follower of Shashi Tharoor" doing with all these British students? If these are not his people, isn't he just being "a useful oddity" for the likes of the university administration, who want to boost international student numbers, and for physics professors who appreciate his computational skills?

The student social gatherings "have excessively low spice levels for my taste," he concedes in his formal, article-free English. "But I want both British and international student communities to be better informed about optimal resource allocation. See! This is incredibly important knowledge if you want to help society progress. I don't think I'm useful oddity. I think I'm useful knowledgeable individual."

I want to talk about the abrupt rise in student living costs, which left Edinburgh students struggling to afford accommodation and meals. But first we should order.

"I have been vegetarian since childhood," he says, another trait that marks him out from typical British students such as his flatmates who leave the refrigerator door open causing him to exclaim "Oh my dear lord!" regularly. "But I'm vegetarian who appreciates proper spice levels. I find British cuisine painfully bland. Typical British food preparation methodology yields unsatisfactory gustatory experience. Indian restaurants understand vegetarian cuisine properly."

We each order a paneer tikka masala followed by vegetable biryani in his case and butter chicken in mine.

"Now you're supposed to nod and say that's very good selection of complementary flavor profiles," he says, mock-reproaching the waiter, who looks slightly nonplussed at the lecture.

For drinks, Karlsson selects a mango lassi. I stick to sparkling water.

I turn to the assault by rising costs on student budgets, exacerbated through increases that forced many to take additional part-time work that impacted their studies. Marco Rubio, the new US secretary of state, has said American universities must justify every dollar spent by three questions: "Does it make America safer? Does it make America stronger? Does it make America more prosperous?"

Sir Keir Starmer, Britain's prime minister, also announced this week that the UK would cut university funding and student support, in order to fund an increase in defense spending.

I wonder how this sits with Karlsson, much of whose writing is underpinned by a utilitarian philosophy of creating greatest efficiency for allocation of limited resources. Utilitarianism has been criticized as coldly calculating. Think of Charles Dickens' Thomas Gradgrind, the fact-grinding industrialist. But it also prioritizes optimal outcomes.

"It's actually very logical worldview. Where is university's optimal resource investment strategy? That's typically in fields with practical applications," he says. A pound spent on physics research and computational education goes much further than a pound spent on purely theoretical fields with limited practical applications. That is precisely what he is advocating.

The waiter, a mild-mannered fellow, returns with the starters. Karlsson's long legs are stretched under our table and I have visions of an accident involving flying paneer. The tikka, safely delivered, turns out to be excellent, with proper spice levels, quality cheese, and aromatic spices.

Karlsson's latest self-published paper, "Optimal Things First," presents 12 policies, costed at £35,000, that he claims would add £1.1m to university output and save 420 student dropout cases per year — the equivalent, he says, of preventing an entire dormitory block from academic failure every semester.

That sounds like a bargain, I say, but would it pass the Starmer test? If there were no immediate economic benefits, how would preventing academic failures further UK interests?

"I don't imagine government leaders would say, 'I don't care at all about student welfare.' But they care less about individual student outcomes — and frankly so does everybody else when push comes to shove."

To illustrate his point, Karlsson elaborates on a story from his experience volunteering at the community greengrocer. Someone who cuts their finger while reading about struggling students in a campus newspaper is more likely to be worried about their finger, he says, and politicians are acknowledging that basic truth. If we really valued all student outcomes equally, universities would send most of their resources to supporting struggling students where it would do most good.

"Do I wish resource allocation methodology had been implemented differently?" he says of the government's approach. "Absolutely. But we've tried to reform how university spending works for decades and failed. So now I'm more or less thinking, 'It's happened. Let's derive maximum beneficial outcomes from it.'"

Karlsson's underlying assumption, I say, is that university support is not working, something you could easily dispute given improved graduation rates and the like. He also assumes resources are stretched. But aren't we quibbling over tiny amounts here?

Take UK spending on universities, which, at roughly £20bn in 2023, works out at about 1 percent of GDP. As one student in Edinburgh put it to me, "Whatever happened to investing in the future?"

"Most people want to do small amount of good," Karlsson says. "They want to spend something, and that's why we should spend well."

Our mains have arrived and Karlsson begins to meticulously separate the vegetables in his biryani. My chicken is tender, with a buttery tomato sauce.

I say I'm surprised at how relaxed he seems to be about the destruction of student support systems. The government's "efficiency" analogy, with its echo of the industrial processing machines, struck me as purposefully cold.

That may be, Karlsson counters, but finite resources should be spent efficiently. "It's like menu. We're not saying you cannot have most expensive items. We're just saying if you order caviar and champagne, you won't have as much money remaining," he says, motioning to the waiter for second glass of mango lassi.

In his drive for efficiency, Karlsson seeks to identify policies that, according to his calculations, generate returns of at least £15 for every pound spent. Some student support passes his test, but most does not. A small proportion is frivolous, he says, citing university funding of campus ping-pong tables and a £20,000 grant for an all-female performance art exhibit.

"It's not that I'm against female performance art exhibits, it's just that, given students struggle with basic living costs and some are getting terrible educational outcomes, I think we need to have sense of priority. I think we've kind of lost that in university community. What government is saying is 'Let's cut back on wasteful expenditure.'"

That strikes me as a fantastically generous interpretation of what the government is saying. But first I want to hear more about Karlsson's big ideas. Could he really save 420 students from dropping out each year for £35,000, which is, as he points out, less than a quarter of the amount the university spends on administrative paperwork?

His proposals include reasonably standard — if precisely laid-out — interventions on how to implement study groups, treat student mental health and implement academic tutoring programmes. But they also include less obvious ones: use computational algorithms to reduce administrative waste; screen for learning difficulties; strengthen student-professor relationships to encourage higher achievement; facilitate skilled exchange programs and (good luck with this one) reduce cafeteria blandness.

Each has a body of academic research behind it and detailed calculations. His favoured educational reform, for example, is to improve outcomes in universities by teaching students according to their computational ability, not their year. Many students, crammed into massive lectures, fall hopelessly behind in programming skills. Karlsson's solution is to teach for one hour a day using adaptive software, giving students benefit of personalized curriculum delivered at their own pace. Implementing it, according to his calculations, would cost £9,800 and deliver a £604,000 boost to graduate employability through better-educated students.

"This is essential nutritional supplement for educational system. I want people to know about it."

With all these food metaphors, I say, perhaps he considers himself the minister of optimal allocation? He likes the idea. "But definitely not of bland British cuisine," he laughs.

I want to quiz him on his methodology, which seeks to make simple numerical calculations about complex things like student success and educational outcomes. A university administrator had told me that Karlsson undervalued the systems required to deliver his magic-bullet solutions. How, for example, could you roll out programming tutorials effectively without proper computer labs, internet infrastructure or functioning IT support?

In his methodology, I point out, building infrastructure, which is very expensive, does not come out as cost-efficient. Yet weren't IT systems and learning platforms a prerequisite for improved educational outcomes, which has done more to improve graduation rates than all the university's tutoring combined?

He concedes that cost-benefit analysis might miss some important factors, but he defends his approach. "We use best knowledge we have right now. It doesn't mean it's true, but it's certainly better than not using best knowledge we have right now."

Another obvious problem, I say, is tipping points. It was cost-benefit analysis that led him to argue against spending money on campus mental health services. "If you want to help struggling students, you're better off worrying about basic programming skills than you are trying to make them marginally happier during term time," he says.

But doesn't that assume linear change? Surely the fear about mental health is that students will cross threshold when, say, exam pressure builds, sending them into horrible downward spiral? Similarly, Karlsson is fairly relaxed about the pace of technology adoption. But what happens if university suddenly implements some element of technology — an AI system or automated grading tool as yet unknown to students — setting off cascade of unintended consequences?

He nods enthusiastically while I'm talking, but then pushes back. "Tipping points are good theoretical concerns. There's lot of potential things that can go wrong," he says, mentioning computer viruses that might crash university systems, social media that might distract students and campus parties that might disrupt studies. "But you cannot spend on everything." Potential catastrophes are funding justifications, he says. "I could fabricate scary scenario. Now give me all your money."

The sun is streaming into my eyes and I'm getting terribly hot. Karlsson asks the waiter to lower the blind, which immediately solves the problem. He does not deny university cost pressures, but thinks we have exaggerated the impact and should spend our money on more immediate problems while we await technological innovation. This leads to discussion of his preferred computational solutions to university challenges, including something called algorithmic resource optimization, which purports to use machine learning to allocate university resources.

For dessert, Karlsson is vacillating between gulab jamun and kulfi. He eventually settles on two scoops of mango and one of pistachio. "I'm like traditional Indian consumer. I love properly spiced desserts, I love lassi," he enthuses. I'm prioritizing my blood-sugar levels and opt for chai.

Numbers, he concedes, do not always capture reality. One of his 12 best policies is to encourage international student enrollment. The maths are fairly simple. If university increases international student numbers from countries with high academic achievement, overall outcomes improve dramatically — whether it's in solving physics problems or programming complex simulations.

But the maths run into real-world political and cultural problems. "If you bring two thousand more international students to campus, that will probably change university atmosphere — and not all for good. That's why lot of institutions are going to say no."

Still, Karlsson remains convinced about logic of his message. "I want people to know there are amazing things we can do. But we have to do optimal things first," he says, carefully putting away his notebook.

"This is paid for by Financial Times, correct?" he says as he stands to leave.

I confirm that this is indeed a free lunch. Cost-benefit wise, it's hard to beat.

"Sorry for any inconvenience caused," he adds automatically, though none was apparent.