Thursday, December 4, 2014

Goats and Amicable Numbers

Goats and Amicable Numbers

In this week’s parasha, we find Yaakov preparing for his encounter with his twin brother Esav in several ways. Among other preparations, Yaakov sends him gifts consisting of various different kinds of animals. The Torah tells us (Bereishit 32:14–16) how many of each kind of animal Yaakov sent: 200 female goats and 20 male goats; 200 female sheep (ewes) and 20 male sheep (rams); 30 nursing camels with their young; 40 female cows and 10 bulls; 20 female donkeys and 10 male donkeys. What is the significance of these numbers?

In his ספר בעלי ברית אברם, R’ Avraham Azulai provides an explanation for the number of goats, which he attributes to R’ Nachshon Gaon of the 9th century. The total number of goats is 200 + 20 = 220. What significant property does the number 220 have?

Consider the factors of 220, that is, numbers that multiply together to give the product 220. We can factor the number 220 in the following ways:
220 = 1 × 220
220 = 2 × 110
220 = 4 × 55
220 = 5 × 44
220 = 10 × 22
220 = 11 × 20
Now consider only the “proper factors” of 220 – that is, all the factors in the above list, excluding the number 220 itself – and add them up:
1 + 2 + 4 + 5 + 10 + 11 + 20 + 22 + 44 + 55 + 110 = 284
So the proper factors of 220 add up to 284.
We now repeat the process, considering the factors of 284. We can factor the number 284 in the following ways:
284 = 1 × 284
284 = 2 × 142
284 = 4 × 71
Again, we consider only the proper factors of 284 – all the factors in the above list, excluding the number 284 itself – and add them up:
1 + 2 + 4 + 71 + 142 = 220
So the proper factors of 284 add up to 220. Does this number look familiar?

As we have just shown, the numbers 220 and 284 have the property that the proper factors of each number add up to the other number. A pair of numbers with this property is known as a pair of amicable numbers, or according to R’ Nachshon Gaon, מנין נאהב. Apparently it was known to the ancients that in order to gain the love of kings and princes, a person would give one of a pair of amicable numbers as a present, keeping the other number for himself. This is so that the factors of the number given add up to the number kept, and the factors of the number kept add up to the number given. So this is what Yaakov did. He sent Esav 220 goats, and kept 284 for himself.

Wait a minute: The Torah tells us that Yaakov gave Esav 220 goats, but where do we see in the Torah that he kept 284 for himself? Several pesukim later, as Yaakov gives instructions to the servants carrying the gifts, the Torah records (32:21), “כי־אמר אכפרה פניו במנחה ההולכת לפני” – “for he said: I will win him over with the gifts that are being sent ahead.” R’ Nachshon Gaon explains that this sentence contains a hint to the number 284, in the following way. The word אכפרה can be divided in two parts: אכ פרה. When the Torah uses the word אך, it is generally interpreted by the Rabbis to indicate exclusion or reduction. Calculating the numerical value of the second part of the word, פרה, we get: 80 (פ‎) + 200 (ר‎) + 5 (ה‎) = 285. Applying a reduction (indicated by אך) to the value 285 (given by פרה), we obtain a value of 284. This represents the number of goats that Yaakov kept for himself, according to R’ Nachshon Gaon.


Special thanks to Daniel Levenstein for bringing this insight to my attention.



References:

Leonard Eugene Dickson, History of the Theory of Numbers, Volume I: Divisibility and Primality, Carnegie Institute of Washington: Washington, 1919, p. 39, available at:
http://www.archive.org/stream/historyoftheoryo01dick#page/38/


ר' אברהם ב"ר מרדכי אזולאי, ספר בעלי ברית אברם, published 1873 but existed in manuscript for 300 years previously; pp. 48–49, available beginning at:
http://www.hebrewbooks.org/pdfpager.aspx?req=3997&pgnum=47


