Gold and Nickel

You have 15 identical coins – 2 of them made of pure gold and the other 13 made of nickel (covered with thin gold layer to mislead you). You also have a gold detector, with which you can detect if in any group of coins, there is at least one gold coin or not. How can you find the pure gold coins with only 7 uses of the detector?

First, we note that if we have 1 gold ball only, then we need:

  • 1 measurement in a group of 2 balls
  • 2 measurements in a group of 4 balls
  • 3 measurements in a group of 8 balls

Start by measuring 1, 2, 3, 4, 5.

  1. If there are gold balls in the group, then measure 6, 7, 8, 9, 10, 11.
    • If there are gold balls in the group, then measure 5, 6, 7.
      • If there are no gold balls among them, then there is a gold ball among 1, 2, 3, 4, and a gold ball among 8, 9, 10, 11, so we can find the gold balls with the remaining 2 measurements.
      • If there are gold balls in 5, 6, 7, then measure 5, 8, 9. If there are gold balls there, then 5 must be gold, and we can find the other gold ball among 6, 7, 8, 9, 10, 11 with the remaining 3 measurements. If there is no gold ball among 5, 8, 9, then there is a gold ball among 1, 2, 3, 4, and a gold ball among 6, 7, so again we can find them with only 3 measurements.
    • If there are no gold balls in the group, then measure 5, 12, 13.
      • If there are no gold balls among them, then measure 14, 15. If none of them is gold, then measure individually 1, 2, and 3 to find which are the 2 gold balls among 1, 2, 3, 4. Otherwise, there is a gold ball among 1, 2, 3, 4, and among 14, 15, and we can find them with the remaining 3 measurements.
      • If there are gold balls among 5, 12, 13, then measure 5, 14, 15. If none of them is gold, then there is a gold ball among 1, 2, 3, 4, and a gold ball among 12, 13, so we can find them with 3 measurements. Otherwise, 5 is gold, and again we can find the other gold ball among 1, 2, 3, 4, 12, 13, 14, 15 with 3 measurements.
  2. If there are no gold balls among 1, 2, 3, 4, 5, then we measure 6, 7, 8.
    • If there are gold balls in the group, then measure 9, 10, 11, 12, 13.
      • If there are no gold balls among them, we measure individually 6, 7, 8, 14.
      • If there is a gold ball among 9, 10, 11, 12, 13, then there is another one among 6, 7, 8. We measure 8, 9. If none of them is gold, then we can find the gold among 6, 7, and the gold among 10, 11, 12, 13, with 3 measurements total. If there is a gold ball among 8, 9, then we measure 10, 11, 12, 13. If none of them is gold, then 9 is gold and we find the other gold ball among 6, 7, 8 with 2 more measurements. If there is a gold ball among 10, 11, 12, 13, then we can find it with 2 measurements. The other gold ball must be 8.
    • If there are no gold balls in the group, then measure 9, 10.
      • If there are no gold balls among them, then measure individually 11, 12, 13, 14.
      • If there are gold balls among 9, 10, then measure 11, 12, 13, 14. If there is a gold ball among them, then there is another one among 9, 10, and we can find them both with 3 measurements. Otherwise, we measure 9 and 10 individually.

Students with Hats

Professor Vivek decided to test three of his students, Frank, Gary and Henry. The teacher took three hats, wrote on each hat a positive integer, and put the hats on the heads of the students. Each student could see the numbers written on the hats of the other two students but not the number written on his own hat.

The teacher said that one of the numbers is sum of the other two and started asking the students:

— Frank, do you know the number on your hat?
— No, I don’t.
— Gary, do you know the number on your hat?
— No, I don’t.
— Henry, do you know the number on your hat?
— Yes, my number is 5.

What were the numbers which the teacher wrote on the hats?

The numbers are 2, 3, and 5. First, we check that these numbers work.

Indeed, Frank would not be able to figure out whether his number is 2 or 8. Then, Gary would not be able to figure out whether his number is 3 or 7, since with numbers 2, 7, 5, Frank still would not have been able to figure his number out. Finally, Henry can conclude that his number is 5, because if it was 1, then Gary would have been able to conclude that his number is 3, due to Frank’s inability to figure his number out.

Next, we we check that there are no other solutions. We note that if the numbers are 1, 4, 3, or 3, 2, 1, or 4, 1, 3, neither Frank nor Gary would have been able to figure their number out. Therefore, if the numbers were 1, 4, 5, or 3, 2, 5, or 4, 1, 5, Henry would not have been able to figure his number out. Thus, 5 is not the largest number.

Similarly, if the numbers are X, X + 5, X + 10, or X + 5, X, X + 10, once again, neither Frank nor Gary would have been able to figure their number out. Therefore, if the numbers were X, X + 5, 5, or X + 5, X, 5, Henry would not have been able to figure his number out.

The Ping Pong Puzzle

Three friends – A, B, and C, are playing ping pong. They play the usual way – two play at a time, the winner stays on the table, the loser lets the third one play. If you know that A played 10 matches in total, B played 15 matches in total, and C played 17 matches in total, who lost the second game?

A lost it. Since there have been (10 + 15 + 17) / 2 = 21 games played in total, and each player never misses 2 games in a row, the only way for A to play just 10 games is if he plays the 2nd, 4th, 6th, etc. games, and every time loses.

The Troll Brothers

There are four troll brothers – Wudhor, Xhaqan, Yijlob, and Zrowag.

  • Wudhor always says the truth.
  • Xhaqan always lies.
  • Yijlob lies or says the truth unpredictably.
  • Zrowag is deaf and never answers.

You must ask these brothers four YES/NO questions (one troll per question), and figure out their names. What questions would you ask?

Coming soon.

Source:

Puzzling StackExchange

Shuffling Cards

52 cards – 2 of clubs to Ace of clubs, 2 of diamonds to Ace of diamonds, 2 of hearts to Ace of hearts, and 2 of spades to Ace of spades – are arranged in a deck. We shuffle them in the following manner:

  • We take the top card and put in a random place inside the deck.
  • Once we get to the King of spades and put it somewhere in the deck, we stop.

Show that this method shuffles the deck uniformly, i.e. every permutation has the same chance to appear.

Notice that at all times the cards below the King of spades are shuffled uniformly. Therefore at the end, after we put the King of spades in a random place inside the deck, the entire shuffle will be uniform as well.