logicmathThere are 5 pirates in a ship. Pirates have hierarchy C1, C2, C3, C4 and C5.C1 designation is the highest and C5 is the lowest. These pirates have three characteristics : a. Every pirate is so greedy that he can even take lives to make more money. b. Every pirate desperately wants to stay alive. c. They are all very intelligent.There are total 100 gold coins on the ship. The person with the highest designation on the deck is expected to make the distribution. If the majority on the deck does not agree to the distribution proposed, the highest designation pirate will be thrown out of the ship (or simply killed). The first priority of the pirates is to stay alive and second to maximize the gold they get. Pirate 5 devises a plan which he knows will be accepted for sure and will maximize his gold. What is his plan?

To understand the answer,we need to reduce this problem to only 2 pirates. So what happens if there are only 2 pirates. Pirate 2 can easily propose that he gets all the 100 gold coins. Since he constitutes 50% of the pirates, the proposal has to be accepted leaving Pirate 1 with nothing.
Now let’s look at 3 pirates situation, Pirate 3 knows that if his proposal does not get accepted, then pirate 2 will get all the gold and pirate 1 will get nothing. So he decides to bribe pirate 1 with one gold coin. Pirate 1 knows that one gold coin is better than nothing so he has to back pirate 3. Pirate 3 proposes {pirate 1, pirate 2, pirate 3} {1, 0, 99}. Since pirate 1 and 3 will vote for it, it will be accepted.
If there are 4 pirates, pirate 4 needs to get one more pirate to vote for his proposal. Pirate 4 realizes that if he dies, pirate 2 will get nothing (according to the proposal with 3 pirates) so he can easily bribe pirate 2 with one gold coin to get his vote. So the distribution will be {0, 1, 0, 99}.
Smart right? Now can you figure out the distribution with 5 pirates? Let’s see. Pirate 5 needs 2 votes and he knows that if he dies, pirate 1 and 3 will get nothing. He can easily bribe pirates 1 and 3 with one gold coin each to get their vote. In the end, he proposes {1, 0, 1, 0, 98}. This proposal will get accepted and provide the maximum amount of gold to pirate 5.

cleanlogicmathA 400 yard long train, travelling at 30 mph, enters a 4.5 mile long tunnel.
How long will elapse between the moment the front of the train enters the tunnel and the moment the end of the train clears the tunnel?

9 minutes and 27.2727 seconds.

cleanSomething very extraordinary happened on the 6th of May, 1978 at thirty-four minutes past twelve a.m. What was it?

At that moment, the time and day could be written as 12:34, 5/6/78.

logicshortA king has 100 identical servants, each with a different rank between 1 and 100. At the end of each day, each servant comes into the king's quarters, one-by-one, in a random order, and announces his rank to let the king know that he is done working for the day. For example, servant 14 comes in and says "Servant 14, reporting in."
One day, the king's aide comes in and tells the king that one of the servants is missing, though he isn't sure which one.
Before the other servants begin reporting in for the night, the king asks for a piece of paper to write on to help him figure out which servant is missing. Unfortunately, all that's available is a very small piece that can only hold one number at a time. The king is free to erase what he writes and write something new as many times as he likes, but he can only have one number written down at a time.
The king's memory is bad and he won't be able to remember all the exact numbers as the servants report in, so he must use the paper to help him.
How can he use the paper such that once the final servant has reported in, he'll know exactly which servant is missing?

When the first servant comes in, the king should write down his number. For each other servant that reports in, the king should add that servant's number to the current number written on the paper, and then write this new number on the paper.
Once the final servant has reported in, the number on the paper should equal
(1 + 2 + 3 + ... + 99 + 100) - MissingServantsNumber
Since (1 + 2 + 3 + ... + 99 + 100) = 5050, we can rephrase this to say that the number on the paper should equal
5050 - MissingServantsNumber
So to figure out the missing servant's number, the king simply needs to subtract the number written on his paper from 5050:
MissingServantsNumber = 5050 - NumberWrittenOnThePaper

