Thursday, November 02, 2006

Trip to Muthathi



I had been to a place called Muthathi, 85 kms from Bangalore with my school mates in bike. Here are some clicks.

Wednesday, October 18, 2006

Once again - DevBagh

Click here for more photos

PS: I haven't posted para sky-ing, water scooter and few other photos.
Few more photos are with my friends and I will post them shortly!!

Tuesday, October 17, 2006

Kart @ Devbagh!!

Last weekend I had been to the paradise on earth - Devbagh, an island near Goa. I had real fun there and I am planning to blog my adventures. Here is the prelude before the full fledged blog...



Thursday, October 05, 2006

The Monty Hall Problem!!

Kart's rating - 4/5

There used to be a column called Ask Marilyn in a magazine called Parade in America. She had the highest IQ in the world and in the column she answered maths questions sent in by readers. And in September 1990 this question was sent in by Craig F. Whitaker of Columbia, Maryland.

"You are on a game show on television. On this game show the idea is to win a car as a prize. The game show host shows you three doors. He says that there is a car behind one of the doors and there are goats behind the other two doors. He asks you to pick a door. You pick a door but the door is not opened. Then the game show host opens one of the doors you didn't pick to show a goat (because he knows what is behind the doors). Then he says that you have one final chance to change your mind before the doors are opened and you get a car or a goat. So he asks you if you want to change your mind and pick the other unopened door instead. What should you do? "


Marilyn vos Savant said that you should always change and pick the final door because the chances are 2 in 3 that there will be a car behind that door.


But if you use your intuition you think that chance is 50-50 because you think there is an equal chance that the car is behind any door.


Lots of people wrote to the magazine to say that Marilyn vos Savant was wrong, even when she explained very carefully why she was right. Of the letters she got about the problem, 92% said that she was wrong and lots of these were from mathematicians and scientists. Here are some of the things that they said


I'm very concerned with the general public's lack of mathematical skills. Please help by confessing your error. -- Robert Sachs, Ph.D., George Mason University


There is enough mathematical illiteracy in this country, and we don't need the world's highest IQ propagating more. Shame! -- Scott Smith, Ph.D., University of Florida

But Marilyn vos Savant was right. And here are 2 ways you can show this.


Firstly you can do it by maths like this


Let the doors be called X, Y and Z.


Let Cx be the event that the car is behind door X and so on.


Let Hx be the event that the host opens door X and so on.


Supposing that you choose door X, the possibility that you win a car if you then switch your choice is given by the following formula


P(Hz ^ Cy) + P(Hy ^ Cz)


= P(Cy)·P (Hz ¦ Cy) + P(Cz)·P(Hy ¦ Cz)


= (1/3 · 1) + (1/3 · 1) = 2/3


The second way you can work it out is by making a picture of all the possible outcomes like this





So if you change, 2 times out of 3 you get a car. And if you stick, you only get a car 1 time out of 3.


And this shows that intuition can sometimes get things wrong. And intuition is what people use in life to make decisions. But logic can help you work out the right answer.


It also shows that numbers are sometimes very complicated and not very straightforward at all. And that is why I like The Monty Hall Problem.



Source: Curious incident of the dog in the night time, a novel by Mark Haddin.

PS: I really enjoyed reading the book. The author is a chap called Mark Haddon who wrote children’s books and decided to get into the mind of one, but this time an Autistic child. It must have been a daunting & painstaking idea because from the efforts, one can easily make out that he eventually learnt precisely how to go about it. It must have been a really huge effort, because not only did he get into Christopher’s (15 year old autistic child) mind, he also created an engrossing whodunit. It's really funny to find the chapter numbers as 2, 3, 5, 7, 11.... yup, they were prime mumbers.

Bonus: Here are few interesting lines from the book...

1) "It was nice in the police cell. It was almost a perfect cube, 2 meters long by 2 meters wide by 2 meters high. It contained approximately 8 cubic meters of air.

I wondered how I would escape if I was in a story."

2) "I find people confusing. This is for two main reasons.

