חי הנשמ ,ג קרפ ,תובא תכסמ 
,רמוא אמסח ןב רזעילא יבר 
.תוכלה יפוג ןה ןה ,הדנ יחתפו ןינק 
.המכחל תוארפרפ ,תואירטמגו תופוקת 
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 embellishments^{1} 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.
ב/אס ףד ,תומבי תכסמ ,ילבב דומלת

םינב ול שי כ"א אלא היברו הירפמ םדא לטבי אל 'ינתמ 
הבקנו רכז םירמוא ה"בו םירכז ינש םירמוא ש"ב 
.םארב הבקנו רכז {'ה תישארב} רמאנש 
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.
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. 
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.
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. 
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
BB  probability p^{2}. 
BG  probability p(1p). 
GB  probability p(1p). 
GGB  probability (1p)^{2}p. 
GGGB  probability (1p)^{3}p, etc. 
These calculations are summarized in the following graph:
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.
א הנשמ ,וט קרפ ,תבש תכסמ ,הנשמ

.ןינפסה רשקו ןילמגה רשק ,ןהילע ןיביחש םירשק ולא 
.ןרתה לע ביח אוה ךכ ,ןרושק לע ביח אוהש םשכו 
,רמוא ריאמ יבר 
.וילע ןיביח ןיא ,וידימ תחאב וריתהל לוכי אוהש רשק לכ 
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.
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 nonalternating knots that cannot be drawn this way, no matter how hard you try:
Nonalternating 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 nonalternating knots cannot be tied or untied on Shabbat, at least according to Rabbi Meir.
א/גצ ףד תובותכ תכסמ ,ילבב דומלת

,תמו םישנ שלש יושנ היהש ימ 'ינתמ םיתאמ וז לשו הנמ וז לש התבותכ .הושב ןיקלוח ,הנמ אלא םש ןיאו תואמ שלש וז לשו 
,םישמח תלטונ הנמ לש ,םיתאמ םש ויה .בהז לש השלש השלש תואמ שלש לשו םיתאמ לש 
לשו םישמח תלטונ הנמ לש ,תואמ שלש םש ויה .בהז לש השש תואמ שלש לשו הנמ םיתאמ 
.ןיקלוח ןה ךכ וריתוה וא ותחיפ סיכל וליטהש 'ג ןכו 
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 100zuz Ketubah gets 50, and the other two get 75 each. If the estate contains 300 zuz, the one with the 100zuz Ketubah gets 50, the one with the 200zuz Ketubah gets 100, and the one with the 300zuz 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 
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 100zuz 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 200zuz Ketubah writes to the one with the 100zuz Ketubah saying, I won't fight with you over the first 100 [so you can divide it equally with the one with the 300zuz 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 W2W3 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 d_{1}, d_{2}, ..., d_{n} against the estate E, and claims exceed assets (i.e., d_{1} + d_{2} + ... + d_{n} > E), then we search for a CGconsistent division of the assets, in the following sense. Suppose the payoffs to the creditors are x_{1}, x_{2}, ..., x_{n}. Then we require x_{1} + x_{2} + ... + x_{n} = E, and also for any two creditors i and j, the amount x_{i} + x_{j} paid out to the two of them should be divided according to the CG rule of אעיצמ אבב. However, it is not obvious that a CGconsistent 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 CGconsistent division of the assets, and it yields the payoff table given in תובותכ תכסמ. Furthermore, the CGconsistent 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 selfduality; that is, it apportions loss the same way it apportions gain.
Let's check that the cases in the Mishnah are indeed CGconsistent. 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 CGconsistent 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
Secondly, what is the meaning of the selfduality of the CGconsistent 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 CGconsistent 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 CGconsistent solution (100  50, 200  75, and 300  75). So the CGconsistent solution treats loss according to the same formula with which it treats gain; this is the meaning of selfduality.
What is the justification for selfduality 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.
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), 437441.
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.