Wednesday, October 7, 2009

Last year on 15th August, in a sudden bout of irrational exuberance (maybe it was the freedom in the air) I bought a book called "Gödel, Escher, Bach: An Eternal Golden Braid" by Douglas Hofstadter. One look at the name and you know it's way out of your league (at least my league). Heck, even the author's name is hard to pronounce. And it's big. I mean BIG. Bigger than Tannenbaum's Computer Networks!!

Wait, it's not over yet. The name of the book comes from mathematician Kurt Gödel (and his various works, mainly the Incompleteness Theorems), artist M. C. Escher (and his various surreal and bizarre artwork), and composer J. S. Bach (aaand his music, what else!).

So mathematics. Set theory, number theory, logic and etc and etc and etc. Rejected.

Art. Hmmmm... Drawings and paintings of figures and buildings and structures. Albeit not your usual drawing, but still drawings. I can live with that.

So that's how my journey in that big and scary world of GEB started. Selective reading. When its skimming the surface it is OK. Certain parts makes sense. And you are delighted with the occasional insight when you happen to catch them. When it goes too deep into theorems or fugues (whatever that is), just jump to the next chapter.

Now you will wonder why on earth somebody will write a book on a mathematician, a musician and an artist. Well, GEB actually a book on logic and intelligence. and it touches the subject of A.I. at the end. To do that he takes help of various devices, namely those works which I mentioned. But also, other mind-bogglingly diverse things. Zen Koans, and poems and puzzles (of course), ancient Greek paradoxes and what not are used to show what a weird thing our mind is. The basic idea is to analyze our thought process, and recognize the very very complex things goes inside our thinking, which is just ordinary and taken-for-ranted when we do not notice. But if you want to define it, or formalize it, make a rule/formula/theory out of it... all hell breaks lose.

Does our mind have to have a theory? Yes, if you think of us as rational beings taking intelligent decisions based on the problems given to us. At least most of the time (emotions and other 'irrational' things like love etc is kept out of picture). It has to follow a logic. A pattern. And if there is a logic, it should be representable. By means of equations, matrices, algorithm, C/C++... whatever.

But, how our mind works, how we perceive and communicate even simple and ordinary events and objects, is complex to the core. Something which is seemingly organised and structured like language, becomes a huge task to feed into a machine.

GEB shows these things with little stories and ongoing dialogues between a few 'odd' characters. For example, the tale of a dog and a bone separated by a fence is used to describe problem solving and a related topic of problem reduction. Tommy can see the bone but can't cross the fence. So he runs to the fence and start barking, maybe jumping around a bit. Jimmy is a more intelligent dog, who runs along the fence, finds an opening few meters away and bingo, gets the prize.

You see in physical sense, path taken by Jimmy is a longer path, but in an abstract so-called 'problem-space' it is the shortest (maybe only) path. If we represent the locations by nodes, the direct path between starting node and 'bone-node' is infinite, and the path Jimmy takes, start-node to opening-in-fence-node to bone-node is of a finite value say x+y. The key is to imagine this abstract space and then calculate the paths (there can be two openings in the fence and then you need to see which opening is near, x+y or w+z).

We do this every time. To go from 2nd floor to ground floor, we don't go the nearest window and jump (unless you are Rajnikant). We find the nearest staircase, walk down, again walk little bit left or right and reach the target. Our mind creates a complicated graph of nodes and paths and corresponding distances immediately. Things become more complex when you need to go from Jayanagar to Hebbal at 6 pm on a Thursday. Lots of paths and nodes and variables, including everchanging one-ways and road-blocks for Namma Metro!

So, how do you 'define' a problem is the first and toughest step. Computers (i.e. programs) are good at calculating inside a given problem-space. But to break down a given real-life problem into abstract (and mathematical) notations is difficult. And of course many at times the first break-down may not be correct. We go along the way and realize this is going nowhere. We sit back and look at the whole thing from top and find a new approach (remember trigonometry problems in +2?). Sometimes that requires going a few steps back and starting once again.

GEB describes this birds-eye-view state as I-mode ('I' for intelligent), where you take stop what you were doing, have a look at the path taken so far and try to see where you will end up in this way. Whereas solving the problem step-by-step in a predetermined way is M-mode ('M' for mechanical). We constantly switch between these modes.

In general, we human beings are good at looking at things/events from a distance, finding a pattern and realities there is something wrong or right (or just simply strange) with it. Maybe we are reaching the same place again and again. Maybe there is a shortcut. Recognizing there is a 'sameness' in apparently dissimilar events which we haven't notice before. Is there a better approach hidden nearby... The whole history of invention and discoveries are based on these basic methods. The key point here is to see the pattern, to realize the sameness. Can you teach that to a computer. To find the pattern...

But then, how do you define 'sameness'?

It is an ever growing list of "How do you define ...". Big brains at big places are breaking their big heads on these things. Just to get grasp of nothing but ourselves. We know 'it', we do 'it', but how... exactly how do we do it!! GEB does not give an answer but describes the problems and complexities related to the job.

So far I have read around 20% of the book (in a whole year). Don't ask about understanding (5%?). As I told, it's way out of my league. But you find gems here and there which makes you wonder about what is going inside this thick skull of ours. My arduous journey continues and will go on for very long time.

In any case, what's the use of spending 500/- plus for a book and finishing it in two weeks! GEB will stay for long in the currently-reading list. Really long. And that's not a bad thing in my book... :)