The Universe of Discourse
http://blog.plover.com
The Universe of Discourse (Mark Dominus Blog)enHow many 24 puzzles are there?
http://blog.plover.com/2017/02/07#increasing-sequences
<p>[ Note: The tables in this article are important, and look unusually crappy if you read this blog through an aggregator. <a href="http://blog.plover.com/math/increasing-sequences.html">The properly-formatted version on my blog</a> may be easier to follow. ]</p>
<p><a href="http://blog.plover.com/math/17-puzzle.html">A few months ago I wrote about puzzles of the following
type</a>: take four digits, say 1, 2, 7, 7,
and, using only +, -, ×, and ÷, combine them to make the number 24.
Since then I have been accumulating more and more material about these
puzzles, which will eventually appear here. But meantime here is a
delightful tangent.</p>
<p>In the course of investigating this I wrote programs to enumerate the
solutions of all possible puzzles, and these programs were always much
faster than I expected at first. It appears as if there are 10,000
possible puzzles, from «0,0,0,0» through «9,9,9,9». But a moment's
thought shows that there are considerably fewer, because, for example,
the puzzles «7,2,7,1», «1,2,7,7», «7,7,2,1», and «2,7,7,1» are all the
same puzzle. How many puzzles are there really?</p>
<p>A back-of-the-envelope estimate is that only about 1 in 24 puzzles is
really distinct (because there are typically 24 ways to rearrange the
elements of a puzzle) and so there ought to be around
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7b10000%7d%7b24%7d%20%5capprox%20417%24"> puzzles. This is an undercount,
because there are fewer duplicates of many puzzles; for example there
are not 24 variations of «1,2,7,7», but only 12. The actual number of
puzzles turns out to be 715, which I think is not an obvious thing to
guess.</p>
<p>Let's write <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2cn%29%24"> for the set of sequences
of length <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24"> containing up to <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24d%24"> different
symbols, with the
duplicates removed: when
two sequences are the same except for the order of their symbols, we
will consider them the same sequence.</p>
<p>Or more concretely, we may imagine that the symbols are sorted into
nondecreasing order, so that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2cn%29%24"> is the set of nondecreasing
sequences of length <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24"> of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24d%24"> different symbols.</p>
<p>Let's also write <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2cn%29%24"> for the number of elements of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2cn%29%24">.</p>
<p>Then <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%2810%2c%204%29%24"> is the set of puzzles where input is four digits.
The claim that there are <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24715%24"> such puzzles is just that
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%2810%2c4%29%20%3d%20715%24">.
A tabulation of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28%5ccdot%2c%5ccdot%29%24"> reveals that it is closely related to binomial
coefficients, and indeed that
$$C(d,n)=\binom{n+d-1}{d-1}.\tag{$\heartsuit$}$$</p>
<p>so that the surprising <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24715%24"> is actually <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cbinom%7b13%7d%7b9%7d%24">. This is not hard
to prove by induction, because <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28%5ccdot%2c%5ccdot%29%24"> is easily shown to obey the same
recurrence as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cbinom%5ccdot%5ccdot%24">: $$C(d,n) = C(d-1,n) +
C(d,n-1).\tag{$\spadesuit$}$$</p>
<p>To see this, observe that an element of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2cn%29%24"> either begins with
a zero or with some other symbol. If it begins with a zero, there
are <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2cn%2d1%29%24"> ways to choose the remaining <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%2d1%24"> symbols in the
sequence. But if it begins with one of the other <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24d%2d1%24"> symbols
it cannot contain any zeroes, and what we really have is a length-<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24">
sequence of the symbols <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241%5cldots%20%28d%2d1%29%24">, of which there
are <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2d1%2c%20n%29%24">.</p>
<p><style>
table .rt td { padding: 2px 8px }
</style></p>
<table class="rt" style="border-collapse: collapse; border: black solid 2px; margin: 1em; float: right;">
<colgroup><col style="background: lightblue"><col style="background: pink""></colgroup>
<tr><td>0 0 0 0<td> 1 1 1
<tr><td>0 0 0 1<td> 1 1 2
<tr><td>0 0 0 2<td> 1 1 3
<tr><td>0 0 0 3<td> 1 1 4
<tr><td>0 0 1 1<td> 1 2 2
<tr><td>0 0 1 2<td> 1 2 3
<tr><td>0 0 1 3<td> 1 2 4
<tr><td>0 0 2 2<td> 1 3 3
<tr><td>0 0 2 3<td> 1 3 4
<tr><td>0 0 3 3<td> 1 4 4
<tr><td>0 1 1 1<td> 2 2 2
<tr><td>0 1 1 2<td> 2 2 3
<tr><td>0 1 1 3<td> 2 2 4
<tr><td>0 1 2 2<td> 2 3 3
<tr><td>0 1 2 3<td> 2 3 4
<tr><td>0 1 3 3<td> 2 4 4
<tr><td>0 2 2 2<td> 3 3 3
<tr><td>0 2 2 3<td> 3 3 4
<tr><td>0 2 3 3<td> 3 4 4
<tr><td>0 3 3 3<td> 4 4 4
</table>
<p>Now we can observe that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cbinom74%3d%5cbinom73%24"> (they are both 35) so that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%285%2c3%29%20%3d%0aC%284%2c4%29%24">. We might ask if there is a combinatorial proof of this
fact, consisting of a natural bijection between <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c3%29%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c4%29%24">.
Using the relation <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%28%5cspadesuit%29%24"> we have:</p>
<p>$$
\begin{eqnarray}
C(4,4) & = & C(3, 4) + & C(4,3) \\
C(5,3) & = & & C(4,3) + C(5,2) \\
\end{eqnarray}$$</p>
<p>so part of the bijection, at least, is clear:
There are <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%284%2c3%29%24"> elements of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c4%29%24">
that begin with a zero,
and also <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%284%2c3%29%24"> elements of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c%203%29%24"> that do <em>not</em> begin with a zero, so
whatever the bijection is, it ought to match up these two subsets of
size 20. This is perfectly straightforward; simply match up <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%c2%ab0%2c%0aa%2c%20b%2c%20c%c2%bb%24"> (blue) with <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%c2%aba%2b1%2c%20b%2b1%2c%20c%2b1%c2%bb%24"> (pink), as shown at
right.</p>
<p>But finding the other half of the bijection, between <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%283%2c4%29%24"> and
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c2%29%24">, is not so straightforward. (Both have 15 elements, but we
are looking for not just any bijection but for one that respects the
structure of the elements.) We could apply the recurrence
again, to obtain:</p>
<p>$$
\begin{eqnarray}
C(3,4) & = \color{darkred}{C(2, 4)} + \color{darkblue}{C(3,3)} \\
C(5,2) & = \color{darkblue}{C(4,2)} + \color{darkred}{C(5,1)}
\end{eqnarray}$$</p>
<p>and since $$
\begin{eqnarray}
\color{darkred}{C(2, 4)} & = \color{darkred}{C(5,1)} \\
\color{darkblue}{C(3,3)} & = \color{darkblue}{C(4,2)}
\end{eqnarray}$$</p>
<p>we might expect the bijection to continue in that way, mapping
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccolor%7bdarkred%7d%7bS%282%2c4%29%20%5cleftrightarrow%20S%285%2c1%29%7d%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccolor%7bdarkblue%7d%7bS%283%2c3%29%20%5cleftrightarrow%0aS%284%2c2%29%7d%24">. Indeed there is such a bijection, and it is very nice.</p>
<p>To find the bijection we will take a detour through bitstrings. There
is a natural bijection between <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2c%20n%29%24"> and the bit strings that
contain <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24d%2d1%24"> zeroes and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24"> ones. Rather than explain it with
pseudocode, I will give some examples, which I think will make the
point clear. Consider the sequence <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%c2%ab1%2c%201%2c%203%2c%204%c2%bb%24">. Suppose you are trying to communicate this sequence to a
computer. It will ask you the following questions, and you should
give the corresponding answers:</p>
<ul>
<li>“Is the first symbol 0?” (“No”)</li>
<li>“Is the first symbol 1?” (“Yes”)</li>
<li>“Is the second symbol 1?” (“Yes”)</li>
<li>“Is the third symbol 1?” (“No”)</li>
<li>“Is the third symbol 2?” (“No”)</li>
<li>“Is the third symbol 3?” (“Yes”)</li>
<li>“Is the fourth symbol 3?” (“No”)</li>
<li>“Is the fourth symbol 4?” (“Yes”)</li>
</ul>
<p>At each stage the
computer asks about the identity of the next symbol. If the answer is
“yes” the computer has learned another symbol and moves on to the next
element of the sequence. If it is “no” the computer tries guessing a
different symbol. The “yes” answers become ones and “no”
answers become zeroes, so that the resulting bit string is <code>0 1 1 0 0 1 0 1</code>. </p>
<p>It sometimes happens that the computer figures out all the elements of
the sequence before using up its <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%2bd%2d1%24"> questions; in this case we
pad out the bit string with zeroes, or we
can imagine that the computer asks some pointless questions to which the answer
is “no”. For example, suppose the sequence is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%c2%ab0%2c%201%2c%201%2c%201%c2%bb%24">:</p>
<ul>
<li>“Is the first symbol 0?” (“Yes”)</li>
<li>“Is the second symbol 0?” (“No”)</li>
<li>“Is the second symbol 1?” (“Yes”)</li>
<li>“Is the third symbol 1?” (“Yes”)</li>
<li>“Is the fourth symbol 1?” (“Yes”)</li>
</ul>
<p>The bit string is <code>1 0 1 1 1 0 0 0</code>, where the final three <code>0</code> bits are
the padding.</p>
<p>We can reverse the process, simply taking over the role of the
computer. To find the sequence that corresponds to the bit string
<code>0 1 1 0 1 0 0 1</code>, we ask the questions ourselves and use the bits as the
answers:</p>
<ul>
<li>“Is the first symbol 0?” (“No”)</li>
<li>“Is the first symbol 1?” (“Yes”)</li>
<li>“Is the second symbol 1?” (“Yes”)</li>
<li>“Is the third symbol 1?” (“No”)</li>
<li>“Is the third symbol 2?” (“Yes”)</li>
<li>“Is the fourth symbol 2?” (“No”)</li>
<li>“Is the fourth symbol 3?” (“No”)</li>
<li>“Is the fourth symbol 4?” (“Yes”)</li>
</ul>
<p>We have recovered the sequence <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%c2%ab1%2c%201%2c%202%2c%204%c2%bb%24"> from the
bit string <code>0 1 1 0 1 0 0 1</code>.</p>
<p>This correspondence establishes relation <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%28%5cheartsuit%29%24"> in a
different way from before: since there is a natural bijection between
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2c%20n%29%24"> and the bit strings with <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24d%2d1%24"> zeroes and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24"> ones,
there are certainly <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cbinom%7bn%2bd%2d1%7d%7bd%2d1%7d%24"> of them as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%28%5cheartsuit%29%24">
says because there are <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%2bd%2d1%24"> bits and we may choose any <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24d%2d1%24"> to
be the zeroes.</p>
<p>We wanted to see why <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%285%2c3%29%20%3d%20C%284%2c4%29%24">. The detour above shows that
there is a simple bijection between</p>
<blockquote>
<p><img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c3%29%24"> and the bit strings with 4 zeroes and 3 ones</p>
</blockquote>
<p>on one hand, and between</p>
<blockquote>
<p><img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c4%29%24"> and the bit strings with 3 zeroes and 4 ones</p>
</blockquote>
<p>on the other hand. And of course
the bijection between the two sets of <em>bit strings</em> is completely
obvious: just exchange the zeroes and the ones.</p>
<p>The table below shows the complete bijection between <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c4%29%24"> and
its descriptive bit strings (on the left in blue) and between <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c%0a3%29%24"> and its descriptive bit strings (on the right in pink) and that
the two sets of bit strings are complementary. Furthermore the top
portion of the table shows that the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c3%29%24"> subsets of the two
families correspond, as they should—although the correct
correspondence is the <em>reverse</em> of the one that was displayed earlier
in the article,
not the suggested
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%c2%ab0%2c%20a%2c%20b%2c%20c%c2%bb%20%5cleftrightarrow%20%c2%aba%2b1%2c%20b%2b1%2c%20c%2b1%c2%bb%24"> at all.
Instead, in the correct table, the initial digit
of the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c4%29%24"> entry says how many zeroes appear in the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c3%29%24">
entry, and vice versa; then the increment to the next digit says how many ones, and so forth.</p>
<p><style>
table .tb { padding-color: purple; }
table .tb td { text-align: center; padding: 1px 4px }
td .c2 { border-right: dotted thin black }
th .c2 { border-right: dotted thin black }
</style></p>
<p align="center"><table class="tb" style="border-collapse: collapse; border: solid black 2px;">
<colgroup>
<col style="background: lightblue; border-right">
<col style="background: rgb(193,236,250);">
</colgroup>
<colgroup>
<col style="background: rgb(255,212,223);">
<col style="background: pink">
</colgroup>
<tbody>
<tr style="border-bottom: solid black 1px"><th><img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%284%2c4%29%24"><th class="c2">(bits)<th>(complement bits)<th><img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c3%29%24">
<tr><td class="c1"> 0 0 0 0 <td class="c2"> 1 1 1 1 0 0 0 <td class="c3"> 0 0 0 0 1 1 1 <td class="c4"> 4 4 4
<tr><td class="c1"> 0 0 0 1 <td class="c2"> 1 1 1 0 1 0 0 <td class="c3"> 0 0 0 1 0 1 1 <td class="c4"> 3 4 4
<tr><td class="c1"> 0 0 0 2 <td class="c2"> 1 1 1 0 0 1 0 <td class="c3"> 0 0 0 1 1 0 1 <td class="c4"> 3 3 4
<tr><td class="c1"> 0 0 0 3 <td class="c2"> 1 1 1 0 0 0 1 <td class="c3"> 0 0 0 1 1 1 0 <td class="c4"> 3 3 3
<tr><td class="c1"> 0 0 1 1 <td class="c2"> 1 1 0 1 1 0 0 <td class="c3"> 0 0 1 0 0 1 1 <td class="c4"> 2 4 4
<tr><td class="c1"> 0 0 1 2 <td class="c2"> 1 1 0 1 0 1 0 <td class="c3"> 0 0 1 0 1 0 1 <td class="c4"> 2 3 4
<tr><td class="c1"> 0 0 1 3 <td class="c2"> 1 1 0 1 0 0 1 <td class="c3"> 0 0 1 0 1 1 0 <td class="c4"> 2 3 3
<tr><td class="c1"> 0 0 2 2 <td class="c2"> 1 1 0 0 1 1 0 <td class="c3"> 0 0 1 1 0 0 1 <td class="c4"> 2 2 4
<tr><td class="c1"> 0 0 2 3 <td class="c2"> 1 1 0 0 1 0 1 <td class="c3"> 0 0 1 1 0 1 0 <td class="c4"> 2 2 3
<tr><td class="c1"> 0 0 3 3 <td class="c2"> 1 1 0 0 0 1 1 <td class="c3"> 0 0 1 1 1 0 0 <td class="c4"> 2 2 2
<tr><td class="c1"> 0 1 1 1 <td class="c2"> 1 0 1 1 1 0 0 <td class="c3"> 0 1 0 0 0 1 1 <td class="c4"> 1 4 4
<tr><td class="c1"> 0 1 1 2 <td class="c2"> 1 0 1 1 0 1 0 <td class="c3"> 0 1 0 0 1 0 1 <td class="c4"> 1 3 4
<tr><td class="c1"> 0 1 1 3 <td class="c2"> 1 0 1 1 0 0 1 <td class="c3"> 0 1 0 0 1 1 0 <td class="c4"> 1 3 3
<tr><td class="c1"> 0 1 2 2 <td class="c2"> 1 0 1 0 1 1 0 <td class="c3"> 0 1 0 1 0 0 1 <td class="c4"> 1 2 4
<tr><td class="c1"> 0 1 2 3 <td class="c2"> 1 0 1 0 1 0 1 <td class="c3"> 0 1 0 1 0 1 0 <td class="c4"> 1 2 3
<tr><td class="c1"> 0 1 3 3 <td class="c2"> 1 0 1 0 0 1 1 <td class="c3"> 0 1 0 1 1 0 0 <td class="c4"> 1 2 2
<tr><td class="c1"> 0 2 2 2 <td class="c2"> 1 0 0 1 1 1 0 <td class="c3"> 0 1 1 0 0 0 1 <td class="c4"> 1 1 4
<tr><td class="c1"> 0 2 2 3 <td class="c2"> 1 0 0 1 1 0 1 <td class="c3"> 0 1 1 0 0 1 0 <td class="c4"> 1 1 3
<tr><td class="c1"> 0 2 3 3 <td class="c2"> 1 0 0 1 0 1 1 <td class="c3"> 0 1 1 0 1 0 0 <td class="c4"> 1 1 2
<tr style="border-bottom: solid black 1px"><td class="c1"> 0 3 3 3 <td class="c2"> 1 0 0 0 1 1 1 <td class="c3"> 0 1 1 1 0 0 0 <td class="c4"> 1 1 1
<tr><td class="c1"> 1 1 1 1 <td class="c2"> 0 1 1 1 1 0 0 <td class="c3"> 1 0 0 0 0 1 1 <td class="c4"> 0 4 4
<tr><td class="c1"> 1 1 1 2 <td class="c2"> 0 1 1 1 0 1 0 <td class="c3"> 1 0 0 0 1 0 1 <td class="c4"> 0 3 4
<tr><td class="c1"> 1 1 1 3 <td class="c2"> 0 1 1 1 0 0 1 <td class="c3"> 1 0 0 0 1 1 0 <td class="c4"> 0 3 3
<tr><td class="c1"> 1 1 2 2 <td class="c2"> 0 1 1 0 1 1 0 <td class="c3"> 1 0 0 1 0 0 1 <td class="c4"> 0 2 4
<tr><td class="c1"> 1 1 2 3 <td class="c2"> 0 1 1 0 1 0 1 <td class="c3"> 1 0 0 1 0 1 0 <td class="c4"> 0 2 3
<tr><td class="c1"> 1 1 3 3 <td class="c2"> 0 1 1 0 0 1 1 <td class="c3"> 1 0 0 1 1 0 0 <td class="c4"> 0 2 2
<tr><td class="c1"> 1 2 2 2 <td class="c2"> 0 1 0 1 1 1 0 <td class="c3"> 1 0 1 0 0 0 1 <td class="c4"> 0 1 4
<tr><td class="c1"> 1 2 2 3 <td class="c2"> 0 1 0 1 1 0 1 <td class="c3"> 1 0 1 0 0 1 0 <td class="c4"> 0 1 3
<tr><td class="c1"> 1 2 3 3 <td class="c2"> 0 1 0 1 0 1 1 <td class="c3"> 1 0 1 0 1 0 0 <td class="c4"> 0 1 2
<tr><td class="c1"> 1 3 3 3 <td class="c2"> 0 1 0 0 1 1 1 <td class="c3"> 1 0 1 1 0 0 0 <td class="c4"> 0 1 1
<tr><td class="c1"> 2 2 2 2 <td class="c2"> 0 0 1 1 1 1 0 <td class="c3"> 1 1 0 0 0 0 1 <td class="c4"> 0 0 4
<tr><td class="c1"> 2 2 2 3 <td class="c2"> 0 0 1 1 1 0 1 <td class="c3"> 1 1 0 0 0 1 0 <td class="c4"> 0 0 3
<tr><td class="c1"> 2 2 3 3 <td class="c2"> 0 0 1 1 0 1 1 <td class="c3"> 1 1 0 0 1 0 0 <td class="c4"> 0 0 2
<tr><td class="c1"> 2 3 3 3 <td class="c2"> 0 0 1 0 1 1 1 <td class="c3"> 1 1 0 1 0 0 0 <td class="c4"> 0 0 1
<tr><td class="c1"> 3 3 3 3 <td class="c2"> 0 0 0 1 1 1 1 <td class="c3"> 1 1 1 0 0 0 0 <td class="c4"> 0 0 0
</tbody></table></p>
<p>Observe that since <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2cn%29%20%3d%20%5cbinom%7bn%2bd%2d1%7d%7bd%2d1%7d%20%3d%20%5cbinom%7bn%2bd%2d1%7d%7bn%7d%20%3d%0aC%28n%2b1%2c%20d%2d1%29%24"> we have in general that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2cn%29%20%3d%20C%28n%2b1%2c%20d%2d1%29%24">, which
may be surprising. One might have guessed that since <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%285%2c3%29%20%3d%0aC%284%2c4%29%24">, the relation was <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24C%28d%2cn%29%20%3d%20C%28d%2b1%2c%20n%2d1%29%24"> and that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2cn%29%24"> would have the same structure as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%28d%2b1%2c%20n%2d1%29%24">, but it isn't so.
The two arguments exchange roles. Following the same path, we can
identify many similar ‘coincidences’. For example, there is a simple
bijection between the original set of 715 puzzles, which was
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%2810%2c4%29%24">, and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%285%2c9%29%24">, the set of nondecreasing sequences of
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%240%5cldots%204%24"> of length <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%249%24">.</p>
<p>[ Thanks to Bence Kodaj for a correction. ]</p>
Let's decipher a thousand-year-old magic square
http://blog.plover.com/2016/12/15#magic-square-puzzle
<p>The <a href="https://en.wikipedia.org/wiki/Parshvanatha_temple,_Khajuraho">Parshvanatha
temple</a>
in Madhya Pradesh, India was built around 1,050 years ago. Carved at
its entrance is this magic square:</p>
<p align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/magic-square.png"></p>
<p>The digit signs have changed in the past thousand years, but it's a
quick and fun puzzle to figure out what they mean using only the
information that this is, in fact, a magic square.</p>
<p>A solution follows. No peeking until you've tried it yourself!</p>
<hr />
<p>There are 9 one-digit entries
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/1.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/2.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/3.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/z.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/E.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/><br>
and 7 two-digit entries
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/12.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/18.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/13.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/11.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/1E.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/10.png"/>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/14.png"/><br>
so we can guess
that the entries are the numbers 1 through 16, as is usual, and the
magic sum is 34. The <img src="http://pic.blog.plover.com/math/magic-square-puzzle/1.png"/> appears in the
same position in all the two-digit numbers, so it's the digit 1. The
other digit of the numeral <img src="http://pic.blog.plover.com/math/magic-square-puzzle/10.png"/> is <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/0.png"/>, and this must be zero. If it were
otherwise, it would appear on its own, as does for example the
<img
src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/> from <img src="http://pic.blog.plover.com/math/magic-square-puzzle/18.png"/> or the
<img
src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> from <img src="http://pic.blog.plover.com/math/magic-square-puzzle/14.png"/>.</p>
<p>It is tempting to imagine that <img src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> is 4.
But we can see it's not so. Adding up the rightmost column, we get</p>
<p align=center>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/18.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/11.png"/> + <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/> = <br>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/18.png"/> + 11 + <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/> = <br>
(10 + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/>) + 11 + <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/>
= 34,
</p>
<p>so that <img src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> must be an <em>odd</em> number. We
know it isn't 1 (because <img src="http://pic.blog.plover.com/math/magic-square-puzzle/1.png"/> is 1), and it
can't be 7 or 9 because <img src="http://pic.blog.plover.com/math/magic-square-puzzle/14.png"/> appears in the
bottom row and there is no 17 or 19. So <img src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/>
must be 3 or 5.</p>
<p>Now if <img src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> were 3, then <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/14.png"/> would be 13, and the third column would be</p>
<p align=center>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/1.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/10.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/14.png"/> = <br>
1 + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/> + 10 + 13 = 34,
</p>
<p>and then <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/> would be 10, which is too big. So <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/> must be 5, and this means that <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/> is 4 and <img src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/> is 8.
(<img src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/> appears only a as a single-digit
numeral, which is consistent with it being 8.)</p>
<p>The top row has</p>
<p align=center>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/12.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/1.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/18.png"/> = <br>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/12.png"/> + 1 + 14 = <br>
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/> + (10 + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/2.png"/>) + 1 + 14 = 34</p>
<p>so that <img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/> + <img src="http://pic.blog.plover.com/math/magic-square-puzzle/2.png"/>
= 9. <img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/> only appears as a single digit and
we already used 8 so <img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/> must be 7 or 9.
But 9 is too big, so it must be 7, and then <img
src="http://pic.blog.plover.com/math/magic-square-puzzle/2.png"/> is 2.</p>
<p><img src="http://pic.blog.plover.com/math/magic-square-puzzle/z.png"/> is the only remaining unknown single-digit
numeral, and we already know 7 and 8, so
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/z.png"/> is 9. The leftmost column tells us
that <img src="http://pic.blog.plover.com/math/magic-square-puzzle/1E.png"/> is 16, and the last two entries,
<img src="http://pic.blog.plover.com/math/magic-square-puzzle/13.png"/> and <img src="http://pic.blog.plover.com/math/magic-square-puzzle/3.png"/> are
easily discovered to be 13 and 3. The decoded square is:</p>
<p align=center>
<table cellspacing=20>
<tr><td><table>
<tr><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/9.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/12.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/1.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/18.png"/>
<tr><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/2.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/13.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/7.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/11.png"/>
<tr><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/1E.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/3.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/10.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/4.png"/>
<tr><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/z.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/E.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/14.png"/><td align=center><img src="http://pic.blog.plover.com/math/magic-square-puzzle/8.png"/>
</table>
<td>
<table>
<tr><td align=center>7<td align=center>12<td align=center>1<td align=center>14
<tr><td align=center>2<td align=center>13<td align=center>8<td align=center>11
<tr><td align=center>16<td align=center>3<td align=center>10<td align=center>5
<tr><td align=center>9<td align=center>6<td align=center>15<td align=center>4
</table>
</table></p>
<p>I like that people look at the right-hand column and immediately see 18 + 11 + 4 + 8 but it's actually
14 + 11 + 5 + 4.</p>
<p>This is <a href="https://en.wikipedia.org/wiki/Most-perfect_magic_square">an extra-special magic
square</a>: not
only do the ten rows, columns, and diagonals all add up to 34, so do
all the four-cell subsquares, so do any four squares arranged
symmetrically about the center, and so do all the broken diagonals
that you get by wrapping around at the edges.</p>
<p>[ Addendum: It has come to my attention that the digit symbols in
the magic square are not too different from the current forms
of
<a href="https://en.wikipedia.org/wiki/Hindu%E2%80%93Arabic_numeral_system#Symbols">the digit symbols in the Gujarati script</a>. ]</p>
<p>[ Addendum 20161217: The temple is not very close to Gujarat or to
the area in which Gujarati is common, so I guess that the digit
symbols in Indian languages have evolved in the past thousand
years, with the Gujarati versions remaining closest to the
ancient forms, or else perhaps Gujarati was spoken more widely a
thousand years ago. I would be interested to hear about this
from someone who knows. ]</p>
<p>[ Addendum 20170130: <a href="https://shreevatsa.wordpress.com/">Shreevatsa R.</a> has contributed <a href="http://blog.plover.com/lang/magic-square-puzzle-2.html">a detailed discussion of the history of the digit symbols</a>. ]</p>
Decomposing a function into its even and odd parts
http://blog.plover.com/2016/07/30#even-odd
<p>As I have mentioned before, I am not a sudden-flash-of-insight
person. Every once in a while it happens, but usually my thinking style is to
minutely examine a large mass of examples and then gradually
synthesize some conclusion about them. I am a penetrating but slow
thinker. But there have been a few occasions in my life when the
solution to a problem struck me suddenly out of the blue.</p>
<p>One such occasion was on the first day of my sophomore honors physics
class in 1987. This was one of the best classes I took in my college
career. It was given by Professor Stephen Nettel, and it was about
resonance phenomena. I love when a course has a single overarching
theme and proceeds to examine it in detail; that is all too rare. I
deeply regret leaving my copy of the course notes in a restaurant in
1995.</p>
<p>The course was very difficult, But also very satisfying. It was also
somewhat hair-raising, because of Professor Nettel's habit of saying,
all through the second half “Don't worry if it doesn't seem to make
any sense, it will all come together for you during the final exam.”
This was not reassuring. But he was right! It <em>did</em> all come
together during the final exam.</p>
<p>The exam had two sets of problems. The problems on the left side of
the exam paper concerned some mechanical system, I think a rod fixed
at one end and free at the other, or something like that. This set of
problems asked us to calculate the resonant frequency of the rod, its
rate of damping at various driving frequencies, and related matters.
The right-hand problems were about an electrical system involving a
resistor, capacitor, and inductor. The questions were the same, and
the answers were formally identical, differing only in the details: on
the left, the answers involved length, mass and stiffness of the rod,
and on the right, the resistance, capacitance, and inductance of the
electrical components. It was a brilliant exam, and I have never
learned so much about a subject <em>during</em> the final exam.</p>
<p>Anyway, I digress. After the first class, we were assigned homework.
One of the problems was</p>
<blockquote>
<p>Show that every function is the sum of an even function and an odd
function.</p>
</blockquote>
<p>(Maybe I should explain that an even function is one which is
symmetric across the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24y%24">-axis; formally it is a function <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> for
which <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%28x%29%20%3d%20f%28%2dx%29%24"> for every <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">. For example, the function
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%5e2%2d4%24">, shown below left. An odd function is one which is
symmetric under a half-turn about the origin; formally it satisfies
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%28x%29%20%3d%20%2df%28%2dx%29%24"> for all <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">. For example <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7bx%5e3%7d%7b20%7d%24">, shown
below right.)</p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/even.png">
<img src="http://pic.blog.plover.com/math/even-odd/odd.png">
</p>
<p>I found this claim very surprising, and we had no idea how to solve
it. Well, not quite <em>no</em> idea: I knew that functions could be expanded in
<a href="http://enwp.org/fourier_series">Fourier series</a>, as the sum of a sine
series and a cosine series, and the sine part was odd while the cosine
part was even. But this seemed like a bigger hammer than was
required, particularly since new sophomores were not expected to know
about Fourier series.</p>
<p>I had the privilege to be in that class with
<a href="https://en.wikipedia.org/wiki/Ron_Buckmire">Ron Buckmire</a>, and I
remember we stood outside the class building in the autumn sunshine
and discussed the problem. I might have been thinking that perhaps
there was some way to replace the negative part of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> with a
reflected copy of the positive part to make an even function, and
maybe that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%28x%29%20%2b%20f%28%2dx%29%24"> was always even, when I was hit from the
blue with the solution:</p>
<p>$$
\begin{align}
f_e(x) & = \frac{f(x) + f(-x)}2 \text{ is even},\\
f_o(x) & = \frac{f(x) - f(-x)}2 \text{ is odd, and}\\
f(x) &= f_e(x) + f_o(x)
\end{align}
$$</p>
<p>So that was that problem solved. I don't remember the other three
problems in that day's homework, but I have remembered that one ever
since.</p>
<p>But for some reason, it didn't occur to me until today to think about
what those functions actually looked like. Of course, if <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24">
itself is even, then <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_e%20%3d%20f%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_o%20%3d%200%24">, and similarly if
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> is odd. But most functions are neither even nor odd.</p>
<p>For example, consider the function <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%5ex%24">, which is neither even nor
odd. Then we get </p>
<p>$$
\begin{align}
f_e(x) & = \frac{2^x + 2^{-x}}2\\
f_o(x) & = \frac{2^x - 2^{-x}}2
\end{align}
$$</p>
<p>The graph is below left. The solid red line is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%5ex%24">, and the blue
and purple dotted lines are <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_e%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_o%24">. The red line is
the sum of the blue and purple lines. I thought this was very
interesting-looking, but a little later I realized that I had already known
what these graphs would look like, because <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%5ex%24"> is just like
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24e%5ex%24">, and for <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24e%5ex%24"> the even and odd components are exactly the
familiar <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccosh%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csinh%24"> functions. (Below left, <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%5ex%24">; below right,
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24e%5ex%24">.)</p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/exp2.png">
<img src="http://pic.blog.plover.com/math/even-odd/exp.png">
</p>
<p>I wasn't expecting polynomials to be more interesting, but they were.
(Polynomials whose terms are all odd powers of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">, such as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%5e%7b13%7d%20%2d%0a4x%5e5%20%2b%20x%24">, are always odd functions,
and similarly polynomials whose terms are all even powers of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24"> are
even functions.) For example, consider <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%28x%2d1%29%5e2%24">, which is neither
even nor odd. We don't even need the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_e%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_o%24"> formulas
to separate this into even and odd parts: just expand <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%28x%2d1%29%5e2%24"> as
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%5e2%20%2d%202x%20%2b%201%24"> and separate it into odd and even powers, <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%2d2x%24"> and
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%5e2%20%2b%201%24">:</p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/poly1.png">
</p>
<p>Or we could do <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7b%28x%2d1%29%5e3%7d3%24"> similarly, expanding it as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7bx%5e3%7d3%20%2d%20x%5e2%20%2b%0ax%20%2d%5cfrac13%24"> and separating this into <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%2dx%5e2%20%2d%5cfrac13%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7bx%5e3%7d3%20%2b%20x%24">:</p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/poly2.png">
</p>
<p>I love looking at these and seeing how the even blue line and the odd
purple line conspire together to make whatever red line I want.</p>
<p>I kept wanting to try familiar simple functions, like <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac1x%24">, but
many of these are either even or odd, and so are uninteresting for
this application. But you can make an even or an odd function into a
neither-even-nor-odd function just by translating it horizontally,
which you do by replacing <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24"> with <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%2dc%24">. So the next function I
tried was <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac1%7bx%2b1%7d%24">, which is the translation of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%0a1x%24">. Here I got a surprise. I knew that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac1%7bx%2b1%7d%24"> was
undefined at <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3d%2d1%24">, so I graphed it only for <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3e%2d1%24">. But the
even component is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac12%5cleft%28%5cfrac1%7b1%2bx%7d%2b%5cfrac1%7b1%2dx%7d%5cright%29%24">,
which is undefined at both <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3d%2d1%24"> and at <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3d%2b1%24">. Similarly the odd
component is undefined at two points. So the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%20%3d%20f%5c_o%20%2b%20f%5c_e%24">
formula does not work quite correctly, failing to produce the correct
value at <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3d1%24">, even though <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> is defined there. In general, if
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> is undefined at some <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3dc%24">, then the decomposition into even
and odd components fails at <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3d%2dc%24"> as well. The limit $$\lim_{x\to
-c} f(x) = \lim_{x\to -c} \left(f_o(x) + f_e(x)\right)$$ does hold, however. The
graph below shows the decomposition of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac1%7bx%2b1%7d%24">. </p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/hyper1.png">
</p>
<p>Vertical translations
are uninteresting: they leave <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_o%24"> unchanged and
translate <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%5c_e%24"> by the same amount, as you can verify algebraically
or just by thinking about it.</p>
<p>Following the same strategy I tried a cosine wave. The evenness of
the cosine function is one of its principal properties, so I
translated it and used <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccos%20%28x%2b1%29%24">. The graph below is actually
for <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%245%5ccos%28x%2b1%29%24"> to prevent the details from being too compressed:</p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/cosine.png">
</p>
<p>This reminded me of the time I was fourteen and graphed <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csin%20x%20%2b%0a%5ccos%20x%24"> and was surprised to see that it was another perfect
sinusoid. But I realized that there was a simple way to understand
this. I already knew that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccos%28x%20%2b%20y%29%20%3d%20%5csin%20x%5ccos%20y%20%2b%20%5csin%20y%20%5ccos%0ax%24">. If you take <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24y%3d%5cfrac%5cpi4%24"> and multiply the whole thing by
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csqrt%202%24">, you get $$\sqrt2\cos\left(x + \frac\pi4\right) =
\sqrt2\sin x\cos\frac\pi4 + \sqrt2\cos x\sin\frac\pi4 = \sin x + \cos
x$$ so that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csin%20x%20%2b%20%5ccos%20x%24"> is just a shifted, scaled cosine
curve. The decomposition of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccos%28x%2b1%29%24"> is even simpler because you
can work forward instead of backward and find that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccos%28x%2b1%29%20%3d%20%5csin%0ax%5ccos%201%20%2b%20%5ccos%20x%20%5csin%201%24">, and the first term is odd while the second
term is even, so that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5ccos%28x%2b1%29%24"> decomposes as a sum of an even and
an odd sinusoid as you see in the graph above.</p>
<p>Finally, I tried a
<a href="http://enwp.org/Poisson_distribution">Poisson distribution</a>, which is
highly asymmetric. The formula for the Poisson distribution is
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7b%5clambda%5exe%5e%5clambda%7d%7bx%21%7d%24">, for some constant <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5clambda%24">. The
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%21%20%24"> in the denominator is only defined for non-negative integer
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">, but you can extend it to fractional and negative <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24"> in the
usual way by using <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cGamma%28x%2b1%29%24"> instead, where <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cGamma%24"> is the
<a href="http://enwp.org/Gamma_function">Gamma function</a>. The <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cGamma%24">
function is undefined at zero and negative integers, but fortunately
what we need here is the
<a href="http://enwp.org/Gamma_function">reciprocal gamma function</a>
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac1%7b%5cGamma%28x%29%7d%24">, which is perfectly well-behaved. The results
are spectacular. The graph below has <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5clambda%20%3d%200%2e8%24">.</p>
<p align="center">
<img src="http://pic.blog.plover.com/math/even-odd/poisson.png">
</p>
<p>The part of this with <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%5cge%200%24"> is the most interesting to me,
because the Poisson distribution has a very distinctive shape, and
once again I like seeing the blue and purple <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cGamma%24"> functions
working together to make it. I think it's just great how the red line
goes gently to zero as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24"> increases, even though the even and the
odd components are going wild. (<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%21%20%24"> increases rapidly with <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">,
so the reciprocal <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cGamma%24"> function goes rapidly to zero. But the
even and odd components also have a <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac1%7b%5cGamma%28%2dx%29%7d%24"> part, and
this is what dominates the blue and purple lines when <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%20%3e4%24">.)</p>
<p>On the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%5clt%200%24"> side it has no meaning for me, and it's just wiggly
lines. It hadn't occurred to me before that you could extend the
Poisson distribution function to negative <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">, and I still can't
imagine what it could mean, but I suppose why not. Probably some
statistician could explain to me what the Poisson distribution is
about when <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3c0%24">.</p>
<p>You can also consider the function <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csqrt%20x%24">, which breaks down
completely, because either <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csqrt%20x%24"> or <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csqrt%7b%2dx%7d%24"> is undefined
except when <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%3d0%24">. So the claim that <em>every</em> function is the sum of
an even and an odd function fails here too. Except perhaps not! You
could probably consider the extension of the square root function to
the complex plane, and take one of its branches, and I suppose it
works out just fine. The geometric interpretation of evenness and
oddness are very different, of course, and you can't really draw the
graphs unless you have four-dimensional vision.</p>
<p>I have no particular point to make, except maybe that math is fun,
even elementary math (or perhaps especially elementary math) and it's
fun to see how it works out.</p>
<p>The beautiful graphs in this article were made with
<a href="https://www.desmos.com/">Desmos</a>. I had dreaded having to illustrate
my article with graphs from Gnuplot (ugh) or Wolfram|α (double
ugh) and was thrilled to find such a handsome alternative.</p>
<p>[ Addendum: I've just discovered that in Desmos you can include a parameter in the functions that it graphs, and attach the parameter to a slider. So for example you can arrange to have it display <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%28x%2bk%29%5e3%24"> or <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24e%5e%7b%2d%28x%2bk%29%5e2%7d%24">, with the value of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24k%24"> controlled by the slider, and have the graph move left and right on the plane as you adjust the slider, with its even and odd parts changing in real time to match. ]</p>
<p>[ For example, check out <a href="https://www.desmos.com/calculator/qc2tbh0xnv">travelling Gaussians</a> or <a href="https://www.desmos.com/calculator/mvptcfvx7f">varying sinusoid</a>. ]</p>
A simple but difficult arithmetic puzzle
http://blog.plover.com/2016/07/12#17-puzzle
<p>Lately my kids have been interested in puzzles of this type: You are
given a sequence of four digits, say 1,2,3,4, and your job is to
combine them with ordinary arithmetic operations (+, -, ×, and ÷) in any order to
make a target number, typically 24. For example, with 1,2,3,4, you
can go with $$((1+2)+3)×4 = 24$$ or with $$4×((2×3)×1) = 24.$$</p>
<p>We were stumped trying to make 6,6,5,2 total 24, so I hacked up a
solver; then we felt a little foolish when we saw the solutions,
because it is not that hard. But in the course of testing the solver,
I found the most challenging puzzle of this type that I've ever seen.
It is:</p>
<blockquote>
<p>Given 6,6,5,2, make 17.</p>
</blockquote>
<p>There are no underhanded tricks. For example, you may not concatenate
2 and 5 to make 25; you may not say <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%246%c3%b76%3d1%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%245%2b2%3d7%24"> and
concatenate 1 and 7 to make <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%2417%24">; you may not interpret the 17 as a
base 12 numeral, etc.</p>
<p>I hope to write a longer article about solvers in the next week or so.</p>
The sage and the seven horses
http://blog.plover.com/2016/04/20#horse-puzzle
<p>A classic puzzle of mathematics goes like this:</p>
<blockquote>
<p>A father dies and his will states that his elder daughter should
receive half his horses, the son should receive one-quarter of the
horses, and the younger daughter should receive one-eighth of the
horses. Unfortunately, there are seven horses. The siblings are
arguing about how to divide the seven horses when a passing sage hears
them. The siblings beg the sage for help. The sage donates his own
horse to the estate, which now has eight. It is now easy to portion
out the half, quarter, and eighth shares, and having done so, the
sage's horse is unaccounted for. The three heirs return the surplus
horse to the sage, who rides off, leaving the matter settled fairly.</p>
</blockquote>
<p>(The puzzle is, what just happened?)</p>
<p>It's not hard to come up with variations on this. For example,
picking three fractions at random, suppose the will says that the
eldest child receives half the horses, the middle child receives
one-fifth, and the youngest receives one-seventh. But the estate has
only 59 horses and an argument ensues. All that is required for
the sage to solve the problem is to lend the estate eleven horses.
There are now 70, and after taking out the three bequests, <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%2470%20%2d%2035%20%2d%0a14%20%2d%2010%20%3d%2011%24"> horses remain and the estate settles its debt to the
sage.</p>
<p>But here's a variation I've never seen before. This time there are 13
horses and the will says that the three children should receive shares
of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac12%2c%20%5cfrac13%2c%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac14%24">. respectively. Now the
problem seems impossible, because <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac12%20%2b%20%5cfrac13%20%2b%20%5cfrac14%20%5cgt%0a1%24">. But the sage is equal to the challenge! She leaps into the
saddle of one of the horses and rides out of sight before the
astonished heirs can react. After a day of searching the heirs write
off the lost horse and proceed with executing the will. There are now
only 12 horses, and the eldest takes half, or six, while the middle
sibling takes one-third, or 4. The youngest heir should get three,
but only two remain. She has just opened her mouth to complain at her
unfair treatment when the sage rides up from nowhere and hands her the
reins to her last horse.</p>
Math.SE report 2015-08
http://blog.plover.com/2015/12/18#2015-08
<p>I only posted three answers in August, but two of them were interesting.</p>
<ul>
<li><p>In <a href="http://math.stackexchange.com/a/1381699/25554">why this <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csigma%5cpi%5csigma%5e%7b%2d1%7d%24"> keeps apearing in my group
theory book? (cycle
decomposition)</a> the
querent asked about the “conjugation” operation that keeps cropping
up in group theory. Why is it important? I sympathize with this;
it wasn't adequately explained when I took group theory, and I had
to figure it out a long time later. Unfortunately I don't think I
picked the right example to explain it, so I am going to try again
now.</p>
<p>Consider the eight symmetries of the square. They are of five types:</p>
<ol>
<li>Rotation clockwise or counterclockwise by 90°.</li>
<li>Rotation by 180°.</li>
<li>Horizontal or vertical reflection</li>
<li>Diagonal reflection</li>
<li>The trivial (identity) symmetry</li>
</ol>
<p>What is meant when I say that a horizontal and a vertical reflection
are of the same ‘type’? Informally, it is that the horizontal
reflection looks just like the vertical reflection, if you turn your
head ninety degrees. We can formalize this by observing that if we
rotate the square 90°, then give it a horizontal flip, then rotate it
back, the effect is exactly to give it a vertical flip. In notation,
we might represent the horizontal flip by <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24H%24">, the vertical flip by
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24V%24">, the clockwise rotation by <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5crho%24">, and the counterclockwise
rotation by <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5crho%5e%7b%2d1%7d%24">; then we have </p>
<p>$$ \rho H \rho^{-1} = V$$</p>
<p>and similarly </p>
<p>$$ \rho V \rho^{-1} = H.$$</p>
<p>Vertical flips do not look like diagonal flips—the diagonal flip leaves two of the corners in the same place, and the vertical flip does not—and indeed there is
no analogous formula with <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24H%24"> replaced with one of the <em>diagonal</em>
flips. However, if <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24D%5c_1%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24D%5c_2%24"> are the two diagonal flips,
then we <em>do</em> have</p>
<p>$$ \rho D_1 \rho^{-1} = D_2.$$</p>
<p>In general, When <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24b%24"> are
two symmetries, and there is some symmetry <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24"> for which </p>
<p>$$xax^{-1} = b$$</p>
<p>we say that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%24"> is <em>conjugate to</em> <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24b%24">.
One can show that
conjugacy is an equivalence relation, which means that the symmetries
of any object can be divided into separate “conjugacy classes” such that two
symmetries are conjugate if and only if they are in the same class.
For the square, the conjugacy classes are the five I listed earlier.</p>
<p>This conjugacy thing is important for telling when two symmetries
are group-theoretically “the same”, and have the same
group-theoretic properties. For example, the fact that the
horizontal and vertical flips move all four vertices, while the
diagonal flips do not. Another example is that a horizontal flip is
self-inverse (if you do it again, it cancels itself out), but a 90°
rotation is not (you have to do it <em>four</em> times before it cancels
out.) But the horizontal flip shares all its properties with the
vertical flip, because it is the same if you just turn your head.</p>
<p>Identifying this sameness makes certain kinds of arguments much
simpler. For example, in <a href="http://blog.plover.com/math/polya-burnside.html">counting
squares</a>, I wanted to
count the number of ways of coloring the faces of a cube, and instead
of dealing with the 24 symmetries of the cube, I only needed to deal
with their 5 conjugacy classes.</p>
<p>The example I gave in my math.se answer was maybe less perspicuous. I
considered the symmetries of a sphere, and talked about how two
rotations of the sphere by 17° are conjugate, regardless of what axis
one rotates around. I thought of the square at the end, and threw it
in, but I wish I had started with it.</p></li>
<li><p><a href="http://math.stackexchange.com/a/1404453/25554">How to convert a decimal to a fraction
easily?</a> was the
month's big winner. OP wanted to know how to take a decimal like
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%240%2e3760683761%24"> and discover that it can be written as
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7b44%7d%7b117%7d%24">. The right answer to this is of course to use
continued fraction theory, but I did not want to write a long
treatise on continued fractions, so I stripped down the theory to
obtain an algorithm that is slower, but much easier to understand.</p>
<p>The algorithm is just binary search, but with a twist. If you are looking for a
fraction for <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">, and you know <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%20ab%20%3c%20x%20%3c%20%5cfrac%20cd%24">, then
you construct the mediant <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7ba%2bc%7d%7bb%2bd%7d%24"> and compare it with
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">. This gives you a smaller interval in which to search for
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">, and the reason you use the mediant instead of using
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac12%5cleft%28%5cfrac%20ab%20%2b%20%5cfrac%20cd%5cright%29%24"> as usual is that if you use the
mediant you are guaranteed to exactly nail all the best rational
approximations of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24">. This is the algorithm I
described a few years ago in <a href="http://blog.plover.com/math/age-fraction-2.html">your age as a fraction,
again</a>; there the binary search proceeds
down the branches of the Stern-Brocot tree to find a fraction close
to <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%240%2e368%24">.</p></li>
</ul>
<hr />
<p>I did ask a question this month: I was looking for a <a href="http://math.stackexchange.com/q/1405312/25554">simpler version
of the dogbone space
construction</a>. The
dogbone space is a very peculiar counterexample of general topology,
originally constructed by R.H. Bing. <a href="http://blog.plover.com/math/R3-root.html">I mentioned it here in
2007</a>, and said, at the time:</p>
<blockquote>
<p>[The paper] is on my desk, but I have not read this yet, and I may never.</p>
</blockquote>
<p>I did try to read it, but I did not try very hard, and I did not
understand it. So my question this month was if there was a simpler
example of the same type. I did not receive an answer, just a
followup comment that no, there is no such example.</p>
Math.SE report 2015-07
http://blog.plover.com/2015/08/16#2015-07
<p>My overall SE posting volume was down this month, and not only did I
post relatively few interesting items, I've already written <a href="http://blog.plover.com/math/ounce-of-theory-2.html">a whole
article about the most interesting
one</a>. So this will be a short
report.</p>
<ul>
<li><p>I already wrote up <a href="http://math.stackexchange.com/questions/1376640">Building a box from smaller
boxes</a> on the blog
<a href="http://blog.plover.com/math/ounce-of-theory-2.html">here</a>. But maybe I have a
couple of extra remarks. First, the other guy's proposed solution
is awful. It's long and complicated, which is forgivable if it had
answered the question, but it doesn't. And the key point is “blah
blah blah therefore code a solver which visits all configurations of
the search space”. Well heck, if this post had just been one
sentence that ended with “code a solver which visits all
configurations of the search space” I would not have any complaints
about that. </p>
<p>As an undergraduate I once gave a talk on this topic. One of my
examples was the problem of packing 31 dominoes into a chessboard
from which two squares have been deleted. There is a simple
combinatorial argument why this is impossible if the two deleted
squares are the same color, say if they are opposite corners: each
domino must cover one square of each color. But if you don't take
time to think about the combinatorial argument you could waste a lot
of time on computer search learning that there is no solution in
that case, and completely miss the deeper understanding that it
brings you. So this has been on my mind for a long time.</p></li>
<li><p>I wrote a few posts this month where I thought I gave good hints.
In <a href="http://math.stackexchange.com/questions/1371330/">How to scale an unit vector <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24u%24"> in such way that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%20u%5ccdot%0a%20%20u%3d1%24"> where <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%24"> is a
scalar</a> I think I
did a good job identifying the original author's confusion; he was
conflating his original unit vector <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24u%24"> and the scaled, leading
him to write <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24au%5ccdot%20u%3d1%24">. This is sure to lead to confusion. So
I led him to the point of writing <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%28bv%29%5ccdot%28bv%29%3d1%24"> and let him
take it from there. The other proposed solution is much more rote
and mechanical. (“Divide this by that…”)</p>
<p>In <a href="ttp://math.stackexchange.com/questions/1362089/">Find numbers <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5coverline%7babcd%7d%24"> so that
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5coverline%7babcd%7d%2b%5coverline%7bbcd%7d%2b%5coverline%7bcd%7d%2bd%2b1%3d%5coverline%7bdcba%7d%24"></a>
the OP got stuck partway through and I specifically addressed the
stuckness; other people solved the problem from the beginning. I
think that's the way to go, if the original proposal was never going
to work, especially if you stop and say <em>why</em> it was never going to
work, but this time OP's original suggestion was perfectly good and
she just didn't know how to get to the next step. By the way, the
notation <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5coverline%7babcd%7d%24"> here means the number
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241000a%2b100b%2b10c%2bd%24">.</p>
<p>In <a href="http://math.stackexchange.com/questions/1347223">Help finding the limit of this series <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac%7b1%7d%7b4%7d%20%2b%20%20%5cfrac%7b1%7d%7b8%7d%20%2b%20%5cfrac%7b1%7d%7b16%7d%20%2b%20%5cfrac%7b1%7d%7b32%7d%20%2b%20%20%5ccdots%24"></a> it would
have been really easy to say “use the formula” or to analyze the
series de novo, but I think I <em>almost</em> hit the nail on the head
here: it's just like <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241%2b%5cfrac12%20%2b%20%5cfrac%7b1%7d%7b4%7d%20%2b%20%5cfrac%7b1%7d%7b8%7d%20%2b%0a%20%20%5cfrac%7b1%7d%7b16%7d%20%2b%20%5cfrac%7b1%7d%7b32%7d%20%2b%20%5ccdots%24">, which I bet OP already
knows, except a little different. But I pointed out the wrong
difference: I observed that the first sequence is one-fourth the
second one (which it is) but it would have been simpler to observe
that it's just the second one without the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241%2b%5cfrac12%24">. I had to
review it just now to give the simpler explanation, but I sure wish
I'd thought of it at the time. Nobody else pointed it out either.
Best of all, would have been to mention <em>both</em> methods. If you can
notice both of them you can solve the problem <em>without</em> the advance
knowledge of the value of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241%2b%5cfrac12%2b%5cfrac14%2b%5cldots%24">, because you
have <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%244S%20%3d%201%2b%5cfrac12%20%2b%20S%24"> and then solve for <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24S%24">.</p>
<p>In <a href="http://math.stackexchange.com/questions/1358933/">Visualization of Rhombus made of Radii and
Chords</a> it seemed
that OP just needed to see a diagram (“I really really don't see how
two circles can form a rhombus?”), so I drew one. </p></li>
</ul>
Another ounce of theory
http://blog.plover.com/2015/07/28#ounce-of-theory-2
<p>A few months ago I wrote an article here called <a href="http://blog.plover.com/math/ounce-of-theory.html">an ounce of theory
is worth a pound of search</a> and I
have a nice followup.</p>
<p>When I went looking for that article I couldn't find it, because I
thought it was about how an ounce of search is worth a pound of
theory, and that I was writing a counterexample. I am quite surprised
to discover that that I have several times discussed how a little
theory can replace a lot of searching, and not vice versa, but perhaps
that is because the search is my default.</p>
<p>Anyway, the question came up on math StackExchange today:</p>
<blockquote>
<p>John has 77 boxes each having dimensions 3×3×1. Is it possible for
John to build one big box with dimensions 7×9×11?</p>
</blockquote>
<p>OP opined no, but had no argument. The first answer that appeared was
somewhat elaborate and outlined a computer search strategy which
claimed to reduce the search space to only 14,553 items. (I think the
analysis is wrong, but I agree that the search space is not too
large.)</p>
<p>I almost wrote the search program. I have a program around that is
something like what would be needed, although it is optimized to deal
with a few oddly-shaped tiles instead of many similar tiles, and would
need some work. Fortunately, I paused to think a little before diving
in to the programming.</p>
<div class="bookbox"><table align=right width="14%" bgcolor="#ffffdd" border=1><tr><td align=center>
<font size="-1">Order</font><br>
<cite><font size="-1">How to Solve It</font></cite><br>
<A HREF="http://www.powells.com/partner/29575/biblio/0691119663"><IMG SRC="http://www.powells.com/cgi-bin/imageDB.cgi?isbn=0691119663" BORDER="0" ALIGN="center" ALT="How to Solve It" ></a><BR>
<A HREF="http://www.powells.com/partner/29575/biblio/0691119663"><font size="-1">with kickback</font></a><br>
<A HREF="http://www.powells.com/biblio/0691119663"><font size="-1">no kickback</font></a>
</td></tr></table></div>
<p>For there is an easy answer. Suppose John solved the problem. Look
at just one of the 7×11 faces of the big box. It is a 7×11 rectangle
that is completely filled by 1×3 and 3×3 rectangles. But 7×11 is not
a multiple of 3. So there can be no solution.</p>
<p>Now how did I think of this? It was a very geometric line of
reasoning. I imagined a 7×11×9 carton and imagined putting the small
boxes into the carton. There can be no leftover space; every one of
the 693 cells must be filled. So in particular, we must fill up the
bottom 7×11 layer. I started considering how to pack the bottommost
7×11×1 slice with just the bottom parts of the small boxes and quickly
realized it couldn't be done; there is always an empty cell left over
somewhere, usually in the corner. The argument about considering just
one face of the large box came later; I decided it was clearer than
what I actually came up with.</p>
<p>I think this is a nice example of the Pólya strategy “solve a simpler
problem” from <em>How to Solve It</em>, but I was not thinking of that
specifically when I came up with the solution.</p>
<p>For a more interesting problem of the same sort, suppose you have six
2×2x1 slabs and three extra 1×1×1 cubes. Can you pack the nine pieces
into a 3×3x3 box?</p>
Math.SE report 2015-04
http://blog.plover.com/2015/07/19#2015-04
<p>[ Notice: I originally published this report at the wrong URL. I
moved it so that I could publish the <a href="http://blog.plover.com/math/se/2015-06.html">June 2015
report</a> at that URL instead. If you're
seeing this for the second time, you might want to read the June
article instead. ]</p>
<p>A lot of the stuff I've written in the past couple of years has been
on Mathematics StackExchange. Some of it is pretty mundane, but some
is interesting. I thought I might have a little meta-discussion in
the blog and see how that goes. These are the noteworthy posts I made
in April 2015.</p>
<ul>
<li><p><a href="http://math.stackexchange.com/questions/1217598/languages-and-their-relation-help/1217609#1217609">Languages and their relation :
help</a>
is pretty mundane, but interesting for one reason: OP was confused
about a statement in a textbook, and provided a reference, which OPs
don't always do. The text used the symbol <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csubset%5c_%5cne%24">. OP had
interpreted it as meaning <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cnot%5csubseteq%24">, but I think what was
meant was <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csubsetneq%24">.</p>
<p>I dug up a copy of the text and groveled over it looking for the
explanation of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csubset%5c_%5cne%24">, which is not standard. There was
none that I could find. The book even had a section with a glossary
of notation, which didn't mention <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csubset%5c_%5cne%24">. Math professors
can be assholes sometimes.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1223920/is-there-an-operation-that-takes-ab-and-ac-and-returns-abc">Is there an operation that takes <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5ec%24">, and returns
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5e%7bbc%7d%24"></a>
is more interesting. First off, why is this even a reasonable
question? Why should there be such an operation? But note that
there <em>is</em> an operation that takes <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5ec%24"> and returns
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5e%7bb%2bc%7d%24">, namely, multiplication, so it's plausible that the
operation that OP wants might also exist.</p>
<p>But it's easy to see that there is no operation that takes <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24">
and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5ec%24"> and returns <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5e%7bbc%7d%24">: just observe that although
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%244%5e2%3d2%5e4%24">, the putative operation (call it <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24">) should take
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%282%5e4%2c%202%5e4%29%24"> and yield <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%5e%7b4%5ccdot4%7d%20%3d%202%5e%7b16%7d%20%3d%2065536%24">, but it
should also take <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%284%5e2%2c%204%5e2%29%24"> and yield <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%244%5e%7b2%5ccdot2%7d%20%3d%202%5e4%20%3d%0a%20%20256%24">. So the operation is not well-defined. And you can take this
even further: <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%5e4%24"> can be written as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24e%5e%7b4%5clog%202%7d%24">, so <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24">
should also take <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%28e%5e%7b2%5clog%204%7d%2c%20e%5e%7b2%5clog%204%7d%29%24"> and yield
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24e%5e%7b4%28%5clog%204%29%5e2%7d%20%5capprox%202180%2e37%24">.</p>
<p>They key point is that the representation of a number, or even an
integer, in the form <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24"> is not unique. (Jargon:
"exponentiation is not injective".) You can raise <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24">, but
having done so you cannot look at the result and know what <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%24">
and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24b%24"> were, which is what <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> needs to do.</p>
<p>But if <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24f%24"> can't do it, how can multiplication do it when it
multiplies <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5ec%24"> and gets <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5e%7bb%2bc%7d%24">? Does it
somehow know what <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%24"> is? No, it turns out that it doesn't need
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%24"> in this case. There is something magical going on there,
ultimately related to the fact that if some quantity is increasing
by a factor of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24x%24"> every <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24t%24"> units of time, then there is some
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24t%5c_2%24"> for which it is exactly doubling every <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24t%5c_2%24"> units of
time. Because of this there is a marvelous group homomophism $$\log
: \langle \Bbb R^+, \times\rangle \to \langle \Bbb R ,+\rangle$$ which
can change multiplication into addition <em>without</em> knowing what the
base numbers are.</p>
<p>In that thread I had a brief argument with someone who thinks that
operators apply to expressions rather than to numbers. Well, you
can say this, but it makes the question trivial: you can certainly
have an "operator" that takes <em>expressions</em> <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5ec%24"> and
yields the <em>expression</em> <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5e%7bbc%7d%24">. You just can't expect to apply
it to numbers, such as <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%2416%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%2416%24">, because those numbers are
not expressions in the form <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24a%5eb%24">. I remembered the argument
going on longer than it did; I originally ended this paragraph with
a lament that I wasted more than two comments on this guy, but
looking at the record, it seems that I didn't. Good work,
Mr. Dominus.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1229986/how-1-0-5-is-equal-to-2/">how 1/0.5 is equal to
2?</a>
wants a simple explanation. Very likely OP is a primary school
student. The question reminds me of a similar question, asking <a href="http://math.stackexchange.com/questions/683774/who-invented-division-and-why-we-do-division-in-those-steps-told/683826#683826">why
the long division algorithm is the way it
is</a>. Each
of these is a failure of education to explain what division is
actually doing. The long division answer is that long division is
an optimization for repeated subtraction; to divide <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24450%5cdiv%203%24">
you want to know how many shares of three cookies each you can get
from <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24450%24"> cookies. Long division is simply a notation for
keeping track of removing <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24100%24"> shares, leaving <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24150%24"> cookies,
then <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%245%5ccdot%2010%24"> further shares, leaving none.</p>
<p>In this question there was a similar answer. <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241%2f0%2e5%24"> is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242%24">
because if you have one cookie, and want to give each kid a share
of <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%240%2e5%24"> cookies, you can get out two shares. Simple enough.</p>
<p>I like division examples that involve giving cookies to kids,
because cookies are easy to focus on, and because the motivation for
equal shares is intuitively understood by everyone who has kids, or
who has been one.</p>
<p>There is a general pedagogical principle that an ounce of examples
are worth a pound of theory. My answer here is a good example of
that. When you explain the theory, you're telling the student how
to understand it. When you give an example, though, if it's the
right example, the student can't help but understand it, and when
they do they'll understand it in their own way, which is better than
if you told them how.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1229755/how-to-read-a-cycle-graph/">How to read a cycle
graph?</a>
is interesting because hapless OP is asking for an explanation of a
particularly strange diagram from Wikipedia. I'm familiar with the
eccentric Wikipedian who drew this, and I was glad that I was around
to say "The other stuff in this diagram is nonstandard stuff that
the somewhat eccentric author made up. Don't worry if it's not
clear; this author is notorious for that."</p></li>
<li><p>In <a href="http://math.stackexchange.com/questions/1257313/expected-number-of-die-tosses-to-get-something-less-than-5">Expected number of die tosses to get something less than
5</a>,
OP calculated as follows: The first die roll is a winner <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac23%24">
of the time. The second roll is the first winner
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac13%5ccdot%5cfrac23%24"> of the time. The third roll is the first
winner <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac13%5ccdot%5cfrac13%5ccdot%5cfrac23%24"> of the time. Summing the series
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5csum_n%20%5cfrac23%5cleft%28%5cfrac13%5cright%29%5enn%24"> we eventually obtain the
answer, <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac32%24">. The accepted answer does it this way also.</p>
<p>But there's a much easier way to solve this problem. What we really
want to know is: how many rolls before we expect to have seen one
good one? And the answer is: the expected number of winners per die
roll is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac23%24">, expectations are additive, so the expected
number of winners per <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24"> die rolls is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cfrac23n%24">, and so we
need <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%3d%5cfrac32%24"> rolls to expect one winner. Problem solved!</p>
<p>I first discovered this when I was around fifteen, <a href="http://blog.plover.com/oops/trivial.html">and wrote about
it here a few years ago</a>.</p>
<p><a href="http://blog.plover.com/math/algebra.html">As I've mentioned
before</a>, this is
one of the best things about mathematics: not that it works, but
that you can do it by whatever method that occurs to you and you get
the same answer. This is where mathematics pedagogy goes wrong most
often: it proscribes that you must get the answer by method X,
rather than that you must get the answer by hook or by crook. If
the student uses method Y, and it works (and if it is correct) that
should be worth full credit.</p>
<p>Bad instructors always say "Well, we need to test to see if the
student knows method X." No, we should be testing to see if the
student can solve problem P. If we are testing for method X, that
is a failure of the test or of the curriculum. Because if method X
is useful, it is useful because for some problems, it is the only
method that works. It is the instructor's job to find one of these
problems and put it on the test. If there is no such problem, then
X is useless and it is the instructor's job to omit it from the
curriculum. If Y always works, but X is faster, it is the
instructor's job to explain this, and then to assign a problem for
the test where Y would take more time than is available.</p>
<p>I see now <a href="http://blog.plover.com/math/484848.html">I wrote the same thing in
2006</a>. It bears repeating.
<a href="http://math.stackexchange.com/questions/331231/what-quantifies-as-a-rigorous-proof/331235#comment715387_331235">I also said it again a couple of years ago on math.se
itself</a>
in reply to a similar comment by Brian Scott:</p>
<blockquote>
<p>If the goal is to teach students how to write proofs by induction,
the instructor should damned well come up with problems for which
induction is the best approach. And if even then a student comes
up with a different approach, the instructor should be
pleased. ... The directions <strong>should not begin</strong> [with "prove by
induction"]. I consider it a failure on the part of the instructor
if he or she has to specify a technique in order to give students
practice in applying it.</p>
</blockquote></li>
</ul>
The annoying boxes puzzle: solution
http://blog.plover.com/2015/07/03#annoying-boxes-solution
<a href="http://blog.plover.com/math/logic/annoying-boxes.html">I presented this logic puzzle on Wednesday</a>:<p>
<blockquote style="background-color: #ffccff;">
There are two boxes on a table, one red and one green. One contains a
treasure. The red box is labelled "exactly one of the labels is
true". The green box is labelled "the treasure is in this box."<p>
Can you figure out which box contains the treasure?<p>
</blockquote>
It's not too late to try to solve this before reading on. If you
want, you can submit your answer here:<p>
<form method=GET action="http://perl.plover.com/annoying-boxes.cgi">
<input type=radio name="r" value="red">The treasure is in the red box<br>
<input type=radio name="r" value="green">The treasure is in the green box<br>
<input type=radio name="r" value="wut">There is not enough information to determine the answer<br>
<input type=radio name="r" value="other">Something else: <input type=text name="o" size=50><br>
<input type=submit value="Submit Solution">
</form>
<h3>Results</h3>
<blockquote><div style="font-size: 100%"> There were 506 total
responses up to Fri Jul 3 11:09:52 2015 UTC; I kept only the first
response from each IP address, leaving 451. I read all the "something
else" submissions and where it seemed clear I recoded them as votes
for "red", for "not enough information", or as spam. (Several people
had the right answer but submitted "other" so they could explain
themselves.) There was also one post attempted to attack my
(nonexistent) SQL database. Sorry, Charlie; I'm not as stupid as I
look.</div></blockquote><p>
<pre>
66.52% 300 red
25.72 116 not-enough-info
3.55 16 green
2.00 9 other
1.55 7 spam
0.44 2 red-with-qualification
0.22 1 attack
100.00 451 TOTAL
</pre>
<div style="font-size: 150%"><b>One-quarter</b> of respondents got
the <b>right</b> answer, that there is <b>not enough information</b>
given to solve the problem, <b>Two-thirds</b> of respondents said the
treasure was in the <span style="color: red"><b>red</b></span> box.
This is <span style="color: red"><b>wrong</b></span>. <b>The treasure
is in the <span style="color: green">green</span> box.</b></div><p>
<h3>What?</h3>
Let me show you. I stated:<p>
<blockquote> <div style="font-size: 122%">There are two boxes on a
table, one red and one green. One contains a treasure. The red box
is labelled "exactly one of the labels is true". The green box is
labelled "the treasure is in this box."</div></blockquote><p>
<p align=center><a href="http://pic.blog.plover.com/math/logic/annoying-boxes-solution/boxesclosed.jpg"><img src="http://pic.blog.plover.com/math/logic/annoying-boxes-solution/boxesclosed-sm.jpg" border=0 /></a></p>
The labels are as I said. Everything I told you was literally true.<p>
The treasure is definitely not in the red box.<p>
<p align=center><a href="http://pic.blog.plover.com/math/logic/annoying-boxes-solution/redboxopen.jpg"><img src="http://pic.blog.plover.com/math/logic/annoying-boxes-solution/redboxopen-sm.jpg" border=0 /></a></p>
No, it is actually in the green box.<p>
<p align=center><a href="http://pic.blog.plover.com/math/logic/annoying-boxes-solution/boxesopen.jpg"><img src="http://pic.blog.plover.com/math/logic/annoying-boxes-solution/boxesopen-sm.jpg" border=0 /></a></p>
(It's hard to see, but one of the items in the green box is the gold
and diamond ring made in Vienna by my great-grandfather, which is
unquestionably a real treasure.)<p>
So if you said the treasure must be in the red box, you were simply
mistaken. If you had a logical argument why the treasure had to be in
the red box, your argument was fallacious, and you should pause and try
to figure out what was wrong with it.<p>
I will discuss it in detail below.<p>
<h3>Solution</h3>
The treasure is undeniably in the green box. However, correct answer to the
puzzle is "no, you cannot figure out which box contains the
treasure". There is not enough information given. (Notice that the
question was not “Where is the treasure?” but “Can you figure out…?”)
<p>
<h3>(Fallacious) Argument <i>A</i></h3>
Many people erroneously conclude that the treasure is in the red box,
using reasoning something like the following:<p>
<ol>
<li>Suppose the red label is true. Then exactly one label is true,
and since the red label is true, the green label is false. Since it
says that the treasure is in the green box, the treasure must really
be in the red box.
<li>Now suppose that the red label is false. Then the green label
must also be false. So again, the treasure is in the red box.
<li>Since both cases lead to the conclusion that the treasure is in
the red box, that must be where it is.
</ol>
<h3>What's wrong with argument <i>A</i>?</h3>
Here are some responses people commonly have when I tell them that
argument <i>A</i> is fallacious:<p>
<p align=center><b>"If the treasure is in the green box, the red label is lying."</b></p>
Not quite, but argument <i>A</i> explicitly considers the possibility
that the red label was false, so what's the problem?<p>
<p align=center><b>"If the treasure is in the green box, the red label is
inconsistent."</b></p>
It could be. Nothing in the puzzle statement ruled this out. But actually it's not inconsistent, it's just irrelevant.<p>
<p align=center><b>"If the treasure is in the green box, the red label is
meaningless."</b></p>
Nonsense. The meaning is plain: it says “exactly one of these labels is
true”, and the meaning is that exactly one of the labels is true.
Anyone presenting argument <i>A</I> must have understood the label to
mean that, and it is incoherent to understand it that way and then
to turn around and say that it is meaningless! (<a href="http://blog.plover.com/math/logic/contradictions.html">I discussed this point in more detail in 2007.)</a><p>
<p align=center><b>"But the treasure <i>could</i> have been in the red box."</b></p>
True! But it is not, as you can see in the pictures. The puzzle does
not give enough information to solve the problem. If you said that
there was not enough information, then congratulations, you have the
right answer. The answer produced by argument <i>A</i> is
incontestably wrong, since it asserts that the treasure is in the red
box, when it is not.<p>
<p align=center><b>"The conditions supplied by the puzzle statement are inconsistent."</b></p>
They certainly are not. Inconsistent systems do not have models, and
in particular cannot exist in the real world. The photographs above
demonstrate a real-world model that satisfies every condition posed
by the puzzle, and so proves that it is consistent.<p>
<p align=center><b>"But that's not fair! You could have made up any random garbage at all, and then told me afterwards that you had been lying."</b></p>
Had I done that, it <i>would</i> have been an unfair puzzle. For
example, suppose I opened the boxes at the end to reveal that there
was no treasure at all. That would have directly contradicted my
assertion that "One [box] contains a treasure". That would have been
<i>cheating</i>, and I would deserve a kick in the ass.<p>
But I did <i>not</i> do that. As the photograph shows, the boxes,
their colors, their labels, and the disposition of the treasure are
all exactly as I said. I did not make up a lie to trick you; I described a real
situation, and asked whether people they could diagnose the location of
the treasure.<p>
(Two respondents accused me of making up lies. One said:<blockquote>There is no
treasure. Both labels are lying. Look at those boxes. Do you really
think someone put a treasure in one of them just for this logic
puzzle? </blockquote> What can I say? I <i>did</i> put a treasure in a box just for this logic puzzle. Some of us just have higher
standards.)<p>
<p align=center><b>"But what about the labels?"</b></p>
Indeed! What about the labels?<p>
<h3>The labels are worthless</h3>
The labels are red herrings; the provide no information. Consider the
following version of the puzzle:<p>
<blockquote style="background-color: #ffccff;">
There are two boxes on a table, one red and one green. One contains a
treasure. <!-- <s>The red box is labelled "exactly one of the labels is
true". The green box is labelled "the treasure is in this box."</s> --><p>
Which box contains the treasure?<p>
</blockquote>
Obviously, the problem cannot be solved from the information given.<p>
Now consider this version:<p>
<blockquote style="background-color: #ffccff;"> There are two boxes on
a table, one red and one green. One contains a treasure. The red box
is labelled "gcoadd atniy fnck z fbi c rirpx hrfyrom". The green box
is labelled "ofurb rz bzbsgtuuocxl ckddwdfiwzjwe ydtd."</s><p>
Which box contains the treasure?<p>
</blockquote>
One is similarly at a loss here.<p>
(By the way, people who said one label was meaningless: this is what a
meaningless label looks like.)<p>
<blockquote style="background-color: #ffccff;">
There are two boxes on a table, one red and one green. One contains a
treasure. The red box is labelled "exactly one of the labels is
true". The green box is labelled "the treasure is in this box."<p>
But then the janitor happens by. "Don't be confused by those labels,"
he says. "They were stuck on there by the previous owner of the
boxes, who was an illiterate shoemaker who only spoke Serbian. I
think he cut them out of a magazine because he liked the frilly borders."<p>
Which box contains the treasure?<p>
</blockquote>
The point being that in the absence of additional information, there
is no reason to believe that the labels give any information about the
contents of the boxes, or about labels, or about anything at all.
This should not come as a surprise to anyone. It is true not just in
annoying puzzles, but in the world in general. A box labeled “fresh figs” might contain fresh figs, or spoiled figs, or angry hornets, or nothing at all.
<div class="bookbox"><table align=right width="14%" bgcolor="#ffffdd" border=1><tr><td align=center>
<font size="-1">Order</font><br>
<cite><font size="-1">What is the Name of this Book?</font></cite><br>
<A HREF="http://www.powells.com/partner/29575/biblio/0671628321"><IMG SRC="http://www.powells.com/cgi-bin/imageDB.cgi?isbn=0671628321" BORDER="0" ALIGN="center" ALT="What is the Name of this Book?" ></a><BR>
<A HREF="http://www.powells.com/partner/29575/biblio/0671628321"><font size="-1">with kickback</font></a><br>
<A HREF="http://www.powells.com/biblio/0671628321"><font size="-1">no kickback</font></a>
</td></tr></table></div>
<h3>Why doesn't every logic puzzle fall afoul of this problem?</h3>
I said as part of the puzzle conditions that there was a treasure in
one box. For a fair puzzle, I am required to tell the truth about the
puzzle conditions. Otherwise I'm just being a jerk.<p>
Typically the truth or falsity of the labels
<b>is part of the puzzle conditions</b>. Here's a typical example,
which I took from Raymond Smullyan's <cite>What is the name of this
book?</cite> (problem 67a):<p>
<blockquote style="background-color: #ffccff;">
… She had the following inscriptions put on the caskets:
<table>
<tr><th>Gold<th>Silver<th>Lead
<tr>
<td align=center>THE PORTRAIT IS IN THIS CASKET
<td align=center>THE PORTRAIT IS NOT IN THIS CASKET
<td align=center>THE PORTRAIT IS NOT IN THE GOLD CASKET
</table>
<b>Portia explained to the suitor that of the three statements, at most one was true.</b><p> Which casket should the suitor choose [to find the portrait]?<p>
</blockquote>
Notice that the problem condition gives the suitor a certification
about the truth of the labels, on which he may rely. In the quotation
above, the certification is in boldface.<p>
A well-constructed puzzle will always contain such a certification,
something like “one label is true and one is false” or “on this
island, each person always lies, or always tells the truth”. I went to
<cite>What is the Name of this Book?</cite> to get the example above, and found
more than I had bargained for: problem 70 is exactly the annoying boxes problem!
Smullyan says:<p>
<blockquote>
Good heavens, I can take any number of caskets that I please and put
an object in one of them and then write any inscriptions at all on the
lids; these sentences won't convey any information whatsoever.
</blockquote>
(Page 65)<p>
Had I known ahead of time that Smullyan had treated the exact same
topic with the exact same example, I doubt I would have written this
post at all.<p>
<h3>But why is this so surprising?</h3>
I don't know.<p>
<h3>Final notes</h3>
16 people correctly said that the treasure was in the green box. This
has to be counted as a lucky guess, unacceptable as a solution to a
logic puzzle.<p>
One respondent referred me to <a
href="http://lesswrong.com/lw/ne/the_parable_of_the_d/">a similar
post on lesswrong</a>.<p>
I did warn you all that the puzzle was annoying.<p>
I started writing this post in October 2007, and then it sat on the
shelf until I got around to finding and photographing the boxes. A
triumph of procrastination!<p>
[ Addendum 20150911: Steven Mazie has written a blog article about
this topic,
<a href="http://bigthink.com/praxis/a-logic-puzzle-that-teaches-a-life-lesson">A Logic Puzzle That Teaches a Life Lesson</a>. ]The annoying boxes puzzle
http://blog.plover.com/2015/07/01#annoying-boxes
Here is a logic puzzle. I will present the solution on Friday.<p>
<blockquote style="background-color: #ffccff;">
There are two boxes on a table, one red and one green. One contains a
treasure. The red box is labelled "exactly one of the labels is
true". The green box is labelled "the treasure is in this box."<p>
Can you figure out which box contains the treasure?<p>
</blockquote>
<form method=GET action="http://perl.plover.com/annoying-boxes.cgi">
<input type=radio name="r" value="red">The treasure is in the red box<br>
<input type=radio name="r" value="green">The treasure is in the green box<br>
<input type=radio name="r" value="wut">There is not enough information to determine the answer<br>
<input type=radio name="r" value="other">Something else: <input type=text name="o" size=50><br>
<input type=submit value="Submit Solution">
</form>
Starting on 2015-07-03, <a
href="http://blog.plover.com/math/logic/annoying-boxes-solution.html">the solution
will be here</a>.<pMath.SE report 2015-05
http://blog.plover.com/2015/06/19#2015-05
<p>A lot of the stuff I've written in the past couple of years has been
on math.StackExchange. Some of it is pretty mundane, but some is
interesting. My summary of April's interesting posts was
well-received, so here are the noteworthy posts I made in May 2015.</p>
<ul>
<li><p><a href="http://math.stackexchange.com/questions/1267062/">What matrix transforms <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%281%2c0%29%24"> into <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%282%2c6%29%24"> and tranforms
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%280%2c1%29%24"> into
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%284%2c8%29%24">?</a> was a
little funny because the answer is $$\begin{pmatrix}2 & 4 \\ 6 & 8
\end{pmatrix}$$ and yeah, it works exactly like it appears to,
there's no trick. But if I just told the guy that, he might feel
unnecessarily foolish. I gave him a method for solving the problem
and figured that when he saw what answer he came up with, he might
learn the thing that the exercise was designed to teach him.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1118286/is-a-network-topology-a-topological-space/">Is a “network topology'” a topological
space?</a>
is interesting because several people showed up right away to say
no, it is an abuse of terminology, and that network topology really
has nothing to do with mathematical topology. Most of those comments
have since been deleted. My answer was essentially: it is
topological, because just as in mathematical topology you care about
which computers are connected to which, and not about where any of
the computers actually are.</p>
<p>Nobody constructing a token ring network thinks that it has to be a
geometrically circular ring. No, it only has to be a <em>topologically</em>
circular ring. A square is fine; so is a triangle; topologically
they are equivalent, both in networking and in mathematics. The
wires can cross, as long as they don't connect at the crossings.
But if you use something that isn't <em>topologically</em> a ring, like say
a line or a star or a tree, the network doesn't work.</p>
<p>The term “topological” is a little funny. “Topos” means “place”
(like in “topography” or “toponym”) but in topology you don't care
about places.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1281319/">Is there a standard term for this generalization of the Euler
totient function?</a>
was asked by me. I don't include all my answers in these posts, but
I think maybe I should have a policy of including all my questions.
This one concerned a simple concept from number theory which I was
surprised had no name: I wanted <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cphi_k%28n%29%24"> to be the number of
integers <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24m%24"> that are no larger than <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24"> for which <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cgcd%28m%2cn%29%20%3d%0a%20%20k%24">. For <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24k%3d1%24"> this is the famous Euler totient function, written
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cvarphi%28n%29%24">.</p>
<p>But then I realized that the reason it has no name is that it's
simply <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5cphi_k%28n%29%20%3d%20%5cvarphi%5cleft%28%5cfrac%20n%20k%5cright%29%24"> so there's no need
for a name or a special notation.</p>
<p>As often happens, I found the answer myself shortly after I asked
the question. I wonder if the reason for this is that my time to
come up with the answer is Poisson-distributed. Then if I set a time
threshold for how long I'll work on the problem before asking about
it, I am likely to find the answer to almost any question that
exceeds the threshold shortly after I exceed the threshold. But if
I set the threshold higher, this would <em>still</em> be true, so there is
no way to win this particular game. Good feature of this theory: I
am off the hook for asking questions I could have answered myself.
Bad feature: no real empirical support.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1282934/">how many ways can you divide 24 people into groups of
two?</a> displays a
few oddities, and I think I didn't understand what was going on at
that time. OP has calculated the first few special cases:</p>
<blockquote>
<p>1:1 2:1 3:3 4:3 5:12 6:15</p>
</blockquote>
<p>which I think means that there is one way to divide 2 people into
groups of 2, 3 ways to divide 4 people, and 15 ways to divide 6
people. This is all correct! But what could the 1:1, 3:3, 5:12
terms mean? You simply can't divide 5 people into groups of 2.
Well, maybe OP was counting the extra odd person left over as a sort
of group on their own? Then odd values would be correct; I didn't
appreciate this at the time.</p>
<p>But having calculated 6 special cases correctly, why can't OP
calculate the seventh? Perhaps they were using brute force: the
next value is 48, hard to brute-force correctly if you don't have a
enough experience with combinatorics.</p>
<p>I tried to suggest a general strategy: look at special cases, and
not by brute force, but try to <em>analyze</em> them so that you can come
up with a method for solving them. The method is unnecessary for
the small cases, where brute force enumeration suffices, but you can
use the brute force enumeration to check that the method is
working. And then for the larger cases, where brute force is
impractical, you use your method.</p>
<p>It seems that OP couldn't understand my method, and when they tried
to apply it, got wrong answers. Oh well, you can lead a horse to
water, etc.</p>
<p>The other pathology here is:</p>
<blockquote>
<p>I think I did what you said and I got 1.585times 10 to the 21</p>
</blockquote>
<p>for the <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%3d24%24"> case. The correct answer is
$$23\cdot21\cdot19\cdot17\cdot15\cdot13\cdot11\cdot9\cdot7\cdot5\cdot3\cdot1
= 316234143225 \approx 3.16\cdot 10^{11}.$$ OP didn't explain how
they got <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%241%2e585%5ccdot10%5e%7b21%7d%24"> so there's not much hope of
correcting their weird error.</p>
<p>This is someone who probably could have been helped in person, but
on the Internet it's hopeless. Their problems are Internet
communication problems.</p></li>
<li><p><a href="http://math.stackexchange.com/questions/1289531/">Lambda calculus
typing</a> isn't
especially noteworthy, but I wrote a fairly detailed explanation of
the algorithm that Haskell or SML uses to find the type of an
expression, and that might be interesting to someone.</p></li>
<li><p>I think <a href="http://math.stackexchange.com/questions/1290948/">Special representation of a
number</a> is the
standout post of the month. OP speculates that, among numbers of
the form <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24pq%2brs%24"> (where <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24p%2cq%2cr%2cs%24"> are prime), the choice of
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24p%2cq%2cr%2cs%24"> is unique. That is, the mapping <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24%5clangle%0a%20%20p%2cq%2cr%2cs%5crangle%20%5cto%20pq%2brs%24"> is reversible.</p>
<p>I was able to guess that this was not the case within a couple of
minutes, replied pretty much immediately:</p>
<blockquote>
<p>I would bet money against this representation being unique. </p>
</blockquote>
<p>I was sure that a simple computer search would find
counterexamples. In fact, the smallest is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%2411%5ccdot13%20%2b%2019%5ccdot%2029%0a%20%20%3d%2011%5ccdot%2043%20%2b%2013%5ccdot%2017%20%3d%20694%24"> which is small enough that you
could find it without the computer if you are patient.</p>
<p>The obvious lesson to learn from this is that many elementary
conjectures of this type can be easily disproved by a trivial
computer search, and I frequently wonder why more amateur
mathematicians don't learn enough computer programming to
investigate this sort of thing. (I wrote recently on the topic of
<a href="http://blog.plover.com/math/ounce-of-theory.html">An ounce of theory is worth a pound of search
</a>, and this is an interesting
counterpoint to that.)</p>
<p>But the most interesting thing here is how I was able to instantly
guess the answer. I explained in some detail in the post. But the
basic line of reasoning goes like this.</p>
<p>Additive properties of the primes are always distributed more or
less at random unless there is some obvious reason why they can't
be. For example, let <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24p%24"> be prime and consider <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%242p%2b1%24">. This
must have exactly one of the three forms <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%243n%2d1%2c%203n%2c%24"> or <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%243n%2b1%24">
for some integer <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24n%24">. It obviously has the form <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%243n%2b1%24"> almost
never (the only exception is <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24p%3d3%24">). But of the other two forms
there is no obvious reason to prefer one over the other, and indeed
of the primes up to 10,000, 611 are of the type <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%243n%24"> and and 616
are of the type <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%243n%2d1%24">.</p>
<p>So we should expect the value <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24pq%2brs%24"> to be distributed more or
less randomly over the set of outputs, because there's no obvious
reason why it couldn't be, except for simple stuff, like that it's
obviously almost always even. <!-- (And some similar analogous
properties; It has the form <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%246n%2b2%24"> and <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%246n%2b4%24"> equally often, and
<img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%246n%24"> twice as often as either.) --></p>
<p>So we are throwing a bunch of balls at random into bins, and the
claim is that no bin should contain more than one ball. For that to
happen, there must be vastly more bins than balls. But the bins are
numbers, and primes are not at all uncommon among numbers, so the
number of bins <em>isn't</em> vastly larger, and there ought to be at least
some collisions. </p>
<p>In fact, a more careful analysis, which I wrote up on the site,
shows that the number of <em>balls</em> is vastly larger—to have them be
roughly the same, you would need primes to be roughly as common as
perfect squares, but they are far more abundant than that—so as you
take larger and larger primes, the number of collisions increases
enormously and it's easy to find twenty or more quadruples of primes
that all map to the same result. But I was able to predict this
after a couple of minutes of thought, from completely elementary
considerations, so I think it's a good example of Lower Mathematics
at work.</p>
<p>This is an example of a fairly common pathology of math.se
questions: OP makes a conjecture that <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24X%24"> never occurs or that
there are no examples with property <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24X%24">, when actually <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24X%24">
almost always occurs or <em>every</em> example has property <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24X%24">.</p>
<p>I don't know what causes this. Rik Signes speculates that it's just
wishful thinking: OP is doing some project where it would be useful
to have <img src="https://chart.googleapis.com/chart?chf=bg,s,00000000&cht=tx&chl=%24pq%2brs%24"> be unique, so posts in hope that someone will tell
them that it is. But there was nothing more to it than baseless
hope. Rik might be right.</p></li>
</ul>
<p>[ Addendum 20150619: A previous version of this article included the delightful typo “mathemativicians”. ]</p>