Some Examples of
Mathematical Analysis
Applied to Talmud Study

Jonathan Rosenberg

As a motto for this article, I would like to invoke the last הנשמ from the 3rd Chapter of תובא תכסמ:

חי הנשמ ,ג קרפ ,תובא תכסמ

,רמוא אמסח ןב רזעילא יבר
.תוכלה יפוג ןה ןה ,הדנ יחתפו ןינק
.המכחל תוארפרפ ,תואירטמגו תופוקת

One can translate this roughly as follows:

Mishnah (Avot, Chapter 3, Mishnah 18): Rabbi Eliezer the son of Chisma says: ןינק and הדנ, while difficult tractates involving complicated quantitative issues, are an integral part of the הכלה. Astronomy and geometry are the embellishments1 of wisdom.

Thus this הנשמ speaks both of the value of mathematics in and of itself, and of the value of applying mathematical analysis to Talmud study. I certainly don't want to claim that the latter should be the normal way to study Talmud, as in fact it only applies to a few isolated תויגוס. But if we are to take the idea of עדמו הרות seriously, then we should entertain the idea that mathematics, even serious mathematics, might sometimes have something useful to say about Talmud study. So I would like to consider three examples.

Example 1: Probability and Family Planning

ב/אס ףד ,תומבי תכסמ ,ילבב דומלת

