Over the past few weeks, the education secretary Damian Hinds has been trying to solve a complicated maths problem. He’s likely to come under public pressure from the independent School Teachers’ Review Body, which is expected to recommend a substantial pay rise of about 3 per cent.

If he refuses, Hinds will face an autumn of discontent from the teachers’ unions – particularly the National Education Union, which has sucked in the previously non-striking Association of Teachers and Lecturers and created one heck of a protest machine.

If he accepts, the money must be found. And this is where things get tricky. The Conservative government has said repeatedly that the vaults are empty: although they’ve cobbled together some cash for the NHS, we still don’t know where it’ll come from. If they start sprouting pounds for other public services, though, they’ll fall foul of their general election pledge that “there’s no magic money tree”. Hinds will have to solve the problem of teacher pay another way.

Back in the late 1990s, a similarly thorny problem faced a young Jon Coles, now chief executive of the United Learning academy trust. Coles was the civil servant tasked with implementing Labour’s pledge not to have infant class sizes exceed 30. A few years ago I interviewed Coles about how he managed it, and he said he thought of it as an algebra equation that simply had to be solvable. “It means that once you see the solution, you can’t unsee it.”

The reason salaries have to rise is because teachers’ pay is no longer sufficient to attract or keep as many as are needed. The situation is particularly pronounced in some subjects, and more acute for early career than later career teachers (who tend to take lower-paid jobs when leaving the profession, which suggests pay isn’t the main factor).

Maybe the solution lies in thinking a little harder about what teachers use their wages for

One solution would be to change the relationship between salary and take-home pay. Teachers’ pension contributions have rocketed. Student loan repayments take a chunk, and so does national insurance and tax. Unfortunately, pensions and tax are part of long-standing government commitments, and a scheme to halt student loan repayments for those working as teachers is already being trialled.

Maybe the solution lies in thinking a little harder about what teachers use their wages for. Teachers face the same killer budget items as most workers: housing, childcare, transport. But unlike many professionals, teachers can work almost anywhere. Schools are spread reasonably evenly around the country. If house prices are too high, teachers will simply move, and this is likely driving the terrifying drop in trainee primary teachers in London. The geographic spread also means teachers can keep transport costs down by working in a school nearby. If the prime minister hikes petrol prices in the autumn to pay for the NHS, this effect will kick in even harder.

However, the exciting thing for Hinds is that each of these variables is within the remit of government. Housing, childcare, transport: all of them affect how far teachers’ wages go, but all of them can be manipulated by ministers, too.

Back in 2015 when Nicky Morgan was education secretary, she suggested giving teachers salary advances for housing deposits, or one-off lump-sum bonuses instead of the “responsibility points” that come with permanent pay rises. She also suggested that all schools should offer wraparound childcare; if onsite creches were free for teachers, it would be a huge potential saving.

The other way around the problem, however, would be for Hinds to start cutting elsewhere – and this is the big cause for concern. Cash set aside for alternative provision and special needs within the Teaching and Learning Improvement Fund and free schools programme is hanging in the balance. If there’s one sector that can’t afford to lose out, it’s this one. The way high-needs funding has been gutted is outrageous, and a column for another day.

If there’s one thing that should give us hope, it’s that before Hinds became an MP, he spent over 20 years in hospitality consulting, with a particular focus on pricing and revenue management. He’s a man who understand a maths problem when he sees one. Let’s hope he finds an optimal solution.