Wednesday, February 23, 2005

The Monty Hall problem

This particular problem has caught the fancy of some (Microsoft) interviewers lately but sometime back it was the hot topic for debates among top Mathematicians worldover. Marilyn Vos Savant was a columnist in Parade magazine (Appearently she is listed in Guiness Book of World Records for highest IQ (228)!). Her column used to invite logical questions from the readers and she used to solve the problems and supply the reasoning too. The column stirred up a hornet's nest when it published the solution by Marilyn for following problem:

Suppose you're on a game show, and you're given the choice of three doors. Behind one door is a car, behind the others, goats. You pick a door, say number 1, and the host, who knows what's behind the doors, opens another door, say number 3, which has a goat. He says to you, "Do you want to pick door number 2?" Is it to your advantage to switch your choice of doors?

Craig. F. Whitaker
Columbia, MD

We'll come to Marilyn's solution but before that there's an intesting piece of trivia about how it got the name - The Monty Hall's Problem/Paradox. Monty Hall was the presenter of Let's Make A Deal, which was a famous game show on american television back in 70's. The aforementioned problem is taken from the show. There was one episode where Monty did the exact thing; made the contestant choose one of the three doors and opened one not having the car. Now the contestant was asked whether s/he wants to change the choice. This made certain Mr. Whitaker think about the mathematical side of it!

Coming back to Marilyn; she suggested that the contestant should switch the doors. This response caused an avalanche of responses, mainly from people disagreeing with her! Various professors, PhDs and teachers challanged her solution. They had decided that it doesn't matter if the contestent switch or not! Due to the fervor created by Ms. Savant’s two columns, the New York Times published a large front page article in a 1991 Sunday issue which declared: “Her answer... has been debated in the halls of the C.I.A. and the barracks of fighter pilots in the Persian Gulf. It has been analyzed by mathematicians at M.I.T. and computer programmers at Los Alamos National Laboratory in New Mexico. It has been tested in classes ranging from second grade to graduate level at more than 1,000 schools across the country.” After several rounds of communication, she finally asked people to organize experiments (by computer simulation) and send her the results. The results matched her claim to astonishing degrees. But not all were satisfied by this experimental proof. Later several people came forward with theoritical proofs. The following picture explains the solution by taking all the possible outcomes and hence proving that the chances increase to 2/3 if the switch is made!



The catch is in the phrase "..and the host, who knows what's behind the doors..". If it was to be the case where the host was also as clueless as the contestent, the switch wouldn't have made any difference. But since the host knows beforehand about the gate with the car behind it and knowing that opens a gate which doesn't have the car behind it, it would increase the probability of winning car by switching the gates! Hats off to Marilyn for getting this non-intutive solution!

P.S. : I got curious about the origin and explaination after I read about this problem in The Curious Incident.... The protagonist, Christopher, has solved the problem all by himself in the book!

Monday, February 21, 2005

Amo a doctores!

I love doctors and there are no two ways about it! Medicine is perhaps the most polished profession around. Doctors are essentially of a mature age and well read too, after spending a major portion of their lives among books (and stiffs!). Like us engineers, their PR skills are not limited to just interviews. More often than not you'll find doctors more eloquent and affable than software engineers.

My liking for them has developed over the years. The earliest recollection of an encounter with a doctor would have me as a toddler (pre-school kid, Oh those sunny days!). I was a small kid with a shaky tooth, he was a dentist with big clamps, still he didn't infuse fear in me. Au contraire, we were chatting happily until he plucked it out in a smooth swift motion. Ice-creams did finally make up for the pain (and for the uneasy gap in my dentition!). Next, in Anoopgarh, we had one doctor uncle in our social circle who always used to scare us with tonsillitis! We kids aptly named him Tonsil Uncle! Barring rare shots, he was again a gentleman, very nice to us kids. In Bikaner, we had Dr.Chahar (Chahar Uncle). (Un)Fortunately I didn't have much business with him. In Bharathpur, I was prescribed some blue pills by Dr. Digamber Singh (the present Health Minister of Rajasthan) to fix the problem of irregular metabolism timings (used to wet my bed once a month or so :( )! He was again good uncle, their family is still very close to ours.

So all in all, doctors are humble people. There can be various reasons, but one I find very reasonable is because they are allowed to practice ONLY after entering their 30's and by then age has taken a toll on the mischievous kid in them. Just imagine, how it would feel to study and study and study, first to enter college for MBBS, then for MD + specialization! We engineers are blessed people, just clear JEE once, then even if you don't study much for the next four years, you are bound to end up with a decent paying job.

Friday, February 18, 2005

The Curious Incident of the Dog in the Night-Time - Mark Haddon

Confession time: When I bought the book from the roadside vendor along with The Broker, I had no clue what is this book about. But I remembered reading about how good it was or someone having recommended it highly. The cover read "Winner : Whitbread book of the year" and the graphics were kinda abstract and funny! I thought, rather assumed, it will be another light/comedy book.

The first thing I noticed when I started to read was the unusual chapter numbers (It has chapters listed by prime numbers!). At first I thought I got a damaged copy with the first chapter missing (Note: 1 is neither prime, nor composite :) ). Many misconceptions about the book (and my copy) were lifted as I dug deeper into the book.

