As of May 4 2007 the scripts will autodetect your timezone settings. Nothing here has to be changed, but there are a few things

Saturday, June 25, 2011

Egyptian mathematics

Did the Ancient Egyptians have computers? - Sorry, this is a serious blog. I have to set a switch first.

Eric von Daniker mode: ON

Done! - The great pyramid in Giza was constructed with approximately 2,300,000. stones ( 2 - 30 tons each ). Estimates are the pyramid was built in 15 years. That means more than 400 stones per day. Or 1 stone every three minutes in 7 x 24 shifts. That sort of precision logistics requires mathematics. In the course M381 I have learned how simple computers really are. And when I watched the video below I had to ask myself the following question. "Did the Ancient Egyptians have computers?" I don't say they had something like the Intel Core, think of a programmable mechanical calculator. Technically that is a computer.

Eric von Daniker mode: OFF

The video below is not as spectaculair as the ramblings of Eric von Daniker ( he sells millions of books full of it ) but will nevertheless surprise you. If you love mathematics.

Wednesday, June 22, 2011

Formal mathematics

Reading formal mathematics is even harder than standard theorem / proof mathematics. For example:

$$\forall{x} \exists{y} (( y \neq 1 \& \forall{z} ( \exists{t} ( z \cdot t = y) \rightarrow ( z=1 \wedge z=y ))) \& \exists{s} (x+s=y))$$

for all x a y exists such that
y not equal to 1 and for all  z a t exists such that
z times t = y implies z =1 or z = y
and a s exists such that x plus s = y.

Do you get it? There are infinitely many primes.

Monday, June 6, 2011

Project Euler

If you like programming, mathematics and you want to rank yourself among peers then Project Euler may be an option for you. It's not for me ( yet ), my game is mathematics at the Open University but who knows, I might not be able to resist the problems. Although some look simple, once you have solved a problem you get access to a database of how others solved the problem. That may be very illuminating.

Add all the natural numbers below one thousand that are multiples of 3 or 5.

Problem #1.

What is the first term in the Fibonacci sequence to contain 1000 digits?

Problem #25.

And so on... with an ever increasing complexity. Knowing some Elementary Number Theory might help, I suppose.

Happy Coding!

Sunday, June 5, 2011

What is the dimension of color ?

Think of color, pitch, loudness, heaviness, and hotness. Each is the topic of a branch of physics.

Benoit Mandelbrot

 The prototypical fractal

( I'll continue with my 'watch notes' of the GEB series later this week. But I'll stay on topic with this post. )

Imagine a recursive process which goes to a certain depth until it stops. This 'certain depth' is a natural number which can be assigned a color. This is basically how fractals like the one above are built, pixel by pixel.

Programming 3D graphics can get quite realistic as we all know from watching movies or playing computer games. What is this reality? When does a picture look real to you? It is what made Rembrandt famous, I suppose. Control over light and thus color and shading.

What I am trying to say is that one number is not enough to encode a color. This is rather counter-intuitive, I know, but only if you assume the number of colors is finite or countable infinite. How many colors are there? Finitely many? Countable infinite many? Or not countable infinite? I don't know.

Assume a scene with an object with a certain color, say lime green. This can be coded with one string, the RGB color method uses 32 CD 32 ( Hex ) for lime green. But then you have an object that looks exactly the same everywhere. Because there is no light in the scene. By adding light we have to add the exact location of the light source in the scene. Shadows must be calculated. And light will be reflected. Each pixel will have a reflection vector which has effect on the color. Does this add to the dimension of the color? What if there are other objects in the scene? They partially reflect light and thus become a light source as well.

Do you get the idea? Then what is the dimension of ( the vector needed to encode a ) color?

More:
- The Dimensions of Colour

Saturday, June 4, 2011

Goedel, Escher, Bach - Lecture 4(1)

My brain ran those neural network algorithms.

Justin Curry

The reading assignment was chapter 6 'The location of meaning'. It is basically about coding and decoding. Of course Hofstadter mentioned the Rosetta Stone in this context, the key to ancient Egypt. It contained a parallel text in three languages and was deciphered in 1821 by Champollion.

A recent example in the context of chapter 6 is space archeology. Archeologists and Egyptologists were able to interpret satellite pictures of Egypt which lead to the sensational discovery of new pyramids.

Let's go to the lecture. ( This is a 1h46m lecture and will be discussed in two posts. )