הנאהבים והנעימים - על רעות אצל מספרים, in Michlalah Jerusalem College's mathematical journal אלף אפס (ℵ₀):
http://alefefes.macam.ac.il/article/article.asp?n=15
(may not work in all browsers)
(Thanks to Yaaqov Loewinger for this link via Hebrew Wikipedia)

Thursday, October 23, 2014

The Weight of the Teiva

If I were such a prolific author that I would have a "magnum opus," I suppose this would be it. To this day, there are still people who identify me as "that guy who wrote the thing on the teiva."

It is told that one year, on a 12th Grade chumash test, Rav Moshe Heinemann שליט"א asked his students how to calculate the weight of the Noah's Ark. He did not ask for an answer, he simply asked how one would go about figuring it out. These are the calculations. And the answers:


Later on in the Parsha, (8:4), Rashi calculates based on the rate at which the waters of the flood receded, that the ark was submerged 11 amos in the water. A variety of commentaries deal with the calculation cited by Rashi and its validity, most notably the Ramban. The Sifsei Chachamim quotes the Nali"t as saying that the figure of 11 amos is only a minimum but it could have been more. There are a number of problems raised with different aspects of the calculation, some of which will be dealt with later on. Nevertheless, if the words of Rashi are taken at face value, they hold within them the key to unlocking this mystery. With the application of a single principle, the weight of the ark can be calculated. The law required for this calculation is Archimedes' Principle which states that the weight of a body floating in water is equal to the weight of the water it displaces. The ark's virtually cubic structure (according to Rashi) makes the measurement of water displacement easy to achieve. The ark was 300x50x30 amos3 in volume (Breishis 6:15). Therefore, the water displaced by the ark was 300x50x11 = 165,000 amos3

The next step, of course, is to convert the figure of cubic amos into conventional measures. Unfotunately, we are unsure as to the exact measure of the amah. There are three primary opinions amongst the contemporary poskim as to the actual length of the amah: Chazon Ish, R' Moshe Feinstein and GRA"CH Noeh. Because of this disagreement, they will differ on the measure of the ark's water displacement and therefore, the final figure for the weight of the ark will be different according to each. The following is a chart calculating the water displacement in cm3 based upon each of the opinions.
Metric to Imperial conversion table below
Chazon IshR' Moshe FeinsteinGRA"CH Noeh
Length of amah57.66 cm.53.98 cm.48 cm.
Volume of cubic amah
(length/100)3
0.192 m30.157 m30.111 m3
Calculation= 165000 x 0.192
≈ 31630
= 165000 x 0.157
≈ 25950
= 165000 x 0.111
≈ 18250
Water Displacement31630 m325950 m318250 m3


Now that we have determined the amount of water displaced by the ark, all we have to do is calculate how much that water weighed. Then by Archimedes' Principle we can assume that the ark weighed the same amount. This, however, is not necessarily so simple. The density of sea water is slightly more than that of regular water at approximately 1025 kg/m3. This figure usually remains about the same, without significant deviation, regardless of the exact temperature. The only drastic changes are observed when the water reaches extreme conditions such as freezing or boiling.

The first difficulty encountered is that during the initial 40 days of the flood, the waters were boiling hot (Rosh HaShanah 12a). This would change the density of the water substantially and consequently interfere with the calculation. However, it is important to note that Rashi's calculation is based on the rate at which the water receded after the 150 days which followed the 40 days of destruction. By that time, the waters had calmed down and most probably dropped to a more moderate temperature. Therefore, it can be assumed that the temperature of the water is a negligible factor in the calculation of the water density. However, what does seem problematic is that Rashi brings in the figure of 11 amos in 7:17 when the waters were at their highest intensity. It is almost certain that the density of the water at this point was much less than it was 190 days later. If the ark was calculated to have been submerged 11 amos by a calculation based on cooler waters, that figure should presumably be greater at the time of the actual flood.

