Thursday, October 18, 2007

The Magic of Numbers 1

Ideas and Numbers and Other Philosophical Digressions:

How do ideas for writing (or indeed ideas for anything for that matter) come? Do you get your ideas before you begin or do you get them while you are writing or is it a mix of both? For me I am stimulated by my reading and then the ideas therefrom are both consciously and unconsciously assimilated. Many other things, of course, mould these ideas further as well as giving me different ideas entirely. These “other things” as I’ve rather generally called them comprise everything that goes to make up human experience – our everyday encounters with what we term, in short, LIFE.

Recently, the mystery of numbers and measurement has been intriguing me. From time to time I like dwelling on the odd puzzle to see if I can work out the answer. At school it so happened that mathematics and the sciences were emphasized to the detriment of languages and the liberal arts. I was quite good at maths and the sciences, though never an A student. I belonged to the B group and managed to get my results at Honours level. However, I had to work hard for the results I got, not being a natural scientist or mathematician, though I did really enjoy these subjects and learned so much from my fine teachers and the colleagues in my class at school. I also did manage to get a pass B.A. in mathematics many years ago – not a mean feat in itself, though no great mathematical achievement either.

Why this rather long prolegomenon? Well, I have gone on to further studies in languages, literature, philosophy and theology since the old days. I also find myself reading a lot in these subjects as well as teaching both Irish and some Italian. However, numbers lurk there all the time in the background. I love reading general science and general mathematics insofar as these have a bearing either on lived life, philosophy – what is the nature of the universe and other big questions, or on practical applications to living. Pure mathematics and Theoretical Physics are decidedly beyond my ken. Yet, say the books of Stephen Hawking, Richard P. Feynman and Eric Mlodinow intrigue me in the extreme as they seek to find one overarching general theory or one overarching law that might sum up the main laws of physics. Here physics, both theoretical and astronomical, overlap with philosophy and theology, which also seek to find one basic principle behind whatever reality is, in their own unique ways. I suppose theoretical physics and mysticism could be linked when both are seen as attempting to encapsulate the universe in a unity of “understanding” or “being,” whether that mysticism be of a religious or spiritual or even agnostic/psychological shade.

Often when we are asked a question which does not have a very clear or defined answer, we might retort with that wonderful old chestnut: “How long is a piece of string?” Well, obviously the answer to that question is quite rightly something like: “as long as you, the questioner, want it to be.” From there we are back to another old adage that “we see things not as they are in themselves, but as we are,” a wise and brilliantly perspicacious statement that has been variously attributed to the Talmud and Carl Gustave Jung and many more besides.

The measurement of things was and is a primary activity for the human being both in commerce and engineering and more besides and it is from this physical activity obviously that all the theoretical and pure mathematics developed which then, in turn, fed back into further and more accurate measurement of things, time and space. A colleague on my staff did his Masters in Computer Applications and wrote his thesis on encryption which involved as far as I recall a lot of “number crunching” and contemplating bundles of numbers and attempting to find primes. Prime numbers in themselves are indeed infinitely interesting in all the meanings of the epithet applied. One wonderful mathematical site, which I shall mention in greater depth in a later post, by the wonderful Irish mathematician, John B. Cosgrave is always mind-bogglingly interesting and captivating. Cosgrave discovered the Millennium Prime, that is, a prime number with exactly 2000 digits which he had specially printed for the occasion.

However, one Greek mathematician stands out for his wonderful algorithm for finding primes and indeed the method is eponymous. It’s called The Sieve of Eratosthenes. This Eratosthenes was the director of the famous Library of Alexandria in Egypt and lived from 276 -194 B.C., that is, over 2000 years ago. He was a Greek, a mathematician, a poet, an athlete, a geographer and also an astronomer. Like a lot of ancient scholars he was a polymath. He is noted for devising a system of latitude and longitude, and for being the first known to have calculated the circumference of the Earth. The Sieve of Eratosthenes is simple to use. Just follow the following algorithmic steps:

 Write a list of numbers from 2 to the largest number you want to test for primality. This is our first list. Call it List A for handiness.
 Write the number 2, the first prime number, in another list for primes found. Call this List B.
 Strike off 2 and all multiples of 2 from List A.
 The first remaining number in the list is a prime number. Write this number into List B.
 Strike off this number and all multiples of this number from List A. The crossing-off of multiples can be started at the square of the number, as lower multiples have already been crossed out in previous steps.
 Repeat steps 4 and 5 until no more numbers are left in List A.

No comments: