unspoken reflections of my heart
eskay
I’m a connoisseur of art, a concoction of assorted interests, with a creative mind and an observant eye. An explorer by choice, I am a simple guy with rich tastes. I’m ever busy, read a lot, always at my witty best, and adore intelligence. Though I look reticent by chance, I talk a dozen to ten, if we share that bond. If you respect friendship, I will like thee. If you love music, you will love me.
Homepage: http://blog.karthiksankar.com
Yahoo Messenger: eskay_karthik
Jabber/GTalk: eskay.karthik
Posts by eskay
interview questions – part 2
Nov 1st
Both the problems here are based on prisoners and hats….
Question 1:
There are n prisoners in a prison. The prison warden gives them an offer:
Activity:
He will be asking the prisoners to stand in a queue, ordered based on their heights, tallest in the front of the queue and the shortest at the end such that every prisoner can see the heads of all prisoners in front of him. Now everyone will be blindfolded and a black or a white hat will be placed on every head. Distribution will be random. The warden would then remove the blindfolds and would start asking every prisoner the colour of their hat, in order, starting from the shortest. The prisoner can answer either “black” or “white”. If a prisoner tells the answer correctly, he will be freed, otherwise killed instantly.
The warden gives twenty minutes for the prisoners to discuss the algorithm among themselves. Then the above activity starts.
Out of n prisoners, how many can be saved for sure ? What is the method ?
Question 2:
Here there are only three prisoners. The warden has three white and two black hats, and the prisoners know this fact. The warden announces that he would be placing one cap on each of their heads after blindfolding them. After removing the blindfold, every prisoner will be able to see both the other prisoners.
The warden blindfolds them and places the three white hats on their heads.
Everyone thinks for some time, after which one prisoner answers “white”.
How did the prisoner come to the conclusion that his head had a white hat ?
interview questions – part 1
Oct 26th
I come across loads of interesting questions which have been asked in interviews. Just thought of posting them here in my blog…
Question 1:
There is a long table with 100 cups arranged in a line. The cups are numbered from one to hundred. Initially all cups are closed with lids.
This is what you do:
First, you open all cups that are multiples of 1. ( Obviously all hundred cups )
Next, you invert all the cups that are multiples of 2. Inverting a cup refers to opening a cup if it is closed, or, closing a cup if it is open.
Next, you invert all cups that are multiples of 3.
This process is continued for 4, 5. 6, …. 100.
After this is done, how many cups will be open, and what are their numbers ??
Question 2:
There is a standard chess board. ( 8 x 8 ). A horse is placed on a corner square, say, black
The task that is being done is the obvious, move to all squares in the chess board, without landing on a square more than once.
The question is different:
Is it possible to reach the corner that is diagonally opposite to the starting square after moving to all other squares ? If yes, how ? If no, why ?
exists… but does not exist…
Oct 18th
My mathematics teacher at TIME coaching classes was explaining about ancient Indians and their knowledge and skill. He extolled about the Hindus, Jains and Buddhists, about their researches, philosophies and their knowledge about the meaning of life.
Consider the following statements:
X exists.
X does not exist.
There are two states for X. Existence and non-existence. Now, the question is,
Is there an excluded middle between the two states, i.e., is there an intermediate state ? Like, X exists but does not exist ???
Well, the research goes thus:
Consider you are sleeping.
In your dreams, you are chased by a tiger. You fear for life. You start running in order to escape.
Suddenly, you wake up from your sleep. You see no tiger. You are not running. You dont have any fear for life.
Now, we see that the tiger existed in dreams, but not in the awake state. It was real in dreams but unreal in reality. X (tiger) exists, but does not exist…
Why so much complexity ? Concept is very simple…
While we wake up every morning, we have a buffer time when we are awake, yet we are sleeping. We tend to live partly in our dreams.
One day, I experienced this. I had a nice dream. Suddenly, I woke up in order to go to class. I locked the room and went out. Apparently, my roommate was still sleeping inside the room. Conclusion : He did not feature in my dream, and I was dreaming when I was locking him inside. So, he did not exist, though he existed…
software freedom week – java workshop
Oct 6th
After one full week of preparation, giving lectures and handling lab classes, the Java programming workshop has finally come to an end. The workshop was conducted by me with the help of my friend, Aswin, as a part of Software Freedom Week celebrations.
This was the first workshop conducted in college by me after I was selected as the Campus Ambassador for Sun Microsystems. Java is one of the greatest products from Sun, which is extensively used in programming, web applications, mobile applications and more. So, I felt that conducting a workshop on Java programming would help the students learn the language. The workshop was intended to show the students the door to the world of Java.
The curriculum of NITT does not have an exclusive Java course. But there are many students who are interested in learning the language. I have seen many friends of mine who have tried to learn Java, but were confused about where to start and how to proceed.
The workshop was planned for second year B. Tech CSE students of my college. I went to their classroom and briefed them about the various open source technologies, about the Campus Ambassador Programme of Sun and about the numerous workshops that are to follow in the months to come. I also asked the students to do a study on open source and write an article on the same. The response was very good.
My HOD arranged the conference hall and the laboratory for our use. With the help of Aswin, I installed Java and Netbeans in all computers in the lab. The projector was set up too. The stage was set for the workshop.
32 students had been selected for the workshop. Everyone had assembled, eagerly awaiting the start. I distributed the Netbeans CDs, pens and key chains which Sun Microsystems had sent for the workshop. Then the classes began.
We started right from the basics, explaining the simple looping constructs, the conditional statements and various other syntax. Then we moved on to object oriented programming and related concepts like abstraction and polymorphism. Concepts of classes and objects were explained with regular demos on screen.
When Aswin was handling the class, I was busy taking snaps. Our HOD also visited the class to make sure everything was running smoothly.
We then explained the concepts of streams used in input/output. Exception handling was taught in detail. The lab practice sessions were interesting. Some students came up with excellent solutions which even we never thought of. The workshop was a learning experience for us too.
We also conducted a small review examination to gauge the understanding of the participating candidates. We wrote a simple Java program to evaluate the answers of students. The answers were discussed later.
We then ventured into complex topics like networking and swt. Students were taught how to write a chat application. They also had a lab session on that, where they implemented chat application and file sending programmes.
Practice makes a programmer perfect. Learning from the book will not help in learning a language. To become an expert, one must practice various programs and develop programming skills. This was emphasized during the workshop.
During the workshop, we asked the students to look up some interesting topics online, like obfuscated code and the dining philosophers problem. This helped the students to learn loads of new stuff.
All the presentations used and the demo programs were mailed to the students. The students’ feedback on the programme was also overwhelming. On the last day, I requested the students to look beyond text books and the curriculum. There must be a thirst for knowledge. Everyone must participate in the development of open source technologies. Gone is the age when there was a divide between the developer and the user. Now is the age where the user is the developer.
The first Java workshop was thus completed successfully. I am planning for the next workshop, which might be on Opensolaris, one of the most stable operating systems from Sun Microsystems. Looking forward to learning and sharing…
A letter to every Indian
Oct 5th
A Letter to Every Indian
The Former President of India DR. A. P. J. Abdul Kalam ‘s Speech in Hyderabad .
Why is the media here so negative?
Why are we in India so embarrassed to recognize our own strengths, our achievements?
We are such a great nation. We have so many amazing success stories but we refuse to acknowledge them. Why?
We are the first in milk production.
We are number one in Remote sensing satellites.
We are the second largest producer of wheat.
We are the second largest producer of rice.
Look at Dr. Sudarshan , he has transferred the tribal village into a self-sustaining, self-driving unit. There are millions of such achievements but our media is only obsessed in the bad news and failures and disasters.
I was in Tel Aviv once and I was reading the Israeli newspaper. It was the day after a lot of attacks and bombardments and deaths had taken place. The Hamas had struck. But the front page of the newspaper had the picture of a Jewish gentleman who in five years had transformed his desert into an orchard and a granary. It was this inspiring picture that everyone woke up to. The gory details of killings, bombardments, deaths, were inside in the newspaper, buried among other news.
In India we only read about death, sickness, terrorism, crime.. Why are we so NEGATIVE? Another question: Why are we, as a nation so obsessed with foreign things? We want foreign T.Vs, we want foreign shirts. We want foreign technology.
Why this obsession with everything imported. Do we not realize that self-respect comes with self-reliance? I was in Hyderabad giving this lecture, when a 14 year old girl asked me for my autograph. I asked her what her goal in life is. She replied: I want to live in a developed India . For her, you and I will have to build this developed India . You must proclaim. India is not an under-developed nation; it is a highly developed nation.
Do you have 10 minutes? Allow me to come back with a vengeance.
Got 10 minutes for your country? If yes, then read; otherwise, choice is yours.
YOU say that our government is inefficient.
YOU say that our laws are too old.
YOU say that the municipality does not pick up the garbage.
YOU say that the phones don’t work, the railways are a joke. The airline is the worst in the world, mails never reach their destination.
YOU say that our country has been fed to the dogs and is the absolute pits.
YOU say, say and say. What do YOU do about it?
Take a person on his way to Singapore. Give him a name – ‘YOURS’. Give him a face – ‘YOURS’. YOU walk out of the airport and you are at your International best. In Singapore you don’t throw cigarette butts on the roads or eat in the stores. YOU are as proud of their Underground links as they are. You pay $5 (approx. Rs. 60) to drive through Orchard Road (equivalent of Mahim Causeway or Pedder Road) between 5 PM and 8 PM. YOU come back to the parking lot to punch your parking ticket if you have over stayed in a restaurant or a shopping mall irrespective of your status identity In Singapore you don’t say anything, DO YOU? YOU wouldn’t dare to eat in public during Ramadan, in Dubai . YOU would not dare to go out without your head covered in Jeddah.
YOU would not dare to buy an employee of the telephone exchange in London at 10 pounds (Rs.650) a month to, ‘see to it that my STD and ISD calls are billed to someone else.’YOU would not dare to speed beyond 55 mph (88 km/h) in Washington and then tell the traffic cop, ‘Jaanta hai main kaun hoon (Do you know who I am?). I am so and so’s son. Take your two bucks and get lost.’ YOU wouldn’t chuck an empty coconut shell anywhere other than the garbage pail on the beaches in Australia and New Zealand .
Why don’t YOU spit Paan on the streets of Tokyo? Why don’t YOU use examination jockeys or buy fake certificates in Boston??? We are still talking of the same YOU. YOU who can respect and conform to a foreign system in other countries but cannot in your own. You who will throw papers and cigarettes on the road the moment you touch Indian ground. If you can be an involved and appreciative citizen in an alien country, why cannot you be the same here in India?
In America every dog owner has to clean up after his pet has done the job. Same in Japan.
Will the Indian citizen do that here?’ He’s right. We go to the polls to choose a government and after that forfeit all responsibility.
We sit back wanting to be pampered and expect the government to do everything for us whilst our contribution is totally negative. We expect the government to clean up but we are not going to stop chucking garbage all over the place nor are we going to stop to pick a up a stray piece of paper and throw it in the bin. We expect the railways to provide clean bathrooms but we are not going to learn the proper use of bathrooms.
We want Indian Airlines and Air India to provide the best of food and toiletries but we are not going to stop pilfering at the least opportunity. This applies even to the staff who is known not to pass on the service to the public. When it comes to burning social issues like those related to women, dowry, girl child! and others, we make loud drawing room protestations and continue to do the reverse at home. Our excuse? ‘It’s the whole system which has to change, how will it matter if I alone forego my sons’ rights to a dowry.’ So who’s going to change the system?
What does a system consist of? Very conveniently for us it consists of our neighbours, other households, other cities, other communities and the government. But definitely not me and YOU. When it comes to us actually making a positive contribution to the system we lock ourselves along with our families into a safe cocoon and look into the distance at countries far away and wait for a Mr.Clean to come along & work miracles for us with a majestic sweep of his hand or we leave the country and run away.
Like lazy cowards hounded by our fears we run to America to bask in their glory and praise their system. When New York becomes insecure we run to England . When England experiences unemployment, we take the next flight out to the Gulf. When the Gulf is war struck, we demand to be rescued and brought home by the Indian government. Everybody is out to abuse and rape the country. Nobody thinks of feeding the system. Our conscience is mortgaged to money.
Dear Indians, The article is highly thought inductive, calls for a great deal of introspection and pricks one’s conscience too. I am echoing J. F. Kennedy’s words to his fellow Americans to relate to Indians..
‘ASK WHAT WE CAN DO FOR INDIA AND DO WHAT HAS TO BE DONE TO MAKE INDIA WHAT AMERICA AND OTHER WESTERN COUNTRIES ARE TODAY’
Lets do what India needs from us.
–Dr. Abdul Kalam
brain teasers
Sep 26th
Recently, I received a mail. There were some interesting questions in it. I was not able to answer most. Thought I would post them here…
***** 1 *****
There is one word in the English language that is always pronounced incorrectly. What is it ?
***** 2 *****
A man gave one son 10 cents and another son was given 15 cents. What time is it ?
***** 3 *****
A boat has a ladder that has six rungs, each rung is one foot apart. The bottom runf is one foot from the water. The tide rises by 12 inches every 15 minutes. High tide peaks in one hour. When the tide is at its highest, how many rungs are under water ?
***** 4 *****
There is a house with four walls. Each wall faces south. There is a window in each wall. A bear walks by one of the windows. What colour is the bear?
***** 5 *****
Is half of two plus two equal to two or three ?
***** 6 *****
There is a room. The shutters are blowing in. There is broken glass on the floor. There is water on the floor. You find Sloppy dead on the floor. Who is Sloppy ? How did he die ?
***** 7 *****
How much dirt would be in a hole which is 6 feet wide and 6 feet deep that has been dug with a square edged shovel ?
***** 8 *****
If a farmer has 5 haystacks in one field and four haystacks in another field, how many haystacks would he have if he combined them all in the center field ?
***** 9 *****
What is it that goes up and goes down, but does not move ?
Answers :
1.
The word “incorrectly”
2.
1:45. The man gave a total of 25 cents. He divided it among two people. Therefore, he gave a quarter to two.
3.
None, the boat rises with the tide
4.
White. If all walls face south, then the house is in the North Pole. The bear must be a polar bear. So, the colour is white.
5.
Three. Division is performed before addition according to mathematical operations.
6.
Sloppy is a fish. The wind blew the shutters in, which knocked his fish-bowl off the table, and it broke, killing him.
7.
None. No matter how big a hole is, it is still a hole, the absence of dirt.
8.
One. If he combines all of his haystack, it becomes one big stack
9.
The temperature
when the source is open…
Sep 23rd
My college had been too busy with Festember, the cultural fest. So, organizing an SFW ( Software Freedom Week – celebrating opensource ) has got a bit delayed. Still, to keep the brains working a bit, I had given my juniors a ( rather simple ) task of penning down their views on open source. Since it was a weekend when the whole college was dancing to the beats of Sivamani and swaying to the voice of playback singer Karthik, I never expected much of a response from the 80-odd strength of the CSE department second years. Moreover, I had given a deadline too, which was midnight, yesterday. In fact, I expected only about ten entries.
But then, mails started pouring in at regular intervals. I have received about 30 articles, a number much more than my expectation. I have been reading the articles since yesterday evening, whenever I could find time. It is evident that students have sought the help of the internet. But, certain articles were really well written ( might have been a direct rip from some website too… Still, the message they convey is strong ).
I am planning to publish a few of their articles out here in my blog.
Before that, here are some excerpts…
“When the world is wide OPEN …
Why do u require doors or WINDOWS…?”
“What the closed-source players lack is the recognition that the open source movement is a result of years of collaboration with the customer, involving them in every step of development, and delivering premier class support and services – a completely different business model to what they are accustomed to.”
“Any time you give something away for free, you are looking to make money off something else as a result. In this case, the free software compliments a core asset (usually also software). By increasing the market share of the compliment, you increase the market size of the core asset. Open source comes down squarely on one side of this debate, since open source software is an extreme case of an open standard: Not just the interfaces are exposed, but the entire body of source code. Furthermore, competing vendors are more likely to participate in an open source process, not just an open standards process, because there are no hidden components that may be changed out from under them.”
“Open source culture is the creative practice of appropriation and free sharing of found and created content. Examples include collage, found footage film, music, and appropriation art. Open source culture is one in which fixations, works entitled to copyright protection, are made generally available. Participants in the culture can modify those products and redistribute them back into the community or other organizations.”
“Open source is a definite force to reckon with for the companies that create trialwares and for Microsoft and Apple.”
“The main advantage of open source is that the number of developers is enormous as compared to any company. This leads to more ideas , better applications and better performance.We are right now in the transition of completely changing to open source software. By present statistics it shouldnt take a long time…”
“However, if open source does usurp journal science, several new challenges are created. How are scientific contributions by researchers measured for tenure and grants? How will the quality of science change? Time will tell.”