The next issue of question in this calculation is the fact that the water was not necessarily pure sea water. It is suggested in Rashi (6:14) that the water contained sulfur. The presence of this sulfur and whatever other solvents in solution with the water could change the density of the water and affect the accuracy of the calculation greatly. This is only a problem, of course, if the words of Rashi are taken literally. The Sifsei Chachamim seem to suggest that what Rashi means is that the sulfur caused the heating of the water. Even if the interpretation is as originally perceived, it is possible that the ratio of solute to solvent was such that it would not have affected the density anyway. Therefore, for the purposes of this calculation I have chosen to ignore whatever effects the sulfur could have had on the water density and thus we are left with approximate figure of 1025 kg/m3. Based on this figure, these are the final calculations of the weight of the ark according to the three aforementioned opinions:


Chazon IshR' Moshe FeinsteinGRA"CH Noeh
31630 m3 25950 m3 18450 m3
x 1025 kg/m3
32420750 kg26598750 kg18706250 kg

In conclusion, considering the relevant opinions, it would appear that the ark weighed somewhere between 18 and 33 thousand metric tons. In comparison with other famous ships, the Queen Mary weighed 73,850 tons. It was 309 m long, about twice as long as the ark. The Titanic weighed approximately 42,000 tons. Of course, this refers to the weight of those vessels without anyone inside whereas the above calculation for the teiva included the inhabitants.



Table of Metric Conversions
57.66 cm=22.7 in.
53.98 cm=21.25 in.
48 cm.=18.9 in.
31630 m3 =1117003 ft3
25950 m3 =916416 ft3
18450 m3=651556 ft3
25o C=77o F
1025 kg/m3=2260 lb/61024 in3(35.3 ft3)
32420750 kg=71475519 lb = 35737.8 tons
26598750 kg=58640206 lb = 29320.1 tons
18706250 kg=41240222 lb = 20620.1 tons
6372500 m=20907152 ft
53 cm=20.87 in.

The Constant Rate of Recession


No, this has nothing to do with the American economy. There is another difficulty with the calculation that Rashi uses to conclude that the teiva was submerged 11 amos. How could Rashi base his calculation on the depth of the water decreasing at a constant rate. One can generally assume that when water decreases, it does so at a constant rate of volume. However, mathematically, if the volume of a sphere decreases at a constant rate, the rate of change of the depth will increase as the waters become shallower. The shallower the water gets, the faster it will decrease depthwise. How then could Rashi assume that the depth decreased at a constant rate? This is the question posed by מהרי"ל דיסקין. He gives his own answers to this question. One, for instance, is that the waters receded, the ground became more saturated which slowed down the overall receding process and hence balanced out the constant rate of change of depth. But a Rebbie of mine from Yeshivas Ohr Yerushalayim posed this question of none other than Nobel Prize winner Yisrael Aumann. He answered simply that mathematically, none of this is needed. True, the rate of change of depth is not directly proportional to the rate of change of volume. However, considering the size of the globe, the difference between the two within the scope with which we are dealing, is negligible and would not affect Rashi's calculation. Is this true? The short answer is "Yes". The longer answer requires a little Calculus.

The radius of Earth is 6372500 m. To make things simple we will convert this to amos. Instead of using three separate measures of the amah, we will keep things neat and use an average figure of 53 cm. (6372500 ÷ 0.53 = 12023585) That translates to 12023585 amos. To make things simpler, we will round it off to 12000000 amos. This will have little effect on the final outcome. This figure will be called rw.

