Logic riddles

logic

3 Lightbulb switches

There are 3 switches outside of a room, all in the 'off' setting. One of them controls a lightbulb inside the room, the other two do nothing. You cannot see into the room, and once you open the door to the room, you cannot flip any of the switches any more. Before going into the room, how would you flip the switches in order to be able to tell which switch controls the light bulb?
Flip the first switch and keep it flipped for five minutes. Then unflip it, and flip the second switch. Go into the room. If the lightbulb is off but warm, the first switch controls it. If the light is on, the second switch controls it. If the light is off and cool, the third switch controls it.
93.98 %
42 votes

logic

Coins on a table

Your friend pulls out a perfectly circular table and a sack of quarters, and proposes a game. "We'll take turns putting a quarter on the table," he says. "Each quarter must lay flat on the table, and cannot sit on top of any other quarters. The last person to successfully put a quarter on the table wins." He gives you the choice to go first or second. What should you do, and what should your strategy be to win?
You should go first, and put a quarter at the exact center of the table. Then, each time your opponent places a quarter down, you should place your next quarter in the symmetric position on the opposite side of the table. This will ensure that you always have a place to set down our quarter, and eventually your oppponent will run out of space.
94.36 %
45 votes

logic

Twelve balls, one different

You have twelve balls, identical in every way except that one of them weighs slightly less or more than the balls. You have a balance scale, and are allowed to do 3 weighings to determine which ball has the different weight, and whether the ball weighs more or less than the other balls. What process would you use to weigh the balls in order to figure out which ball weighs a different amount, and whether it weighs more or less than the other balls?
Take eight balls, and put four on one side of the scale, and four on the other. If the scale is balanced, that means the odd ball out is in the other 4 balls. Let's call these 4 balls O1, O2, O3, and O4. Take O1, O2, and O3 and put them on one side of the scale, and take 3 balls from the 8 "normal" balls that you originally weighed, and put them on the other side of the scale. If the O1, O2, and O3 balls are heavier, that means the odd ball out is among these, and is heavier. Weigh O1 and O2 against each other. If one of them is heavier than the other, this is the odd ball out, and it is heavier. Otherwise, O3 is the odd ball out, and it is heavier. If the O1, O2, and O3 balls are lighter, that means the odd ball out is among these, and is lighter. Weigh O1 and O2 against each other. If one of them is lighter than the other, this is the odd ball out, and it is lighter. Otherwise, O3 is the odd ball out, and it is lighter. If these two sets of 3 balls weigh the same amount, then O4 is the odd ball out. Weight it against one of the "normal" balls from the first weighing. If O4 is heavier, then it is heavier, if it's lighter, then it's lighter. If the scale isn't balanced, then the odd ball out is among these 8 balls. Let's call the four balls on the side of the scale that was heavier H1, H2, H3, and H4 ("H" for "maybe heavier"). Let's call the four balls on the side of the scale that was lighter L1, L2, L3, and L4 ("L" for "maybe lighter"). Let's also call each ball from the 4 in the original weighing that we know aren't the odd balls out "Normal" balls. So now weigh [H1, H2, L1] against [H3, L2, Normal]. -If the [H1, H2, L1] side is heavier (and thus the [H3, L2, Normal] side is lighter), then this means that either H1 or H2 is the odd ball out and is heavier, or L2 is the odd ball out and is lighter. -So measure [H1, L2] against 2 of the "Normal" balls. -If [H1, L2] are heavier, then H1 is the odd ball out, and is heavier. -If [H1, L2] are lighter, then L2 is the odd ball out, and is lighter. -If the scale is balanced, then H2 is the odd ball out, and is heavier. -If the [H1, H2, L1] side is lighter (and thus the [H3, L2, Normal] side is heavier), then this means that either L1 is the odd ball out, and is lighter, or H3 is the odd ball out, and is heavier. -So measure L1 and H3 against two "normal" balls. -If the [L1, H3] side is lighter, then L1 is the odd ball out, and is lighter. -Otherwise, if the [L1, H3] side is heavier, then H3 is the odd ball out, and is heavier. If the [H1, H2, L1] side and the [H3, L2, Normal] side weigh the same, then we know that either H4 is the odd ball out, and is heavier, or one of L3 or L4 is the odd ball out, and is lighter. So weight [H4, L3] against two of the "Normal" balls. If the [H4, L3] side is heavier, then H4 is the odd ball out, and is heavier. If the [H4, L3] side is lighter, then L3 is the odd ball out, and is lighter. If the [H4, L3] side weighs the same as the [Normal, Normal] side, then L4 is the odd ball out, and is lighter.
94.36 %
45 votes

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.70 %
40 votes

logic

Measuring Gallons of Water

You have two jugs, one that holds exactly 3 gallons, and one that holds exactly 5 gallons. Using just these two jugs and a fire hose, how can you measure out exactly 4 gallons of water?
Fill the 5-gallon jug to the top, and then pour it into the 3-gallon jug until the 3-gallon jug is full. You now have 2 gallons remaining in the 5-gallon jug. Pour out the 3-gallon jug, and then pour the 2 gallons from the 5-gallon jug into the 3-gallon jug. Finally, fill the 5-gallon jug to the top and pour it into the 3-gallon jug until it's full. Since there was only space left for 1 more gallon in the 3-gallon jug, you now have exactly 4 gallons in the 5-gallon jug.
93.39 %
38 votes

logicmath

Pizza

How can you divide a pizza into 8 equal slices using only 3 straight cuts?
Cut 1: Cut the pizza straight down the middle into two halves. Cut 2: Keeping the two halves in the place, cut the pizza straight down the middle at right angles to the first cut (you will be left with 4 equal quarters) Cut 3: Pile the 4 quarters on top of each other and cut through the middle of the pile. You will be left with 8 equal slices.
93.05 %
36 votes

logic

Egg challenge

An egg has to fall 100 feet, but it can't break upon landing (or in the air). Its fall can't be slowed down, nor can its landing be cushioned in any way. How is it done?
Drop it from more than 100 feet high. It won't break for the first 100 feet.
93.39 %
38 votes

logic

Traveling all over the world

A man named Stewart is traveling all over the world. First he travels to Cape Town in South Africa. Then to Jakarta in Indonesia. Then to Canberra in Australia. Then to Rome in Italy. Then to Panama City in Panama. Where does he travel next?
Santiago in Chile. He travels to each continent in alphabetical order then to the capital of the country that has the most southern latitude.
93.05 %
36 votes

logic

Two Japanese people

Two Japanese people who have never seen each other meet at the New York Japanese Embassy. They decide to have drinks together at a nearby bar. One of them is the father of the other one's son. How is this possible?
The Japanese are husband and wife and both blind since birth.
92.67 %
34 votes

logic

A liar and a truth teller

You are walking down a path when you come to two doors. Opening one of the doors will lead you to a life of prosperity and happiness, while opening the other door will lead to a life of misery and sorrow. You don't know which door leads to which life. In front of the doors are two twin brothers who know which door leads where. One of the brothers always lies, and the other always tells the truth. You don't know which brother is the liar and which is the truth-teller. You are allowed to ask one single question to one of the brothers (not both) to figure out which door to open. What question should you ask?
Ask "If I asked your brother what the good door is, what would he say?" If you ask the truth-telling brother, he will point to the bad door, because this is what the lying brother would point to. Alternatively, if you ask the lying brother, he will also point to the bad door, because this is NOT what the truth-telling brother would point to. So whichever door is pointed to, you should go through the other one.
93.22 %
37 votes