## Carnival of Mathematics – Silver Jubilee Edition

January 25th, 2008

Welcome everyone to this, the 25th edition of the Carnival of Mathematics. The 25th anniversary of many things is usually considered to be a little bit special and is often marked by a ‘Silver’ celebration of some sort. For example, in 1977, Queen Elizabeth II of the United Kingdom celebrated her 25th Year on the throne with a Silver Jubilee celebration and the British Royal Mail commemorated the event by releasing the postage stamps below

Technically speaking of course I should have waited until the Carnival had been around for 25 years rather than 25 posts but I thought I would exercise a little poetic license here – I hope the host of the real Silver Jubilee Edition in 24 years time will accept my heartfelt apologies.

So what else is interesting about the number 25? Obviously it is a square number but did you know that it is also the smallest square that can be expressed as the sum of two squares . It is also a Cullen Number and is the atomic number of the element Manganese. Twenty-Five is also the name of a card game that is sometimes referred to as the national card game of Ireland.

Enough of the random meanderings and on with the show…

The first two submissions come from Mathmom over at Ramblings of a Math Mom who asks the question “Should gifted math students tutor others?” This is something I had personal experience of when I was at school (both good and bad) so I found her arguments interesting – feel free to head over there and add to the discussion, I am sure you will be made very welcome. Her second submission concerns probability-fallacies.

Next up we have Arvind Narayanan from the randomwalker’s journal (we have no connection other than both of our blogs have cool names!) who explains the mathematics behind part of Arthur Benjamin’s act in “Mathemagics” explained. I love this sort of stuff and may well be trying it out on some of my (long suffering) friends.

Over at Reasonable Deviations (I always think of Richard Feynman when I see that blog name), Rod presents an interesting problem in thinking about permutations. It has already sparked an interesting discussion in his comments section so why not head over and see if you can have a go at solving it? I tried, and failed, but you might have more luck.

Maria Miller highlights a link to Classic Math Mistakes over at Homeschool Math Blog which includes posters for classic howlers like “3.1hrs = 3 hours 10 minutes.” My favorite is “Finishing an exam early and then sitting doing nothing” which is clearly an elementary error when every true math geek knows that the correct procedure is to clear your throat loudly as you stand up to leave. This ensures that all of your classmates know that you have finished early and so must be better at maths than they are – just make sure that they never find out that your actual score on the exam was only 6% as it ruins the illusion.

The next submission comes from the blog of Mr Kruopatwa’s AP Calculus AB (2007-2008) class and concerns a favourite topic of mine – namely the evaluation of integrals. One of his students, Mr Siwwy (AKA Chris), asks the question ‘How “approximate” can approximate can be’ and discusses some of the elementary methods of numerical integration. In an ideal world we would always be able to come up with exact answers for our definite integrals but, as we all know, the world is far from ideal and so we often must make do with numerical approximations. Chris’ post discusses how you might start to go about making such approximations. I had not discovered this blog before now and, if all of the posts are going to be this good, then I look forward to reading more.

Over at Goods and Chattels, Amanda has been reminiscing about one of the problems from her student days in An interesting mathematics puzzle. Some maths problems seem trivial when you first read them and so you mutter “All too easy!” as you start working on them, expecting it to all be over after a few minutes. Several hours (and pieces of paper) later you give up in frustration, try to forget about it and get on with your life…but then another idea strikes you….another way of attacking it….this one might just work you know…just one more go….and it has you again. This is one of those problems. Have fun – but no peeking at the solution!

Sol’s Fun Math Blog has only been around for four months and yet it is one of the most read in the blath-sphere. Building up a Technorati rating of 88 in such a short amount of time says it all really – Sol writes stuff that the rest of us like to read and link to. His submission, “five constants tie together multiple branches of mathematics”, discusses some of the mathematics behind the equation that Feynman once called “The most remarkable formula in math”. I remember the first time I discovered this equation – my response was pretty similar to this one (don’t click if swearing offends you).