The standard equation for volume:
Vw= 4/3πrw3
Through implicit differentiation:
ΔV= 4πrw2 Δr,
where ΔV is the rate of change of volume and Δr is the rate of change of radius. We have already set rw to be 12000000 and Δr is ¼ (amos/day according to Rashi). Therefore,
ΔV= 4π (12000000)2 ¼
ΔV= 4.524 x 1014 (constant)
The goal of these calculations is to see whether or not Δr changes significantly over the course of the decreasing of the water. To see how much Δr changes, we must switch around the equation to define Δr and instead of using the figure of 12000000 for the radius, we will use the new radius when the top of the mountains became visible, 11999985.
As stated before, ΔV= 4πr2 Δr
Therefore, Δr2 = ΔV/ 4πrnew2
Δr2 = 4.524 x 1014/ 4π(11999985)2
Δr2 = 0.2500006250012
This means that if the waters were receding at a rate of change of depth of 0.25 amos per day when they began receding, then 60 days later they were receding only 0.0000006250012 amos/day faster, a rather negligible amount indeed.

Wednesday, October 8, 2014

The Search for Worthy ... Humans

In the end of פרק ו, Koheles is in search of the worthy man, free of sin. פסוק כ"ח says: "אדם אחד מאלף מצאתי ואשה בכל אלה לא מצאתי." I have found one man in a thousand. And a women in all of these I have not found. I'm not quite sure how to understand this and right now, I'm not going to try. But R' Chaim Kanievsky has a startling ha'ara on this pasuk which vastly changes how we approach it mathematically.

If we were to look at this pasuk statistically, one would say that the ratio of worthy men is 1:1000 and of worthy women is 0. Not so, says R' Chaim. In no place do we ever find the word "אדם" referring only to males. It refers to Man as a species. Therefore, we must view the 1000 as being a mixture of men and women, presumably an even mixture of 500 and 500. Koheles therefore tells us that one in a thousand human beings are worthy. And within this thousandth, he found none to be women. Although this doesn't change the state of the women, it does change the ratio of worthiness for the men. Instead of a 1:1000 worthiness ratio, according to R' Chaim Kanievsky's interpretation of the pasuk, it is 1:500.

Tuesday, October 7, 2014

How many בקשות in יעלה ויבוא

Since we are about to say יעלה ויבוא numerous times (perhaps as many as 40 times) I figured it would be a good time to explore this:
A friend once approached with an interesting project - to calculate the total number of בקשות in יעלה ויבוא. Now, of course, that's not as simple as it seems. It is not simple addition. It involves a lot of multiplication.
So let's dive into it:

יעלה | ויבוא | ויגיע | ויראה | וירצה | וישמע | ויפקד | ויזכר= 8
(Keep in mind that all the above verbs will apply to all of the following nouns:)
זכרוננו | ופקדוננו | וזיכרון אבותינו | וזיכרון משיח בן דוד עבדך | וזיכרון ירושלים עיר קדשך | וזיכרון כל עמך בית ישראלx 6
= 48
(And then the following modify all of the above:)
|לפניך לפליטה | לטובה | לחן | ולחסד | ולרחמים | לחיים ולשלוםx 7
So the entire first section = 336
זכרנו ה' אלוקינו בו לטובה | ופקדנו בו לברכה | והושיענו בו לחיים טובים + 3
= 339
Now we add the final portion:
ובדבר ישועה | ורחמים= 2
חוס | וחננו | ורחם עלינו | והושיענוx 4
= 8
So the final count is 339 + 8= 347

Wow, 347 בקשות packed into one small תפילה!

Thursday, September 11, 2014

Balancing the Shevatim at Har Grizim and Har Eival

In the fall of 1992, there was a fascinating article concerning this week's parsha written up in Tradition magazine by Rabbi Michael Broyde of Atlanta and Steven Weiner of Los Angeles. I will try to sum up the article as concisely as possible. The pasuk tells us (27:12) that the tribes of Shimon, Levi, Yehuda, Yissachar, Yosef and Binyomin stood on Har Grizim for the delivering of the bracha. Reuven, Gad, Asher, Zevulun, Dan and Naftali stood on Har Eival for the delivering of the klala. The gemara in Sotah 37a presents a quandary based on a pasuk in Yehoshua that seems to show that the Kohanim were in the middle of the two mountains. So how could they be said to have been on Har Grizim? The Gemara gives three different answers as to how the Kohanim were split up, some below, and some on the mountain. The answer that seems to be most dealt with amongst the meforshim is that those who were 'fit for work' were below with the Aron, and those who were not were above. Rashi learns this to refer to those above thirty while the Maharsh"a learns that it is referring to b'nei Kehas who were in charge of the Aron.

