Monday, July 19, 2010

1233424807495820985023492385798739582794852 is not prime !!

Scenario 1

Write a C++ program to find a whether a a given no. n is prime no.
The Algorithm for the same goes something like
1. Divide n by all integers i such that i < n
2. if Remainder == 0 for any of the i
then n is composite
else n is prime


Scenario 2

Explain a 4 year old kid the concept of prime no. that any no. which has no other factors than 1 and no itself is a prime no. Also teach him how to factorize nos. and find factors of a given no.


Let both the computer with C++ program and 4 year old fidget around with no of inputs for n like 2, 5, 49 , 17 etc. after about 30 odd mins of playing around with many inputs the child is bound to have "learned something" about the prime nos.

Now input value of n as 1233424807495820985023492385798739582794852 . The computer is going to take a hell lot of time( secs or even minutes ) to come up with a answer , the 4 year old kid however is going to snap back at you - " Dude , its a even no. - it cant be prime "


What is it that just happened ?! We are essentially staring right in the face of what sets Us apart from computers. The ability to go beyond to set rules of the governing formal system and formulate new rules for yourself - The human brain has the unique ability to transcend the level of current functioning of the system and take a overview and make new rules. While the computer is essentially bound by the formal system of its program and hence cant make the "err" of not following the system, which essentially characterizes us "Human". Being able to learn like this for a program is an essential step in artificial intelligence development


It is the very same thing used in CAPTCHA test which you give while registering for any site on the internet ! The given horribly deformed alphabets make no sense to the computer , for it those are just scattered pixels not resembling any pre-programmed font it knows - where as for us there's a whole word in there !

When you see a a lady laughing on the Screen , there are 2 ways of understanding it
1. Know which pixel(i,j) is going to be illuminated by what Red Green Blue ratio
2. Know the woman is laughing

Both of these do make sense for us humans ( though the 1st type of understanding would be a pain in the ass )- We can still understand picture being shown at a pixel value as also from a highly abstract point of view as to say that these confined activity of pixels is indeed a woman laughing !!! This is a spectacular achievement of understanding a single phenomena at 2 different levels - It is indeed this type of "overview - understanding" at different levels of the same phenomena that helped the child know at some point of time that " Prime No. ( except 2 ) cant be even "

We can see the same being explained in the Movie "The Matrix" - where Morpheus tells Neo
that even though Agents are the most powerful entities in the matrix , they have a fundamental weakness that they are programmed based on a foundation which they cant break and hence Neo can beat them this is something analogous to the 2 scenarios above. More aptly said by Morpheus ( when Neo asks him How can he move as fast as the agents and dodge the bullets ) -" "When you are ready , you wont need to dodge bullets"

We can draw parallels to this even in philosophy n spiritualism where we humans( like computer) keep on trying to excel in our lives( finding whether no. is prime or not ) which is so bounded by material world( the algorithm programmed bounding the computer ) , when a Buddha or Krishna ( 4 year old ) comes along with certain deep insight( "even nos. cant be prime" ) and gives answers within seconds to question which we would have taken an eternity to answer !

So if you are troubled and caught up in the small pixels of your life - Come out of it and see How beautiful is the laughing woman !!
 
Watch the latest videos on YouTube.com