%artstein.tex:  Some Mathematical Footnotes to Zvi Artstein's Masterpiece ``Mathematics and the Real World
%%a Plain TeX file by  Doron Zeilberger (5 pages)

%begin macros
\def\L{{\cal L}}
\baselineskip=14pt
\parskip=10pt
\def\halmos{\hbox{\vrule height0.15cm width0.01cm\vbox{\hrule height
  0.01cm width0.2cm \vskip0.15cm \hrule height 0.01cm width0.2cm}\vrule
  height0.15cm width 0.01cm}}
\font\eightrm=cmr8 \font\sixrm=cmr6
\font\eighttt=cmtt8
\magnification=\magstephalf
\def\P{{\cal P}}
\def\Q{{\cal Q}}
\def\1{{\overline{1}}}
\def\2{{\overline{2}}}
\parindent=0pt
\overfullrule=0in
\def\Tilde{\char126\relax}
\def\frac#1#2{{#1 \over #2}}
%\headline={\rm  \ifodd\pageno  \RightHead  \else  \LeftHead  \fi}
%\def\RightHead{\centerline{
%Title
%}}
%\def\LeftHead{ \centerline{Doron Zeilberger}}
%end macros

\centerline
{\bf Appendix to Dr. Z.'s 140th Opinion: }
\centerline
{\bf Some Mathematical Footnotes to Zvi Artstein's Masterpiece ``Mathematics and the Real World'' }
\bigskip
\centerline
{\it Doron ZEILBERGER}
\bigskip

{\bf Introduction}: In  {\tt http://www.math.rutgers.edu/\~{}zeilberg/Opinion140.html} $\,\,$ , $\,\,$
I expressed my great admiration of Zvika Artstein's masterpiece[A], and the lessons that can be learned from
his penetrating and insightful book. The purpose of the present appendix is to  list a few
mathematical footnotes. I also include a (very short!) list of possible errors.

{\bf Personal Remark}: Back in 1981, Zvika and I were colleagues at the Weizmann Institute of Science.
Already then Zvika was interested in ``meta-mathematics'', i.e. in the big picture about the nature of mathematics,
and {\it mathematical activity}, and I remember his great enthusiasm about the Davis-Hersh (now) classic, {\it The Mathematical Experience}[DH].
Artstein's new book may be considered an early-21st-century analog, and I am sure that it too is destined to become a classic.


$\bullet$ (pp. 34-36) About pattern-matching.

The subway sequence is sequence 54 in Neil Sloane's famous OEIS namely \hfill\break {\tt https://oeis.org/A000054} $\,\,$.
Zvika should have mentioned the OEIS, one of the greatest tools for ``pattern-matching''.
I disagree with Wittgenstein (and many others) that logically a finite sequence can be continued
in many ways. Using {\it Occam's razor}, and only using part of the known sequence, as ``training data'',
so that the remaining known part can be checked, it is often clear-cut what is the most natural continuation.
Of course, it is {\it ansatz-dependent}. See my article [Z1]. 

$\bullet$ (p. 53) Regarding the proof that $\sqrt{2}$ is irrational, see my note [Z3].

$\bullet$ (p. 188), Galileo was asked why gamblers put higher stakes on the sum of three (fair, $6$-faced) dice adding up to
$10$ rather than $9$, since the set of integer-partitions of $10$ into $3$ strictly positive parts,
$$
\{ \, 6+3+1 \quad ,  \quad 6+2+2 \quad , \quad 5+4+1 \quad , \quad  5+3+2 \quad , \quad 4+4+2 \quad , \quad 4+3+3 \, \} \quad ,
$$
has the same number of elements as those adding-up to $9$,
$$
\{ \, 6+2+1 \quad, \quad   5+3+1 \quad , \quad 5+2+2 \quad , \quad 4+4+1 \quad , \quad 4+3+2 \quad , \quad 3+3+3 \, \} \quad .
$$
As told by Artstein, Galileo correctly replied that one has to talk about {\it compositions}. 
Indeed if you roll $m$ (fair) $k$-faced dice, the probability generating function (in $q$) for compositions
is
$$
\frac{1}{k^m} \, \left ( \sum_{i=1}^k q^i \right )^m \quad,
$$
that is (trivially!) {\bf strictly} unimodal. The probability generating function for integer-partitions, on the
other hand is given by the polynomial
$$
\frac{1}{ {{m+k-1} \choose {m}}} \, q^m {{m+k-1} \choose {m}}_q \quad ,
$$
where  ${{a} \choose {b}}_q:=((1-q^a) \cdots (1-q^{a-b+1}))/((1-q) \cdots (1-q^b))$.

For the Galileo case, the former generating polynomial is
$$
\frac{1}{6^3} \,  ( \sum_{i=1}^6 q^i  )^3 =
$$
$$
\frac{1}{216} 
( {q}^{18}+3\,{q}^{17}+6\,{q}^{16}+10\,{q}^{15}+15\,{q}^{14}+21\,{q}^{13}+25\,{q}^{12}+27\,{q}^{11}+27\,{q}^{10}+25\,{q}^{9}+21\,{q}^{8}+15\,{q}^{7}+10\,{q}^{
6}+6\,{q}^{5}+3\,{q}^{4}+{q}^{3} ) \quad,
$$
while the latter is
$$
\frac{1}{ {{3+6-1} \choose {3}}} \, q^3 {{3+6-1} \choose {3}}_q \, =\frac{1}{56} \, q^3 {{8} \choose {3}}_q \, =
$$
$$
\frac{1}{56} 
({q}^{18}+{q}^{17}+2\,{q}^{16}+3\,{q}^{15}+4\,{q}^{14}+5\,{q}^{13}+6\,{q}^{12}+6\,{q}^{11}+6\,{q}^{10}+6\,{q}^{9}+5\,{q}^{8}+4\,{q}^{7}+3\,{q}^{6}+2\,{q}^{5}
+{q}^{4}+{q}^{3}) \quad .
$$
Thanks to James Joseph Sylvester, the generating function for  integer partitions of positive integers into $m$ parts
and largest part $\leq k$ is unimodal, and this
fact was given a combinatorial proof by Kathy O'Hara([O]). In [Z2], I adapted it into a `high-school algebra proof'.
However these generating polynomials, the so-called {\it Gaussian polynomials}, 
are {\bf not} always {\it strictly} unimodal, as the above Galileo `paradox' exemplifies, since there
is a `plateau' at the middle (and at the two ends).
Recently Igor Pak and Greta Panova [PP] proved (see [Za] for a nice elementary proof)
that (with very few exceptions, that they list, including the above case
considered by Galileo) it is {\it strictly} unimodal, so with  larger-faced dice and/or more of them, this
`paradox' would not have arisen.

$\bullet$ (p. 216) Using Bayes' Rule.

For the `person in the street'  it is more instructive to use nicer numbers. Suppose that
there are 100 people, out of whom it is known that exactly one person is sick and that
the rest are healthy. It is also known that the out of the 99 healthy people, exactly one
would be diagnosed sick, and the sick person would definitely be diagnosed sick. 

Invoking {\it the principle of equal a priori probabilities},
let's make the {\it default assumption} that each of the $100$ people is equally likely to be
really sick (of course, if you neither smoke nor drink, and the other do, this assumption is false),
and the equally unjustified assumption that each of the $99$ healthy people are equally likely to be diagnosed sick.

Regardless of assumptions, there are always two people diagnosed sick.
Under the above, default, assumptions,
your {\it a priori} chance of being sick is $\frac{1}{100}$ and your
chance of being healthy and being diagnosed sick is $\frac{99}{100} \cdot \frac{1}{99}=\frac{1}{100}$.
So you are equally likely to be really sick and be healthy but pronounced sick. Of course with probability
$\frac{98}{100}$ you are neither. But granted that you were unfortunate enough to be diagnosed sick, 
you still have a chance of $\frac{1}{2}$ of being healthy. Nevertheless, it is still depressing, since
your chance of being healthy dropped from $\frac{99}{100}$ to $\frac{1}{2}$.

$\bullet$ (p. 221) I agree more with Gigerenzer than with Artstein about the proper
way to train physicians and others not to abuse probability. Nowadays one can
use {\it computer simulations} that are very convincing, and would not have to torture
poor physicians with `logical analysis' over their heads.

For example, for simulating one instance of the above scenario with $N-1$ healthy persons, and one sick one, the
following Maple code

{\tt A:=proc(N) local rs,fs,ra,ra1,i,H: ra:=rand(1..N): ra1:=rand(1..N-1): rs:=ra(): \hfill\break
H:=$\{$ seq(i,i=1..N) $\}$ minus $\{$rs$\}$: fs:=H[ra1()]:[rs,fs]:end:}

inputs $N$ and picks at random the {\it really} sick person, {\tt rs} (that only G-d knows that he is sick), and the healthy
person who was (wrongly) diagnosed sick. Using procedure  {\tt A(N)}, one can simulate it many ({\tt K}) times,  using the following procedure,
{\tt Khole(N,K)}:


{\tt Khole:=proc(N,K) local T,S,i,lu: for i from 1 to N do T[i]:=0: S[i]:=0: od: \hfill\break
for i from 1 to K do lu:=A(N): T[lu[1]]:=T[lu[1]]+1: S[lu[2]]:=S[lu[2]]+1: \hfill\break
od: [seq([T[i],S[i]],i=1..N)]: end:}


It outputs the list $[ [a_i,b_i]] \, , \, 1 \leq i \leq n$, where $a_i$ is the number of times, out of the $K$ trials,
that person $i$ was truly sick, and $b_i$ is the number of times he was healthy but diagnosed sick.
For example, by typing

{\tt Khole(10,10000);}

one gets something, like (since we use a (pseudo)-random number generator, the actual numbers differ each time)

{\tt [[966, 1001], [996, 983], [998, 984], [994, 991], [1023, 956], [982, 1081], [964, 990], [983, 989], [998, 1040], [1096, 985]]} ,


indicating that  each of the ten persons roughly gets a false positive and a true positive an equal number of times.
Now this is more convincing, to most people, than `logical analysis'.

$\bullet$ (p. 223), last paragraph. Indeed {\it over-fitting} is a dangerous disease in the human quest for `patterns',
and it reminds me of the Hebrew poet David Avidan's beautiful poem {\it yippui koach}, that says

``{\it ... the knowledge that there is {\bf no} justification [for our existence], and [nevertheless] searching for it all the time}''


$\bullet$ (p. 321): The calculus nightmare. The whole (so-called) `rigorization' of the infinitesimal calculus can
be done much more painlessly using discrete calculus, see [Z4].


$\bullet$ (p. 356): Regarding errors, my colleague, Abbas Bahri[B], has pointed out five serious gaps
in  deep (and famous) mathematical results that are universally considered as proved.

$\bullet$ (pp. 402-403): Artstein is a bit too hard, and overly pedantic, what Israelis call a {\it yeke},
in nit-picking on an article published in an Israeli high-school education journal. 
By `reverse engineering' the (admittedly erroneous) solution of the original writer, it is clear that
what the latter meant was: `Suppose that you found out that the family has at least two daughters'. 
Then the original solution is correct (corresponding to Artstein's second scenario).
By `slip of the pen', the criticized writer transforms it into:` you see two girls playing outside', a fact that implies that there
are at least two girls in the family, but of course is not equivalent to it.

Whenever there is ``missing information'', there usually are  natural `default assumptions'. 
For example  for the famous Monty Hall problem (p. 404), the most natural assumption is that Monty is
{\it always} obligated to open a door with a goat.

{\bf A Very Short Errata}

$\bullet$ p. 97, line 19 from top: 1,4,6,16 $\rightarrow$ 1,4,9, 16

$\bullet$ p. 126, line 3 from the bottom: $\frac{nct}{L}$  $\rightarrow$  $\frac{nc}{L}$

$\bullet$ p. 160, line 15 from top: Ernest Rutherford (1871-1927)   $\rightarrow$ Ernest Rutherford (1871-1937) 

$\bullet$ p. 186, line 13 from top: die   $\rightarrow$ dice

$\bullet$ p, 227, subtitles, line 4: expected win   $\rightarrow$ expected to win

$\bullet$ p. 298, line 4 from bottom: 

exponential number of steps  as a function of the number $\rightarrow$ 

exponential number of steps  as a function of the {\bf logarithm} (or number of digits) of the number

$\bullet$ p. 299: KSA is more commonly known as AKS

$\bullet$ p. 300, line 8 from top: $k^{2m}$   $\rightarrow$ $k^m$

$\bullet$ p. 319, line 7 from bottom: was thwarted   $\rightarrow$ has thwarted

$\bullet$ p. 338, line 15 from top: G\"odel was, for many years only a ``long-term visitor'' at the Institute for Advanced Study. He
became an official permanent member as late as 1953.

$\bullet$ p. 338, line 5 from bottom: always be theorems  $\rightarrow$  always be statements

$\bullet$ p. 403, line 4 from top: $P(B|A) \rightarrow P(A|B)$

\bigskip
{\bf References}

[A] Z. Artstein, ``{\it Mathematics and the Real World: The Remarkable Role of {\bf Evolution} in the Making of {\bf Mathematics}}'',
Prometheus Books, 2014.

\vfill\eject

[B] A. Bahri, {\it Five Gaps in Mathematics}, Advanced Nonlinear Studies  {\bf 15} (2015), 289-320.
Available on-line from   \hfill\break
{\tt http://www.math.rutgers.edu/\~{}zeilberg/akherim/AbbasBahriMasterpieceFiveGaps.pdf} \quad .

[DH] P. J. Davis and R, Hersh, ``{\it The Mathematical Experience}'', Houghton Mifflin, Birkhauser, 1981.

[O] K. M. O'Hara, {\it Unimodality of Gaussian coefficients: a constructive proof},   J. Combin. Theory Ser. A  {\bf 53}  (1990), 29-52.

[PP] I. Pak and G. Panova, {\it Strict unimodality of q-binomial coefficients}, 
C. R. Math. Acad. Sci. Paris {\bf 351}(2013), no. 11-12, 415-418. 
Available on-line from \hfill\break 
{\tt http://arxiv.org/abs/1306.5085} \quad .
 
[Za] F. Zanello, {\it Zeilberger's KOH theorem and the strict unimodality of q-binomial coefficients},
to appear in Proc. Amer. Math. Soc., {\tt http://arxiv.org/abs/1311.4480} \quad .

[Z1] D. Zeilberger, {\it An Enquiry Concerning Human (and Computer!) [Mathematical] Understanding},
 ``Randomness \& Complexity, from Leibniz to Chaitin'' (C.S. Calude, ed.), World Scientific, Singapore, 2007.
Available on-line from \hfill\break 
{\tt http://www.math.rutgers.edu/\~{}zeilberg/mamarim/mamarimhtml/enquiry.html} \quad .

[Z2] D. Zeilberger, {\it Kathy O'Hara's constructive proof of the unimodality of the Gaussian polynomials}, Amer.
Math. Monthly {\bf 96} (1989), no. 7, 590-602. Available on-line from \hfill\break 
{\tt http://www.math.rutgers.edu/\~{}zeilberg/mamarim/mamarimhtml/ohara.html} \quad .

[Z3] D. Zeilberger, 
{\it Two Motivated Concrete Proofs (much better than the usual one) that the Square-Root of 2 is Irrational},
The Personal Journal of Shalosh B. Ekhad and Doron Zeilberger, Oct. 7, 2014. Available on-line from
\hfill\break 
{\tt http://www.math.rutgers.edu/\~{}zeilberg/mamarim/mamarimhtml/sqrt2.html} \quad .


[Z4] D. Zeilberger, 
{\it ``Real'' Analysis is a Degenerate Case of Discrete Analysis},
``New Progress in Difference Equations''(Proc. ICDEA 2001), edited by Bernd Aulbach, Saber Elaydi, and Gerry Ladas, and publisher by Taylor \& Francis, London, 2004.
Available on-line from
\hfill\break 
{\tt http://www.math.rutgers.edu/\~{}zeilberg/mamarim/mamarimhtml/real.html} \quad .


\bigskip
\hrule
\bigskip
Doron Zeilberger, Department of Mathematics, Rutgers University (New Brunswick), Hill Center-Busch Campus, 110 Frelinghuysen
Rd., Piscataway, NJ 08854-8019, USA. \hfill\break
Email: {\tt zeilberg at math dot rutgers dot edu} \quad , \hfill\break   
url: {\tt http://www.math.rutgers.edu/\~{}zeilberg} \quad .
\bigskip
\hrule
\bigskip
Oct. 7, 2014

\end




