Logic riddles

logic

Same Number of Handshakes

At a dinner party, many of the guests exchange greetings by shaking hands with each other while they wait for the host to finish cooking. After all this handshaking, the host, who didn't take part in or see any of the handshaking, gets everybody's attention and says: "I know for a fact that at least two people at this party shook the same number of other people's hands." How could the host know this? Note that nobody shakes his or her own hand.
Assume there are N people at the party. Note that the least number of people that someone could shake hands with is 0, and the most someone could shake hands with is N-1 (which would mean that they shook hands with every other person). Now, if everyone at the party really were to have shaken hands with a different number of people, then that means somone must have shaken hands with 0 people, someone must have shaken hands with 1 person, and so on, all the way up to someone who must have shaken hands with N-1 people. This is the only possible scenario, since there are N people at the party and N different numbers of possible people to shake hands with (all the numbers between 0 and N-1 inclusive). But this situation isn't possible, because there can't be both a person who shook hands with 0 people (call him Person 0) and a person who shook hands with N-1 people (call him Person N-1). This is because Person 0 shook hands with nobody (and thus didn't shake hands with Person N-1), but Person N-1 shook hands with everybody (and thus did shake hands with Person 0). This is clearly a contradiction, and thus two of the people at the party must have shaken hands with the same number of people.
93.39 %
38 votes

funnylogic

Hippopotamus, rhino and elephant

Presume that you do not know what a rhino looks like. Now the question goes like this: If one day while walking in a forest with two of your close friends, one friend shows you an elephant and tells that this is a rhino, and another friend shows you a hippopotamus and tells you that this is rhino, who would you believe and why?
I told you that you do not know what a rhino looks like, not that you are unaware of what a hippo and elephant look like. So you shouldn't believe either of them.
93.98 %
42 votes

logic

Two tape recorders

Marty and Jill want to copy three 60 minute tapes. They have two tape recorders that will dub the tapes for them, so they can do two at a time. It takes 30 minutes for each side to complete; therefore in one hour two tapes will be done, and in another hour the third will be done. Jill says all three tapes can be made in 90 minutes. How?
Jill will rotate the three tapes. Let's call them tapes 1,2, and 3 with sides A and B. In the first 30 minutes they will tape 1A and 2A, in the second 3 minutes they will tape 1B and 3A (Tape 1 is now done). Finally, in the last 30 minutes, they will tape 2B and 3B.
93.22 %
37 votes

logicshort

The Missing Servant

A king has 100 identical servants, each with a different rank between 1 and 100. At the end of each day, each servant comes into the king's quarters, one-by-one, in a random order, and announces his rank to let the king know that he is done working for the day. For example, servant 14 comes in and says "Servant 14, reporting in." One day, the king's aide comes in and tells the king that one of the servants is missing, though he isn't sure which one. Before the other servants begin reporting in for the night, the king asks for a piece of paper to write on to help him figure out which servant is missing. Unfortunately, all that's available is a very small piece that can only hold one number at a time. The king is free to erase what he writes and write something new as many times as he likes, but he can only have one number written down at a time. The king's memory is bad and he won't be able to remember all the exact numbers as the servants report in, so he must use the paper to help him. How can he use the paper such that once the final servant has reported in, he'll know exactly which servant is missing?
When the first servant comes in, the king should write down his number. For each other servant that reports in, the king should add that servant's number to the current number written on the paper, and then write this new number on the paper. Once the final servant has reported in, the number on the paper should equal (1 + 2 + 3 + ... + 99 + 100) - MissingServantsNumber Since (1 + 2 + 3 + ... + 99 + 100) = 5050, we can rephrase this to say that the number on the paper should equal 5050 - MissingServantsNumber So to figure out the missing servant's number, the king simply needs to subtract the number written on his paper from 5050: MissingServantsNumber = 5050 - NumberWrittenOnThePaper
87.71 %
46 votes

logicshortwhat am I

It will follow you

If will follow you for 1000 miles but not miss home. It desires neither food nor flowers. It fears not water, fire, knives, nor soldiers. But it disappears when the sun sets behind the western mountains. Who Am I?
Shadow.
90.67 %
45 votes

logicmystery

Two Hourglasses

You have two sand hourglasses, one that measures exactly 4 minutes and one that measures exactly 7 minutes. You need to measure out exactly 2 minutes to boil an egg. Using only these two hourglasses, how can you measure out exactly 2 minutes to boil your egg?
Flip over both hourglasses at the same time. After 4 minutes, the 4-minute hourglass will be done, and there will be 3 minutes left in the 7-minute hourglass. Immediately flip the 4-minute hourglass over again. After 3 more minutes, the 7-minute hourglass will be done, and there will be exactly 1 minute left in the 4-minute hourglass. Immediately flip the 7-minute hourglass over again. After 1 more minute, the 4-minute hourglass will be done again, and there will be exactly 6 minutes left in the 7-minute hourglass. Immediately flip over the 4-minute hourglass. After 4 more minutes, the 4-minute hourglass will be done again, and there will be exactly 2 minutes left in the 7-minute hourglass. At this point, put your egg in the boiling water. When the 7-minute hourglass is done, it will have been exactly 2 more minutes, and your egg will have boiled just right.
91.55 %
50 votes

logic

A Liar OR a Truth Teller

You're walking down a path and come to two doors. One of the doors leads to a life of prosperity and happiness, and the other door leads to a life of misery and sorrow. You don't know which door is which. In front of the door is ONE man. You know that this man either always lies, or always tells the truth, but you don't know which. The man knows which door is which. You are allowed to ask the man ONE yes-or-no question to figure out which door to go through. To make things more difficult, the man is very self-centered, so you are only allowed to ask him a question about what he thinks or knows; your question cannot involve what any other person or object (real or hypothetical) might say. What question should you ask to ensure you go through the good door?
You should ask: "If I asked you if the good door is on the left, would you say yes?" Notice that this is subtly different than asking "Is the good door on the left?", in that you are asking him IF he would say yes to that question, not what his answer to the question would be. Thus you are asking a question about a question, and if it ends up being the liar you are talking to, this will cause him to lie about a lie and thus tell the truth. The four possible cases are: The man is a truth-teller and the good door is on the left. He will say "yes". The man is a truth-teller and the good door is on the right. He will say "no". The man is a liar and the good door is on the left. He will say "yes" because if you asked him "Is the good door on the left?", he would lie and say "no", and so when you ask him if he would say "yes", he will lie and say "yes". The man is a liar and the good door is on the right. Similar to the previous example, he'll say "no". So regardless of whether the man is a truth-teller or a liar, this question will get a "yes" if the door on the left is the good door, and a "no" if it's not.
93.98 %
42 votes

logic

25 Horses

You have 25 horses. When they race, each horse runs at a different, constant pace. A horse will always run at the same pace no matter how many times it races. You want to figure out which are your 3 fastest horses. You are allowed to race at most 5 horses against each other at a time. You don't have a stopwatch so all you can learn from each race is which order the horses finish in. What is the least number of races you can conduct to figure out which 3 horses are fastest?
You need to conduct 7 races. First, separate the horses into 5 groups of 5 horses each, and race the horses in each of these groups. Let's call these groups A, B, C, D and E, and within each group let's label them in the order they finished. So for example, in group A, A1 finished 1st, A2 finished 2nd, A3 finished 3rd, and so on. We can rule out the bottom two finishers in each race (A4 and A5, B4 and B5, C4 and C5, D4 and D5, and E4 and E5), since we know of at least 3 horses that are faster than them (specifically, the horses that beat them in their respective races). This table shows our remaining horses: A1 B1 C1 D1 E1 A2 B2 C2 D2 E2 A3 B3 C3 D3 E3 For our 6th race, let's race the top finishers in each group: A1, B1, C1, D1 and E1. Let's assume that the order of finishers is: A1, B1, C1, D1, E1 (so A1 finished first, E1 finished last). We now know that horse D1 cannot be in the top 3, because it is slower than C1, B1 and A1 (it lost to them in the 6th race). Thus, D2 and D3 can also not be in the to 3 (since they are slower than D1). Similarly, E1, E2 and E3 cannot be in the top 3 because they are all slower than D1 (which we already know isn't in the top 3). Let's look at our updated table, having removed these horses that can't be in the top 3: A1 B1 C1 A2 B2 C2 A3 B3 C3 We can actually rule out a few more horses. C2 and C3 cannot be in the top 3 because they are both slower than C1 (and thus are also slower than B1 and A1). And B3 also can't be in the top 3 because it is slower than B2 and B1 (and thus is also slower than A1). So let's further update our table: A1 B1 C1 A2 B2 A3 We actually already know that A1 is our fastest horse (since it directly or indirectly beat all the remaining horses). So now we just need to find the other two fastest horses out of A2, A3, B1, B2 and C1. So for our 7th race, we simply race these 5 horses, and the top two finishers, plus A1, are our 3 fastest horses.
94.11 %
43 votes