In classic mythology, there is the story of the Sphinx, a monster with the body of a lion and the upper part of a woman.
The Sphinx lay crouched on the top of a rock along the highroad to the city of Thebes, and stopped all travellers passing by, proposing to them a riddle.
Those who failed to answer the riddle correctly were killed.
This is the riddle the Sphinx asked the travellers: "What animal walks on four legs in the morning, two legs during the day, and three legs in the evening?"
This is part of the story of Oedipus, who replied to the Sphinx, "Man, who in childhood creeps on hands and knees, in manhood walks erect, and in old age with the aid of a staff."
Morning, day and night are representative of the stages of life.
The Sphinx was so mortified at the solving of her riddle that she cast herself down from the rock and perished.
In a far away land, it was known that if you drank poison, the only way to save yourself is to drink a stronger poison, which neutralizes the weaker poison.
The king that ruled the land wanted to make sure that he possessed the strongest poison in the kingdom, in order to ensure his survival, in any situation. So the king called the kingdom's pharmacist and the kingdom's treasurer, he gave each a week to make the strongest poison. Then, each would drink the other one's poison, then his own, and the one that will survive, will be the one that had the stronger poison. The pharmacist went straight to work, but the treasurer knew he had no chance, for the pharmacist was much more experienced in this field, so instead, he made up a plan to survive and make sure the pharmacist dies.
On the last day the pharmacist suddenly realized that the treasurer would know he had no chance, so he must have a plan. After a little thought, the pharmacist realized what the treasurer's plan must be, and he concocted a counter plan, to make sure he survives and the treasurer dies. When the time came, the king summoned both of them. They drank the poisons as planned, and the treasurer died, the pharmacist survived, and the king didn't get what he wanted. What exactly happened there?
The treasurer's plan was to drink a weak poison prior to the meeting with the king, and then he would drink the pharmacist's strong poison, which would neutralize the weak poison. As his own poison he would bring water, which will have no effect on him, but the pharmacist who would drink the water, and then his poison would surely die. When the pharmacist figured out this plan, he decided to bring water as well. So the treasurer who drank poison earlier, drank the pharmacist's water, then his own water, and died of the poison he drank before. The pharmacist would drink only water, so nothing will happen to him. And because both of them brought the king water, he didn't get a strong poison like he wanted.
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.
Emily was sitting at her study table, home alone, on a cold and stormy night. Her parents had taken a flight earlier in the morning to Australia as her grandmother had passed away. She had wanted to follow her parents but she had an important English examination the next day which she could not miss. The storm was getting heavier by the minute and the wind was howling outside. All this noise made it very hard for her to concentrate. She was on the verge of dozing off when she was shaken alert by a sudden "THUD!" She dismissed it as a window which had been slammed shut by the wind.
She tried to concentrate on her books when she heard faint footsteps. Emily got out of her room and looked around when suddenly, without warning, she was grabbed by the neck. She tried to scream but it came out as a mere whimper as the intruder was pressing hard against her throat with his arm. She tried to free herself from his grip but to no avail.
"Give me all your money!" growled the man who had grabbed her from behind.
"Th-there is none h-here! Please ll-let me go!" cried Emily.
"Don't LIE TO ME!" screamed the increasingly agitated man. She felt the man strengthen his grip around her neck. She said nothing and a few seconds passed by in silence. Suddenly the phone rang which alerted both of them.
"People will get suspicious if I don't answer the phone," said Emily, with a controlled voice. The intruder let her go.
"Alright, but NO funny business, or ELSE!" said the nervous intruder. Emily walked toward the phone. She took a deep breath and calmed herself. She picked up the phone. "Hey Em! How's the revision going?" said the caller.
"Hey Anna. Thanks for the call. Hey you know those Science notes I lent you last week? Well I really need them back. It would be a great help to me. It's an emergency, so if you could give me them tomorrow it would be great. Please hurry in finding the notes. I need to get back to my books now. Bye," Emily said. She hung up the phone.
"It was wise of you not to say anything," said the intruder, although he was more than a bit confused by her conversation.
"Now TELL ME WHERE THE MONEY IS KEPT!" screamed the thief.
"It...it's...in my dad's room. The first room on the right. Third drawer," said Emily. "SHOW me!" said the man, and removed his grip around her neck. She took a big gulp of air and nearly fell. She swallowed hard and said a silent prayer. She walked slowly, in silence, toward her father's room. All of a sudden, they heard police sirens. The intruder froze in his footsteps. He ran to the nearest window and jumped out of it. Emily ran outside in time to see the intruder being escorted into the car. She saw Anna and she ran toward her and hugged her.
"Smart kids," said the policeman.
What had happened?
Emily had used the mute button during her conversation with Anna so that all Anna heard was: "call...help...emergency...please hurry".
Anna, sensing something was wrong, called the police and told them Emily's address. The police were able to come to Emily's house in time to catch the perpetrator.
It was a Pink Island. There were 201 individuals (perfect logicians) lived in the island. Among them 100 people were blue eyed people, 100 were green eyed people and the leader was a black eyed one.
Except the leader, nobody knew how many individuals lived in the island. Neither have they known about the color of the eyes. The leader was a very strict person. Those people can never communicate with others. They even cannot make gestures to communicate. They can only talk and communicate with the leader. It was a prison for those 200 individuals.
However, the leader provided an opportunity to leave the island forever but on one condition. Every morning he questions the individuals about the color of the eyes! If any of the individuals say the right color, he would be released. Since they were unaware about the color of the eyes, all 200 individuals remained silent. When they say wrong color, they were eaten alive to death. Afraid of punishment, they remained silent.
One day, the leader announced that "at least 1 of you has green eyes! If you say you are the one, come and say, I will let you go if you are correct! But only one of you can come and tell me!"
How many green eyed individuals leave the island and in how many days?
All 100 green eyed individuals will leave on the 100th night.
Consider, there is only one green eyed individual lived in the island. He will look at all the remaining individuals who have blue eyes. So, he can get assured that he has green eyes!
Now consider 2 people with green eyes. Only reason the other green-eyed person wouldn't leave on the first night is because he sees another person with green eyes. Seeing no one else with green eyes, each of these two people realize it must be them. So both leaves on second night.
This is the same for any number. Five people with green eyes would leave on the fifth night and 100 on the 100th, all at once.
Search: Monty Hall problem
Why it's important for the solution that the leader said the new information "at least 1 of you has green eyes", when they must knew from the beginning, that there are no less than 99 green-eyed people on the island? Because they cannot depart the island without being certain, they cannot begin the process of leaving until the guru speaks, and common knowledge is attained.
Search: Common knowledge (logic)
One day, Emperor Akbar posed a question to Birbal. He asked him what Birbal would choose if he offered either justice or a gold coin.
"The gold coin," said Birbal without hesitation.
On hearing this, Akbar was taken aback. "You would prefer a gold coin to justice?" he asked, not believing his own ears.
"Yes," said Birbal.
The other courtiers were amazed by Birbal's display of idiocy. They were full of glee that Birbal had finally managed himself to do what these courtiers had not been able to do for a long time - discredit Birbal in the emperor's eyes!
"I would have been disappointed if this was the choice made even by my lowliest of servants," continued the emperor. "But coming from you it's not only disappointing, but shocking and sad. I did not know you were so debased!"
How did Birbal justify his answer to the enraged and hurt Emperor?
"One asks for what one does not have, Your Majesty." said Birbal, smiling gently and in quiet tones.
"Under Your Majesty´s rule, justice is available to everybody. But I am a spendthrift and always short of money and therefore I said I would choose the gold coin."
The answer immensely pleased the emperor and respect for Birbal was once again restored in the emperor's eyes.
There are 100 ants on a board that is 1 meter long, each facing either left or right and walking at a pace of 1 meter per minute.
The board is so narrow that the ants cannot pass each other; when two ants walk into each other, they each instantly turn around and continue walking in the opposite direction. When an ant reaches the end of the board, it falls off the edge.
From the moment the ants start walking, what is the longest amount of time that could pass before all the ants have fallen off the plank? You can assume that each ant has infinitely small length.
The longest amount of time that could pass would be 1 minute.
If you were looking at the board from the side and could only see the silhouettes of the board and the ants, then when two ants walked into each other and turned around, it would look to you as if the ants had walked right by each other.
In fact, the effect of two ants walking into each other and then turning around is essentially the same as two ants walking past one another: we just have two ants at that point walking in opposite directions.
So we can treat the board as if the ants are walking past each other. In this case, the longest any ant can be on the board is 1 minute (since the board is 1 meter long and the ants walk at 1 meter per minute). Thus, after 1 minute, all the ants will be off the board.
Mr. Jason was walking along the sea shore. Suddenly it started drizzling and turned into a heavy rain. He wasn’t carrying any umbrella, not even any cap. He was completely wet and all his clothes were soaked in rain. Yet not even a single strand of his hair was wet! How was that possible?