The first main reason is that people do a lot of talking without using any words. Siobhan says that if you raise one eyebrow it can mean lots of different things. It can mean "I want to do sex with you" and it can also mean "I think that what you just said was very stupid."

The second main reason is that people often talk using metaphors. For instance,

They had a skeleton in the cupboard.
We had a real pig of a day.

The word metaphor means carrying something from one place to another, and it comes from the Greek words µετα (which means from one place to another) and φερειυ (which means to carry), and it is when you describe something by using a word for something that it isn't. This means that the word metaphor is a metaphor.

I think it should be called a lie because a pig is not like a day and people do not have skeletons in their cupboards. "

3) This will not be a funny book. I cannot tell jokes because I do not understand them. Here is a joke, as an example. It is one of Father's.

"His face was drawn but the curtains were real. "

I know why this is meant to be funny. I asked. It is because drawn has three meanings, and they are (1) drawn with a pencil, (2) exhausted, and (3) pulled across a window, and meaning 1 refers to both the face and the curtains, meaning 2 refers only to the face, and meaning 3 refers only to the curtains.
If I try to say the joke to myself, making the word mean the three different things at the same time, it is like hearing three different pieces of music at the same time, which is uncomfortable and confusing and not nice like white noise. It is like three people trying to talk to you at the same time about different things.
And that is why there are no jokes in this book.

Hope, it is enough to make u read the 110 page novel.

Wednesday, September 27, 2006

Beware of the Petrol Bunk cheats!!

Last weekend, I had been to a petrol bunk in BTM, a place in south Bangalore, to fill petrol for my two wheeler - A black Pulsar. As usual the petrol bunk was crowded. It took 10 minutes for me to reach the fag end of the queue but I had fun time ogling at a call center girl (I guess so) who was standing before me in pink T-Shirt and skin tight blue jeans. Then all of a sudden, I heard a male voice - 'yashtu guru' (meaning 'for how much boss').

There were couple of guys standing near me - a petrol bunk worker to my right and a cash collector to my left. To my surprise, both those guys were unusually very friendly. The cash collector smiled at me and asked me for how much should he fill my tank. I asked him to fill for 100 bucks. He ordered the first guy to fill my tank and asked me to check for zero reading. He asked me if I am from Madras. I nodded my head and paid all my attention to catch the last glimpse of that pink T-shirt, who was flying away in her scooty. As and when the other guy was filling the tank, the cash collector got 100 bucks from me. The first guy stopped filling the tank, when the reading showed 'Rs. 30'. I got shocked and I shouted at them that I paid 100 bucks but they filled my tank only for 30 bucks. The cash collector, in turn shouted at the other guy and asked him to fill the remaining petrol. The other guy, immediately opened the petrol tank knob and started filling the petrol. I was sort of relieved.

As and when I turned my head towards the petrol tank to have a look at the reading, the cash collector asked me if I needed any bill (Strange!! Till that day no petrol bunk-wala asked me this question?!). I replied in negative and turned the other side to look at the reading- it read 'Rs.70'. I shouted at him that I paid 100 and not 70. The other guy was very cool and told me that he filled for 30 bucks initially, then for 70 bucks and so totally 100 bucks. I was about to loose my temper. But then, the cash collector told me, "Yenna sir, namba oor karar neenga. ungala poi yemathuvoma?!" (then does it mean that he cheats all other people?!). Though I wasn't convinced, I moved out of that bunk.

I forgot the incident until today morning, when my vehicle stopped running in the middle of the road. I checked the meter to find that I had driven my bike only for 65 Kms since I filled my petrol tank - normally it will be a number close to 100. I realized that those guys filled the tank only for 70 bucks.

In retrospecting the whole incident, I realized that it was a well planned cheat. I remember, few months ago, my room mate (Murali) was screaming that he was cheated by some petrol bunk-walas. Now, I realize how bad he would have felt that day!
In spite of being extra careful, I wasn't able to dodge from those rogues. :-(

PS: For all of you arguing that I wasn't careful enough, I should say - Me ogling at that girl in pink T-shit definitely didn't contribute to the plot !

The Beach!!

