Best easy riddles

logicmath

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 10 14 First Player picks 14, now row of coins is 10 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: Example 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.
72.18 %
60 votes
logiccleanstory

One day a really rich old man with two sons died. In his will he said that he would give one of his sons all of his fortune. He gave each of his sons a horse and said they would compete in a horse race from Los Angeles to Sacramento, but the son whose horse came in second would get the money. So one day they started the race. After one whole day they had only ridden one mile. At night they decided they should stop at a hotel. While they were booking in they told their problem to the wise old clerk, who made a suggestion. The next day the two brothers rode as fast as they could. What did the clerk suggest that they do?
The clerk told them to swap horses. The father said that whoever's horse crossed the finish line second would get the money. He didn't say that the owner of the horse had to be on it.
72.17 %
98 votes
logiccleansimplestory

A guard is stationed at the entrance to a bridge. He is tasked to shoot anyone who tries to cross to the other side of the bridge, and to turn away anyone who comes in from the opposite side of the bridge. You are on his side of the bridge and want to escape to the other side. Because the bridge is old and rickety, anyone who tries to cross it does so at a constant speed, and it always takes exactly 10 minutes to cross. The guard comes out of his post every 6 minutes and looks down the bridge for any people trying to leave, and at all other times he sits in his post and snoozes. You know you can sneak past him when he's sleeping, but the problem is that you won't be able to make it all the way to the other side of the bridge before he sees you (since he comes out every 6 minutes, but it takes 10 minutes to cross). One day a brilliant idea comes to you, and soon you've successfully crossed to the other side of the bridge without being shot. How did you do it?
Right after the guard goes back to his post after checking the bridge, you sneak by and make your way down the bridge. After a little bit less than 6 minutes, you turn around and start walking back toward the guard. He will come out and see you, and assume that you are a visitor coming from the other side of the bridge, since you're only about 4 minutes from the end of the other side of the bridge. He will go back into his post since he doesn't plan to turn you away until you reach him, and then you turn back around and make your way the rest of the way to the other side of the bridge.
72.10 %
106 votes