You have 3 jars that are all mislabeled. One jar contains Apples, another contains Oranges and the third jar contains a mixture of both Apples and Oranges.
You are allowed to pick as many fruits as you want from each jar to fix the labels on the jars. What is the minimum number of fruits that you have to pick and from which jars to correctly label them?
Let's take a scenario. Suppose you pick from jar labelled as Apples and Oranges and you got Apple from it. That means that jar should be Apples as it is incorrectly labelled. So it has to be Apples jar.
Now the jar labelled Oranges has to be Mixed as it cannot be the Oranges jar as they are wrongly labelled and the jar labelled Apples has to be Oranges.
Similar scenario applies if it's a Oranges taken out from the jar labelled as Apples and Oranges. So you need to pick just one fruit from the jar labelled as Apples and Oranges to correctly label the jars.
A bad king has a cellar of 1000 bottles of delightful and very expensive wine. A neighboring queen plots to kill the bad king and sends a servant to poison the wine.
Fortunately (or say unfortunately) the bad king's guards catch the servant after he has only poisoned one bottle.
Alas, the guards don't know which bottle but know that the poison is so strong that even if diluted 100,000 times it would still kill the king. Furthermore, it takes one month to have an effect.
The bad king decides he will get some of the prisoners in his vast dungeons to drink the wine. Being a clever bad king he knows he needs to murder no more than 10 prisoners – believing he can fob off such a low death rate – and will still be able to drink the rest of the wine (999 bottles) at his anniversary party in 5 weeks time.
Explain what is in mind of the king, how will he be able to do so?
Think in terms of binary numbers. (now don’t read the solution, give a try).
Number the bottles 1 to 1000 and write the number in binary format.
bottle 1 = 0000000001 (10 digit binary)
bottle 2 = 0000000010
bottle 500 = 0111110100
bottle 1000 = 1111101000
Now take 10 prisoners and number them 1 to 10, now let prisoner 1 take a sip from every bottle that has a 1 in its least significant bit. Let prisoner 10 take a sip from every bottle with a 1 in its most significant bit. etc.
prisoner = 10 9 8 7 6 5 4 3 2 1
bottle 924 = 1 1 1 0 0 1 1 1 0 0
For instance, bottle no. 924 would be sipped by 10,9,8,5,4 and 3. That way if bottle no. 924 was the poisoned one, only those prisoners would die.
After four weeks, line the prisoners up in their bit order and read each living prisoner as a 0 bit and each dead prisoner as a 1 bit. The number that you get is the bottle of wine that was poisoned.
1000 is less than 1024 (2^10). If there were 1024 or more bottles of wine it would take more than 10 prisoners.
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.
You've been placed on a course of expensive medication in which you are to take one tablet of Plusin and one tablet of Minusin daily. You must be careful that you take just one of each because taking more of either can have serious side effects. Taking Plusin without taking Minusin, or vice versa, can also be very serious, because they must be taken together in order to be effective. In summary, you must take exactly one of the Plusin pills and one of the Minusin pills at one time.
Therefore, you open up the Plusin bottle, and you tap one Plusin pill into your hand. You put that bottle aside and you open the Minusin bottle. You do the same, but by mistake, two Minusins fall into your hand with the Plusin pill.
Now, here's the problem. You weren't watching your hand as the pills fell into it, so you can't tell the Plusin pill apart from the two Minusin pills. The pills look identical. They are both the same size, same weight (10 micrograms), same color (Blue), same shape (perfect square), same everything, and they are not marked differently in any way.
What are you going to do?
You cannot tell which pill is which, and they cost $500 a piece, so you cannot afford to throw them away and start over again. How do you get your daily dose of exactly one Plusin and exactly one Minusin without wasting any of the pills?
Carefully cut each of the three pills in half, and carefully separate them into two piles, with half of each pill in each pile. You do not know which pill is which, but you are 100% sure that each of the two piles now contains two halves of Minusin and half of Plusin. Now go back into the Plusin bottle, take out a pill, cut it in half, and add one half to each stack. Now you have two stacks, each one containing two halves of Plusin and two halves of Minusin. Take one stack of pills today, and save the second stack for tomorrow.
Last week, the local Primary school was visited by the Government School Inspector who was there to check that teachers were performing well in their respective classes. He was very impressed with one particular teacher. The Inspector noticed that each time the class teacher asked a question, every child in the class put up their hands enthusiastically to answer it. More surprisingly, whilst the teacher chose a different child to answer the questions each time, the answers were always correct.
Why would this be?
The children were instructed to ALL raise their hands whenever a question was asked. It did not matter whether they knew the answer or not. If they did not know the answer, however, they would raise their LEFT hand. If they knew the answer, they would raise their RIGHT hand. The class teacher would choose a different child each time, but always the ones who had their RIGHT hand raised.
Pirate Pete had been captured by a Spanish general and sentenced to death by his 50-man firing squad. Pete cringed, as he knew their reputation for being the worst firing squad in the Spanish military. They were such bad shots that they would often all miss their targets and simply maim their victims, leaving them to bleed to death, as the general's tradition was to only allow one shot per man to save on ammunition. The thought of a slow painful death made Pete beg for mercy.
"Very well, I have some compassion. You may choose where the men stand when they shoot you and I will add 50 extra men to the squad to ensure someone will at least hit you. Perhaps if they stand closer they will kill you quicker, if you're lucky," snickered the general. "Oh, and just so you don't get any funny ideas, they can't stand more than 20 ft away, they must be facing you, and you must remain tied to the post in the middle of the yard. And to show I'm not totally heartless, if you aren't dead by sundown I'll release you so you can die peacefully outside the compound. I must go now but will return tomorrow and see to it that you are buried in a nice spot, though with 100 men, I doubt there will be much left of you to bury."
After giving his instructions the general left. Upon his return the next day, he found that Pete had been set free alive and well. "How could this be?" demanded the general. "It was where Pete had us stand," explained the captain of the squad.
Where did Pete tell them to stand?
Pete told them to form a circle around him. All the squad was facing in at Pete, ready to shoot, when they realized that everyone who missed would likely end up shooting another squad member. So no one dared to fire, knowing the risk. Thus at sundown he was released.
In olden days you are a clever thief charged with treason against the king and sentenced to death.
But the king decides to be a little lenient and lets you choose your own way to die.
What way should you choose?
Remember, you're clever!
A monk leaves at sunrise and walks on a path from the front door of his monastery to the top of a nearby mountain. He arrives at the mountain summit exactly at sundown. The next day, he rises again at sunrise and descends down to his monastery, following the same path that he took up the mountain.
Assuming sunrise and sunset occured at the same time on each of the two days, prove that the monk must have been at some spot on the path at the same exact time on both days.
Imagine that instead of the same monk walking down the mountain on the second day, that it was actually a different monk. Let's call the monk who walked up the mountain monk A, and the monk who walked down the mountain monk B. Now pretend that instead of walking down the mountain on the second day, monk B actually walked down the mountain on the first day (the same day monk A walks up the mountain).
Monk A and monk B will walk past each other at some point on their walks. This moment when they cross paths is the time of day at which the actual monk was at the same point on both days. Because in the new scenario monk A and monk B MUST cross paths, this moment must exist.
A man was to be sentenced, and the judge told him, "You may make a statement. If it is true, I'll sentence you to four years in prison. If it is false, I'll sentence you to six years in prison." After the man made his statement, the judge decided to let him go free.What did the man say?
He said, "You'll sentence me to six years in prison." If it was true, then the judge would have to make it false by sentencing him to four years. If it was false, then he would have to give him six years, which would make it true. Rather than contradict his own word, the judge set the man free.
General Custer is surrounded by Indians and he's the only cowboy left.
He finds an old lamp in front of him and rubs it. Out pops a genie. The genie grants Custer one wish, with a catch. He says, "Whatever you wish for, each Indian will get two of the same thing." Custer ponders a while and thinks:"If I get a bow and arrow they get two. If I get a rifle they get two!" He then rubs the bottle again and out pops the genie. "Well," the genie asks "have you made up your mind?"
What did Custer ask for to help him get away?