I had been to an interesting place few weeks before. It's a restaurant called "The Beach" at Indira Nagar. It was a birthday treat and we (seven of my friends) reached there around 7 PM that friday straight from the office.

As we entered the restaurant, we were thrilled by it's very look - sand everywhere, open sky with small huts here and there covered by palm leaves, a pillow on top of a cut coconut trunk replacing the traditional chairs, a mini flat bole of a tree supported by two bamboo sticks replacing tables, spherical candles everywhere that were the only source of light, a mini light house at one corner, small pool of water at another corner (supposed to be the beach but it had very little water), a small but deep pit containing water that had fishes, crabs and couple of water snakes, heavy rock music in the air, cute girls all around....I should say nothing short of an electric atmosphere.

We were welcomed by a Chinese cutie who led us to a small hut. Next to us were a couple who were resting their body on a bed (yeah... there were few beds in the restaurant on a corner and they had two cylindrical rests as well). My friend ordered some side dishes - 'Californian potato with Skin', 'Mexican veg fry' and chicken/prawn dishes, which had some fancy names. We were stumped when we saw - 'un-pealed salted potato cut into slices', 'masal vada', 'chicken bajji', and 'prawn bajji' on our plates. I could not believe that we spent 15o bucks for 1 plate of masal vada!! We ate hell lot of side dishes - mostly sea food, mocktails, and finally some rice. If I say that the food wasn't all that great, it is definitely euphemistic- I was puking that night.

At 9 PM, the DJ stepped in. Rocks transformed into Hip-hops. One girl alone was dancing for half an hour. Then all of a sudden, few more guys and girls stepped in. At 10:30, almost everyone in the place, except us were dancing. A couple were twisting their body ferociously and my friend told me that it is called "Salsa" (It should be some weird form of dance!!). At 11 PM, after watching all those fun around us, even we shaked our head for sometime (it's strange to find most people dancing with their head and hips; but legs glued on the ground) and left the place by 11:30, not before spending a memorable evening at ' The Beach'.

You know what... girls get unlimited beer for free of cost during wednesdays - should we call them 'feminists' ?!

Definitely worth going there once, only if some one else pays!!
Cross Posted here

Monday, September 25, 2006

Love...

Here is my first attempt to write a poem...

I wrote your name in the sand,
but the tide washed it away.

I wrote your name in the clouds,
but the wind blew it away.

I wrote your name in the water,
but the sun scorched it away.

I wrote your name in the air,
but the cyclone swirled it away.

I wrote your name in the fire,
but the rain flung it away.

I wrote your name in my heart,
but then I realized, you stole my heart away!!

PS: Check out for tamil version in the comments!!

Disclaimer: Seems like there are few poems in the internet which carry the words "I wrote your name..." but they are purely coincidental.

Tuesday, August 01, 2006

Pirates Puzzle

I thought I will use this blog to post some good puzzles or algos that I come across. Here is my first attempt.

There are 5 pirates who jointly looted 100 gold coins. The pirate-A has 1 year of experience, the pirate-B has 2 years of experience... and the fifth pirate-E has 5 years of experience.

Below is the agreement b/w the pirates in sharing the gold coins among them.

1) Pirate E would propose an approach to share the 100 gold coins. If atleast 50% (means 50% or above) of the pirates agree on his approach, then his approach would be followed in spliting the 100 gold coins. If his proposal doesn't get the majority, then he would be killed and the next most experienced guy (ie. Pirate D) would propose his approach and all the rules apply to him as well.

2) Each of the pirate would try to get maximum number of gold coins possible.

Given this, what should the pirate-E propose so that he can save his skin by winning the majority as well as get the maximum number of gold coins?

PS: The question has a very logical answer. I will post the answer tomorrow.

Wednesday, June 28, 2006

The Weird Me!!

I am tagged by Prad to write on the top six weird things about me.

1. I am a lazy sloth. I tend to hang my shirts unbuttoned in the hanger, so that later I can wear it like a T-Shirt!!

2. I like drinking cough syrups esp Corex, even when I am not sick. When, I was in college, I used to get it from the college dispensary and finish the 150 ml bottle in just 2 days. I remember, Prad was always my rival during those days!!