As a matter of fact, although the book is not a comedy, its very interesting nonetheless! Its about Christopher, who is a special kid (I always thought calling someone special is just euphemism for retarded, but he is certainly not retarded! He is indeed special kid!). He has a photographic memory (My memory is like a film….And when people ask me to remember something I can simply press Rewind and Fast Forward and Pause like on a video recorder….If someone says to me, 'Christopher, tell me what your mother was like,' I can rewind to lots of different scenes and say what she was like in those scenes.). He never lies (A lie is when you say something happened which didn't happen. But there is only one thing which happened at a particular time and a particular place. And there are infinite number of things which didn't happen at that time and that place. And if I think about something which didn't happen I start thinking about all the other things which didn't happen.). He has nutured his own simple philosophical thinking (I think people believe in heaven because they don't like the idea of dying, because they want to carry on living and they don't like the idea that other people will move into their house and their things into rubbish.). He is intelligent enough to score an 'A' on 'A' level math. He is also a walking encyclopedia, he can talk about various topics under the sun, varying from types of heart attacks to black holes to molecules to species of monkeys. He keenly observes his surroundings, contrary to the grazing "normal" people do. Sometimes, just because of this, he can't handle too much information at once. He normally avoids crowded places as he can't take all the information coming into his brain. In such situations, he kneels down and starts groaning (to cut off the noise!). He thinks of it just like pressing CTRL-ALT-DEL on his computer (this is a metaphor, he can differentiate between a metaphor and a simile, but can't understand similes :) ).

The adventure starts when his teacher at his (special) school encourages him to write a book. As he can't lie, he thinks of writing a book from what he observes. He wants to write a murder mystery (his favorite book is The hound of Baskervilles by Sir Arthur Conan Doyle). He starts to write a book on the murder of a dog in the neighbourhood. When his teacher tells him that no one cares much if the dog is dead, he argues that two hounds were murdered in The hound of Baskervilles :)! He starts to investigate this murder, much against his father's wishes and in the process he unveils some very important realities about his own life!

The charcter I hold in very high regard is Christopher's father, Ed. He is really patient with Christopher. Ed's wife has left him because it was too painful for her to take care of Christopher. Ed gets really heart-broken when Christopher also runs away from home. It's really heart-rending to see how hard he tries to win his son's trust back. His situation is kind of hopeless and somewhat depressing.

It's the first novel for Hadden and indeed an extra-ordinary effort on his behalf. I recommend this book highly to all readers! Welcome to the curious world of Christopher.

Favorite quote from book: Prime numbers are what is left when you have taken all the patterns away. I think prime numbers are like life. They are very logical but you could never work out the rules, even if you spend all your time thinking about them.

Wednesday, February 16, 2005

Cyborgs are here!

They don't get hungry.
They're not afraid.
They never forget their order.
They don't care if the guy next to them is shot.
Will they perform better than humans -- we'll see that :).

Sci-fi writers have fancied AI enabled, swiftly moving, mean killer machine robots for decades now. Movies like The Terminator, RoboCop potray immense possibilities in the field of robotics. Matrix and Terminator series even saw the possibility of a take over of Earth by machines!

All this is not longer figments of imagination but very much here (we still have to see the take over deal :) ). The article here informs us about the RnD work being carried out by the US Army in this direction. They are looking for possibilities in this area for last 30 years and it is supposed to take around 30 more years to manage an entirely independent army of robots. But they are supposed to be a major fighting force in next 10 years. Initially they will be manually controlled remotely. Robots in battle, as envisioned by their builders, may look and move like humans or hummingbirds, tractors or tanks, cockroaches or crickets. With the development of nanotechnology - the science of very small structures - they may become swarms of "smart dust." The Pentagon intends for robots to haul munitions, gather intelligence, search buildings or blow them up.

Already we've several robots digging Iraq for land-mines, small unmanned planes doing the spy work. AI is coming up as an area of great potential. It was supposed to get stagnent some time back, but the advent of robotics and putting intelligent decision trees in their heads has revived the entire research community for AI.

