Saturday, April 23, 2011

India Against Corruption - Are you ?

I write this post on the background of a resounding success of Anna Hazare and India Against Corruption movement , which fomented a mass public revolution fueling itself using the dormant anger within each Indian against the corruption looting their country !

What I loved most about this movement is : Its nature !
The movement was very very constructive , not a single paisa of public property destroyed (Learn something Shiv Sena and MNS), the movement was not about group of people standing up and vilifying the government with cliches like " Sab neta chor hain " and "Kill all the politicians". It simply said - System is flawed ,We want to change it and MOST importantly it gave a solution in form of a Draft Jan Lokpal Bill (this is always missing from most of the mass protests we have ) - Now if you dont allow me to correct this flaw - I will hold you at moral ransom and make you see things the right way. Another important aspect of this movement was the self less nature or if the self was involved it was - the Self as an Indian.


We have had telangana , gujjar , jat and various other mass protest before this - but all of these were by a certain group of people working for their own good , none of them was for India - I guess thats where this movement set itself apart from others and got the pan India mass support. So all of you, who say that this protest has set a precedent or step by step guide to arm twist, "blackmail" the government into accepting your demands ,cant be right, because people understand who are you and what are you asking and if you are really self-less then only you will get the kind of support Anna got. I must confess here that the success of this protest gave a glimmer of hope to a hopeless pessimist(when it comes to prospect of doing good in India) like me that - Good things can happen if the people leading the change have that much clean energy to blast through all the obstacles

So the mass Movement culminated into formation of the Joint Drafting Committee for the Jan Lokpal bill - with 5 Civil society members and 5 ministers , Question have been raised that do these 5 civil society members actually represent the civil society - I think even if they dont , it really doesnt matter (coz the requirement that they should represent is only by the principle of democracy - We all know that when given option to choose our representatives we choose Sharad Pawars, Suresh Kalmadis and A Rajas) ,what matters is whether they are Good at what they do ! As expected we had Digvijay "I hate everything that is Good" Singh , teaming up with (out of and hence looking for action) Amar Singh and retrograde Mulayam Singh to malign one by one all the 5 members.

Now Anna and Kejriwal have an impeccable record hence the targets were Bhushans and Hegde ! Bhushans because they have been alloted 20Cr Home for 1 lakh in UP and the (forged or original ?!)CD , Hegde for being ineffective as Lokayukta of Karnataka. I would like to argue that these people are on the panel not because they have a good track record and are honsest , but becuase we believe that they have the right intension and skill to draft a non loopholed Good Lokpal Bill. I say today almost nobody is perfectly white or black for that matter - each of us at some level has contributed to corruption , so if I have a checkered past does that mean I can never do anything good for the country ? The adage that "Even if you have indulged in 1 paisa corruption yourself - then you lose the moral right and hence will be termed jealous If you point out fingers at others who are more corrupt " doesnt apply here . The argument of purity of means should give way to objectivism . Bhusans certainly aren't as corrupt as Sharad Pawar (who as heard doesnt take bribe but takes % in the project and is supposedly atleast a Dollar billionaire), I say if the Bhushans do contribute in forming a Good Lokpal Bill they do deserve the 20 Crore house for 1 Lakh ! Come on if Yuvraj Singh can get Porsche 911 turbo for individual achievement in a Sport - Bhushans are contributing a hell lot more, that to not for themselves, but for the country ! About the argument that what if corrupt Bhushans compromise the draft bill ? Well arent there 5 Ministers on that committee to whom we have gladly accepted and Bhushans were the original authors of civil society draft. Also the fact that impeccable Anna and Kejriwal want the Bhushans as a art of the committee is more than an assurance for me and media bashing or maligning wont make me impugn their integrity !

I think that we should believe in these 5 guys for once and lets hope that under the leadership of Anna ,they draft a perfect Lokpal bill and take ahead a movement on which all of us Indians had pinned our hopes - Jai Hind !

Saturday, January 8, 2011

Gandhian Game Theory

After Seeing the Movie - " A beautiful Mind " for the first time- like most people I had became a fan of the legendary John Nash and his even more legendary "Nash Equilibrium" and had done quite some reading on the same issue by googling him , but I was little kid then who didn't understand the profoundness of Nash's Equilibrium. Then came a day when my grandfather, who was studying Nobel Laureates then , asked me -"Who's this guy John Nash ? Do you know whats so brilliant about his equilibrium that fetched him a Nobel ?" - There Began my Round II of research on John Nash and now being a 3rd year Engineering student - I guess I had matured enough to taste the Whiskey called John Nash and not spit it out saying "It tastes yuck" but let it sink in and make me "high"- and I am still high ....
John Nash's Equilibrium can be best explained using the Prisoner's Dilemma - A classic Game theory problem- Where 2 robbers on way to robbery have been caught by the police trespassing - Now the Police "know" that the robbers were up to a Robbery but they have no proof and can only book them for trespassing. But the Police are smart asses - they decide to turn the 2 robbers against each other to gain proof -They lock each of the robber in separate rooms and offer each of them a deal without letting them communicate with each other - Defect on your partner and we will let you go free without booking you even for trespassing and will screw your partner for the entire robbery.

