In 8 May 2015, parliament will be hung again. For the first time since 1910, the electorate will almost certainly deny any party a majority for a second successive election. Until the end of last year, Labour could plausibly hope to achieve an overall victory. But Scotland – a word that produces exquisite grimaces when mentioned to shadow cabinet ministers – changed the game. The likely loss of half or more of its 40 Scottish MPs to the SNP means Labour needs to make net gains of 88 in England and Wales to win a majority: an unachievable feat.

The task for Labour or the Conservatives will be to reconstitute the asphyxiated parliament as a functioning organ of the body politic. While publicly insisting that they are remorselessly focused on achieving a majority, both sides are preparing for the likelihood that they will fall short. The Tories have been careful not to say anything that would jeopardise a second coalition with the Lib Dems, while also taking an unusually high interest in the political priorities of the Democratic Unionist Party. Labour has left open the possibility of a confidence and supply agreement with the SNP even as it faces an existential struggle against the party.

The most fruitful partnership could be one that has attracted little discussion in recent months: Labour and the Liberal Democrats. A new study by the Labour-affiliated Fabian Society and the liberal Centre­Forum, Common Ground, charts the large degree of policy crossover between the two parties, including a mansion tax, borrowing for infrastructure investment, a 2030 decarbonisation target, greater oversight of free schools and academies, an elected House of Lords, the reduction of the voting age to 16 and political funding reform, part of 100 measures in total. The report, both organisations emphasise, was not commissioned by the parties but is intended to serve as “a resource” for them. As such, it represents the closest document we have to the first draft of a Labour-Lib Dem coalition agreement.

Nick Clegg and his allies have long privately indicated their preference for a renewal of vows with the Conservatives. They fear, as one tells me, that a coalition with Labour would leave them as “the nasty party” (demanding greater austerity, rather than higher public spending), that it would threaten their Tory-facing southern seats and that the opposition’s “tribalists” would prove even more Machiavellian than their current partners. But the report is a reminder to the right of the party (which the Centre­Forum is close to) that, in policy terms, it has far more in common with Labour than the Conservatives. As it concludes, however: “It will be politics, rather than the policies of the two parties, that will decide whether a partnership is possible.”

Mindful that they may need to work together after the election, the two parties have maintained lines of communication. Ed Miliband’s chief of staff, Tim Livesey, and his Lib Dem equivalent, Jonny Oates, are among those who speak regularly. Over the parliament, the parties have combined forces to support press regulation, thwart the proposed constituency boundary changes and defeat the Tories’ EU Referendum Bill. One shadow cabinet minister says of a potential coalition: “My view is you do whatever’s required to make Ed Miliband prime minister.”

But the obstacles to a deal remain forbidding. Some in Labour, including shadow cabinet members, will not contemplate any agreement with the “yellow bastards”. For them, the Tories are enemies but the Lib Dems are something worse: traitors. Among those who subscribe to this view is Len McCluskey, the general secretary of Unite, Labour’s largest donor. He has publicly warned of a cut in funding and even of disaffiliation should Labour form a coalition with Clegg’s party.

For many, the defenestration of the Lib Dem leader is a prerequisite to any deal. But Labour could yet be spared the need to administer the death blow. The working assumption among most in Clegg’s party is that the Deputy Prime Minister, who has seemed increasingly demob happy in recent months, will depart after the election (assuming the voters of Sheffield Hallam don't oust him first). One senior Lib Dem MP told me: “Clegg will almost certainly go. The only scenario under which I can see him staying is another coalition with the Conservatives.” Even then, the scale of the Lib Dems’ losses may force a human sacrifice. Clegg’s replacement would almost certainly be Tim Farron, the party’s former president and the darling of the grass roots. But Farron has been notably cooler towards the possibility of another coalition with either party than other senior Lib Dems, leading some to conclude that he aspires to rebuild the party from opposition.

The complexion of the government that emerges from May’s election (minority, minority coalition, or majority coalition) will be dictated by the arithmetic. The salient question is no longer whether parliament will be hung but how hung it will be. Yet even before any votes are counted, Labour and the Lib Dems may need to co-operate tacitly. In the past fortnight, three shadow cabinet ministers have told me of their fear that a collapse in Clegg’s party’s vote could allow the Tories to win upwards of a dozen seats in which they currently lie in second place (of the Lib Dems’ 56 seats, the Conservatives were runners-up in 37 in 2010). Tactical voting, the means by which the centre left has historically sought to secure a "progressive" parliament, will matter more than ever. Whether Labour and the Lib Dems are capable of creating an informal pre-election coalition could determine whether they have the chance to form one afterwards.

The artificial majority provided by Clegg’s party has enabled the Tories to pass all of their major legislation and to govern uninterrupted for five years. If the numbers align on 8 May, Labour would be remiss not to learn from this example.