Curry talked about Goedel numbering again, a method Goedel used to code strings in formal number theory to numbers. What Curry said about coding a string in formal number theory, playing with it and then code it back is only true in theory. Simply because Goedel numbers become -extremely large-. Think of numbers built from pages full of digits. ( Would Curry ever have calculated a Goedel number? This reminds me of a DBA course I attended once. The trainer talked about all the beautiful properties of the then new RMAN from Oracle as if backups could be recovered in an instant. It turned out that he never worked in the trenches of 7 x 24 administration of large databases. )

Dialog "Contracrostipunctus" on page 75 of GEB is discussed. How this dialog has meaning on several levels. The dialog refers to itself that it contains a hidden message. The concept of 'Self' is introduced here.

Starting with what does "Snow is white" mean? he builds an argument that there is an isomorphism between electrical activity in the brain and the interpretation of symbols. ( Thought reading might be possible after all, one day. Isn't it true that man can create everything he is able to envision? )

There are at least two phases in the proces of assigning meaning two a string. The first is parsing the string, the second is the interpretation of the parsed words. Interpretation depends on the context of the interpreter.

 Message in a bottle

He introduces the concept of information. For example how physicists reduce complex physical behaviour to a small sequence of symbols. Like for example how a pendulum works.

 Pendulum ?

Friday, June 3, 2011

Goedel, Escher, Bach - Lecture 3

A guy named Euclid.

Justin Curry

Curry briefly explaines the concepts:
- consistency
- completeness
- and geometry.

A consistent system leads to conclusions that are not contradictory in any sense. A statement is either true or false, and never both true and false.
A system is complete if everything that is true in the context of that system can be derived from the axioms.
Regarding geometry he mentioned that there are Euclidean non-Euclidean geometries.

Then he attempts to explain Goedel's Incompleteness Theorems.
1. Any system as powerful as number theory which can prove its own consistency is necessarily inconsistent.
2. Any system as powerful as number theory is necessarily incomplete.
He explains that Goedel managed to transform the idea of provability to a property of numbers by introducing his Goedel numbers.
He says that students should now have a notion of the Goedel theorems and promises that this is just a first glance at Goedel's theorem. ( Not sure if he meant he would come back at Goedel in this lecture series. )

 Trying to explain Goedel

He then talks about Euclid and his postulates.
(1) Any straight line segment can be drawn joining any two points.
(2) Any straight line segment can be extended indefinitely in a straight line
(3) Given any straight line, a circle can be drawn having the segment as radius and the
(4) All right angles are congruent.
===
(5) If two lines are drawn which intersect a third in such a way that the sum of the inner angles on one side is less than two right angles

He explains that the 5th postulate is consistent in Euclidean Geometry but not in spherical and hyperbolic geometry.

Hofstadter Dialog - Little Harmonic Labyrinth is removed from the video due to copyright concerns. It is part of what makes GEB such a difficult book. Here is part of it.

The Tortoise and Achilles are spending a day at Coney Island. After buying a couple of cotton candies, they decide to take a ride on the Ferris wheel.
Tortoise: This is my favorite ride. One seems to move so far, and yet in
reality one gets nowhere.
Achilles: I can see why it would appeal to you. Are you all strapped in?
Tortoise: Yes, I think I've got this buckle done. Well, here we go. Whee!
Achilles: You certainly are exuberant today.
Tortoise: I have good reason to be. My aunt, who is a fortune-teller, told me that a stroke of Good Fortune would befall me today. So I am tingling with anticipation.
Achilles: Don't tell me you believe in fortune-telling!
Tortoise: No . . . but they say it works even if you don't believe in it.

About 1% of the Little Harmonic Labyrinth dialog.

He explains the cardinal arithmetic, the arithmetic of infinities.
An interesting definition of infinity is that a set can be mapped to a subset of itself. I.e. the natural numbers can be bijectively mapped to the even numbers. The points on the real line can be bijectively mapped to the points on the line between 0 and 1.

 Non-Euclidean geometries

Thursday, June 2, 2011

Goedel, Escher, Bach - Lecture 2

It will get a little bit mathy, but that's ok.

Curran Kelleher

Lecture 2 is given by Curran Kelleher. This lecture is all about recursion and ends with a nice explanation of the Mandelbrot set.

He starts out with the traditional examples factorial:
factorial[0]:=1;
factorial[n_]:=factorial[n-1]*n; 
and fibonacci sequence:
fib[1]:=1;
fib[2]:=1;
fib[n_]:=fib[n-1]+fib[n-2];
 Kelleher's factorial program

Kelleher's hand-out ( pdf ) contains examples of Java code for drawings of the Koch curve and Sierpinski triangle. Although I fast-forwarded through this part of the lecture, it may be very interesting for non-programmers.

 Explaining the Fern algorithm

 Complex number implemented as a class in Groovy
At around 1:00 he starts with the topic of the Mandelbrot set. Starting with f(z) = z^2 + c he manages to give a nice explanation of the Mandelbrot set. The color of a point in the Mandelbrot set is based on the number of iterations it took f to 'escape' a circle. Since this is done on a pixel by pixel basis and one pixel may generate not one but several iterations this explains the long time it takes to generate a Mandelbrot set.

P.S.
GEB does not seem 'outdated' at all although it was written in the late seventies. A time when there were no mobile phones, no PCs, let alone laptops and the internet was still in its toddler phase.

Wednesday, June 1, 2011

Goedel, Escher, Bach - Lecture 1

'Understanding Goedel' is one of the major goals I set for myself.

This final unit brings together all the ideas introduced in the course. These ideas constitute the technical machinery that enables us to prove some very important theorems which answer what we have called Leibniz's and Hilbert's Questions. These theorems, Goedel's Incompleteness Theorems, are among the most profound intellectual discoveries of the the twentieth century. Thus you should not be surprised if you find this unit hard going in places.

M381 - Unit 8.

In Goedel, Escher, Bach (GEB) Hofstadter asks the question: what happens when 'things' start referencing themselves? ( Like people do who are in essence not more than a set of linked molecules. )

At last I took the time to watch video 1 of the GEB series.

 Justin Curry

The teacher is Justin Curry. He started by telling that most undergraduates don't get through GEB in less than 13 weeks and that it took him seven years to get through the book. I am not sure but I think my first attempt in reading GEB was in 2007 or 2008. It took me almost six months to get through it. Which I thought was really bad. When I finished the book and still didn't understand what he was talking about I started to seriously doubt my learning abilities. I have to admit that I still don't get it but I made progress. And I am getting closer, thanks to M381 Mathematical Logic ( read: Nigel Cutland ).

Anyway, to the point: the lecture.

He starts with the concept of isomorphism. In GEB, Hofstadter explains isomorphism as a map between structures that maps parts with similar purpose to similar purpose ( my words ). This is different than the mathematical definition which states that an isomorphic map is both surjective and injective. Hofstadters definition can be understood immediately, whereas the mathematical definition needs understanding of layer upon layer upon layer. Since what is a map in mathematical sense? What does surjective mean? What does injective mean? Analyzing a mathematical sentence always creates a ( large ) tree structure.

Recursion. The concept of recursive definition. A fascinating concept which I use a lot, since I am a programmer by profession. Curry uses the example of the Fibonacci sequence 1,1,2,3,5,8,13,... and translates it to f(n) = f(n-1) + f(n-2) and the Sierpinski triangle ( fractal ).

 Drawing the Sierpinski triangle

( To be continued in the next post. ) Edit: Nope. I'll make a last note about lecture 1 here and continue with lecture 2 next time.

Some remarks, tips for if you want to give it a try ( like myself ). I was not in continuous awe while watching this lecture. You know when like you are watching the latest BBC Horizon or similar. It's not like that. I don't have the feeling as if I have wasted my time, not at all. I am going to watch lecture 2 soon.

- You definitely need the 720+ pages ( 20 chapters ) book. ( Details on the course site. )
- You need to be ( somewhat ) familiar with Bach's music, or at least -know- someone who is. ( What are forums for anyway? ) To fully grasp the genius of Hofstadter's work.
- If you are a religuous person than GEB might not be for you.

There is an audio set in the lecture room. Near the end of the lecture a piece of Bach is played. Students familiar with that music could elaborate on it. Since I am ignorant to most classical music I must have missed a lot of what Hofstadter said. It might be an opportunity to start listening to some Bach, who knows what happens.,

So far for lecture 1,

Welcome to The Bridge

Mathematics: is it the fabric of MEST?
This is my voyage
My continuous mission
To uncover hidden structures
To create new theorems and proofs
To boldly go where no man has gone before

(Raumpatrouille – Die phantastischen Abenteuer des Raumschiffes Orion, colloquially aka Raumpatrouille Orion was the first German science fiction television series. Its seven episodes were broadcast by ARD beginning September 17, 1966. The series has since acquired cult status in Germany. Broadcast six years before Star Trek first aired in West Germany (in 1972), it became a huge success.)