So Now each of the robber has 2 options:
1.Betray Partner
2.Stay Silent with partner

Plotting this 2 options of the 2 robbers in a matrix form we get 4 scenarios

B Stays Silent B Betrays
A Stays SilentEach serves 6 months A: 10 years
B: goes free
A Betrays A: goes free
B: 10 years
Each serves 5 years



Thinking from Point of view of A : A thinks " Whatever B does my sentence will always be less
if I betray him " because given if B remains silent , A get 0 if he betrays whereas 6 months if he too remains silent and if B betrays him , then if A remains silent then he gets 10 years and if A too betrays he gets only 5 ! So in any case - Mathematically speaking A is better off Betraying B.
But come on - Same is true for B too - B too is always better off betraying A. So as they say in Game theory Jargon - Betraying is the Dominating Strategy for both the players !

Now if you see there are 2 Equilibrium points in the matrix - (Silent,Silent) and (Betray,Betray) -where both get equal term. But (Silent, Silent) is an unstable Equilibrium because when engaged in that equilibrium , there is an "incentive" to change your strategy, your sentence reduces if you change given your opponent doesn't change. The (betray,betray) on other hand is stable equilibrium , because if u change your strategy from there and your opponent doesn't - then u r screwed ! This Stable Equilibrium is known as the "Nash Equilibrium" and it almost accurately captures the essence of natural human behavior and you can predict given such a scenario - its highly likely that the Game will end up at the Nash Equilibrium ! Don't believe that humans can act so stupidly - Nuclear Arms Race during the Coldwar - its Pure Nash Equilibrium in Action !!! Option to USSR and USA being to produce or not to produce nukes !

Now .......lets get back to the title of the Blog - Where Does Gandhi come into picture ?!
Gandhi somewhere down the line realized that - " Nash Equilibrium" which we saw was a very sad place to be in ! Win Win Nash equilibria do exist - but not in the case we were studying ! Gandhi realized that only way of avoiding a "lose-lose Nash Equilibria" is to for someone to take one step backward first ! Lets describe another scenario with help of a pay off matrix to justify Gandhiri
B is Violent B is non-Violent
A is Violent Each gets hurt A: is unhurt
B: gets hurt
A is non-Violent A: gets hurt
B: is unhurt

Each is unhurt


The Dominating Strategy here again is to be violent and hence the Nash Equilibrium is at intersection of dominating Strategies of both players and unfortunately in it both get hurt !
Gandhi ideally wants you to be at the unstable equilibrium where both remain unhurt - but for that someone has to take the 1st step of immediate mathematical irrationality - Gandhi says taking this 1st step though apparently irrational is very important and requires true Courage !
the Courage he says u can only derive when U have truth on your side - Once you have taken the 1st step it causes your Opponent to morally move to the unstable equilibrium . So does Morality and mathematics mix is an open ended debate ? The first step of nonviolent Satyagraha is definitely not supported by Game theory - But one could argue that immediate rationality in being violent is myopic and Satyagraha is your way to support the unstable equilibrium which in the long run is Win win ! Gandhi here is supported by another polymath - Douglas Hofstadter
(whose book- Godel Escher Bach is a must read) - Douglas Hofstadter argues that rationality which ends in lose-lose situation is not rationality at all , hence He defines what he calls "Super Rationality" as a virtue of both players by which they will chose non-violence as their strategy which will get them better results in the end ! So is it morality or super Rationality - I dont know - but I know Gandhi as a man was able to break the "Nash Equilibrium" of pre-independence struggle , where British killed us in Jallianwalla Baugs etc and we killed their officers in return, and shifted the whole dynamics to a "Win-Win" unstable equilibrium and most importantly maintain it ! So cheers to the man who defied Game theory or should I say introduced us to a new Moral Game Theory - Gandhian Game Theory !

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 !!

Wednesday, December 23, 2009

Artificial Intelligence

