Maths For Lay Dutching To A Fixed Liability

This evening I 'Googled' for the maths behind lay dutching to a fixed max liability and found loads of links to on-line dutching calculators and little else. There is of course lots of trading/betting software out there that also has dutching calculators, but as I needed the maths for a bot I'm developing, I wound up working it out for myself.

Requirement: Calculate the individual stakes required based on a fixed overall maximum liability.

Looking at the correct score market of the Arsenal v AC Milan match to be held tomorrow night (6th Mar 2012) we see the lay odds for the 0-1, 1-1, 2-1, 3-0 and 3-1 scores are as listed in the table below. Note, those scorelines have been picked at random for illustration purposes and do not indicate any thoughts I may have on the game.