Two soldiers, William and Ethan, are assigned to guard a bridge, which connects the West and East sides of the Great Kingdom. Each soldier is ordered to stand at an end of the bridge to make sure no criminals cross.
On one side of the bridge stands William, watching over the West side of the kingdom, and making sure no shady characters try to cross the bridge.
Ethan stands on the other side of the bridge, facing the East side of the kingdom with his rifle at the ready in case any criminals try to pass across.
"Any criminals today?" William asks.
Ethan rolls his eyes. "What do you think?" he asks.
"You roll your eyes too much," William says.
How could William tell that Ethan was rolling his eyes?
William is on the east side of the bridge, facing the West side of the kingdom, while Ethan is on the west side of the bridge, facing the East side of the kingdom. So William and Ethan are facing each other, and can see each other's faces.
See also best riddles or new riddles.logicshort
Name the only sport in which the ball is always in possession of the team on defense, and the offensive team can score without touching the ball?
There are n coins in a line. (Assume n is even). Two players take turns to take a coin from one of the ends of the line until there are no more coins left. The player with the larger amount of money wins.
Would you rather go first or second? Does it matter?
Assume that you go first, describe an algorithm to compute the maximum amount of money you can win.
Note that the strategy to pick maximum of two corners may not work. In the following example, first player looses the game when he/she uses strategy to pick maximum of two corners.
Example 18 20 15 30 10 14
First Player picks 18, now row of coins is
20 15 30 10 14
Second player picks 20, now row of coins is
15 30 10 14
First Player picks 15, now row of coins is
30 10 14
Second player picks 30, now row of coins is
First Player picks 14, now row of coins is
Second player picks 10, game over.
The total value collected by second player is more (20 + 30 + 10) compared to first player (18 + 15 + 14). So the second player wins.
Going first will guarantee that you will not lose. By following the strategy below, you will always win the game (or get a possible tie).
(1) Count the sum of all coins that are odd-numbered. (Call this X)
(2) Count the sum of all coins that are even-numbered. (Call this Y)
(3) If X > Y, take the left-most coin first. Choose all odd-numbered coins in subsequent moves.
(4) If X < Y, take the right-most coin first. Choose all even-numbered coins in subsequent moves.
(5) If X == Y, you will guarantee to get a tie if you stick with taking only even-numbered/odd-numbered coins.
You might be wondering how you can always choose odd-numbered/even-numbered coins. Let me illustrate this using an example where you have 6 coins:
18 20 15 30 10 14
Sum of odd coins = 18 + 15 + 10 = 43
Sum of even coins = 20 + 30 + 14 = 64.
Since the sum of even coins is more, the first player decides to collect all even coins. He first picks 14, now the other player can only pick a coin (10 or 18). Whichever is picked the other player, the first player again gets an opportunity to pick an even coin and block all even coins.cleanlogic
A man wanted to enter an exclusive club but did not know the password that was required. He waited by the door and listened. A club member knocked on the door and the doorman said, "twelve." The member replied, "six " and was let in. A second member came to the door and the doorman said, "six." The member replied, "three" and was let in. The man thought he had heard enough and walked up to the door. The doorman said ,"ten" and the man replied, "five." But he was not let in. What was the right answer then?
Three. The doorman lets in those who answer with the number of letters in the word the doorman says.funnylogicwhat am I
What am I?
Without looking at a calendar, within a minute name a boys name using 5 consecutive first letters of 5 consecutive months.
JASON - July August September October November.logicshort
John Heysham Gibbon was most renowned surgeon of 1940-1970. More than 90% of his surgeries he performed are highly successful and still almost all of his patients die.
The surgery was performed way back, by now approx 90% of them have died by old age.animalcleanfunnylogicshort
August was the name of a puppy who was always picking on larger animals. One day he got into an argument with a lion. The next day was the first day of September. Why?
Because that was the last of August.logic
A man comes to a small hotel where he wishes to stay for 7 nights. He reaches into his pockets and realizes that he has no money, and the only item he has to offer is a gold chain, which consists of 7 rings connected in a row (not in a loop).
The hotel proprietor tells the man that it will cost 1 ring per night, which will add up to all 7 rings for the 7 nights.
"Ok," the man says. "I'll give you all 7 rings right now to pre-pay for my stay."
"No," the proprietor says. "I don't like to be in other people's debt, so I cannot accept all the rings up front."
"Alright," the man responds. "I'll wait until after the seventh night, and then give you all of the rings."
"No," the proprietor says again. "I don't like to ever be owed anything. You'll need to make sure you've paid me the exact correct amount after each night."
The man thinks for a minute, and then says "I'll just cut each of my rings off of the chain, and then give you one each night."
"I do not want cut rings," the proprietor says. "However, I'm willing to let you cut one of the rings if you must."
The man thinks for a few minutes and then figures out a way to abide by the proprietor's rules and stay the 7 nights in the hotel. What is his plan?
The man cuts the ring that is third away from the end of the chain. This leaves him with 3 smaller chains of length 1, 2, and 4. Then, he gives rings to the proprietor as follows:
After night 1, give the proprietor the single ring
After night 2, take the single ring back and give the proprietor the 2-ring chain
After night 3, give the proprietor the single ring, totalling 3 rings with the proprietor
After night 4, take back the single ring and the 2-ring chain, and give the proprietor the 4-ring chain
After night 5, give the proprietor the single ring, totalling 5 rings with the proprietor
After night 6, take back the single ring and give the proprietor the 2-ring chain, totalling 6 rings with the proprietor
After night 7, give the proprietor the single ring, totalling 7 rings with the proprietorlogic
You die and the devil says he'll let you go to heaven if you beat him in a game. The devil sits you down at a perfectly round table. He gives himself and you an infinite pile of quarters. He says, "OK, we'll take turns putting one quarter down, no overlapping allowed, and the quarters must rest flat on the table surface. The first guy who can't put a quarter down loses." You guys are about to start playing, and the devil says that he'll go first. However, at this point you immediately interject, and ask if you can go first instead. You make this interjection because you are very smart and can place quarters perfectly, and you know that if you go first, you can guarantee victory. Explain how you can guarantee victory.
You place a quarter right in the center of the table. After that, whenever the devil places a quarter on the table, mimic his placement on the opposite side of the table.. If he has a place to place a quarter, so will you. The devil will run out of places to put a quarter before you do. logicshort
If you were to put a coin into an empty bottle and then insert a cork into the neck, how could you remove the coin without taking out the cork or breaking the bottle?
Push the cork into the bottle and shake the coin out.