I was pondering over Artificial Intelligence and what it would be like ?
and if I have to program one into existence , what would I need to program it to do !
which led me to look back at evolution of life , to seek some of the answers to questions like What is intelligence? how did natural intelligence evolve ? Why am I intelligent and the Dog on the street is less intelligent ? I kinda Zeroed in onto this thought that :
Intelligence in its raw form, is indeed the most efficient tool of survival .
The Intelligence that we talk of in terms of IQ or cognitive power is basically a very very specialized and applied form of this basic tool of Survival.
Lion has raw strength , cheetah has speed , Elephant has size , Ants have huge numbers of themselves , Humans ? yes Humans have Intelligence !

Now this Intelligence was such a brilliant tool that nature gave to humans that hardly 10% of it he used and managed to survive in Nature! This is like the prime achievement of all other spices
- To survive . But Humans got a tool so fertile that mere survival was not enough for it
to satisfy its sense of achievement ! The human intelligence went on (applying itself) to make life easier for humans as in if for survival of a specie , a specie needed to score 50 on the Survival test....intelligence (as a tool of survival) went on to score 60 , 70 ,80 , 90 , 99 ...... till Human dominated the world.
For example :
1. Even though not naturally autotrophic , intelligence told man how he could produce food for himself , by agriculture and breeding , and need not waste time or be uncertain
in searching for it !!Mind you, No other specie does this , except for Plants for whom its a nature's gift !

2. All the maths and sciences developed are essentially human intelligence applying itself
to make life easier and ascertaining survival of man !

So now I have a fair fundamental idea about what is intelligence ! So back to asking questions
to evolution about How I can try and program intelligence or what had God done ? when he programmed it.
Evolution tells me that life began from a single celled specie which had a singular property
IT DID NOT WANT TO DIE !
the secondary property was - Reproduce as many as yourself before you die and pass on the info you generated for ease of survival to the reproduced !

All its action were governed by single point agenda - It didn't want to die and if this condition was met then it followed the 2nd property of reproducing. So the point to note by the computer Engineers is who are trying to develop AI . You need to program urge to survive in a machine instead of the traditional way of trying to program by - infinite programming - i.e programming exhaustively for all possible stimuli the machine will get in its life time.

A point to note here is even for God to produce such highly intelligent species like the human , required millions of years of evolution, in its non evolved forms animals like mosquito have some sort of programming in them that they will avoid themselves getting hit by your hands and still seek out to drink your blood which we can even program now . So essentially if we want to Invent Artificial Intelligence - we are looking at machines with urge to survive otherwise Artificial Intelligence will lose its reason to exist ! Once this is done 99% is achieved - the rest 1 % is only about programming and giving that machine with urge to survive - better mechanism to exist !


Monday, September 7, 2009

The Circle of death !

This is my 1st Mathematical blog and hence entirely technical one !

The Problem at hand was an old one :

Suppose 1000 men are standing in a circle ; with 1st man holding a gun !
1st man shoots the 2nd guy and gives the gun to 3rd who shoots the 4th
and gives gun to 5th ..........999th shoots 1000th and gives gun back to 1st
whi now kills the 3rd and gives gun to 5th ..... the cycle continues .
Who will be the last Survivor ?!


All varied approaches were tried but answer was reached by 2 ways only
1. Brute force of actually killing 999 people on paper to find the survivor
2.Writing computer program to find the solution

Both were done! 1st by me , 2nd by my friend Shalabh and answers matched 977th person would survive ! Shalabh's program went 1 step ahead , coz it was written for N no. of people !
i.e it accepted how many people did we want in circle of death and calculated the last survivor in each case !

The program made me think and plot the list of survivors against no of people involved in the circle of death! and what followed was beauty of maths revealing itself !


Total no of ppl and No. of the Survivor

( n = m )
n = No of ppl in the circle ;
m = Position of the person who survied the shoot out !

1 = 1st

2 = 1st
3 = 3rd

4 = 1st
5 = 3rd
6 = 5th
7 = 7th

8 = 1st
9 = 3rd
10 = 5th
11 = 7th
12 = 9th
13 = 11th
14 = 13th
15 = 15th

16 = 1st
17 = 3rd
18 = 5th
19 = 7th
20 = 9th
21 = 11th
22 = 13th
23 = 15th
24 = 17th
25 = 19th
26 = 21st
27 = 23 rd
28 = 25 th
29 = 27th
30 = 29th
31 = 31th



The series of odd numbered survivors repeats itself each time growing in a specific way !


1 => 1st cycle 1 = 2^0 element Total =1


1 3 => 2nd cycle 2 = 2^1 elements Total =1+2= 3


1 3 5 7 => 3rd cycle 4 = 2^2 elements Total =1+2+4=7


1 3 5 7 9 11 13 15 => 4th cycle 8 = 2^3 elements Total=1+2+4+8=15


