Algorithmic game theory in the bible or the man who had 3 wives

(Strongly inspired by Gadi Aleksandrowicz)

I always find it fascinating how many math riddles you can find in the old writings like the Talmud and the bible.
Prof. Robert Aumann, an economy Nobel prize winner, published multiple papers on algorithmic game theory and their proof in the Talmud.
One of my favorite ones is the story of the man who had 3 wives.
Unfortunately, in Hebrew vowels are not always written, and the words “wives” and “debt collectors” are indistinguishable, but nevertheless
when the man dies the women (or the debt collectors) demand his inheritance: the first wife wants 300$, the second 200$ and the last one wants 100$.
From this point there is an interesting analysis of how the money should be divided, depending on how much money was left in the inheritance, and it is summarized in the following table:


When looking in the table it is extremely hard to understand the rule behind it.
The first line makes sense – you divide the inheritance equally. This comes to prevent the unfair situations that because one of the debt collectors wants a big share, the other debt collectors will get nothing. In other words, this solution tries to be as fair to as many women as possible.
The third solution also makes sense – you divide the inheritance by the ratio of the debts requested. But what surprised me the most was the second solution – why the one who wants the smallest debt gets so little while the others get an equal share? What the logic behind this?

So it turns out those rabbis knew a thing or two about game theory.
Game theory investigates many situations similar to this, or in general games that have collaboration between groups of players, and the ultimate question of “how is it fair to divide a profit in a way that everyone is happy”. There are many ways of defining fairness, e.g. Shapley value, nucleolus of a game,etc. And it turns out the rabbis actually got to the same solution as the nucleolus does in those games.
To explain the concept, I will present a simpler version of this game, which is presented in another Talmud riddle: two men are holding a prayer shawl – one says all of it is mine, the other says half of it is mine. The solution given in the Talmud is to divide it ¾ and ¼ . The intuition behind this is that only the part that was not agreed upon should be divided half. In this case, the one who demanded only half “agreed” that one half belongs to the other, therefore only half the shawl is in dispute and divided into two: ¼ goes to one and the ½+¼=¾ goes to the other.

“The man who was married to three women” is a generalization of the problem of the “two men are holding a prayer shawl”.
Let’s look on the second case, where the inheritance is 200$.
Let’s assume the woman who wants the 300$ decides to take the 75$ and leave. We are left with 125$ to divided between two women – one wants 100$ the other 200$. It means that the sum in dispute is only 100$, and the other 25$ the first woman agrees belong to the second woman.
Given the rule of “two men are holding a prayer shawl” we need to divide only the sum in dispute, i.e. the 100$, therefore the first woman gets 50$ and the other gets 50$ + the 25$ that were not in dispute, all in total of 75$. But here we handled only 2 players. So let’s assume now that the woman who wanted the 100$ took her 50$ and left. Now we have 150$ to divide. One wants 200$ and the other wants 300$, i.e. the entire sum is in dispute and should be divided half and half – 75$ to each. Therefore we have reached an equilibrium.

If you want to read the entire proof you can find it here:
Pretty amazing how mathematical some of those ancient laws are.