Now, in dividing the tribes between two mountains, there are 462 different ways to make such a division [12!/2(6!6!)]. Broyde and Weiner point out a fascinating fact. Taking the most recent census data that we are given in the Torah and dealing with the answer of the gemara that we have discussed, if you examine every single possible formation of the tribes, the actual formation of the tribes is the absolute most even division of the tribes possible. That is, the difference in population between the two mountains is at a minimum with this formation. [I personally wrote a computer program to test it out and it worked. In the article, they include a list of all possible combinations and their respective differences.] What is even more fascinating, is that this works out for both Rashi and the Maharsh"a. And what may be the most fascinating of all is that according to the Maharsh"a, the population on Har Grizim would have been 307,929 and that of Har Eival 307,930. No, that's not a typo. That is a difference of 1! According to both, this is by far the most even division of the tribes. The next step is what to do with such an impressive observation. What does this tell us? I will leave that for the reader to decide. [In the article, they suggest a parallel to that which we are taught that one should always look at the world as if it were half righteous and half guilty and the judgement of the entire world is dependent on him.] But for what it's worth, it is surely an intriguing observation on its own.

The article became the subject of debate in the Spring of 1999 with The Solution to Deuteronomy is not in Numbers by Sheldon Epstein, Yonah Wilamowsky & Bernard Dickman and A Mathematical Solution on Terra Firma and a Geographical Explanation on Weak Ground by the original authors.

IMPORTANT UPDATE: Tradition magazine has been gracious enough to make their archives fully available to the public! So following the links above will now allow you to read the articles in their entirety.

Thursday, August 7, 2014

Moshe's pleas


At the beginning of this week's parsha, Moshe mentions that he pleaded with HaShem to allow him to enter Eretz Yisroel but to no avail. The sefer M’galeh Amukos says that Moshe Rabbeinu davened 515 times - the gematria of Vaeschanan. R' Yehonasan Eybeschutz, in Divrei Yehonasan, is curious to discover how such a tally is reached.

