Sunday, July 4, 2010

Zoozoo and What it says about Indians


Many of you have seen Zoozoo advertisements of Vodafone. 
I got curious at the shape of these characters. Why do we (Indians) like them.
They resemble the typical shape an Indian has with a large midsection. Hence an indian audience
implicitly (subconsciously) accept these characters.
I think that such an adversitement would not have a great following or accpetance in western countries. They have been fed with perfect figures of superman, spiderman, etc.



Are our Holy Books complete?


There is a famous theorem by a Mathematician Godel. In short it says that

Which means that there will statements in such systems which cannot be proved within the system. We as a human being understand that those statements are true in that system but by using rules of inference present within the system we cannot prove the truth/falsity of such statements.

Now my point is this. Kuran/Bible [or any other holy book] can be considered to be sets of axioms and rules of inference. It is a System. It is supposed to govern human behaviour. In short it is supposed to govern human brains. Since our human brains cannot be modeled by any System [defined as sets of axioms and rules of inference]. This means human understanding/  behaviour is beyond any System. Then how can a System (i.e. Kuran/Bible) be relied upon to govern a non-System (human being) in a reliable way. There will be situations in which the System (i.e Holy book or Kuran) will not be able to judge truth/falsity (or appropriate/inappropriateness) of a human behaviour. A human brain itself is so complex. Think about how complex the interactions between 6 billion human beings will be. Also thrown in the complexity of the environment itself with which we are interacting.

Considering the above points, I think it will be foolish for human beings to rely on a code of conduct or a holy book for ratifying/validating their behaviour. Because such a book won't be able to cover all the myriad different interactions in human society

Quality of Recommended Books


Majority of us are not into reading books. i.e many of us are not well-read.
So only few have crossed 100 books or etc.
So if majority of us are recommending some particular books, say Harry Potter or The Alchemist or The Monk who Sold his Ferrari or Five Point Some One, then if follows that recommendations may not be appropriate or well founded.
Hence Rule of thumb could be that read only those books which Few people suggest and those 
people suggest the book strongly and wholeheartedly.


Morals and their context


We all have heard stories about Hare and Tortoise

The moral there was : "Slow and steady wins the race"
Sub-moral : "Never underestimate your opponents" 

Now suppose in that story, Hare doesn't sleep so ultimately he would have won the race.
The moral now becomes : "Fast and steady wins the race"

Now suppose the race track was passing through a jungle which is full of carnivorous animals.
Since Hare is fast, it could easily pass the jungle. But Tortoise being slow would be attacked by other animals etc.

Moral now is "Core Competence wins the race"  Race now favours Hare

Also assume further that after the jungle, there was a river which had to be crossed to win the race.
Now chances of Hare winning the race is very small since it doesnt know how to swim [ probablity~0]
But this is an advantage to Tortoise. There is some chance that he would pass the jungle unnoticed and reach the bank of the river and wave "TATA" to poor helpless Hare.

Again Moral now is "Core Competence wins the race"  but here Race favours Tortoise.


Morals are limited to their context. Similarly learnings/quotes/analogies are all related to their context.
IF you take the moral out of its context and apply the moral anywhere,  the moral can backfire.


I heard this story from Swami Sukhabodhananda.Please do make a point to watch the following videos.
http://sukhabodhananda.jnanajyoti.com/





Friday, April 30, 2010

Mini Betting

This little story is about the recently held IPL final.
Mumbai Indians(MI) v/s Chennai Super Kings(CSK).

Its characters are D, P1,P2,P3 .

So P1 was informed by his "friend" that CSK is gonna win the IPL.
Reason:  Lot of betting going on for MI. People are betting more on MI. If MI wins then it would be a great loss to the bookies.

P1 is happy to know that he knows the future. He goes around telling everyone about the "Plan". Now comes D. Not so sure about P1's claim, he wants to challenge P1 that if he is so sure why doesn't he put down his money in the betting market.

D : "I don't think, CSK is the winner. Just look at the stats and current form of the MI players. MI is rocking man. Totally impossible for CSK to snatch a win"
P1 : "You dont know the internals of betting. I am informed (by a trusted source) that CSK is this season's winner"

D : "Ohh...ya...why don't you bet then. if you are so sure. I am making a wager to you now. If MI wins, you give me 500 bucks and if CSK wins, I give u 100 bucks. The odds are different because you have an insider information. If you believe in your Source, then I think you should bet"
P1 :  "Deal Bro. See you at the finals."

Now D is little skeptical about the deal. If D loses, he is gonna lose about 100 bucks. He doesn't want that. D who always takes calculated risks saw this to be too risky. So he chalks out a plan to cut out his losses.

He makes another wager with P2. Now little background about P2. He is a CSK supporter.
Reason : His favourite player is the captain of CSK.

The following chat occurred between D and P2.

D : "I have a hunch. I think CSK  is gonna win. Sachin is injured and he won't be a captain at the finals. I don't trust Zaheer with captainship. So what do you say if I bet on MI losing the final."

P2 : "I am not sure. I dont know."

Now at this stage, D thinks P2 needs to be pushed a little harder.

D : " See, there is no harm in you making a deal. IF CSK wins, you will give me 100 bucks in happiness as your team won the final. If CSK loses, I will give you 100 bucks and it will be like consolation for you. In both the outcomes, its good for you"

Fortunately P2 agreed.

The deal is set for D. D is at zero risk in case of any outcome. If MI wins, he is gonna get 500 from P1 and he will hand out 100 bucks to P2. A profit of 400 bucks. If MI loses, D just transfers the money from P2 to P1.

Now comes P3 in the story. Seeing the deal between D and P1, P3 got little greedy. He wanted a piece of the action too. He told D that he is ready to divide risk and profit. If MI loses, he will pay 50 bucks to P1 and would take half the amount if MI wins.

Here's something that went wrong. Instead of accepting the offer, D said no to P3. If D had accepted the offer from P3, he would have earned a minimum of 50 bucks and a maximum of 150 bucks in either outcome of the finals. A much safer option.

The following diagrams explain the above situation.

Without P3's deal

With P3's deal :

Sunday, April 25, 2010

Proving primality : Testing whether a particular number is prime or not

Many a times computer science students are faced with problems whose sub-problem involves testing whether a chosen number is a prime or not.

Finding primes & proving primality

In the above link, you will find very good resources about primality testing and proving.

I have implemented an algorithm which lets you test whether a number  (17 < N < 341,550,071,728,321) is a prime or not.

The link to the python code is here

The code is nicely written but not well documented. You can extend the valid limit for numbers by adding extra conditions in the code.

HOPE THIS HELPS SOMEONE.

Friday, April 16, 2010

To specify default Browser for links in Thunderbird


A nice post by the name "Forcing Thunderbird to open links in Firefox"

This post talks about how to specify / force Thunderbird to open links in Firefox in Ubuntu. For sometimes now, I had this problem of not being able to directly open links from Thunderbird. The same effect can be achieved if we do the following.


The real problem was that I had not specified the default system browser in System Preferences. 
Go the Preferred Applications and specify the browser (Chrome/Firefox/Opera/Konqueror/ etc)
System->Preferences->Preferred applications

Open Thunderbird and all your links will now be opened in your default browser.
 

HOPE THAT HELPS SOMEONE OUT THERE