# Tag: apple

Ever since I’ve upgraded to Snow Leopard I’ve been having problems with the webserver.

At first there were the ‘obvious’ problems : mysql-connection lost and php-error message. These were swiftly dealt with using the excellent Snow Leopard, Apache, PHP, MySQL and WordPress! advice from ‘tady’.

Right now, access to this blog is extremely slow (and often impossible), certainly via the admin-page. The problem appears to be that most of my CPU is used by lots of pdfetex-processes owned by www. Hence the conjecture that it is a problem with either LaTeXRender or WP LaTeX.

Anyone experiencing a similar problem, or knowing a trick to resolve it? Takk.

About a year ago I did a series of posts on games associated to the Mathieu sporadic group $M_{12}$, starting with a post on Conway’s puzzle M(13), and, continuing with a discussion of mathematical blackjack. The idea at the time was to write a book for a general audience, as discussed at the start of the M(13)-post, ending with a series of new challenging mathematical games. I asked : “What kind of puzzles should we promote for mathematical thinking to have a fighting chance to survive in the near future?”

Now, Scientific American has (no doubt independently) taken up this lead. Their July 2008 issue features the article Rubik’s Cube Inspired Puzzles Demonstrate Math’s “Simple Groups” written by Igor Kriz and Paul Siegel.

By far the nicest thing about this article is that it comes with three online games based on the sporadic simple groups, the Mathieu groups $M_{12}$, $M_{24}$ and the Conway group $.0$.

the M(12) game

Scrambles to an arbitrary permutation in $M_{12}$ and need to use the two generators $INVERT=(1,12)(2,11)(3,10)(4,9)(5,8)(6,7)$ and $MERGE=(2,12,7,4,11,6,10,8,9,5,3)$ to return to starting position.

Here is the help-screen :

They promise the solution by july 27th, but a few-line GAP-program cracks the puzzle instantly.

the M(24) game

Similar in nature, again using two generators of $M_{24}$. GAP-solution as before.

This time, they offer this help-screen :

the .0 game

Their most original game is based on Conway’s $.0$ (dotto) group. Unfortunately, they offer only a Windows-executable version, so I had to install Bootcamp and struggle a bit with taking screenshots on a MacBook to show you the game’s starting position :

Dotto:

Dotto, our final puzzle, represents the Conway group Co0, published in 1968 by mathematician John H. Conway of Princeton University. Co0 contains the sporadic simple group Co1 and has exactly twice as many members as Co1. Conway is too modest to name Co0 after himself, so he denotes the group “.0” (hence the pronunciation “dotto”).

In Dotto, there are four moves. This puzzle includes the M24 puzzle. Look at the yellow/blue row in the bottom. This is, in fact, M24, but the numbers are arranged in a row instead of a circle. The R move is the “circle rotation to the right”: the column above the number 0 stays put, but the column above the number 1 moves to the column over the number 2 etc. up to the column over the number 23, which moves to the column over the number 1. You may also click on a column number and then on another column number in the bottom row, and the “circle rotation” moving the first column to the second occurs. The M move is the switch, in each group of 4 columns separated by vertical lines (called tetrads) the “yellow” columns switch and the “blue” columns switch. The sign change move (S) changes signs of the first 8 columns (first two tetrads). The tetrad move (T) is the most complicated: Subtract in each row from each tetrad 1/2 times the sum of the numbers in that tetrad. Then in addition to that, reverse the signs of the columns in the first tetrad.

Strategy hints: Notice that the sum of squares of the numbers in each row doesn’t change. (This sum of squares is 64 in the first row, 32 in every other row.) If you manage to get an “8”in the first row, you have almost reduced the game to M24 except those signs. To have the original position, signs of all numbers on the diagonal must be +. Hint on signs: if the only thing wrong are signs on the diagonal, and only 8 signs are wrong, those 8 columns can be moved to the first 8 columns by using only the M24 moves (M,R).

Below an up-till-now hidden post, written november last year, trying to explain the long blog-silence at neverendingbooks during october-november 2007…

A couple of months ago a publisher approached me, out of the blue, to consider writing a book about mathematics for the general audience (in Dutch (?!)). Okay, I brought this on myself hinting at the possibility in this post

Recently, I’ve been playing with the idea of writing a book for the general public. Its title is still unclear to me (though an idea might be “The disposable science”, better suggestions are of course wellcome) but I’ve fixed the subtitle as “Mathematics’ puzzling fall from grace”. The book’s concept is simple : I would consider the mathematical puzzles creating an hype over the last three centuries : the 14-15 puzzle for the 19th century, Rubik’s cube for the 20th century and, of course, Sudoku for the present century.