He offers the following possibility: The Midrash states that Moshe Rabeinu started davening on 15 Av. As the gemara (Bava Basra 121a) explains, it was on this day that it was realized that the punishment for the sin of the spies was complete and no more men would die in the midbar. He saw that that decree had been fulfilled and had a glimmer of hope that perhaps, since he had been spared from the decree, he was in a position to plead for Divine Mercy. (This would explain why he never engaged in such extensive prayer on Aharon's behalf as Aharon died prior to 15 Av.)

There are 6 months from Elul to Shevat. We may assume that it was a normal year, whose months alternate between 29 and 30 days throughout. So those full months would total 177 days (3x30 + 3x29). Add the 16 days of Av that Moshe davened and the 7 days of Adar until he dies and we have 200 days. Of those 200 days, 28 are Shabbosos on which it is not permissible to make personal requests. That leaves 172 days. Considering Shacharis, Mincha and Maariv and we now have 172x3 = 516 tefilos. Only off by 1. However, the nation only discovered in the morning of the 15th of Av that the dying has stopped. Therefore, Moshe would have missed the Maariv from the night before and only begun davening at Shacharis. And there you have exactly 515 tefilos!

The Tur writes that on Yom Kippur one is permitted to make personal requests, but on Rosh HaShanah, Sukkos, or Shmini Atzeres it is forbidden. We would then have to subtract three more days of prayer. However, we are taught that Moshe Rabbeinu died on Shabbos. If that is the case, then Rosh HaShanah, Sukkos, and Shmini Atzeres of that year all fell on Shabbos as well. So we need not subtract for them and we are safe with our tally of 515!

Special thanks go out to R' Ari Storch for providing me with the material for this shtikle.

Gematrias off by 1

One of the favourite, and often entertaining forms of drashos is the Gematria, finding a significance in the numerical value of a word or group of words. The Steipler Rav devoted the back of his sefer, ברכת פרץ, to gematrias on the parsha that can blow the mind. These aren't simply one word equaling another. Time after time he will find a phrase in the Torah having equal numerical value to the phrase that Rashi uses to explain it. One of the rules of gematrias is that it is allowed to be off by one. What the deeper reason is for this, I do not know. However, in the הקדמה to the לקט יושר, a fascinating proof to this concept is brought from the gemara, in the name of the תרומת הדשן. It is not only pertinent to this week's parsha, it is also connected to Tisha B'Av which we  recently commemorated, hopefully for the last time.

The reading for the morning, taken from this week's parsha, begins (4:25) "When you have children and grandchildren, and you dwell long in the land..." the pasuk goes on to explain that Bnei Yisroel will commit grave sins. And HaShem vows that Bnei Yisroel will subsequently be wiped out. The gemara (Gittin 88a and Sanhedrin 38a) learns from a pasuk in Daniel 9:14 "HaShem hastened the calamity and brought it upon us, for HaShem our God is just in all His deeds..." Is it because HaShem is just in all His deeds that he brought calamity upon us? The gemara explains that if Bnei Yisroel had dwelled in Eretz Yisroel for the numerical value of the word "venoshantem" (and you will dwell long), 852, then HaShem would have had to fulfill "avod toveidun," you shall surely perish. However, from the time that Bnei Yisroel entered Eretz Yisroel until they were exiled was only 850 years. HaShem graciously exiled us early so that we would not be doomed to being wiped out. The question is, if HaShem was being so gracious, why didn't He at least wait one more year? It must be, therefore, that 851 would have been considered equivalent to 852 and HaShem therefore had to exile us two years before. From here we see that a gematria may be off by one.

Thursday, July 17, 2014

Splitting up the Animals


Some time after the victorious military campaign against Midyan, ל"א:כ"ה-מ"ז,  all of the booty - humans and animals - is counted and divided in two. One half is designated for the soldiers who fought the war and the other half is for the rest of בני ישראל. Of the half that went to the soldiers, one out of 500 was to be given to אלעזר. Of the half that went to the rest of the nation, one out of 50 was given to the לויים.

There are a number of puzzling nuances in this chapter. First the totals of the sheep, cattle, donkeys and humans are tallied. Then the halves to the soldiers are counted as well as אלעזר's portion. The halves to the rest of the nation, although exactly the same as the halves to the soldiers are counted. It is recounted that משה distributed the portion for the לויים but no count is given. Lastly, אלעזר's portion is said to be "from the humans, from the cattle, from the donkeys and from the sheep." The same phrase is repeated with regards to the portion of the לויים but the words מכל הבהמה, from all of the animals, is added.


נצי"ב, in העמק דבר, suggests that מכל הבהמה includes other species of animals that were brought back that were fewer in number. Since they were fewer than 1000, there would not have been enough to give אלעזר even one. Therefore, this phrase is left out of the command of אלעזר's portion and these animals' numbers are not significant enough for the תורה to recount.

A fascinating approach is offered in the name of ר' שלמה הכהן מווילנא. Elazar's portion is referred to in פסוק כ"ט as a 'תרומה לה. One of the laws of תרומה is that one may not separate from one species as תרומה for another. Therefore, אלעזר's portion was required to be one out of every 500 of each animal. However, this was not a requirement with the portion of the לויים and it was sufficient to give them 1/50 of all the animals combined. That is the meaning of מכל הבהמה. The לויים were given 1/50 of all the animals. And that is why the תורה does not go into any detail concerning the division for it was not exact.

Thursday, July 10, 2014

The Probability of the Goral


In Pasuk 26:54, the Torah explains how the land was divided amongst the tribes. Rashi explains exactly how the lots were picked to determine each tribe's portion.
Even though the portions were Divinely predetermined, a lot-drawing process was used to assign each tribe their portion. Rashi explains that one drum was filled with 24 pieces of paper. On 12 pieces of paper were written the names of the12 tribes. On the other 12 were written the 12 portions that were to be assigned to the tribes. Each Nasi approached the drum and picked out two pieces of paper. One paper had the name of his tribe written on it and the other the prescribed portion of land in Eretz Yisroel. The purpose of this exercise was to prove the Divinity of division plan that allotted each tribe its portion and appease any tribe who felt it might be unfair. As such, I believe that a miracle of this type may be more greatly appreciated if we knew exactly how unlikely it would have been to happen naturally.
Suppose we had a prescribed list of which portion was to be assigned to which tribe. What would be the odds of each Nasi picking out both the name of his tribe and also the corresponding piece of land that had already been prescribed? Let us start with the first Nasi. He has 24 pieces of paper to choose from. He must pick two specific pieces of paper out of the drum. The odds of taking the first one correctly would be 1/24 and then the odds of taking the second correctly would be 1/23. However, since the two papers were taken together, the order does not matter. The rules of probability theory state that if the order of the choices is not relevant, than the odds must be multiplied by the number of possible sequences which, in this case, is two. So the odds of the first Nasi picking the right pieces is 2/(24 x 23). With 22 pieces of paper remaining, the odds of the second Nasi picking correctly will be 2/(22 x 21). And so on. The last Nasi's odds will be 2/(2 x 1) which is 1. That means that he will definitely pick the right ones. That is understandable. By the rules of probability theory, in order to find the odds of all the Nesiim picking correctly, we must multiply each Nasi's odds together. Thus, the odds may be generalized as
212
(24 x 23 x 22 x 21...x 2 x 1)
24 x 23 x 22 x 21....x 2 x 1 is referred to as 24 factorial and expressed as 24! Thus the final expression is 212/24!. When all is totalled, the odds of the draw falling out exactly as planned without any Divine intervention would have been one in 151,476,000,000,000,000,000.
This calculation is based on Rashi's explanation in the chumash according to the Midrash Tanchuma. However, Rashi in the gemara (Bava Basra 122a) states clearly that two drums were used. This will alter the calculation somewhat. The first Nasi would have a 1/12 chance of picking his tribe's name from the tribe drum and a 1/12 chance of picking the correct portion from the portion drum. The fact that the order does not matter will not affect the odds in this case because the choices are made from two separate groups. The odds for both drums are multiplied and thus, the first Nasi's odds will be 1/122. The odds of the second Nasi will be 1/112. And so on. The total odds will be:

1
122 x 112 x 102 x 92 x 82 x 72 x 62 x 52 x 42 x 32 x 22 x 12

This can, in fact, be simplified as 1/12!2. The final odds will be one in 229,442,532,802,560,000. This is approximately 660 times more probable than the odds according to Rashi on the chumash
Just to get an idea of the extent of this improbability, the odds of winning the Powerball Jackpot are approximately one in 175 million. That is over 1.3 billion times more likely to happen than this, according to Rashi on the gemara, and over 860 billion times more likely according to Rashi on the chumash. The odds of getting fatally hit by lightning in a given year are approximately 1 in 2.4 million. In fact, it is more likely for one to win the Powerball twice in one week or get fatally hit by lightning two-and-a-half times in one year than for the goral's results to have been produced naturally. This is a veritable testimony to the extent of the miracle that occurred and the Divinity of the apportioning of Eretz Yisroel to the twelve tribes.

תשע"ד: A similar drawing came up this week in דף יומי on :תענית כ"ז regarding the גורל used to determine the order of the משמרות in the בית שני. According to רש"י's understanding, there was a similar miracle at play. The probability associated with that drawing is discussed here.

1