Denise discusses a quotation from Ralph P. Boas about what it takes to learn math over at her blog, Let’s Play Math. The phenomenon mentioned is something that I am sure we are all familiar with from our student (and teaching) days and her article is well worth a read. Any blog article that mentions a paper with the title “A Contribution to the Mathematical Theory of Big Game Hunting” is just begging to be read in my opinion.

What sort of calculations can do perform using nothing but your fingers and thumbs? Until I read Heathers’ article – Three finger tricks for multiplying – the best I could do was count to ten on them but now they quite a bit more versatile Head over to 360 if you want to upgrade your digits.

And now for something completely different…Rick from Big Ideas submitted an article called
Mathematical Beauty and the K4 Crystal. Check out that gorgeous looking bit of perl – If only I could write stuff like that :)

Finally, we have a last minute submission from Brent, the author of The Math Less Traveled, who has written the third installment of his “Recounting the Rationals” series.

And – with that – I’m done. I hope you have enjoyed reading this carnival as much as I enjoyed writing it. Thanks to everybody who submitted articles – I loved reading through them all. The next carnival is over at 360 so start thinking about what your submissions might be,

Mike

## A little puzzle involving factors of Integers

January 22nd, 2008

What is the only integer below 500,000 that has exactly 13 factors (including 1 and itself)? What is the next integer with this number of factors? For extra credit list all of the factors of these two numbers.

Finally, what is the only integer below 10 million that has exactly 23 factors (including 1 and itself)?

## Installing the GD::Graph Perl module on Ubuntu Linux

January 21st, 2008

I have a couple of perl projects that make use of the GD::Graph module and I needed to set them up on a new machine. I was expecting to install the module without any problems but I was wrong. With a live internet connection I started off by starting the CPAN shell by typing the following in a bash shell

sudo perl -MCPAN -e shell

Since it was the first time I had run this command on this particular machine I had to answer a lot of questions but simply selected the defaults for everything as this usually works for me. Once in the CPAN shell I entered

install Bundle::CPAN

and selected all of the defaults again. Once the CPAN bundle had finished installing I tried to install GD::Graph by typing

install GD::Graph

but it failed with hundreds of errors – the first of which was

GD.xs:7:16: error: gd.h: No such file or directory

This was fixed with the following apt-get command (in the bash shell)

sudo apt-get install libgd2-xpm-dev

back in the CPAN shell I still couldn’t get GD::Graph to build and I guessed this was because of some left over files from the failed build. I don’t know the command to clean things up inside the CPAN shell and am too lazy to read the docs so I simply went into the .cpan/build directory in my home directory and deleted anything that started with GD – eg

rm -rf GD-2.35-HC_vkB

rm -rf GDGraph-1.44-Evfibe

and so on. Those strings at the end (VkB and so on) look random so they might be different on your machine. Then I went back into the CPAN shell and ran

install GD::Graph

again. There were a few dependencies which the script fetched and installed for me but everything worked smoothly. With a bit of luck these notes will be of use to someone else out there – please let me know if this is the case.

## When I was at school – Pluto was a planet.

January 18th, 2008

Here’s one for pub quiz fans – Name the only planet that has not yet been visited by a man made probe. Some of you will say ‘Pluto‘ and this would have been the correct answer back on 19th January 2006 when the NASA space probe, New Horizons, was launched.

Two years later and, according to some astronomers, this is no longer true because the definition of a planet was altered in 2006 and Pluto no longer fits the bill. Pluto is now officially known as a dwarf planet along with the asteroid, Ceres, and the Kuiper belt object, Eris. From what I can gather there is still a lot of controversy about this ruling among the astronomical community with lots of people arguing over which balls of rock we should designate as planets and which we should not.

A wise man once said “You can know the name of a bird in all the languages of the world, but when you’re finished, you’ll know absolutely nothing whatever about the bird… So let’s look at the bird and see what it’s doing — that’s what counts. I learned very early the difference between knowing the name of something and knowing something.”

