Thursday, October 18, 2007

In a contest, four fruits (an apple, a banana, an orange, and a pear) have been placed in four closed boxes (one fruit per box). People may guess which fruit is in which box. 123 people participate in the contest. When the boxes are opened, it turns out that 43 people have guessed none of the fruits correctly, 39 people have guessed one fruit correctly, and 31 people have guessed two fruits correctly.
How many people have guessed three fruits correctly, and how many people have guessed four fruits correctly?

Sunday, August 12, 2007

Palindrome date

"October 2, 2001" in MMDDYYYY format is a palindrome (a string that reads the same forwards as it does backwards). Pretty cool, check it out: 10/02/2001 --> 10022001. When was the last date before October 2, 2001 that is also a palindrome?

Saturday, August 4, 2007

Camel Puzzle

You have 3,000 bananas that must be transported across a desert that is 1,000 kilometers wide. You have a camel that has a 1,000 banana capacity. However, the camel must eat one banana for each kilometer that it walks.

What is the largest number of bananas that can be transported across the desert?

Thursday, July 26, 2007

Saving The Prisoners

There are some prisoners(say 500) to whom the death sentence is annouced. But being liberal the jailar gave a chance and annouced a day before to the prisoners that
"I will keep a colored hat on your head, it will be either Red or Blue,
I will make you stand each one on the stairs (rule or clue - the top most stair guy can see all the prisoners hats and thier colors down to him, means standing one person per stair)
**Rule - No one is allowed to see their hat color but can see all others who are down to them.
I will come to each person from top stair to down and ask their hat color, if you say correct color.. .you are escaped.. else shot"

Then the prisoners gathered and decided on one strategy so that maximum people can be saved.

what is that strategy and how many prisoners can be escaped?

Find The Truth Teller...

There are three persons in a room
One of them always tells the truth, but the others are "alternate liars": they tell the truth then lie, then truth, etc, but you do not know if they will start by telling the truth or a lie...
You can ask three questions that MUST be answered by Yes or No.
Find the truth teller.

Anyone with previous knowledge on information theory and coding would find it more easy...

Saturday, July 21, 2007

Solution to the Handshakes problem

Your spouse shook hands with Pat, but not Chris.

We begin with what we know: since nobody shook hands with more than six persons, and the seven people other than
yourself all shook hands with a different number of people, the numbers must have been:
0,1,2,3,4,5,6, respectively.

Let us begin with "0"--whom we shall call the introvert, because this person shook nobody's hand. At the other extreme
was "6"--whom we shall call the extrovert for obvious reasons. The extrovert shook everybody's hand, except his/her
own spouse. Since the extrovert and the introvert did not shake hands, the introvert must be the extrovert's spouse.

0&6 are a couple, leaving 1,2,3,4,5 and yourself

Consider the remaining five people other than yourself. Each of these shook hands with the extrovert, and none with the introvert.

One of these five people-- "1", the quasi-introvert--only shook hands with one other person, the extrovert. Another--
"5", the quasi-extrovert--shook hands with five people, everyone except his/her own spouse and the introvert ("0").
Therefore, the quasi-introvert and the quasi-extrovert form a couple.

0&6, 1&5 are couples, leaving 2,3,4 and yourself.

In the same way, "2" and "4" form a couple--we'll call them the pseudo-introvert and pseudo-extrovert, respectively.

0&6, 1&5, 2&4 are couples, leaving 3 and yourself.

Therefore, your spouse is the one who shook hands with three other persons. Furthermore, you and your spouse shook hands with the same people: the extrovert ("6"), the quasi-extrovert ("5"), and the pseudo-extrovert ("4"). This group includes Pat (one of our givens: you shook hands with Pat), and therefore must exclude Chris.

Solution to Gold Chain Problem

This can be done wit 2 cuts.
Cut the gold chain into 3 pieces of length 1, 2 and 4. That will take just 2 cuts. On the first day, 1 can be given as wage. On 2nd day link 1 can be taken back, and link 2 can be given. On 3rd day link 1 can be given along with link 2. And so on..