Here is a puzzle that at first sight seems completely impossible, but it actually has a simple and elegant solution. It's just that the solution is not easy to see.
You are sitting by a table wearing a blindfold, and you are told that on the table are a large number of one pound coins, perhaps hundreds. You are also told that exactly 20 of these coins are tails up, and all the rest of them are heads up.
You can touch the coins, but it is not possible to determine which side of a coin is heads and which side is tails. You can move the coins around as much as you want, and you can turn over as many coins as you want. But you will remain blindfolded throughout the task.
Your problem is to put the coins into two piles with both piles containing exactly the same number of coins that are tails up. The number of coins in the two piles that are heads up is irrelevant.
As we said, the solution is very easy and elegant, once you have spotted it.
Move 20 coins to a separate pile and turn over all 20 of them. And you have solved it.
Say all 20 coins are heads up, meaning the 20 coins that are tails up are in the other pile. Once you have turned over the 20 coins there are 20 coins that are tails up in both piles.
If 19 of your coins are heads up and one is tails up, that leaves 19 coins that are tails up in the other pile. Turn over your pile and there are 19 tails-up coins in both piles.
And if you happened by some fluke to select the 20 coins that are tails up, after turning them over there are no tails-up coins in either pile.
It always works!