Quote:

Originally Posted by

**mdl**
You are given 99 coins that are heads up, and an unknown number of coins that are tails up. You are blindfolded and somehow can't feel the difference between the heads and tails sides of the coins. You can count the coins, put them in arbitrary many piles, flip whichever coins you want, but remember, when you flip and when you sort, you DO NOT know which ones are heads up, which are tails up. In the end, you must end up with just two piles, each containing an equal number of heads. How do you do this?

I struggled with this one for awhile but then I realized I was misreading it as saying "and an unknown number of coins that are heads or tails up." *But it just says "tails up."*

Duh.

And all we care about in the end is that the number that are heads up is the same - we don't care about how many are tails up in either of the piles. I also think people get confused by the number 99 being odd…

But anyway: since 99 coins are heads up, we have this:

**Coin Side** |
**Number** |

Heads |
99 |

Tails |
??? |

You can do this in two moves, I believe.

First, pull out 99 coins into Pile B (we'll call the original pile Pile A).

Pile B will contain X heads up coins. This is the number, of the 99, that are heads up.

Pile A will contain 99 - X heads up coins. It started with 99, and we remove between 0 and 99 heads up coins.

Since we don't care at all about the tails, we can look at the heads up only, and we have:

**Pile A** |
**Pile B** |

Before: 99 coins heads up |
Before: 0 coins heads up |

After: 99-X coins heads up |
After: 99 coins, X heads up |

For the heck of it, let's just say we took out 66 heads up coins. That means we also pulled out 33 tails up coins. That would make the tables look like this:

**Pile A** |
**Pile B** |

99-66, leaving 33 coins heads up |
66 heads up, 33 tails up |

The red gives away the answer. Flip all 99 coins in Pile B. The number of tails up in Pile B equals the number of heads up that you started with (99) minus the number of heads up that you took away (i.e. what remains in Pile A).

It works for any number from 0 to 99. If you pull 99 coins over that are tails up, flip them all, they'll match the original 99 heads up coins that you somehow avoided getting into Pile B. If you pull all 99 coins that are heads up, you'll flip them all to tails up, and the number of heads will be 0.

If you pull 98 heads over, leaving one in Pile A, the one tails up coin will be converted. If you pull 1 heads over, leaving 98 in Pile A, the 98 tails that came with it will convert.

The only way this fails - because you can't create two piles using my method - is if there are ONLY 99 heads up coins and NO tails up coins to start… but even then you'll have 0 heads up.