Damned right! Whatever you choose to designate Pluto as, it is something we know very little about and the New Horizons team are doing something about that – and THAT is what is important here. The probe won’t reach Pluto until July 2015 – over 9 years after it was launched and yet it is traveling very quickly. As it left Earth orbit it was doing something like 35,800 miles per hour and, thanks to the assistance of Jupiter, it is now going even faster at over 50,000 mph.

When it gets there it will do things like map the surface composition of Pluto and it’s largest moon Charon. It will also look at the composition of Pluto’s tenuous atmosphere, map the surface temperature, look for rings around Pluto along with various other things. Our level of knowledge about the Pluto-Charon system will have increased by orders of magnitude which will hopefully lead to even more interesting questions for future missions to work on.

For me it does not matter what you choose to call Pluto – what matters is that in a few years time we are going to know a LOT more about that enigmatic little ball of rock which is so far away that it ties my mind in knots just trying to visualize it. Happy birthday New Horizons – I wish you the best of luck.

A combination of 2 New Horizons images taken on March 2 2007 of the Jovian moons Io and Europa. The original source is here.

## Second call for Carnival of Maths articles

January 17th, 2008

If you have come here from the InsideHPC article and are a little confused it is because they used an incorrect link.  The article you are looking for is Vectorising code to take advantage of modern CPUs (AVX and SSE).

I haven’t had many submissions for the next carnival of mathematics yet and it is due to be published in just over a week. If you would like one of your articles to be featured then please let me know about it via the comments section of this post, email me or use the submission form. Please help me make the 25th carnival one of the best yet.

To find my e-mail address, start with the following and “subtract one” from each letter (for example, you should change the first “n” into a “m”, and so on). There will still be one incorrect letter but it will be obvious what you should correct it to. (I stole this idea from The Math Less Traveled and think it’s a great way to fool the spam bots).

njdibfm.q.dspvdifs@hpphmfnbjm.wpn

If you have Mathematica then evaluate the following to get it (don’t forget to correct the obvious mistake in the resulting email address)

FromCharacterCode[
ToCharacterCode["njdibfm/q/dspvdifsAhpphmfnbjm/wpn"] - 1]

It annoys me that we have to go to such lengths to prevent spam but such is life.

## Carnival of Mathematics

January 14th, 2008

The 24th carnival of mathematics has been posted over at Ars Mathematica and includes articles ranging from Mathematics Magic to supersymmetric quantum mechanics. As with all Maths carnivals, it is well worth a read no matter what your level of mathematics is. The next carnival will be hosted here so please send your submissions to me via the submission form or, if that doesn’t work for you, let me know of your submission by posting a comment here.

Pretty much anything that has a reasonable amount of maths related content can be included in the carnival and can be at any level from elementary to cutting edge research so if you have never submitted anything before then why not have a go now?

## 2008 – Year of the Python (for me anyway)

January 12th, 2008

Over the years I have programmed in a reasonable number of languages but the ones I am actually using right now are Fortran, C++, Mathematica, Matlab and Perl. The one I would choose would depend on what I needed to accomplish, maybe Fotran for high speed numerics, Matlab for quick numerical algorithm development or Perl for sysadmin work and for the most part this tool-set serves my purposes well.

Just recently, however, I have been getting itchy feet and have been wanting to learn another programming language as it is a process I quite enjoy and last time I did it (with Perl) it turned out to be pretty useful. The question, of course, is which one to choose? I want a language that is going to be fun to use (to keep up my interest) and useful in my day job (so I can justify the time spent).

For me, one language stuck out more than all of the others – Python. I have always been dimly aware of it but until recently you could summarize my knowledge of it as follows

• It’s free
• It’s not a traditional compiled language (like C or Fortran) – it uses bytecodes and a virtual machine like Java
• It’s the one where white space matters
• Perl and Python people argue a lot

More recently, however, I have discovered a few more things about it piqued my interest.

