Best long difficult riddles

cleanlogicstory

100 men are in a room, each wearing either a white or black hat. Nobody knows the color of his own hat, although everyone can see everyone else's hat. The men are not allowed to communicate with each other at all (and thus nobody will ever be able to figure out the color of his own hat). The men need to line up against the wall such that all the men with black hats are next to each other, and all the men with white hats are next to each other. How can they do this without communicating? You can assume they came up with a shared strategy before coming into the room.
The men go to stand agains the wall one at a time. If a man goes to stand against the wall and all of the men already against the wall have the same color hat, then he just goes and stands at either end of the line. However, if a man goes to stand against the wall and there are men with both black and white hats already against the wall, he goes and stands between the two men with different colored hats. This will maintain the state that the line contains men with one colored hats on one side, and men with the other colored hats on the other side, and when the last man goes and stands against the wall, we'll still have the desired outcome.
72.48 %
120 votes
logicmath

A women walks into a bank to cash out her check. By mistake the bank teller gives her dollar amount in change, and her cent amount in dollars. On the way home she spends 5 cents, and then suddenly she notices that she has twice the amount of her check. How much was her check amount?
The check was for dollars 31.63. The bank teller gave her dollars 63.31 She spent .05, and then she had dollars 63.26, which is twice the check. Let x be the dolars of the check, and y be the cent. The check was for 100x + y cent He was given 100y + x cent Also 100y + x - 5 = 2(100x + y) Expanding this out and rearranging, we find: 98y = 199x + 5 Which doesn't look like enough information to solve the problem except that x and y must be whole numbers, so: 199x ≡ -5 (mod 98) 98*2*x + 3x ≡ -5 (mod 98) 3x ≡ -5 ≡ 93 (mod 98) This quickly leads to x = 31 and then y = 63 Alternative solution by substitution: 98y = 199x + 5 y = (199x + 5)/98 = 2x + (3x + 5)/98 Since x and y are whole numbers, so must be (3x + 5)/98. Call it z = (3x+5)/98 so 98z = 3x + 5, or 3x = 98z - 5 or x = (98z - 5)/3 or x = 32z-1 + (2z-2)/3. Since everything is a whole number, so must be (2z-2)/3. Call it w = (2z-2)/3, so 3w = 2z-2 so z = (3w+2)/2 or z = w + 1 + w/2. So w/2 must be whole, or w must be even. So try w = 2. Then z = 4. Then x = 129. Then y = 262. if you decrease y by 199 and x by 98, the answer is the same: y = 63 and x = 31.
72.45 %
65 votes
logicstoryclever

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.
72.39 %
103 votes
logiccleverstory

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.
72.33 %
69 votes
interviewlogicmath

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.
72.29 %
115 votes
crazyfunnytricky

A man walks into a bar and asks the bartender for a glass of water. The bartender reaches under the bar and brings out a gun and aims it at the man. The man says thank you and leaves. What happened?
The man had the hiccups and the water helped him stop it, and the gun scared him which also help stop his hiccups as well.
72.26 %
90 votes
logicmathclever

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.
72.26 %
90 votes
logicmathstory

The owner of a banana plantation has a camel. He wants to transport his 3000 bananas to the market, which is located after the desert. The distance between his banana plantation and the market is about 1000 kilometer. So he decided to take his camel to carry the bananas. The camel can carry at the maximum of 1000 bananas at a time, and it eats one banana for every kilometer it travels. What is the most bananas you can bring over to your destination?
First of all, the brute-force approach does not work. If the Camel starts by picking up the 1000 bananas and try to reach point B, then he will eat up all the 1000 bananas on the way and there will be no bananas left for him to return to point A. So we have to take an approach that the Camel drops the bananas in between and then returns to point A to pick up bananas again. Since there are 3000 bananas and the Camel can only carry 1000 bananas, he will have to make 3 trips to carry them all to any point in between. When bananas are reduced to 2000 then the Camel can shift them to another point in 2 trips and when the number of bananas left are <= 1000, then he should not return and only move forward. In the first part, P1, to shift the bananas by 1Km, the Camel will have to Move forward with 1000 bananas – Will eat up 1 banana in the way forward Leave 998 banana after 1 km and return with 1 banana – will eat up 1 banana in the way back Pick up the next 1000 bananas and move forward – Will eat up 1 banana in the way forward Leave 998 banana after 1 km and return with 1 banana – will eat up 1 banana in the way back Will carry the last 1000 bananas from point a and move forward – will eat up 1 banana Note: After point 5 the Camel does not need to return to point A again. So to shift 3000 bananas by 1km, the Camel will eat up 5 bananas. After moving to 200 km the Camel would have eaten up 1000 bananas and is now left with 2000 bananas. Now in the Part P2, the Camel needs to do the following to shift the Bananas by 1km. Move forward with 1000 bananas – Will eat up 1 banana in the way forward Leave 998 banana after 1 km and return with 1 banana – will eat up this 1 banana in the way back Pick up the next 1000 bananas and move forward – Will eat up 1 banana in the way forward Note: After point 3 the Camel does not need to return to the starting point of P2. So to shift 2000 bananas by 1km, the Camel will eat up 3 bananas. After moving to 333 km the camel would have eaten up 1000 bananas and is now left with the last 1000 bananas. The Camel will actually be able to cover 333.33 km, I have ignored the decimal part because it will not make a difference in this example. Hence the length of part P2 is 333 Km. Now, for the last part, P3, the Camel only has to move forward. He has already covered 533 (200+333) out of 1000 km in Parts P1 & P2. Now he has to cover only 467 km and he has 1000 bananas. He will eat up 467 bananas on the way forward, and at point B the Camel will be left with only 533 Bananas.
72.17 %
98 votes
logicstoryclever

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.
72.14 %
77 votes
cleanlogicmath

A 400 yard long train, travelling at 30 mph, enters a 4.5 mile long tunnel. How long will elapse between the moment the front of the train enters the tunnel and the moment the end of the train clears the tunnel?
9 minutes and 27.2727 seconds.
72.05 %
51 votes