3. Naming the code variables, functions, classes, file names and directories with funny names like kooja, kuduvai, et al. !! But, thanks to the naming conventions and code reviews at my company, I no longer have the freedom to name them at my will!!

4. Eating almost everything on earth with curd. Dosa with curd, toasted bread with curd, Noodles with curd are all my favourites. I even tried Laksa (a Thai dish) with curd when I was in Sydney! It won't be surprising if I say that curd rice is my favourite dish.

5. Dates... I never felt interesting to remember dates. I was one of the weakest student in history during my 9 th standard (Ironically, I was the history topper of my class in 10 th matric exam... you know scoring marks is totally a different art!!). Even now, I never felt that I should wish someone on his birthday or on some X anniversary?! But still I wish someone because they feel happy when I do so!! :-)

6. I am scared of heights (not at my own height... I am close to six feet!! :-). There were many instances where heights scared me - my trip to Kovai kutralam with my classmates, my trip to Sivasamudram waterfalls with my school mates were all scary experiences.

I could think of few other weird things about me... but those are too private to share it here :-)

Thursday, June 22, 2006

Writing Style!

At most times, the problems in writing a good blog, article or essay are more rhetorical than grammatical. Most of us are aware of the grammatical structures (S+V+C, S+V+IO+DO) and familiar with the commonly used words and their spellings (Who said so?! I was generous in lending another 'm' to the word 'coming' (comming) until Nitya corrected me sometime back!!); Even otherwise, in case of grammatical mistakes, there are hard and fast rules that draw a thick line between what is correct and what is wrong. If one has good memory, grammatical mistakes should be hardly a problem. In general, a problem becomes complex only when you have multiple choices. That's exactly what one will encounter in deciding their writing style. As a writer one must determine what style would suit to express his thoughts with greater clarity and cogency. In doing so, he should take into account various other parameters as well. For instance, the style that suits a formal writing ( say, writing an essay) may not suit an informal writing (say writing a blog).

At a high level, the steps in determining the 'style of writing' may be broken into steps as

1) creating an appropriate voice for one's purpose,
2) choosing the right words for the subject and audience,
3) constructing elegant sentences whose rhythm reinforces their meaning,
4) presenting an argument in a logical fashion that is both engaging and easy to follow,
5) finding vivid images to make thoughts accessible to the readers.

As discussed earlier, all these steps have to be decided dynamically and cannot be generalized. One has to reconceive all these rules/steps before starting to write. Below are some of the common mistakes that one makes in writing a blog.

Voice - Active/passive:

In case of writing technical documents like specification or design, active voice is considered the most effective style. The guidelines for those documents suggest to use 'Active Voice' because passive voices are generally wordy and hence result in ambiguous statements. But it doesn't mean that we should always follow active voice in our writing.

There are a number of places where passive voice would suit better.

1) Where the subject is not known.
Egs: The car was thrashed.

2) When one wants to hide the subject. This is probably the best use of passive voice. We software engineers tend to use this quite often than not.
Egs: The document was written ambiguously. (by whom?!)

3) When one wants to create a suspense (like an anchor in an award ceremony).
Egs: Centum in CAT 2006 was achieved by...Pradeep Sundaram, the GCT 'peter'.

4) When one wants to write a technical document or research paper.
Egs: The experiment was performed at 0'C. - PAssive
I performed the experiment at 0'C - Active

5) In some cases, passive voice will help to maintain a good flow and preserve coherence.

But in general, the key in writing clearly and concisely is to use strong active verbs. This means that you should only use the passive voice when you have a solid reason for doing so.

Parallelism:

This is the most common mistake that most of us do. Let us take a common sentence - "Democracy is the government by the people, of the people and for the people." Each part of the sentence maintains the same grammatical form. Sentences that do not follow this rule like "She had a strong liking to read books and for playing tennis." should be avoided at any cost.

Redundancy:

Redundnacy is also another common mistake that most of us make. "Revert back", "close proximity" are some of the phrases that we use in our blogs often. But sometimes in case of informal writing, we do use it willingly to add more style to our writing. I don't find anything wrong with it either, as long as it doesn't look odd.

Wordiness:

Many have a tendency to write more than what is required. We not only waste our time in writing those extra words but also waste the time of the reader. By the way, why would the reader want to read more pages than required to gather the information?! If there is an opportunity to convey the same content with less number of words, we should prefer it (doesn't it sound analogous with code optimization). Also, usage of more words means there are more chances to commit grammatical mistakes and more chances to deviate away from the topic (Ain't this sentence wordy?!). But sometimes, we may want the sentence to be wordy to stress our point. For instance, consider the following passage from a speech by Winston Churchill during world war II. It could certainly be made shorter with fewer repetitions, but it would hardly be more inspiring:

"We shall not flag or fail. We shall go on to the end. We shall fight in France, we shall fight on the seas and oceans, we shall fight with growing confidence and growing strength in the air, we shall defend our island, whatever the cost may be, we shall fight on the beaches, we shall fight on the landing grounds, we shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender."

A certain amount of repetition and redundancy has its uses.

Ref: Book of English Usage

Thursday, May 25, 2006

An Eventful Day

Every one of you would have heard about the riots in Bangalore after the demise of the great Kandada film actor RajKumar. 4 buses were burnt, police jeeps were thrashed, quite a few private vehicles were also banged and the saddest of all, it cost the life of 5 human lives!! I would like to share my experience on this eventful day @ Bangalore with you guys...

At Wednesday night 10 PM, I was still slogging in my company. I got a mail that thursday was declared a public holiday and went back home happily. Next day, got up very late and went out to have breakfast. No shops were open. There were few medical shops that were half closed (It seemed that is to only aid the few who got minor scratches while bumping the buses and jeeps). I managed to sneak into a small tea shop opened by a rebel and finished my breakfast with a puffs and tea.

Then... went back home to while away the day. My only hope was TV and thought I could manage with Bangladesh-Australia test match highlights. Then came the real shock...Cable TV operators at many places in Bangalore stopped broadcasting the entertainment channels and broadcasted only the channels that showed the great actor's movie or at least his photos. The manthra being..."No fun for 2 days".... Anyway, I managed with "Dishum" VCD that my roommate hired it for 10 bucks last evening..(VCDs in Bangalore are damn cheap).

At 1 PM, I went to my kitchen to get some water and ended up finding that there was not even a drop of water available to drink. So, thought I have to sneak in somewhere to get some food + some water to drink. After 20 mins of walk, I found an All-In-One kinda shop. When I requested for a pepsi, the shop keeper was reluctant to give anything else apart from bread, rice, noodles and jam (Funny...I never asked him for free of cost). A guy standing beside me told that u will get the stuffs that are needed for survival and no other luxuries. Hmm, never knew that drinking pepsi in the hot sun is an entertainment. I virtually begged him to give me a can of water and atlast managed to get it.

Time was now 1:30PM, was feeling very hungry coz I haven't had enough in the morning. Then we (me + couple of my room mates) found an Andhra mess, which was half closed but the owner was willing to give us parceled meals. By the time I got the parcel, I realized that I had already walked for almost 2 Kms. So, thought we would do good for ourselves by hiring an auto. I found an auto that had a mini cutout of Rajkumar. I was so tired that I was willing him to pay 1.5 times the normal rent (10 + 5 = 15 bucks). The guy replied back in Tamil with a kanda tint that "1000 ruba koduthalum nanga yarum innaikku vara mattom." When I went back home walking all the way, I had severe headache (I was ill last week and wasn't fully fit). When I finished my lunch, I.... don't know what happened...not sure if I washed my hands. I got up only @ 5 PM.

I planned well enough for my dinner. Went to my friend's house who stays nearby, cooked some food in his home and finished my dinner. Meanwhile, watched "Ullam Ketkumae" in DVD player, played NFS 2 (after a long time) in his PC and came back home @ 9 PM.