For each puzzle, I would describe its origin, the mathematics involved and how it can be used to solve the puzzle and, finally, what the differing quality of these puzzles tells us about mathematics’ changing standing in society over the period. Needless to say, the subtitle already gives away my point of view. The final part of the book would then be more optimistic. What kind of puzzles should we promote for mathematical thinking to have a fighting chance to survive in the near future?

While I still like the idea and am considering the proposal, chances are low this book ever materializes : the blog-title says it all…

Then, about a month ago I got some incoming links from a variety of Flemish blogs. From their posts I learned that the leading Science-magazine for the low countries, Natuur, Wetenschap & Techniek (Nature, Science & Technology), featured an article on Flemish science-blogs and that this blog might be among the ones covered. It sure would explain the publisher’s sudden interest. Of course, by that time the relevant volume of NW&T was out of circulation so I had to order a backcopy to find out what was going on. Here’s the relevant section, written by their editor Erick Vermeulen (as well as an attempt to translate it)

Sliding puzzle For those who want more scientific depth (( their interpretation, not mine )), there is the English blog by Antwerp professor algebra & geometry Lieven Le Bruyn, MoonshineMath (( indicates when the article was written… )). Le Bruyn offers a number of mathematical descriptions, most of them relating to group theory and in particular the so called monster-group and monstrous moonshine. He mentions some puzzles in passing such as the well known sliding puzzle with 15 pieces sliding horizontally and vertically in a 4 by 4 matrix. Le Bruyn argues that this ’15-puzzle (( The 15-puzzle groupoid ))’ was the hype of the 19th century as was the Rubik cube for the 20th and is Sudoku for the 21st century.
Interesting is Le Bruyn’s mathematical description of the M(13)-puzzle (( Conway’s M(13)-puzzle )) developed by John Conway. It has 13 points on a circle, twelve of them carrying a numbered counter. Every point is connected via lines to all others (( a slight simplification )). Whenever a counter jumps to the empty spot, two others exchange places. Le Bruyn promises the blog-visitor new variants to come (( did I? )). We are curious.
Of course, the genuine puzzler can leave all this theory for what it is, use the Java-applet (( Egner’s M(13)-applet )) and painfully try to move the counters around the circle according to the rules of the game.

Some people crave for this kind of media-attention. On me it merely has a blocking-effect. Still, as the end of my first-semester courses comes within sight, I might try to shake it off…

MacBookAir? Is this really the best Apple could come up with? A laptop you can slide under the door or put in an envelop? Yeez… Probably the hot-air-book is about as thick as an iTouch. The first thing I did was to buy a leather case to protect the vulnerable thing, making it as thick as a first generation iPod… (needless to say, when my MacBookPro breaks down, ill replace it with a MacBookAir, clearly!)

Ranting about MacWorlds : Wired has a great article on last year’s event. Steve Job’s iPhone presentation is something that will be part of the collective memory when it comes to 2007-recollections. Few people will have realized that the Apple-team didnt have a working prototype a few weeks before… Here’s The Untold Story: How the iPhone Blew Up the Wireless Industry. A good read!

If you plug in your jailbroken iTouch, you will be asked wether you want to upgrade to 1.1.3, something we all feared for a long time and so it takes just nanoseconds to hit the cancel-button. But, there is good news! Rupert Gee reports that you can downgrade to 1.1.1 and redo jailbreak. I won’t try it for some time, but still…

In the unlikely event that you come here being a mathematician, here’s what I did with my iTouch today. Ive downloaded the Connes-Marcolli talks on Renormalization and Motives part 1, part 2, part 3, part 4, part 5, part 6, part 7 and part 8 at work. They are in mp4-format so you can load them into iTunes and onto your iTouch!!! Weather is not favorable for outdoor-cycling at the moment, so I used the home-trainer, put the iTouch in front of me and, boy, was I educated…

So, you did jailbreak your iTouch and did install some fun or useful stuff via the Install.app … but then, suddenly, the next program on your wish-list fails to install ??!! I know you hate to do drastic things to your iTouch, but sooner or later you’ll have to do it, so why not NOW?

Move the Applications Folder

The problem is that there are two disk partitions (a small one, meant only to host the apple-software and a large one to contain all your music, videos and stuff) and Install.app installs programs in the /Apllications folder on the smaller partition. So, we want to move it to the other partition using a symbolic link trick (as in the wiki-hack post). Here a walkthrough, more details can be found on Koos Kasper’s site.

• Have BSDsubsystem and OpenSSH installed, so that you can ssh into the iTouch.
• verify that the second line of the /etc/fstab file reads as below (or edit it if necessary, in my case it was already ok, perhaps this is done during jailbreak?) and reboot the iTouch (if you had to change it)