םינב ול שי כ"א אלא היברו הירפמ םדא לטבי אל 'ינתמ
הבקנו רכז םירמוא ה"בו םירכז ינש םירמוא ש"ב
.םארב הבקנו רכז {'ה תישארב} רמאנש

Mishnah (Yevamot, Chapter 6, Mishnah 7): A man should not abstain from having children unless he already has children. How many [are needed to fulfill one's obligation]? Beit Shammai say two males and Beit Hillel say a male and a female, as it is said: "He created them male and female."

Let's see what the consequences of this Mishnah are. Suppose a couple starts to have children and agrees they will continue until they have fulfilled their obligation of היברו הירפ. What are the probabilities of the various family sizes at the time they complete their obligation? Let's assume the chance of a boy each time is 1/2, and that the sexes of the children are independent events.

Possible sequences of children according to ה"ב (in the הנשמ):

First we assume they follow Beit Hillel. Note that whatever the sex of the first child, the couple (according to ה"ב) just continue till they get a child of the opposite sex. So the possibilities are:
BG -- probability (1/2)(1/2)=1/4.
GB -- probability (1/2)(1/2)=1/4.
BBG -- probability (1/2)(1/2)(1/2)=1/8.
GGB -- probability (1/2)(1/2)(1/2)=1/8.
BBBG -- probability (1/2)(1/2)(1/2)(1/2)=1/16.
GGGB -- probability (1/2)(1/2)(1/2)(1/2)=1/16, etc.
Thus if X is the number of children, P(X=2)=1/4+1/4=1/2, P(X=3)=1/8+1/8=1/4, etc.

Now an important concept in probability theory is that of expected value, or average value, where we weight events by their probabilities. So the expected number of children is the sum of various possible numbers of children, each weighted by the corresponding probability, i.e.,

E(X)=2(1/2) + 3(1/4) + 4(1/8) + ... = 3. Note that as this model treats girls and boys completely equally, and both are equally likely, the expected number of girls per family is 3/2 and the expected number of boys per family is 3/2.

Possible sequences of children according to ש"ב (in the הנשמ):

Next suppose the couple follow Beit Shammai. This time the couple must continue until they have two boys, regardless of the number of girls. So the possible sequences are:
BB -- probability (1/2)(1/2)=1/4.
GBB -- probability (1/2)(1/2)(1/2)=1/8.
BGB -- probability (1/2)(1/2)(1/2)=1/8.
GGBB -- probability (1/2)(1/2)(1/2)(1/2)=1/16.
GBGB -- probability (1/2)(1/2)(1/2)(1/2)=1/16.
BGGB -- probability (1/2)(1/2)(1/2)(1/2)=1/16, etc.
Thus if X is the number of children, P(X=2)=1/4, P(X=3)=1/8+1/8=1/4, P(X=4)=1/16+1/16+1/16=3/16, etc.

So expected number of children is the sum of various possible numbers of children, each weighted by the corresponding probability, i.e.,

E(X)=2(1/4) + 3(2/8) + 4(3/16) + ... = 4. Note that since the couple always ends up with two boys, the expected number of boys is 2 and the expected number of girls is E(X) - 2 = 2. An interesting consequence is that the "misogynist" opinion of ש"ב is the one that results in the greatest number of girls: an average of two per family, compared with an average of one and a half per family for ה"ב.

Now let's take a look at some of the Gemara on our Mishnah:

א/בס ףד ,תומבי תכסמ ,ילבב דומלת

תובקנ יתשו םירכז ינש םירמוא ש"ב רמוא ןתנ יבר אינת
ש"בד אבילא ןתנ יברד ט"מ אנוה ר"א הבקנו רכז א"הבו
לבה תא ויחא תא תדלל ףסותו {'ד תישארב} ביתכד
ותוחאו ןיק ותוחאו לבה
רחא ערז םיהלא יל תש יכ {'ד תישארב} ביתכו
ןיק וגרה יכ לבה תחת
.תידומ אקד אוה ייודוא ןנברו
רכז וא א"הבו הבקנו רכז םירמוא ש"ב רמוא ןתנ 'ר ךדיא אינת
{המ והיעשי} 'אנש ה"בד אבילא ןתנ 'רד ט"מ אבר רמא הבקנ וא
.תבש הל דבע אהו הרצי תבשל הארב והת אל

Gemara (Yevamot 62a): It was taught (in a אתירב): ןתנ 'ר says: Beit Shammai say two males and two females and Beit Hillel say a male and a female. אנוה 'ר says: what's the reasoning of ןתנ 'ר according to Beit Shammai? It's because it is written "she continued to give birth to his brother Abel": Abel and his sister, Cain and his sister … It was taught (in another אתירב): ןתנ 'ר says: Beit Shammai say a male and a female and Beit Hillel say either a male or a female. אבר says: what's the reasoning of ןתנ 'ר according to Beit Hillel? It's because it is written "He didn't create it [the world] for naught [to remain barren]" ...

Note that there are two different versions of the Beit Hillel -- Beit Shammai controversy quoted here in the name of ןתנ 'ר, and neither one agrees with the version in the Mishnah. But now that we've done our calculation, there is an unexpected payoff -- we can reconcile the two statements of ןתנ 'ר, that seem to contradict both each other and the הנשמ, with the formulation in the הנשמ. One can argue that the first אתירב is talking about expected value, so that is why ןתנ 'ר says Beit Shammai say "two boys and two girls", and why he says Beit Hillel say "a boy and a girl". (It's natural to round down from the actual expected values of 1.5 and 1.5, since an individual family can't have fractional children!). Furthermore, the prooftext quoted in support of Beit Shammai is consistent with our interpretation, since the sisters of Cain and Abel are not mentioned explicitly in Genesis; they just "come along for the ride" since, on average, waiting for a second boy entails having two girls also. On the other hand, since the whole purpose of having children is perpetuation of the species, which requires a boy and girl in the next generation to replace their parents, perhaps it's taken for granted that everyone will have at least a boy and a girl, and the second אתירב is talking about the excess of the expected value over the "norm" of one girl, one boy. This agrees precisely with ןתנ 'ר saying that Beit Shammai say "a boy and a girl", and that Beit Hillel say "a boy or a girl".

Next let's examine the parallel discussion in the ימלשורי.

'ו הכלה ,ו קרפ ,תומבי תכסמ ,ימלשורי דומלת

.'וכ הייברו הייריפמ םדא לטבי אל
.רזעילאו םושרג השמב רמאנש ,םירכז ינש םירמוא יאמש תיב
,םלוע לש ותיירבמ הביקנו רכז םירמוא ללה תיב
.םארב הבקנו רכז רמאנש
,הבקנו רכז וליפא הכירצ ןכל ןוב יבר רמא
אתינתמ איה ןכ[ א]ל[ םא]ד
.ללה תיב ירמוחמו יאמש תיב ילוקמ

I will translate the last sentence, which is key: Rabbi Bon said, we have to assume that Beit Hillel meant "even a male and a female" [implying that two males would also be acceptable], for if not, our Mishnah would be a case where Beit Shammai are lenient and Beit Hillel are strict.2 In other words, Rabbi Bon is saying that we must interpret the Mishnah to mean that Beit Hillel agreed with Beit Shammai that two boys would fulfill the obligation of having children, but so would a boy a girl. Now that we know that, on average, ש"ב already seem stricter than ה"ב, this is puzzling. However, we can understand it as follows. Clearly in some families there seems to be a propensity toward boys or girls. (For instance, וניבא בקעי had thirteen children, all but one of them boys.) Perhaps ןוב יבר was from such a family himself. In a family that tends to produce only boys, waiting for a girl can take time. In fact, suppose that in a particular family, the probability of a boy is p and of a girl is 1 - p, where p is between 0 and 1. Redoing the calculations shows that according to the opinions in the הנשמ, expected family size E(X) according to ה"ב is

(p2 - p + 1)/(p - p2)
and according to ש"ב is 2/p. So the former is stricter than the latter as soon as
(p2 - p + 1)/(p - p2) > 2/p,
that is, p is at least 0.6180 (the "golden ratio"). (See Figure 1 below.) On the other hand, with ןוב יבר's emendation of the opinion of ה"ב, one has fulfilled one's obligation after a boy and a girl or two boys, whichever comes first. So according to this opinion, the possible sequences are:
BB -- probability p2.
BG -- probability p(1-p).
GB -- probability p(1-p).
GGB -- probability (1-p)2p.
GGGB -- probability (1-p)3p, etc.
Thus if X is the number of children, P(X=2)=p(2-p), P(X=3)=(1-p)2p, P(X=4)=(1-p)3p, etc., and E(X)=(p^2+1)/p. This is always at least 2, and tends to 2 as p goes to 1. It's also always less than 2/p, the expected value according to ש"ב, which makes this the אלוק opinion, as required.

These calculations are summarized in the following graph:


Figure 1. Expected number of children

Indeed, we see that Rabbi Bon's emendation of the opinion of Beit Hillel is always more lenient than either position in the Mishnah, as the dotted curve lies below the other two.

Of course, one might raise the question of what about a family with p much less than 1/3, i.e., with a propensity to produce only girls, such as the family of דחפלצ. In this case, all opinions appear to be strict, as the couple would just end up having girl after girl. Our איגוס doesn't address this situation, though there is plenty of evidence elsewhere in the Talmud that the םימכח understood the principle of statistical hypothesis testing: if a rare event happens repeatedly, one can assume this is not just the result of chance alone.3 So perhaps one could stop after having enough girls, invoking this principle. But that's the subject for another article.

Example 2: Laws of Shabbat and Knot Theory

According to the Mishnah, there are 39 categories of work prohibited on Shabbat. Of these, numbers 21 and 22 are רשוקה and ריתמה, tying and untying knots. Fortunately for us, this does not refer to all knots; tying our shoes is permitted! In Chapter 15 of תבש תכסמ, the Mishnah quantifies the rule as follows:

א הנשמ ,וט קרפ ,תבש תכסמ ,הנשמ

.ןינפסה רשקו ןילמגה רשק ,ןהילע ןיביחש םירשק ולא
.ןרתה לע ביח אוה ךכ ,ןרושק לע ביח אוהש םשכו
,רמוא ריאמ יבר
.וילע ןיביח ןיא ,וידימ תחאב וריתהל לוכי אוהש רשק לכ

Mishnah (Shabbat, Chapter 15, Mishnah 1): These are the knots for which one is liable [for tying and untying them on Shabbat]: the knot of the camel drivers and the knot of the sailors. And just as one is liable for tying them, one is liable for untying them. Rabbi Meir says: any knot that one can untie with just one hand, one is not liable for.

The Gemara (in the Talmud Bavli) goes on to explain what the "knot of the camel drivers and the knot of the sailors" are, but what are we to make of the rule of Rabbi Meir (admittedly, a minority opinion)? While I don't claim that what follows is necessarily what he originally had in mind, we can quantify his idea as follows.

There is a whole branch of mathematics, called knot theory, devoted to the classification of knots. The simplest knots, those that be drawn with no more than 7 crossings, are illustrated below in Figure 2. Note that a "mathematical knot" is a single continuous loop of string. Two such knots are to be regarded as identical if one can continuously deform one into the other, without breaking the string. To convert such an idealized knot to the sort of knot most people are familiar with (with two loose ends), simply cut it at one point.


Figure 2. The usual mathematical classification of knots with up to 7 crossings

Note that all of these are what are called alternating knots; you can draw them with the strand alternately crossing over and under, over and under. But starting with knots with 8 crossings, there are non-alternating knots that cannot be drawn this way, no matter how hard you try:


Figure 3. The three 8-crossing non-alternating knots

Non-alternating knots are perfect examples of knots that seem not to obey Rabbi Meir's rule. When one tries to untie them, there are times when the strand has to be pulled over two or more crossing strands, which is hard to do with only one hand. So perhaps non-alternating knots cannot be tied or untied on Shabbat, at least according to Rabbi Meir.

Example 3: Bankruptcy Law and Game Theory

The discussion in this example is taken from a brilliant article by Robert Aumann and Michael Maschler, "Game theoretic analysis of a bankruptcy problem from the Talmud," J. Economic Theory 36 (1985), 195-213. We start with a Mishnah in the 10th chapter of תובותכ תכסמ:

א/גצ ףד תובותכ תכסמ ,ילבב דומלת

,תמו םישנ שלש יושנ היהש ימ 'ינתמ
םיתאמ וז לשו הנמ וז לש התבותכ
.הושב ןיקלוח ,הנמ אלא םש ןיאו תואמ שלש וז לשו
,םישמח תלטונ הנמ לש ,םיתאמ םש ויה
.בהז לש השלש השלש תואמ שלש לשו םיתאמ לש
לשו םישמח תלטונ הנמ לש ,תואמ שלש םש ויה
.בהז לש השש תואמ שלש לשו הנמ םיתאמ
.ןיקלוח ןה ךכ וריתוה וא ותחיפ סיכל וליטהש 'ג ןכו

Mishnah (Ketubot, Chapter 10, Mishnah 3): If a man was married to three women and died,4 and if the amount of the Ketubah was 100 zuz for the first, 200 zuz for the second, and 300 zuz for the third, and if his estate only contains 100 zuz, they divide it equally. If the estate contains 200 zuz, the one with the 100-zuz Ketubah gets 50, and the other two get 75 each. If the estate contains 300 zuz, the one with the 100-zuz Ketubah gets 50, the one with the 200-zuz Ketubah gets 100, and the one with the 300-zuz Ketubah gets 150. And if three people [similarly] contributed to a fund, and it lost or gained, this is how they divide things.

Aumann and Maschler point out that this הנשמ in effect deals with a bankruptcy. There are 3 creditors (the 3 widows), let's call them W1, W2, and W3, owed 100, 200, and 300 units, respectively. The table of payoffs is as follows:

size of estate payoff to W1 payoff to W2 payoff to W3
100 33.33 33.33 33.33
200 50 75 75
300 50 100 150
The problem is to figure out what rule gives rise to these numbers. In fact, the first and second rows seem at first to be unfair, as the payoffs are not proportional to the claims on the estate. In the first case, the three divide the estate equally, and in the middle case, they divide it neither proportionally nor equally.

This Mishnah has puzzled scholars for centuries. For a clue as to the underlying rule, let's look at the Gemara:

.הל תיאד אוה אתליתו אתלתו ןיתלת ,םישמח תלטונ הנמ לש 'מג
יל ןיא םירבדו ןיד הנמ תלעבל םיתאמ תלעב תבתוכב לאומש רמא
שלש תואמ שלש לשו םיתאמ לש אפיס אמיא יכה יא הנמב ךמע
ןידמ הל הרמאד םושמ הנימ ךשפנ תקלס אה הל אמית בהז לש שלש
:יאשפנ יקילסד אוה םירבדו

Gemara (Ketubot 93a) The one with the 100-zuz Ketubah gets 50 [referring to the second case]? She ought to get 33.33 [the logic being that she only lays claim to the first 100 zuz of the estate, but the other widows also claim this same 100, so they ought to divide it equally]! Shmuel said: this is when the one with the 200-zuz Ketubah writes to the one with the 100-zuz Ketubah saying, I won't fight with you over the first 100 [so you can divide it equally with the one with the 300-zuz Ketubah]. Then why do the other two widows each get 75, when the second widow has conceded 100? Because she only conceded it as far as the first widow is concerned [and after 50 has been subtracted for the first widow, 150 is left, and they each claim at least 200, so they divide the 150 equally].

לאומש's answer provides a clue, though not the full story, and suggests we examine the following principle from אעיצמ אבב:

א הנשמ ,א קרפ ,אעיצמ אבב תכסמ ,הנשמ

היתאצמ ינא רמוא הז ,תילטב ןיזחוא םינש
,היתאצמ ינא רמוא הזו
,ילש הלכ רמוא הזו ילש הלכ רמוא הז
,היצחמ תוחפ הב ול ןיאש עבשי הז
.וקולחיו ,היצחמ תוחפ הב ול ןיאש עבשי הזו
,ילש היצח רמוא הזו ילש הלכ רמוא הז
.םיקלח השלשמ תוחפ הב ול ןיאש עבשי ,ילש הלכ רמואה
.עיברמ תוחפ הב ול ןיאש עבשי ,ילש היצח רמואהו
:עיבר לטונ הזו ,םיקלח השלש לטונ הז

א הנשמ ,א קרפ ,אעיצמ אבב אתפסות

סופתש םוקמ דע לטונ הז תילטב ןיזחוא םינש
סופתש םוקמ דע לטונ הזו
הב ןיספות םהינש ויהש ןמזב םירומא םירבד המב
.היארה וילע וריבחמ איצומה ןהמ דחא לש ודיב התיה םא לבא
,ילש שילש רמוא הזו ילש הלוכ רמוא הז
'המ תוחפ הב ול ןיאש עבשי ילש הלוכ רמואה
.תותשמ תוחפ הב ול ןיאש עבשי ילש שילש רמואהו םיקלח
:דבלב ונעוט יצח לע אלא עבשנ ןיא ,רבד לש וללכ

I will translate the relevant sections: Mishnah (Bava Metzia, Chapter 1, Mishnah 1): If two people are holding on to a garment, one saying "I found it" and the other saying "I found it", or one saying "it's all mine" and the other saying "it's all mine", the one should swear he owns at least a half, and the other should swear he owns at least a half, and they should divide it. If one says "it's all mine" and the other says "it's half mine", the one who says "it's all mine" should swear he owns at least a half, and the one who says "it's half mine" should swear he owns at least a quarter, and they should divide it in the ratio 3:1.

Tosefta (Bava Metzia, Chapter 1, Mishnah 1): ... If one says "it's all mine" and the other says "it's one third mine", the one who says "it's all mine" should swear he owns at least 5/6, and the one who says "it's one third mine" should swear he owns at least a sixth [and they divide it in the proportion 5:1].

In other words, if there are only two claimants to disputed property, we exclude from contention the part of the property conceded by one of the parties, and divide equally the part claimed by both parties. As you can see, this is also the basis for לאומש's explanation of the situation in the original Mishnah. While the last part of the discussion of לאומש's explanation is difficult (why should W2 make a concession to W1 but not to W3?), it makes a little more sense if we understand it in view of the parallel passage in the ימלשורי:

'ד הכלה ,'י קרפ ,תובותכ תכסמ ,ימלשורי דומלת

וז תא וז תושרמב רמא לאומש
.הנושארה םע ןודל היינשה תא תישילשה תשרהשכ
.ךל לזיאו ןישמח בס ,ךל תיא הנמ אל ,הל הרמא

לאומש said, this is when the third widow authorizes the second to deal with the first. Then she [the second] says to her [the first]: you are only claiming 100 [and the two of us are claiming the same 100], so take 50 and go.

In other words, W2 and W3 are really jointly negotiating with W1 according to the principle of division; in cases 2 and 3, W1 claims 100 and the W2-W3 coalition claims 500, but only 200 or 300 is available, so they split the first 100 evenly. Then W2 and W3 divide what's left according to the rule from אעיצמ אבב.

We can now explain the original איגוס as follows. If there are only two creditors, follow the contested garment (CG) principle from אעיצמ אבב. In other words, the contested part of the estate is divided equally, after each creditor renounces claim to any part of the estate exceeding his or her claim. When there are n creditors, with claims d1, d2, ..., dn against the estate E, and claims exceed assets (i.e., d1 + d2 + ... + dn > E), then we search for a CG-consistent division of the assets, in the following sense. Suppose the payoffs to the creditors are x1, x2, ..., xn. Then we require x1 + x2 + ... + xn = E, and also for any two creditors i and j, the amount xi + xj paid out to the two of them should be divided according to the CG rule of אעיצמ אבב. However, it is not obvious that a CG-consistent division exists, nor is it obvious that such a division must be unique. This is where the mathematical analysis of Aumann and Maschler comes in. They prove:

Theorem (Aumann and Maschler). There is one and only one such CG-consistent division of the assets, and it yields the payoff table given in תובותכ תכסמ. Furthermore, the CG-consistent division has the desirable property that a creditor with a larger claim receives at least as much as one with a smaller claim. It also has the property of self-duality; that is, it apportions loss the same way it apportions gain.

Let's check that the cases in the Mishnah are indeed CG-consistent. In the first case, for example, 66.66 is paid to W1 and W2 (taken together). Since each one claims more than this, the entire 66.66 is contested, so it's divided equally. The same argument applies to any other pair of widows. In the second case, 125 is paid to W1 and W2 (taken together). Since W1 only claims 100, she renounces 25, which immediately goes to W2, and the remaining 100 is divided, giving 50 to W1 (as לאומש explained) and 25+50=75 to W2. Similarly with all the other pairs. In the third case, 250 is paid to W2 and W3 (taken together). Since W2 only claims 200, she renounces 50, which immediately goes to W3, and the remaining 200 is divided, giving 100 to W2 and 50+100=150 to W3. Similarly with all the other pairs.

I just want to point out a few aspects of the CG-consistent solution. First of all, why not always divide the assets in proportion to the claims on the estate, as happened in the third case in the Mishnah, and is the usual arrangement in American law? The answer is, American (or English common) law is based on the protection of property, for which proportional division is the obvious solution, but Jewish law is based on different principles (such as

'ה יניעב בוטהו רשיה תישעו,
you shall do what is right and good). If each widow has to live off the estate and each claims at least as much as is there, who is to say that one is more deserving than any of the others? (That's why they divide the estate equally in the first case in the Mishnah.)

Secondly, what is the meaning of the self-duality of the CG-consistent solution? We can illustrate this with the second case in the original Mishnah. Total claims on the estate are 600 zuz, so it there is only 200 zuz available, the net loss (to the widows) is 400 zuz. Recall that they claim 100, 200, and 300 zuz, respectively. The CG-consistent division of an estate of 400 zuz (with claims of 100, 200, and 300) would be 50, 125, and 225. (For instance, 350 goes to W2 and W3 taken together. Since W3 only claims 300, she concedes 50 to W2, and since W2 only claims 200, she concedes 150 to W3. That leaves 350 - 50 - 150 = 150 in contention, which is divided equally, giving another 75 each to W2 and W3. Thus W2 gets 50 + 75 = 125 and W3 gets 150 + 75 =225.) But 50, 125, and 225 are exactly the losses to the 3 widows in the CG-consistent solution (100 - 50, 200 - 75, and 300 - 75). So the CG-consistent solution treats loss according to the same formula with which it treats gain; this is the meaning of self-duality.

What is the justification for self-duality in the Talmud? Aumann and Maschler give various explanations, but the simplest argument is the language at the end of the Mishnah itself: וריתוה וא ותחיפ, which suggests that gain and loss should be treated equally.

Conclusion

Some of the תויגוס we have discussed are quite complicated, and I don't claim to have given a complete analysis of them. There are also plenty of other places where mathematical analysis has been, or could be, applied to the study if Talmud. But I hope I've at least suggested what might be possible. רידאיו הרות לידגי; the more the better.

Footnotes

1. This is a gastronomic metaphor. A תרפרפ is a side-dish or dessert. While not the main part of the meal, it can make the difference between a humdrum meal and a memorable one.

2. It is a basic principle in the Talmud that Beit Hillel are always more lenient than Beit Shammai, except for a limited number of cases enumerated in Masechet Eduyot, of which this is not one.

3. See Nachum L. Rabinovitch, Studies in the history of probability and statistics. XXII. Probability in the Talmud, Biometrika 56 (1969), 437--441.

4. Rashi explains that he married all three on the same day, so none of them can claim precedence over the other two. Obviously, this is a very weird case. But it's standard practice in the Talmud to examine the law in extreme cases, so that the law for "normal" cases will be a corollary.