Skip to content →

neverendingbooks Posts

NeB on Leopard and iPhone

If you have an iPhone or iPod Touch and point your Safari browser to this blog you can now view it in optimised format, thanks to the iWPhone WordPress Plugin and Theme. I’ve only changed the CSS slightly to have the same greeny look-and-feel of the current redoable theme.

Upgrading a WordPress-blog running under Tiger (Mac OS 10.4) to Leopard produces a few anxiety moments. All of the standard tools (Apache, PHP and MySQL) seem no longer to work as before. For those of you who do not want to waste too much time over it, I’ll walk through the process.

After upgrading to Leopard you want to check whether your blog is still alive, so you fire up Safari and will be greeted by the message that Safari cannot find your server. Sure enough you forgot to start the WebServer in SystemPreferences/Sharing/Web Sharing. Having fixed this you will see the default Apache-screen because Leopard put these default-files in your webserver-root directory (/Library/WebServer/Documents). In case you installed your blog under a user account you will get a message that you enter forbidden territory, see below for the solution to that problem. Having removed all those index.html files (making sure NOT to delete the index.php of your blog) a more serious problem presents itself : you see the text-version of index.php meaning that PHP isnt working. You check the /etc/httpd/httpd.conf file and it still contains all the changes you made to it to get PHP running under Tiger, so what is going on?