/dev/disk0s2 /private/var hfs rw 0 2

• ssh into the iTouch and type in the following commands (to move the folder and make the symbolic link)

cd /
cp -pr Applications /var/root
mv Applications Applications.old
ln -s private/var/root/Applications /Applications

• reboot the iTouch, ssh into it and remove the old Application-folder to free space

cd /
rm -rf Applications.old

From now on, all (most) new programs are installed on the larger partition. If you reinstall the OpenSSH application (as suggested) make sure to remove on your computer the old key for iTouch.

I use the iTouch to read my mail, to read RSS feeds, to administer this blog, to VNC to the home-server and when needed to ssh into the computer at work (running this blog) to restart the apache server. Unless I have to write a lot, there is no need to fire up a computer… But, when someone has a Mac running, I would like to be able to stream the music on my iTouch to hear it loudly. Here’s the procedure, via Rupert Gee’s blog :

• Have the Auto-Lock set to “Never” in Settings/General
• Install the UIctl applications (under Utilities)
• Add a source to Install.app (click on Sources-button lower-right, Edit upper-right and then Add upper-left) http://home.mike.tl/iphone
• Relaunch Install.app and install FireFlyMediaServer (under Multimedia).
• Write down the address given during installation to change your password and monitor the Firefly-server (the default root password is ‘dottie’ and so the address should be

http://root:dottie@127.0.0.1:3689

• Open up UIctl and scoll down to a line saying “org.fireflymediaserver.mt-daapd” and tap on it. Tap on “load-w” and then on “Do It”
• Now, at the Mac your iTouch should be vusible under Shared in iTunes, click on it and give the password and your music is available!

You may have surmised it from reading this post : Santa brought me an iPod Touch! (( or rather : Santa brought PD2 an iTouch and knowing his jealous nature ordered one for him as well… )) Ive used an iPodClassic to transfer huge files between home (MacBook) and office (iMac) as well as for backup purposes. I wanted to find out what new tricks this trio could play now that iPod can go online. Major disillusion : one cannot even enable DiskUse via iTunes at the moment. (( rumours are that Apple will enable DiskUse in firmware 1.1.3, coming up next februari… )) What’s wrong with Apple? They make this marvelous piece of technology and then do a Golem-act preventing anyone else from using their precious thing. I understand their business plan, but soon it will make more sense to buy Apple shares than to buy their computers…

Enters the 13-year old AriX writing iJailbreak to free the iTouch. So, before you put any music or video on your pod (( and frankly there’s not much else Apple allows you to put on it )), dare to void the guarantee and risk your new gadget being bricked (( but, if I can pull if off you certainly can.. )) by Jailbreaking it! There are plenty of good guides around, both for Windows and Mac, but most of them can be slightly improved. I’ve followed Let’s Jailbreak the iPod touch 1.1.2 with OS X but shortened his downgrade to 1.1.1 procedure which is the first (and hardest) step in the whole procedure. The moment PD2 will see I can use Maps and Weather she’ll want me to jailbreak her iTouch too, so mainly for myself I list here the procedure before I forget it.

Jailbreak 1.1.2 with Leopard on Intel, use at your own risk.

Get a decent browser such as Firefox or Flock (to prevent the download to selfexpand, so when given the choice to open it with iTunes or save it to Disk, save!) and download Firmware1.1.1 and place it somewhere (why not create a Folder called Jailbreak).

Connect your iTouch and fire up iTunes and select your iTouch in the left column. Hold down the option key and click in the summary pane the Check for Update button. This will open a Finder window allowing you to navigate to the downloaded file and open it. The iTouch will downgrade itself to 1.1.1. Just wait until it reappears in iTunes and disconnect it.

With Safari on the iTouch go to jailbreakme.com and scroll to the bottom and click on the InstallAppSnap button. Let it do its magic and afterwards there is a new Installer-icon on your ‘springboard’ (the opening iTouch page). Open it and refrain from installing all the goodies now, just scroll down to Tweaks (1.1.1) open and select “OktoPrep” and install it (button top right-hand corner).

Connect iTouch to mac, start iTunes and select your iTouch. Click on the update button and now iTunes will bring you back to Firmware 1.1.2. After finishing wait until your iPod reappears in the left column. (Do not panic if you fail to see the Installer-icon on springboard, it will reappear later on). Then, close iTunes (your iPod stays connected via USB to the Mac). Use any browser on your mac to download Jailbreak 1.1.2 and place it somewhere.

Find the Java-applet jailbreak.jar in the folder and double click it. Again, magical things are happening ending with the iTouch booting up several times and you performed the Jailbreak.

Let’s open up the iTouch to the world

So, what was the point of all this? We still have no DiskUse enabled nor can we speak to the iTouch directly. But all of this is going to change rapidly. Let’s make it available to our DeskTop.

With “install package xxx” I will mean : fire up Installer from your springboard, donate as quickly as you can to the guys making this available, then click on the “install” icon lower-left. This will open up lists of packages, scroll down to package xxx, click on it to read more about it, and then hit the “install” button top-right. That’s it. (If you ever want to unistall a package, do the same process now starting from the “uninstall” icon lower-right).

Install first BSD Subsystem (under System packages) and the AFPd (under Network). This will turn your iTouch into an AFP-server. By clicking on its icon in the Springboard you can turn the server on and off (remember to turn it off when not needed!) and turn on Broadcast if you want the iTouch to show up on your Desktop (in the Leopard-Finder under ‘Shared’). You can now connect to the iTouch by clicking on its icon in the Finder and hitting connect. The default user/password combination for a Jailbroken iTouch are
root/alpine. Change this as soon as you figure out how to do it. ‘Alpine’ must be the most popular password right now… The AFPd-page also contains the Wi-Fi IP Address of the iTouch and you will need it soon, so write it down.

For we are going to connect via ssh and sftp to and from iTouch/Mac. Install the OpenSSH package (under System) and the Term-vt100 package (also under System). From the Mac to iTouch you can connect via something like

ssh root@10.0.1.197

(change the number to the IP-Address of the iTouch) and login with the alpine password. You’re in! Conversely, open up the Term-vt100 icon in the springboard which give you a genuine *nix-Terminal. You can connect via ssh to your mac provided you know its IP and your login. That’s all.

Btw. you can also use your favourite file-transport program (mine is Transmit to connect to and from your iTouch via SFTP. Right, now that the iTouch is under control we might as well give it a voice of his/her own.

Install Apache (under System) and PHP (under Development) and follow the instructions from the iTouch Fans Forum (you will need to register, but if you’re not an iTouch-fan there’s little point in you reading this post anyway) and you will have turned your iTouch into a PHP-enabled webserver! On the left is a screenshot of the proof via the php-info testpage.

Finally, we can turn the world upside down completely. Before all of this we had no way to get control of the iTouch, now we can use the iTouch to take control of all our Macs serving VNC (Leopard comes with it, enable the password in System Preferences/Sharing/Screen Sharing/Computer Settings and you’re under iTouch control). To pull this off, just install the VNsea package (under Network). It really works well!

Oh, you’re only here to install the iPhone Apps…

Well, that’s easy enough. Just follow the instructions of the Install and use iPhone Apps in iPod touch from the excellent blog by Rupert Gee. The most difficult part is to get hold of the iPhone Apps if you don’t own an iPhone… Well, I’m happy to provide you with this secret information

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

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

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…

Conway’s puzzle M(13) is a variation on the 15-puzzle played with the 13 points in the projective plane $\mathbb{P}^2(\mathbb{F}_3)$. The desired position is given on the left where all the counters are placed at at the points having that label (the point corresponding to the hole in the drawing has label 0). A typical move consists in choosing a line in the plane going through the point where the hole is, choose one of the three remaining points on this line and interchange the counter on it for the hole while at the same time interchanging the counters on the other two points. In the drawing on the left, lines correspond to the little-strokes on the circle and edges describe which points lie on which lines. For example, if we want to move counter 5 to the hole we notice that both of them lie on the line represented by the stroke just to the right of the hole and this line contains also the two points with counters 1 and 11, so we have to replace these two counters too in making a move. Today we will describe the groupoid corresponding to this slide-puzzle so if you want to read on, it is best to play a bit with Sebastian Egner’s M(13) Java Applet to see the puzzle in action (and to use it to verify the claims made below). Clicking on a counter performs the move taking the counter to the hole.

Recently, I’ve been playing with the idea of writing a book for the general public. Its title is still unclear to me (though an idea might be “The disposable science”, better suggestions are of course wellcome) but I’ve fixed the subtitle as “Mathematics’ puzzling fall from grace”. The book’s concept is simple : I would consider the mathematical puzzles creating an hype over the last three centuries : the 14-15 puzzle for the 19th century, Rubik’s cube for the 20th century and, of course, Sudoku for the present century.

For each puzzle, I would describe its origin, the mathematics involved and how it can be used to solve the puzzle and, finally, what the differing quality of these puzzles tells us about mathematics’ changing standing in society over the period. Needless to say, the subtitle already gives away my point of view. The final part of the book would then be more optimistic. What kind of puzzles should we promote for mathematical thinking to have a fighting chance to survive in the near future?