  
%king.tex: A 2-page Plain Tex file of the paper `King Solomon and Rabbi
%Ben Ezra's Evaluations of Pi and Patriarch Abraham's Analysis of an Algorithm'
%by D. Zeilberger
%begin macros
\def\mod{\mathop{\rm mod} \nolimits}
\baselineskip=14pt
\parskip=10pt
\def\Tilde{\char126\relax}
\font\eightrm=cmr8 \font\sixrm=cmr6 
\font\eighttt=cmtt8
\magnification=\magstephalf
\def\lheading#1{\bigbreak \noindent {\bf#1} 
}
\parindent=0pt
\overfullrule=0in
%end macros
\bf
\centerline
{King Solomon and Rabbi
Ben Ezra's Evaluations of Pi}
\centerline
{and Patriarch Abraham's Analysis of an Algorithm}
\rm
\bigskip
\centerline{ {\it Doron ZEILBERGER}\footnote{$^1$}
{\eightrm  \raggedright
Department of Mathematics, Temple University,
Philadelphia, PA 19122, USA. 
{\eighttt zeilberg@math.temple.edu \quad .\break
Exclusively published in: http://www.math.temple.edu/\Tilde zeilberg \quad.
\break
Tishrei 9, 5757 (tet betishrei heh' tav shin
nun zayin)
} 
}
}
{\bf Aleph: King Solomon's Evaluations of $\pi$}
 
{\it
``...ten cubits from the one brim to the other ...and a line
of thirty cubits did compass it round about.''} (I Kings vii.23).
 
Taken literally, this yields $\pi=3$. However, the Bible knew
that this is just the first of the infinite sequence of 
best diophantine approximations,
and hinted at another one: ${{333} \over {106}}=3 \cdot {{111} \over {106}}$,
by adding an {\it apparently superfluous} `heh' to the end of `kav' (kuf
vav) [perimeter]. Since the Gematrical value of `kuf vav' is $106$, and
with the added `heh' it is $111$, this gives the adjustment factor
$111/106$, that one has to multiply by the first approximation $3$.
 
{\eightrm
[I thank Rabbi Leon Ehrenpreis for telling me about this.
He told me that this is well-known to the experts, and is often
(probably erroneously)
attributed to the ``The Gra'' (Eliahu (Ben Shlomo), Gaon of Vilna)].}
 
{\bf Bet: Ibn Ezra's Evaluation of $\pi$}
 
Rabbi Abraham Ben Meir Ibn Ezra (1098-1164 C.E.) was one of the
greatest minds of all times.
In his commentary on Numbers iii.15, after a long discourse on
the difference between {\it noun} and {\it adjective}, followed by
the magical properties of the positional decimal system,\footnote{$^2$}
{\eightrm In particular he gives the rule for generating the
multiples of 9 by pairing complementary digits: 18, 27, 36, 45,
54, 63, 72, 81.}
he digresses, {\it apropos ten}, and writes:
 
{\it And when you add the square of 1 to the square of the first
[non-$1$] odd number, ..., and then you draw a circle as the former
as diameter, and then you draw a perpendicular [chord] at
[a distance of a] third [from the end], the isosceles triangle
that is thus formed [whose base is the chord and whose height is the
longer segment of the diameter] has an area equal to 
the perimeter of the circle}.
 
Hence
$\pi={{1} \over {3}}(1^2+3^2)\sqrt{(1-({{1} \over {3}} )^2)}=
{{20 \sqrt{2}} \over {9}}=3.142...\quad $ .
 
{\eightrm [I discovered this when I was browsing through back issues
of ``Gilyonot Matematica'', 
the
math periodical, in Hebrew, for `the learning youth and amateurs'
edited, (and largely written) by Joe Gillis (1911-1993). 
This excellent publication made me, and many others, decide to become
mathematicians.
In Volume 4, no. 1,
(Nov. 1969), p.12, there is a letter to the editor by the
famous  Design-theorist, Haim Hanani, that described the above.
The library of the department of Science Teaching, at the Weizmann
Institute of Science, Rehovot, Israel, has
an almost complete collection of this magazine.]}
\eject
{\bf Gimel:   
Sefer Yetzirah and the Computational Complexity of Listing all Permutations}
 
In Sefer Yetzirah (Book of Creation, 
created ca. 1800 B.C.E, compiled ca. 300 C.E.), it is
written (iv.16 in the `Gra version', iv.12 in the `short version'):
 
{\it two stones build two houses, three stones build six houses,
four stones build four and twenty houses, five stones build [one]
hundred and twenty houses, six stones build seven hundred and twenty
houses, seven stones build five thousand and forty houses, from here
on go and compute that which the mouth cannot speak and the ear
cannot hear.}
 
This passage is referred to in yet another {\it scripture}:
Don Knuth's {\it Art of Computer Programming}, III, 5.1.2 (p. 23),
but unfortunately it is mistranslated to read: 
``...go on and obtain {\it numbers} [my italics], that the mouth ...''.
So according to Knuth,
Sefer Yetzirah was stumped at 
$8!=40320$. But this is very easy to both speak and hear:
{\it arba revavot shlosh meot veeshrim}.
 
I am sure that there are many other cases where we underestimate
the wisdom and sophistication of sages of the past, due to
misreading their words and misunderstanding their intentions.
This turned out to be the case here.
 
A few days ago, in the local bookstore, I discovered
the very interesting modern commentary by Aryeh Kaplan
({\it Sefer Yetzirah, The book of Creation, in theory and
practice}, Samuel Weiser, York Beach, Maine, 1993).\footnote{$^3$}
{\eightrm This book also settled my dispute with Knuth
over the right location of this famous passage. The
original citation in ACP, III, erroneously had
the non-existent, and wrongly-formatted `verse 52'. I spotted
this error, and told him, back in 1989,
that the right place is Ch. IV, verse 12. Seven years later, I
received the reward check of \$4.21 (including interest
compounded continuously), but Knuth retorted with: the real
place is Ch. IV, verse 16, as the two copies in the
Stanford library can testify. But my own personal copy,
and the two copies at the Temple library sided with me.
According to Kaplan's book, there are four versions.
In the `Gra version', this passage is indeed in iv.16.
In the `short version', it is iv.12, in the `long version' it
is iv.4, while in the `Saadia version' it is iii.4.}
According to Kaplan (p. 191), the Kabbalists were interested primarily not
in the {\it cardinality} of the set of houses one can build
out of $n$ stones, but in the {\it uttering} (listing) of the
set itself. Pronouncing all the $n!$ permutations of
a given set of $n$ sacred letters had magical applications.
Since every permutation has $n$ letters, the computational
complexity of this task is $n \cdot n!$, which at a rate
of three letters a second would take over three hours
to recite for $n=7$ (still real time), but
appx. thirty hours for $n=8$, which is not feasible for
a human computer, even a {\it tsadik}. 
 
Since Sefer Yetzirah is attributed to the Patriarch Abraham
(ca. $1800$ B.C.E.),
this is probably the oldest {\it analysis of algorithm}.
 
\bye