1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 => 5th cycle 16= 2^4 element Total=1+2+4+8+16=31 .
.
.
.


The elements in each cycle grow as the power of 2 !

So now according to problem under consideration
n = 1000 ;
Aftr completing 9 cycles of growing odd series
i.e 1+2+4+8+16+31+64+128+256 = 511 elements are done

now cycle having 2^10=512 elements begins ;
n = 1000 corresponds to 1000-511 = 489 th odd no in cycle containing 2^9 elements

(
1000 = 2^0 + 2^1 + 2^2 + 2^3 + 2^4 + 2^5 + 2^6 + 2^7 + 2^8 + 489
= 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128 + 256 + 489
)

Thus the person having 489th odd no. will survive the shootout of 1000 people !
i.e. (2*489 - 1 ) = 489th odd no. = 977th person will Survive!


Now using above concept, survivor in case of N no. of people in circle of death can be solved
with ease !

Thursday, May 28, 2009

An Analogical Epiphany !

Well I was discussing about the power of Human Imagination , which has been a long time favorite topic of mine to ponder upon , with my doctor and pharmacist friends, which is when the epiphany struck me! The situation under consideration was
"Could a person blind by birth , imagine what was vision or how would it be ? "
To test the power of Human imagination - I wondered
"When such a blind by birth person regains his vision ( due to the wonder of Medical science) , How would what he had imagined vision to be and his actually 1st experience of seeing compare ?"
It would be an enlightenment for him !
Well this topic itself is worth another blog post !
But I want to concentrate on the Epiphany derived from the above discussion !

Taking an analogy from above - if we consider "All the worlds population to be blind and if some one person gains vision - How the hell is he going to explain us ( the rest of the population ) What the phenomena of vision is ? " . He will be helpless in trying to explain us what vision is !! Try doing it yourself. Try and explain Whats Blue yellow and green to a Blind person ! You will realize that You can describe it based on pre-established refrences only ! But if these are not available - U will just have to say - Experience it yourself ; I cant tell you what it is !

Well well that is what has been said about Enlightenment by all the Greats who have achieved it in our history so far ! Experience it yourself ! So Can we dare say enlightenment is a development of a new perception ? of which we initially are bereft of ! Is it like developing new set of sensory organs to perceive something which is non existent for the commons but some few special ones have in history gained it and the no. of such people being so less that we dont have any refrences established of the same ? These special ones have tried to explain to us commoners, about this new perception which they had - in a language and refrences of 5 sensosry organs !! But we simply cant Understand - leave understanding ; we find their talk absurd Coz for us its simply not existent and will be till we EXPERIENCE IT on our own !

The Question to be asked remains that if enough no. of ppl do develop this Perception of Enlightenment in course of Human History- Would we be able to determine accurate refrences of enlightenment like we have of our 5 sense of organs and thus Bring Enlightenment into field of Practicality ?!

Tuesday, February 10, 2009

Religion - the medicine of our wrongdoings ?!

I had the Audacity to watch Sanskaar and Astha Channel together for about 2 hrs at a stretch !
Going through I saw about three Saffron clad bearded babas giving 'discourses' !! Well fine at the face value , but underlying all the 3 satsangs I saw a common thread wherein a dumb looking guy
who doesnt even have an ounce of serenity or piousness on his face sits amidst huge Garlands of flowers , with pictures of Gods and Goddess in the background : with tasteless extravagant and gaudy Decorations - talking anything but Philosophy !
Its fine till here ! I panicked when the the cameraman Panned the camera over the huge crowd that had gathered and was listening to this guy ! Well what was more striking was half of them weren't interested and rest half who were , were not so much interested in listening to this guy as they were in just being present ' at some devotional event' ! Some sort of a mental medicine of 'being present at such an event would wash me off my sins ' !!

When I was a chess Player , I remember a guy telling me " Nowadays I dont get Angry because I have done Advance course of Art of Living " and I was like " OHK !! even I dont get anrgy without even knowing what Art of living is " . All respect to Mr. Sri sri Ravishankar but I want you people to see that this person , doesnt get angry because He has done a Course and not really coz he understood the futility of getting angry !!

People look at religion philosophy and devotion to God not as a way of life but more so of some sort of repair mechanism !! Its same throughout all religions Jesus has suffered for you so you would be free of all your guilt if you follow him , Ganga mein Snan karlo sab paap dhul jayenge , Allah ki marzi ye nahi hua,uske marzi bina kuch nahi hota !!
Come on people grow up , stop treating religion as mental medcine for your wrongdoings !
Be Rational !
 
Watch the latest videos on YouTube.com