• The open source CAS system – SAGE – is implemented in Python
• There are mature python libraries for doing numerical computing – numpy and scipy
• There is a wonderful looking matlab-like plotting library for it – matplotlib
• There are a lot of scientific applications developed using it
• I can install it on my mobile phone
• There is a number-theoretic (another emerging interest I have) library for it – NZMATH

So python it is then. Although there are a lot of great looking python tutorials on the web, I prefer to do my learning from a book, I am showing my age I guess. When I was learning Perl I used the O’Reilly book, learning perl, and would recommend it to any new Perl learners without hesitation. Since they have served me so well in the past, I turned to O’Reilley again and have just bought Learning Python (below) from Amazon. If you would like to join me on my Python journey (and support this site) then click on the image below and buy a copy.

## An integral that Maxima (and you) can do better than Mathematica

January 11th, 2008

How good is your symbolic integral calculus? Do you think that you can do better than Mathematica? Let’s see – try and evaluate the following (there is a hint in the comments if you get stuck).

My integration skills are a little rusty but I found the solution, log(6)/4, without too much difficulty (I have picked up the habit of writing log(x) when I mean ln(x) from using computer algebra packages too much) . Let’s see how Mathematica handles the same integration. Plugging the following command into version 6

Integrate[(x^3 + 1)/(x^4 + 4*x + 1), {x, 0, 1}]

gives a solution of

