Riddle #874

logic

Creepy house

You walk into a creepy house by yourself. There is no electricity, plumbing or ventilation. Inside you notice 3 doors with numbers on them. Once you open the doors you will die a particular way. Door #1 You’ll be eaten by a lion who is hungry. Door #2 You’ll be stabbed to death. Door #3 There is an electric chair waiting for you. Which door do you pick?
Door #3, Since There Is No Electricity To Harm You.
93.70 %
40 votes

Similar riddles

See also best riddles or new riddles.

logic

Engineers and Managers

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.
93.84 %
41 votes

logicmathshort

Eight eights

Using eight eights and addition only, can you make 1000?
888 + 88 + 8 + 8 + 8 = 1000
93.05 %
36 votes

cleanfunnylogic

Blind in a hardware store

A blind man walks into a hardware store to buy a hammer. There are hammers hanging behind the front desk, but obviously the blind man isn't able to see them. And yet a few minutes later, he happily walks out of the store, having just purchased a new hammer. How did he do it?
He walks up the the front desk where the clerk is working and says "I'd like to buy a hammer."
93.70 %
40 votes

logicmath

Cards in the dark

You are standing in a pitch-dark room. A friend walks up and hands you a normal deck of 52 cards. He tells you that 13 of the 52 cards are face-up, the rest are face-down. These face-up cards are distributed randomly throughout the deck. Your task is to split up the deck into two piles, using all the cards, such that each pile has the same number of face-up cards. The room is pitch-dark, so you can't see the deck as you do this. How can you accomplish this seemingly impossible task?
Take the first 13 cards off the top of the deck and flip them over. This is the first pile. The second pile is just the remaining 39 cards as they started. This works because if there are N face-up cards in within the first 13 cards, then there will be (13 - N) face up cards in the remaining 39 cards. When you flip those first 13 cards, N of which are face-up, there will now be N cards face-down, and therefore (13 - N) cards face-up, which, as stated, is the same number of face-up cards in the second pile.
91.22 %
48 votes

logicmath

Flipping Lockers

There are 1 million closed school lockers in a row, labeled 1 through 1,000,000. You first go through and flip every locker open. Then you go through and flip every other locker (locker 2, 4, 6, etc...). When you're done, all the even-numbered lockers are closed. You then go through and flip every third locker (3, 6, 9, etc...). "Flipping" mean you open it if it's closed, and close it if it's open. For example, as you go through this time, you close locker 3 (because it was still open after the previous run through), but you open locker 6, since you had closed it in the previous run through. Then you go through and flip every fourth locker (4, 8, 12, etc...), then every fifth locker (5, 10, 15, etc...), then every sixth locker (6, 12, 18, etc...) and so on. At the end, you're going through and flipping every 999,998th locker (which is just locker 999,998), then every 999,999th locker (which is just locker 999,999), and finally, every 1,000,000th locker (which is just locker 1,000,000). At the end of this, is locker 1,000,000 open or closed?
Locker 1,000,000 will be open. If you think about it, the number of times that each locker is flipped is equal to the number of factors it has. For example, locker 12 has factors 1, 2, 3, 4, 6, and 12, and will thus be flipped 6 times (it will end be flipped when you flip every one, every 2nd, every 3rd, every 4th, every 6th, and every 12th locker). It will end up closed, since flipping an even number of times will return it to its starting position. You can see that if a locker number has an even number of factors, it will end up closed. If it has an odd number of factors, it will end up open. As it turns out, the only types of numbers that have an odd number of factors are squares. This is because factors come in pairs, and for squares, one of those pairs is the square root, which is duplicated and thus doesn't count twice as a factor. For example, 12's factors are 1 x 12, 2 x 6, and 3 x 4 (6 total factors). On the other hand, 16's factors are 1 x 16, 2 x 8, and 4 x 4 (5 total factors). So lockers 1, 4, 9, 16, 25, etc... will all be open. Since 1,000,000 is a square number (1000 x 1000), it will be open as well.
93.70 %
40 votes

interviewlogic

Which came first into the wolrd, the chicken or the egg?

One day a scholar came to the court of Emperor Akbar and challenged Birbal to answer his questions and thus prove that he was as clever as people said he was. He asked Birbal: "Would you prefer to answer a hundred easy questions or just a single difficult one?" Both the emperor and Birbal had had a difficult day and were impatient to leave. "Ask me one difficult question," said Birbal. "Well, then tell me," said the man, "which came first into the world, the chicken or the egg?" "The chicken," replied Birbal, very confidently. "How do you know?" asked the scholar, a note of triumph in his voice. What did Birbal answer to this?
Birbal told the scholar, "We had agreed you would ask only one question and you have already asked it" and he and the emperor walked away leaving the scholar gaping.
94.11 %
43 votes

cleanlogicshort

Four daughters

Mr. Smith has 4 daughters. Each of his daughters has a brother. How many children does Mr. Smith have?
He has 5 children, all of the daughters have the same 1 brother.
89.58 %
40 votes

logic

Identifying a computer's password

A man worked for a high-security institution, and one day he went in to work only to find that he could not log in to his computer terminal. His password wouldn't work. Then he remembered that the passwords are reset every month for security purposes. So he went to his boss and they had this conversation: Man-"Hey boss, my password is out of date." Boss-"Yes, that's right. The password is different, but if you listen carefully you should be able to figure out the new one: It has the same amount of letters as your old password, but only four of the letters are the same." Man: "Thanks boss." With that, he went and correctly logged into his station. What was the new password? BONUS: What was his old password? HINT: It is nine letters long. Also, a "password" can be more than one word...
The old one was: Out of date The new one is: Different He said: My password is "Out of date." And the boss told him the new one when he said: "The password is different."
91.55 %
50 votes