Googling for something like ‘enabling PHP under Leopard’ you’ll discover that the configuration file used by the webserver is in a different location. It now resides at /private/etc/apache2/httpd.conf. You will have to remove the hash sign (#) at the beginning of line 114 so that it reads

LoadModule php5_module libexec/apache2/libphp5.so

Next, you have to create a php.ini file and change one line. The first thing is settled by the following Terminal-commands

cd /private/etc
sudo cp php.ini.default php.ini

and in the php.ini you have to modify line 305 so that it becomes (removing the latter part of the line)

error_reporting = E_ALL

Restarting the webserver enables PHP. If you need more details check out the article Enabling PHP and Apache in Leopard. However, you are not quite done yet. Your blog will now show the WordPress-page that something is wrong with your mysql-database. However, mysql seems to be running fine as you can check from the Terminal so PHP cannot find it.

To remedy this, you have to add the locations (after the = sign) in the follwing two lines of the php.ini file

mysql.default_socket = /private/tmp/mysql.sock
mysqli.default_socket = /private/tmp/mysql.sock

Restarting the webserver should resolve the problem. But then your blog can still choke on old PHP-code in one of the plugins you use. In my case I was using an ancient version of the PHP-Markdown plugin but after replacing it with the newest version NeB looked just like I left it with Tiger…

A final point : webpages stored in personal Sites-folders cannot be served by Apache2 and will produce a message that you have not enough privileges to view the page. To resolve this, type the following command from the Terminal

sudo cp /private/etc/httpd/users/*.conf /private/etc/Apache2/users

2 Comments

problema bovinum

Suppose for a moment that some librarian at the Bodleian Library announces that (s)he discovered an old encrypted book attributed to Isaac Newton. After a few months of failed attempts, the code is finally cracked and turns out to use a Public Key system based on the product of two gigantic prime numbers, $2^{32582657}-1 $ and $2^{30402457}-1 $, which were only discovered to be prime recently. Would one deduce from this that Newton invented public key cryptography and that he used alchemy to factor integers? (( Come to think of it, some probably would ))

The cynic in me would argue that it is a hell of a coincidence for this text to surface exactly at the moment in history when we are able to show these numbers to be prime and understand their cryptographic use, and conclude that the book is likely to be a fabrication. Still, stranger things have happened in the history of mathematics…

In 1773, Gotthold Ephraim Lessing at that time librarian at the Herzog-August-Bibliothek discovered and published a Greek epigram in 22 elegiac couplets. The manuscript describes a problem sent by Archimedes to the mathematicians in Alexandria.

In his beautiful book “Number Theory, an approach through history. From Hammurapi to Legendre” Andre Weil asserts (( Chapter I,IX )):

Many mathematical epigrams are known. Most of them state problems of little depth; not so Lessing’s find; there is indeed every reason to accept the attribution to Archimedes, and none for putting it into doubt.

This Problema Bovidum (the cattle problem) is a surprisingly difficult diophantine problem and the simplest complete solution consists of eigth numbers, each having about 206545 digits. As we will see later the final ingredient in the solution is the solution of Pell’s equation using continued fractions discovered by Lagrange in 1768 and published in 1769 in a long memoir. Lagrange’s solution to the Pell equation was inserted in Euler’s “Algebra” which was composed in 1771 but published only in 1773… the very same year as Lessing’s discovery! (( all dates learned from Weil’s book Chp. III,XII ))

Weil’s book doesn’t include the details of the original epigram. The (lost) archeologist in me wanted to see the original Greek 22 couplets as well as a translation. So here they are : (( thanks to the Cattle problem site ))

A PROBLEM

which Archimedes solved in epigrams, and which he communicated to students of such matters at Alexandria in a letter to Eratosthenes of Cyrene.

If thou art diligent and wise, O stranger, compute the number of cattle of the Sun, who once upon a time grazed on the fields of the Thrinacian isle of Sicily, divided into four herds of different colours, one milk white, another a glossy black, a third yellow and the last dappled. In each herd were bulls, mighty in number according to these proportions: Understand, stranger, that the white bulls were equal to a half and a third of the black together with the whole of the yellow, while the black were equal to the fourth part of the dappled and a fifth, together with, once more, the whole of the yellow. Observe further that the remaining bulls, the dappled, were equal to a sixth part of the white and a seventh, together with all of the yellow. These were the proportions of the cows: The white were precisely equal to the third part and a fourth of the whole herd of the black; while the black were equal to the fourth part once more of the dappled and with it a fifth part, when all, including the bulls, went to pasture together. Now the dappled in four parts were equal in number to a fifth part and a sixth of the yellow herd. Finally the yellow were in number equal to a sixth part and a seventh of the white herd. If thou canst accurately tell, O stranger, the number of cattle of the Sun, giving separately the number of well-fed bulls and again the number of females according to each colour, thou wouldst not be called unskilled or ignorant of numbers, but not yet shalt thou be numbered among the wise.

But come, understand also all these conditions regarding the cattle of the Sun. When the white bulls mingled their number with the black, they stood firm, equal in depth and breadth, and the plains of Thrinacia, stretching far in all ways, were filled with their multitude. Again, when the yellow and the dappled bulls were gathered into one herd they stood in such a manner that their number, beginning from one, grew slowly greater till it completed a triangular figure, there being no bulls of other colours in their midst nor none of them lacking. If thou art able, O stranger, to find out all these things and gather them together in your mind, giving all the relations, thou shalt depart crowned with glory and knowing that thou hast been adjudged perfect in this species of wisdom.

The Lessing epigram may very well be an extremely laborious hoax but it is still worth spending a couple of posts on it. It gives us the opportunity to retell the amazing history of Pell’s problem rangingfrom the ancient Greeks and Indians, over Fermat and his correspondents, to Euler and Lagrange (with a couple of recent heroes entering the story). And, on top of this, the modular group is all the time just around the corner…

4 Comments

the iguanodon dissected

Here the details of the iguanodon series. Start with the Farey sequence $F(n) $of order n which is the sequence of completely reduced fractions between 0 and 1 which, when in lowest terms, have denominators less than or equal to n, arranged in order of increasing size. Here are the first eight Fareys

F(1) = {0⁄1, 1⁄1}
F(2) = {0⁄1, 1⁄2, 1⁄1}
F(3) = {0⁄1, 1⁄3, 1⁄2, 2⁄3, 1⁄1}
F(4) = {0⁄1, 1⁄4, 1⁄3, 1⁄2, 2⁄3, 3⁄4, 1⁄1}
F(5) = {0⁄1, 1⁄5, 1⁄4, 1⁄3, 2⁄5, 1⁄2, 3⁄5, 2⁄3, 3⁄4, 4⁄5, 1⁄1}
F(6) = {0⁄1, 1⁄6, 1⁄5, 1⁄4, 1⁄3, 2⁄5, 1⁄2, 3⁄5, 2⁄3, 3⁄4, 4⁄5, 5⁄6, 1⁄1}
F(7) = {0⁄1, 1⁄7, 1⁄6, 1⁄5, 1⁄4, 2⁄7, 1⁄3, 2⁄5, 3⁄7, 1⁄2, 4⁄7, 3⁄5, 2⁄3, 5⁄7, 3⁄4, 4⁄5, 5⁄6, 6⁄7, 1⁄1}
F(8) = {0⁄1, 1⁄8, 1⁄7, 1⁄6, 1⁄5, 1⁄4, 2⁄7, 1⁄3, 3⁄8, 2⁄5, 3⁄7, 1⁄2, 4⁄7, 3⁄5, 5⁄8, 2⁄3, 5⁄7, 3⁄4, 4⁄5, 5⁄6, 6⁄7, 7⁄8, 1⁄1}

Farey sequences have plenty of mysterious properties. For example, in 1924 J. Franel and Edmund Landau proved that an asymptotic density result about Farey sequences is equivalent to the Riemann hypothesis.
More precisely, let a(n) be the number of terms in the Farey sequence F(n) (that is, a(1)=2,a(2)=3,…,a(8)=23 etc. This is sequence A005728 in the online integer sequences catalog).
Let $F(n)_j $ denote the j-th term in F(n), then the following conjecture is equivalent to the Riemann hypothesis

For every $\epsilon > 0 $ there is a constant C depending on $\epsilon $ such that

$\sum_{j=1}^{a(n)} | F(n)_j – \frac{j}{a(n)} | < C n^{\frac{1}{2}+\epsilon} $

when n goes to infinity. Anyway, let us continue our construction. Farey sequences are clearly symmetric around 1/2 so let us just take half of them, so we jump to 1 when we have reached 1/2. Let us extend this halved Farey on both sides with $\infty $ and call it the modified Farey sequence f(n). For example,

$f(3) = {~\infty,0,\frac{1}{3},\frac{1}{2},1,\infty } $

Now consider the Farey code in which we identify the two sides connected to $\infty $ and mark two consecutive Farey numbers as

[tex]\xymatrix{f(n)_i \ar@{-}[r]_{\bullet} & f(n)_{i+1}}[/tex]

That is, the Farey code associated to the modified sequence f(3) is

[tex]\xymatrix{\infty \ar@{-}[r]_{1} & 0 \ar@{-}[r]_{\bullet} & \frac{1}{3} \ar@{-}[r]_{\bullet} & \frac{1}{2} \ar@{-}[r]_{\bullet} & 1 \ar@{-}[r]_{1} & \infty}[/tex]

Recall from earlier that to a Farey-code we can associate a special polygon by first taking the hyperbolic convex hull of all the terms in the sequence (the region bounded by the vertical lines and the bottom red circles in the picture on the left) and adding to it for each odd interval [tex]\xymatrix{f(n)_i \ar@{-}[r]_{\bullet} & f(n)_{i+1}}[/tex] the triangle just outside the convex hull consisting of two odd edges in the Dedekind tessellation (then we obtain the region bounded by the black geodesics for the sequence f(3)).

Next, we can associate to this special polygon a cuboid tree diagram by considering all even and odd vertices on the boundary (which are tinted red, respectively blue) together with all odd vertices in the interior of the special polygon. These are indicated in the left picture below. If we connect these vertices with the geodesics in the polygon we get a cuboid tree diagram. The obtained cuboid tree diagram is depicted on the right below.

Finally, identifying the red points (as they lie on geodesics connected to $\infty $ which are identified in the Farey code), adding even points on the remaining geodesics and numbering the obtained half-lines we obtain the dessin d’enfant given on the left hand side. To such a dessin we can associate its monodromy group which is a permutation group on the half-lines generated by an order two element indicating which half-lines make up a line and an order three element indicating which half-lines one encounters by walking counter-clockwise around a three-valent vertex. For the dessin on the left the group is therefore the subgroup of $S_{12} $ generated by the elements

$\alpha = (1,2)(3,4)(5,6)(7,8)(9,10)(11,12) $

$\beta = (1,2,3)(4,5,7)(8,9,11) $

and a verification with GAP tells us that this group is the sporadic Mathieu group $M_{12} $. This concludes the description of the second member of the Iguanodon series. If you like to check that the first 8 iguanodons are indeed the simple groups

$L_2(7), M_{12}, A_{16}, M_{24}, A_{28}, A_{40}, A_{48}, A_{60}, \ldots $

the following dissection of the Iguanodon may prove useful

9 Comments