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. cleanfunny
What is black and white and read all over?
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.logic
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.cleanshort
What is the last thing you take off before bed?
Your feet off the floor.logic
How many months have 28 days?
All of them. Every month has 28 days. Some just continue on after reaching 28.logicmath
How could you give someone $63 using six bills without using one dollar bills?
1 - $50 bill, 1 - $5 bill, 4 - $2 bills.animalmath
As I was going to the mall I met a man with seven wives, Each wive held two bags, Each bag held a mother cat, Each mother cat had six babies,
How many people were going to the mall?
How to measure exactly 4 gallon of water from 3 gallon and 5 gallon jars, given, you have unlimited water supply from a running tap.
Step 1. Fill 3 gallon jar with water. ( 5p – 0, 3p – 3)
Step 2. Pour all its water into 5 gallon jar. (5p – 3, 3p – 0)
Step 3. Fill 3 gallon jar again. ( 5p – 3, 3p – 3)
Step 4. Pour its water into 5 gallon jar untill it is full. Now you will have exactly 1 gallon water remaining in 3 gallon jar. (5p – 5, 3p – 1)
Step 5. Empty 5 gallon jar, pour 1 gallon water from 3 gallon jar into it. Now 5 gallon jar has exactly 1 gallon of water. (5p – 1, 3p – 0)
Step 6. Fill 3 gallon jar again and pour all its water into 5 gallon jar, thus 5 gallon jar will have exactly 4 gallon of water. (5p – 4, 3p – 0)
We are done !
What rock group has four men that don't sing?