So next time you hear, Is it a bird? Is it a plane?, it may not necessarily be Superman there :).

Tuesday, February 15, 2005

Cellphones and your privacy.

Recently Supreme Court ordered Indian Govt. to curb the nuisance created by the tele-marketing people. How often you've received these annoying phone calls about credit cards, house loans, and what not. RG will vouch for it, how annoyingly dumb these tele-marketers are (He was once asked to go for Silver card since he already had Gold card :) ). And they just don't let go of it so easily! Certainly its a good decision and a definite relief for the customers.

But its just a teeny-weeny side-effect of the flourishing mobile market in India. If you thought tele-marketing was an invasion to your privacy, think about a scenerio where your location can be tracked as accurately as some meters, or even less! Read this and you'll come to know that your new mobile phone is already acting as a homing device, sending signals to satelites constantly revealing your whereabouts! There is another simple way to detect your current location via your mobile phone. Mobile phone service companies divide the entire area in hexagonal cells, defined with the help of three towers. You are serviced by the nearest towers. Currently this information is utilized by the service providers for LBS (location based services). But its quite elementry to use the location of three nearest towers and work out the exact location of the mobile phone.

Right now the service providers are using this information to provide inane LBS, but no law prevents them to sell this information. This now, is a scary scenario! The constitution provides everyone of us the right of privacy (Privacy : The state of being free from unsanctioned intrusion) and this is certainly a unsanctioned intrusion! Some might argue that, big deal people know where are you roaming, but I don't rate it any higher than stalking and that is a perversive act! So, while you enjoy all the cool features of your mobile phones, don't forget big bro is watching!

Thursday, February 03, 2005

Last day at Oracle...

Today was my last day at Oracle, resigned on 12th Jan. My manager, Guido, was generous enough to let me go and waived 10 days of my notice period. So, today I bade farewell to all the colleagues at Oracle. Though it wasn't as dramatic as last dance with Mary Jane, it evoked some memories and thoughts.

I got the offer from Oracle when I was really pressed against the wall. The last semester at IIT was over and I was working on my (extended) B.Tech. project (Oh! those gloomy days and Oh! Dr. Chandran!). With no progress in project and no jobs in hands (to make it worse, I was besotted in love too!), life was full of gloom. Then Oracle HR punter (Vishnu?) contacted me, I had 3-4 rounds of telephonic interviews. Interviews were really easy, they never got into those gross technical details, which are useful only to mean interviewers and which must be known to all "good" candidates. And one fine morning, I came to NSL, checked my mail only to find the offer from Oracle! I remember, I went directly to Canara Bank to draw money for night's treat (that was the night when Jha got totally smashed!). I was also being interviewed by MicroSoft those days, but after receiving the offer from Oracle (that too from Oracle Bangalore!), I closed all other windows of opportunities rather abruptly. I was told very clearly during interviews that it will be a "testing" job, but at that time other than some general negative comments, I didn't get to learn much about this "testing" stuff. So shrugged it off and went on to join Oracle.

First shock of my professional life jolted me when I saw the first salary. The difference between the "CTC" and "inhand" salary was staggering! Later I learnt about the components in the offer, which are meant to only increase the weight of offer :-). What I thought of as Rs.1000 per day, was about Rs.1000 per working day! Who needs two days' weekend now, haaa?

At the very begining, I couldn't make head or tail of what I was supposed to do. But slowly and steadily I developed an understanding and a strong dislike for the work! There was really not much scope for applying the mind. There were some bright streaks, but for most part of it, I was disappointed with the work. But the people and culture were really nice! I made some very good friends at Oracle. Their HR policies and general benefits were also good. I really learnt a lot, if not about technologies, about the way things work in the industry. About shaping career, about interviews and selection procedures, about managing people from good/bad managers, about conf-calls and skipping them :).

I feel kind of melancholic thinking about last 1.5 years and future. I will surely miss Oracle and its people. I will miss the extended coffee breaks, evening snacks at OTP terrace watching sun set, literally fleecing visiting managers from HQ with lunches, arguments in pantry with Sumanth Prasad about anything and everything, team meeting, cracking PJs with Amar, Pizzas with Stuti during conf-calls, discussing managers with Poxy,... list just goes on!

Anyway, I'm joining Everypath on monday. So have 4 full days to do NOTHING! And thats what I plan to do :). Recently bought an easy chair, will lie on that all day and read! I'll read the history books I bought, or probably the Manorama yearbook. Duh, I know I'm not gonna do that!