When I reached my house, I Switched on the TV...now NDTV was on...(still no signs of Star Movies or Ten Sports)... the first sentence I heard was ... "It is a shame for the people of IT capital of India to behave in such a manner and this act doesn't show any respect to the greatness of the man who had passed away. One could imagine the state of the city when Veerapan kidnapped the legendary hero. If his death wasn't a natural one, it's hard to envisage the state of the city."

I turned the channel to NDTV Profit... "Heavy losses for BPOs and IT majors. The riot has definitely damaged the image of the IT city and this could prove devastating in the longer run."

Now, I was wondering what my manager (Australian by birth, stays in Bangalore for 2 years to write a book (his 3 rd book) on Bangalore's IT charm) would think about this debacle. If he asks me about this issue, I would say him that "RajKumar has more influence in India than what James Bond has in US!!". I could imagine what he would write about Indians (For him...'Indians' is synonymous with 'Bangalore-ians') in his book.

Now...My house owner's son came into the house (a kanadiga by every right). I casually asked him about the happenings in the city. He replied back that "This shows the unity of Kanadigas and their power. People (north Indians?!!) will now realize the strength of the Kanadigas". May a times I get the impression that the native kanadigas feel that S/w engineers (north indians esp) are the looters of Bangalore's wealth?! I wasn't able to react to such a comment from him. I shut my mouth and started moving towards my bed wondering "when Shivaji died.....".
Cross posted here

Ship Wreck - A Short Story

It was more terrible than the titanic climax when I found myself drowning in the dark sea all alone, even Kate Winslet was not around to accompany me and the ship was on it's way down to the bottom of the ocean. Next day, I was lying bare in an atlantic coast somewhere in an Island betweeen Newyork and London.

The first day was full of fun. Nature all around - singing birds, fresh fruits, green plants. ferocious stream and more importantly no boss to fiddle with my freedom. I spent my time sharing fun with the deers and monkeys that hopped around. I thought that unlimited fun was instore for the rest of my life.

Two days went by and on the third day I felt everything boring. The shouting birds disturbed my sleep, monkeys irritated by throwing ripe fruits at my head, the stream was too cold to wet my hands, the plants were too green to light fire, and more importantly I missed my boss who would lend his helping hands at my terrible hours. Allmost every animal in the jungle tried to attack me but none was good enough to overpower me. It rained all the day and my bare body shivered in cold. I thought that worst was still instore for me.

I knew that seven was always my lucky number but never knew that it could bring so much of luck my way. On seventh day, I woke up to find 6 or 7 young girls (around 20 or 22 years old) surrounding me, who wore little fur around their waist and two small flowers (too small to identify what flower it was) covering their top. I could not believe my luck, I pinched my hand hard to realize that everything was real. The youngest of them (around 19) gave me a dozen of ripe banana, which I ate in a split second.

The eldest of them (around 23) asked me if I was a virgin. I nodded my head and everyone started laughing at me. She told me that the islands entire male population died in an epidemic and the island has got not even a single male now. I pinched my hand once again to realize that it wasn't another dream. Another with a slighlty big tummy (like Jothika) told me that it was almost 1 year since they had sex and they missed their males to do the job for them. I realized that God should be in the best of his moods now. She told that "We are looking for a guy like you so long to do the job ".

I asked her, when could I start? The girl who had a big dimple in her face told me "You could start even now if you want to" with a smile on her face. She added that "There are lots of children in the island and you can choose any one among them". I was puzzled "children?!".She told me that "The male in the island did only the first part rite but they died before doing their second part. For previous 3 years, every male in the island was busy all day and night in their ventures to make every girl, a women. But, before bringing up the children, all the male in the island died. So, we were searching so long for someone who could continue their work. We were lucky to get atleast one male."

I pinched my hand once again to check if it is a dream only to find that I was running out of luck. The girl with a red flower on her top, asked me why I was pinching myself,without expecting any reply, helped me to stand up on my legs, to take me to a hut where all those kids with running nose and leaking bums were smiling at me. Without waiting for her instructions, with a towel on one hand and a mug containing water on the other hand, I walked towards the first child to start my job.

Cross Posted here