logicA new student met the Zen Master after traveling hundreds of miles by yak cart. He was understandably pleased with himself for being selected to learn at the great master's feet .
The first time they formally met, the Zen Master asked, "May I ask you a simple question?" "It would be an honor!" replied the student.
"Which is greater, that which has no beginning or that which has no end?" queried the Zen Master. "Come back when you have the answer and can explain why."
After the student made many frustrated trips back with answers which the master quickly cast off with a disapproving negative nod, the Zen Master finally said, "Perhaps I should ask you another question?"
"Oh, please do!" pleaded the exasperated student.
The Zen Master then asked, "Since you do not know that, answer this much simpler riddle. When can a pebble hold back the sea?" Again the student was rebuffed time and again. Several more questions followed with the same result. Each time, the student could not find the correct answer. Finally, completely exasperated, the student began to weep, "Master, I am a complete idiot. I can not solve even the simplest riddle from you!"
Suddenly, the student stopped, sat down, and said, "I am ready for my second lesson."
What was the Zen Master's first lesson?

The student's first lesson was that in order to learn from the Zen Master, the student should be asking the questions and not the Zen Master.

logicThere are 4 big houses in my home town. They are made from these materials: red marbles, green marbles, white marbles and blue marbles.
Mrs Jennifer's house is somewhere to the left of the green marbles one and the third one along is white marbles.
Mrs Sharon owns a red marbles house and Mr Cruz does not live at either end, but lives somewhere to the right of the blue marbles house.
Mr Danny lives in the fourth house, while the first house is not made from red marbles.
Who lives where, and what is their house made from ?

From, left to right:
#1 Mrs Jennifer - blue marbles
#2 Mrs Sharon - red marbles
#3 Mr Cruz - white marbles
#4 Mr Danny - green marbles
If we separate and label the clues, and label the houses #1, #2, #3, #4 from left to right we can see that:
a. Mrs Jennifer's house is somewhere to the left of the green marbles one.
b. The third one along is white marbles.
c. Mrs Sharon owns a red marbles house
d. Mr Cruz does not live at either end.
e. Mr Cruz lives somewhere to the right of the blue marbles house.
f. Mr Danny lives in the fourth house
g. The first house is not made from red marbles.
By (g) #1 isn't made from red marbles, and by (b) nor is #3. By (f) Mr Danny lives in #4 therefore by (c) #2 must be red marbles, and Mrs Sharon lives there.
Therefore by (d) Mr Cruz must live in #3, which, by (b) is the white marbles house. By (a) #4 must be green marbles (otherwise Mrs Jennifer couldn't be to its left) and by (f) Mr Danny lives there.
Which leaves Mrs Jennifer, living in #1, the blue marbles house.

logicmathshortRamanujan discovered 1729 as a magic number. Why 1729 is a magic number ?

It can be expressed as the sum of the cubes of two different sets of numbers.
10^3 + 9^3 = 1729
and
12^3 + 1^3 = 1729

logicmathprobabilityYou have a basket of infinite size (meaning it can hold an infinite number of objects). You also have an infinite number of balls, each with a different number on it, starting at 1 and going up (1, 2, 3, etc...).
A genie suddenly appears and proposes a game that will take exactly one minute. The game is as follows: The genie will start timing 1 minute on his stopwatch. Where there is 1/2 a minute remaining in the game, he'll put balls 1, 2, and 3 into the basket. At the exact same moment, you will grab a ball out of the basket (which could be one of the balls he just put in, or any ball that is already in the basket) and throw it away.
Then when 3/4 of the minute has passed, he'll put in balls 4, 5, and 6, and again, you'll take a ball out and throw it away.
Similarly, at 7/8 of a minute, he'll put in balls 7, 8, and 9, and you'll take out and throw away one ball.
Similarly, at 15/16 of a minute, he'll put in balls 10, 11, and 12, and you'll take out and throw away one ball.
And so on....After the minute is up, the genie will have put in an infinite number of balls, and you'll have thrown away an infinite number of balls.
Assume that you pull out a ball at the exact same time the genie puts in 3 balls, and that the amount of time this takes is infinitesimally small.
You are allowed to choose each ball that you pull out as the game progresses (for example, you could choose to always pull out the ball that is divisible by 3, which would be 3, then 6, then 9, and so on...).
You play the game, and after the minute is up, you note that there are an infinite number of balls in the basket.
The next day you tell your friend about the game you played with the genie. "That's weird," your friend says. "I played the exact same game with the genie yesterday, except that at the end of my game there were 0 balls left in the basket."
How is it possible that you could end up with these two different results?

