## Shorter and shorter

I look taller when I am young. But as I get old, I become shorter and shorter. What Am I?

A candle.

I look taller when I am young. But as I get old, I become shorter and shorter. What Am I?

A candle.

What has 18 legs and catches flies?

A baseball team.

You have just purchased a small company called Company X. Company X has N employees, and everyone is either an engineer or a manager. You know for sure that there are more engineers than managers at the company.
Everyone at Company X knows everyone else's position, and you are able to ask any employee about the position of any other employee. For example, you could approach employee A and ask "Is employee B an engineer or a manager?" You can only direct your question to one employee at a time, and can only ask about one other employee at a time. You're allowed to ask the same employee multiple questions if you want.
Your goal is to find at least one engineer to solve a huge problem that has just hit the company's factory. The problem is so urgent that you only have time to ask N-1 total questions.
The major problem with questioning the employees, however, is that while the engineers will always tell you the truth about other employees' roles, the managers may lie to you if they like. You can assume that the managers will do their best to confuse you.
How can you find at least one engineer by asking at most N-1 questions?

You can find at least one engineer using the following process:
Put all of the employees in a conference room. If there happen to be an even number of employees, pick one at random and send him home for the day so that we start with an odd number of employees. Note that there will still be more engineers than managers after we send this employee home.
Then call them out one at a time in any order. You will be forming them into a line as follows:
If there is nobody currently in the line, put the employee you just called out in the line.
Otherwise, if there is anybody in the line, then we do the following. Let's call the employee currently at the front of the line Employee_Front, and call the employee who we just called out of the conference room Employee_Next.
So ask Employee_Front if Employee_Next is a manager or an engineer.
If Employee_Front says "manager", then send both Employee_Front and Employee_Next home for the day.
However, if Employee_Front says "engineer", then put Employee_Next at the front of the line.
Keep doing this until you've called everyone out of the conference room. Notice that at this point, you'll have asked N-1 or less questions (you asked at most one question each time you called an employee out except for the first employee, when you didn't ask a question, so that's at most N-1 questions).
When you're done calling everyone out of the conference room, the person at the front of the line is an engineer. So you've found your engineer!
But the real question: how does this work?
We can prove this works by showing a few things.
First, let's show that if there are any engineers in the line, then they must be in front of any managers.
We'll show this with a proof by contradiction. Assume that there is a manager in front of an engineer somewhere in the line. Then it must have been the case that at some point, that engineer was Employee_Front and that manager was Employee_Next. But then Employee_Front would have said "manager" (since he is an engineer and always tells the truth), and we would have sent them both home. This contradicts their being in the line at all, and thus we know that there can never be a manager in front of an engineer in the line.
So now we know that after the process is done, if there are any engineers in the line, then they will be at the front of the line. That means that all we have to prove now is that there will be at least one engineer in the line at the end of the process, and we'll know that there will be an engineer at the front.
So let's show that there will be at least one engineer in the line. To see why, consider what happens when we ask Employee_Front about Employee_Next, and Employee_Front says "manager". We know for sure that in this case, Employee_Front and Employee_Next are not both engineers, because if this were the case, then Employee_Front would have definitely says "engineer". Put another way, at least one of Employee_Front and Employee_Next is a manager. So by sending them both home, we know we are sending home at least one manager, and thus, we are keeping the balance in the remaining employees that there are more engineers than managers.
Thus, once the process is over, there will be more engineers than managers in the line (this is also sufficient to show that there will be at least one person in the line once the process is over). And so, there must be at least one engineer in the line.
Put altogether, we proved that at the end of the process, there will be at least one engineer in the line and that any engineers in the line must be in front of any managers, and so we know that the person at the front of the line will be an engineer.

There 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.

I follow you all day long,
But when the night or rain comes,
I am all gone.

A shadow.

Farmer Brown came to town with some watermelons. He sold half of them plus half a melon and found that he had one whole melon left. How many melons did he take to town?

Easy, three melons.

I have 28 days in a month. Which month I am?

All months in a year have 28 days and many have more than 28 days.

A beggar's brother died, but the man who died had not brother.
How could this be?

The beggar was a women.

There 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.

Why shouldn't you tell an Easter egg a joke?

It might crack up.