I recently obtained a cheap reprint of HG Wells'
Little Wars, since my old copy seems to have vanished. Regrettably, and rather shabbily, the reprint appears to be cheap partly because it omits all the diagrams and illustrations. Anyway - to get to the point - I was pleased to renew my acquaintance with a jolly old friend (and that's intended as "old and jolly" rather than "very old").
Wells has a very blunt approach to melees - if troops come into contact, they wipe each other out. Thus two equal-sized units will just eliminate each other, and if a unit of m men is involved in a melee with a smaller unit of strength n, the only survivors of this awfulness will be (m - n) men from the first unit.
Obviously it works, and it is quick, but it does seem a bit crude. I also had a quick squint in Peter Young's
Charge! - the melee procedure there is refined by the introduction of probability (dice) and limiting the number of rounds in each melee, but otherwise the line of descent is clear to see.

I dug out the Theorems of Frederick W Lanchester, just to check. If you are familiar with Lanchester then read no further, but FWL was an English engineer and mathematician, who died in 1946 (same year as Wells), and he is most famous as an automotive inventor. I wish to mention, in passing, that my Uncle Harold had a green Lanchester 10 saloon when I was a boy, and a big solid thing it was, too - the Lanchester marque was swallowed by the British Daimler company during the 1950s. More relevantly, in 1916 – 3 years after the publication of
Little Wars - Dr Lanchester produced a mathematical analysis of warfare, and the two best known elements of this are his
Linear Law (an abstraction of ancient-style warfare) and his
n-Square Law. If you look these up on the internet, you'll find so much diverse explanation that it is hard to believe that it all relates to the same ideas. In the interests of providing yet more redundant information on a subject which has already been hammered to death, I'll attempt to provide yet another lightweight view on Lanchester's Laws!
The Linear Law

Imagine two groups of warriors, armed only with (say) a club. One of them has m men, the other has n (a smaller number). Men can only fight one-against-one, so anyone who has no-one to fight presumably stands and watches, cheering (or placing bets?). Anyway, in this remarkably organised and chivalrous form of melee, they match off into n fighting pairs. Assume that each man has an even chance of winning his fight. On a given word or command, there is an almighty
thwack! and the casualties are removed. On average, we would expect each side to lose n/2 men. So the (m - n/2) survivors of the first group will now fight the n/2 survivors of the second group. Since n/2 is the smaller group, there will be n/2 fights, of which each side will lose n/4.
And so on. If you are keen on the theory of finite differences, you can solve this as the sum of a series. If not, you can put in some real numbers and do it on a spreadsheet.
If the first force is 1000 men and the second force is 500, and each man has an equal chance of winning each fight, then - on average - we find that we can expect the first force to wipe out the second, while themselves losing 500 men. If the forces were of equal strength, they would eliminate each other.
Step forward, Mr Wells [applause] - in this rather stilted form of combat your rule is exactly correct. It does rather gloss over what the unemployed warriors would be doing during each thwack, for example, and it also ignores the possibility that someone might decide this was a bad idea before reaching the point of actual annihilation. Otherwise, nice job.
The n-Square Law
Let's now consider a more modern form of warfare, in which all the troops on one side are able to kill any of the troops on the other side - perhaps they are all armed with long-range automatic weapons.
If, again, there are m one side and n on the other, and if each man in the first side has a killing rate (the number of enemy troops he can kill in 1 unit of time) equal to Km (this allows for his own effectiveness, the defensive capability of his opponents, and any other relevant contextual factors), and the other side has a killing rate of Kn, then the actual rates of loss will be proportional to the numbers of men

Now, the armies would be considered equally matched if they are wiping each other out (proportionally) at the same rate - i.e. would both be reduced to half strength at the same time, for example.
In this special case, we have m Km = n Kn at any instant; if we substitute in (1) & (2) and integrate, we get

This is Lanchester’s
n-Square Law – in words, the total fighting strengths of two forces are equal when their fighting effectiveness (killing rate), multiplied by the square of the numerical strength, is equal.
Thus a force which has half the numerical strength of the opposition would have to have four times its killing rate to be equally matched.
Let's look, again, at our 1000-man force attacking a 500-man one, with equal values of Kn & Km. Running it on a spreadsheet demonstrates that we should expect the 500 man force to be eliminated for a cost of 130-something casualties to the other side. This is very different from the HG Wells situation. It also demonstrates the importance of concentrating your armies, thus:
if two identical 1000-man forces engage, then Lanchester’s
n-Square Law has them eliminate each other. However, if one side divides (or is divided) into two 500-man forces, then the 1000-strong enemy force will eliminate the first 500 men and still have 870 or so troops left, which is more than enough to eliminate the second 500 men. Napoleon was right, even though he never met Dr Lanchester.
And that is quite enough of that.