Your strategy for choosing which ball to throw away could have been one of many. One such strategy that would leave an infinite number of balls in the basket at the end of the game is to always choose the ball that is divisible by 3 (so 3, then 6, then 9, and so on...). Thus, at the end of the game, any ball of the format 3n+1 (i.e. 1, 4, 7, etc...), or of the format 3n+2 (i.e. 2, 5, 8, etc...) would still be in the basket. Since there will be an infinite number of such balls that the genie has put in, there will be an infinite number of balls in the basket.
Your friend could have had a number of strategies for leaving 0 balls in the basket. Any strategy that guarantees that every ball n will be removed after an infinite number of removals will result in 0 balls in the basket.
One such strategy is to always choose the lowest-numbered ball in the basket. So first 1, then 2, then 3, and so on. This will result in an empty basket at the game's end. To see this, assume that there is some ball in the basket at the end of the game. This ball must have some number n. But we know this ball was thrown out after the n-th round of throwing balls away, so it couldn't be in there. This contradiction shows that there couldn't be any balls left in the basket at the end of the game.
An interesting aside is that your friend could have also used the strategy of choosing a ball at random to throw away, and this would have resulted in an empty basket at the end of the game. This is because after an infinite number of balls being thrown away, the probability of any given ball being thrown away reaches 100% when they are chosen at random.

logicA fancy restaurant in New York was offering a promotional deal. A married couple could eat at the restaurant for half-price on their anniversary. To prevent scams, the couple would need proof of their wedding date. One Thursday evening, a couple claimed it was their anniversary, but didn't bring any proof. The restaurant manager was called to speak with the couple. When the manager asked to hear about the wedding day, the wife replied with the following: "Oh, it was a wonderful Sunday afternoon, birds were chirping, and flowers were in full bloom." After nearly 10 minutes of ranting, she comes to tell him that today was their 28th wedding anniversary.
"How lovely", the manager said, "However, you do not qualify for the discount. Today is not your anniversary, you are a liar".
How did the manager know that it wasn't their anniversary?

The calendar repeats itself every 28 years. So, if they were married on a Sunday 28 years ago, the day they were at the restaurant would also have to be a Sunday. Since it was a Thursday, the manager knew they were lying, and abruptly kicked them out of his restaurant.

logicmathprobabilityWhat is the least number of people that need to be in a room such that there is greater than a 50% chance that at least two of the people have the same birthday?

Only 23 people need to be in the room.
Our first observation in solving this problem is the following:
(the probability that at least 2 people have the same birthday + the probability that nobody has the same birthday) = 1.0
What this means is that there is a 100% chance that EITHER everybody in the room has a different birthday, OR at least two people in the room have the same birthday (and these probabilities don't add up to more than 1.0 because they cover mutually exclusive situations).
With some simple re-arranging of the formula, we get:
the probability that at least 2 people have the same birthday = (1.0 - the probability that nobody has the same birthday)
So now if we can find the probability that nobody in the room has the same birthday, we just subtract this value from 1.0 and we'll have our answer.
The probability that nobody in the room has the same birthday is fairly straightforward to calculate. We can think of this as a "selection without replacement" problem, where each person "selects" a birthday at random, and we then have to figure out the probability that no two people select the same birthday. The first selection has a 365/365 chance of being different than the other birthdays (since none have been selected yet). The next selection has a 364/365 chance of being different than the 1 birthday that has been selected so far. The next selection has a 363/365 chance of being different than the 2 birthdays that have been selected so far.
These probabilities are multiplied together since each is conditional on the previous. So for example, the probability that nobody in a room of 3 people have the same birthday is (365/365 * 364/365 * 363/365) =~ 0.9918
More generally, if there are n people in a room, then the probability that nobody has the same birthday is (365/365 * 364/365 * ... * (365-n+2)/365 * (365-n+1)/365)
We can plug in values for n. For n=22, we get that the probability that nobody has the same birthday is 0.524, and thus the probabilty that at least two people have the same birthday is (1.0 - 0.524) = 0.476 = 47.6%.
Then for n=23, we get that the probability that nobody has the same birthday is 0.493, and thus the probabilty that at least two people have the same birthday is 1.0 - 0.493) = 0.507 = 50.7%. Thus, once we get to 23 people we have reached the 50% threshold.