(RootSum[1 + 4*#1 + #1^4 & , Log[1 – #1]/(1 + #1^3) & ] -RootSum[1 + 4*#1 + #1^4 & , Log[-#1]/(1 + #1^3) & ] +
RootSum[1 + 4*#1 + #1^4 & ,(Log[1 – #1]*#1^3)/(1 + #1^3) & ] -RootSum[1 + 4*#1 + #1^4 & , (Log[-#1]*#1^3)/(1 + #1^3) & ])/4

Ugh! Applying the FullSimplify command doesn’t help so it seems that this is the best that Mathematica can do at the moment. If you evaluate this expression numerically then it agrees with the symbolic result but I think you would agree that Mathematica has not done a very good job here.

I found this integral while looking through the changelog of the latest version of Maxima – an open source mathematics package. If you try and evaluate it in pre-5.14 versions of Maxima then it will appear to hang (actually it will return a result eventually if you leave it long enough and have enough memory but it makes the Mathematica result look positively pretty). This has been fixed in version 5.14 and now issuing the command

integrate ((x^3 + 1)/(x^4 + 4*x + 1),x,0,1);

gives the result you would expect. So what went wrong – why does such a simple integral cause problems with these powerful software packages? The answer can be found in the full Maxima bug report for this issue – I will let you read it yourself if you are interested but in a nutshell pre 5.14 versions of Maxima were attempting to use a technique from complex analysis called contour integration to evaluate this integral. Contour integration is an amazingly useful technique that can be used to evaluate all sorts of definite integrals that are very difficult to do via other methods but using it in this case was a bad idea. It is possible that Mathematica tried to evaluate the integral in the same way but since it is closed source only the developers at Wolfram know the answer to that.

So this has been fixed in Maxima and I imagine that it will only be a matter of time before it is fixed in Mathematica but until that happens why not give this integral to your students and show them that, sometimes at least, they can do calculus better than Mathematica?

## Maxima – “I aint’nt dead!”

January 10th, 2008

In a recent post over at the sage math blog the author recounts a conversation he had with the well known Wolfram Research employee Eric Weisstein. According to the post, Eric used Maxima as an example of a dead open source mathematics project and was ‘shocked’ when told that this was not the case.

I wondered when Maxima last saw a release and was pleasantly surprised to see that the latest version was released just a few weeks ago on December 23rd 2007. This brings the total number of releases in 2007 to 3 – quite a way from being dead then. Now if only I could find out what’s new in this release…

By the way – in case you haven’t heard of Eric, he is the creator of Wolfram’s Mathworld, previously Eric Weisstein’s world of Mathematics.

## Should we let computers do all the maths for us?

January 9th, 2008

There is a post over at Mapleprimes called ‘The feeling of Power‘ which contains an extract from a short story by Isaac Asimov written in 1958. The story is also called ‘The feeling of power’ and is set in the far future at a time when humans completely rely on computers to do all of their calculations for them. In this vision of the future even the keenest human minds are incapable of performing simple calculations such as ‘nine multiplied by seven’ without the aid of a machine.

Until reading the Mapleprimes post I had never heard of this story and I wanted to read more. A quick google search gave me the full text (it is very short and well worth a read). I am not sure if putting the full text online in this manner is completely legal but I doubt that Asimov would have minded – especially since it seems to be currently out of print.

The message of the piece struck a chord with me since I spend a lot of my working and personal life working with various mathematical packages such as Mathematica, MathCad, Matlab, Octave, the NAG libraries and so on (as you may have guessed from the sort of things I write about in this blog) – all of which give humans various ways of doing Mathematics on a computers.

You need a PhD in order to do percentages in your head you know?

Thanks to all of these technological aids, it is certainly not difficult to imagine a time in the very near future when those of us who can compute 9*7 in our heads are in the minority. In fact, it is quite possible that this is already the case. Some time last year I bought a new pair of spectacles that had a marked price of exactly 300 pounds. When it was time to pay for them, the nice lady at the till told me that it was my lucky day because they had just started a 15% off promotion. She then started hunting for her calculator so she could let me know how much I needed to pay as she didn’t know how to get her fancy till to do it for her.

I patiently waited…and waited…and waited some more – her desk was rather untidy you see. Eventually I said – “The discount is 45 pounds so I need to pay 255.” I didn’t want to appear arrogant so I added “I think” to the end of the sentence. She smiled but continued hunting for her calculator. Eventually she found it – punched in the numbers and was utterly amazed that I had worked this out in my head.

This bothered me – why should such a simple calculation be considered amazing by someone who was well educated? When I recounted this story to my wife she rolled her eyes and said (and I quote) “Do get off your high-horse Mike – not everyone has a PhD like you do. You think you are so clever just because you can do a bit of maths.” This upset me even more and off I went to sulk for a bit. If I tell the same story to a mathematician or physicist then they usually respond with a knowing nod and then something along the lines of “That’s nothing – the other day I saw a student get out his calculator to multiply 32 by 10”.

So is this a bad thing? Should we be worried that many people today would struggle to do these basic calculations in their head? Alternatively, to put it in a more domestic setting, who is right – me or my wife?

Strong opinions

A lot of people have some very strong opinions on this – check out “Will it rot my students’ brains if they use Mathematica?” by Jerry Glynn and Theodore Gray for example – where they argue that skills such as mental arithmetic or being able to evaluate integrals by hand are no longer useful in today’s society. Actually they put their point a little more forcefully than this when they say

“If you are worried that your child will suffer by not learning to solve a polynomial by hand, I would suggest worrying more about not learning how to skin a rabbit, or how to start a stalled car. Of all the failures of education likely to get your child into trouble, manual polynomial solving is not high on the list.”

My own opinion is a little less polarised than that – I personally feel that maths education in the future should contain both hand calculations and the use of computers. Basic mental arithmetic, for example, gives one a certain level of intuition about numbers that would be lost otherwise (I am reminded of the story about Richard Feynman and the abacus here) but if I had a large list of numbers to add up then I would use a computer to do it.

Similarly I think that is important that calculus students learn manual techniques such as integration by parts or partial fractions and be able to apply them to reasonably complicated functions and not rely on packages such as Mathematica all the time. On the other hand, they should also know how to evaluate integrals using a computer (both numerically and symbolically) and check that the result is plausible (Even Mathematica gets it wrong sometimes you know). Ideally they would also be able to knock up a simple trapezium-integration routine in a language such as python, estimate the errors, and talk about how you might improve it.

Enough of what I think – feel free to read the Asimov story and the other articles linked to in this post and post a comment letting me know what you think.