Flipping Miracles (or Bar Bets to Amaze Your Friends)

Do you like a little cream in your coffee, or are you one of those people who likes a little coffee in your cream?

In front of you is a pot of coffee and a jug of cream.


You transfer one teaspoon of cream from the jug to the pot, then one teaspoon of liquid from the pot back to the jug. Which is greater: the amount of coffee in the jug or the amount of cream in the pot?

Note that we didn't indicate whether any stirring or mixing took place, or how thorough it might have been if it did, nor are we suggesting that you drink either concoction. For simplicity, we are ignoring possible chemical interactions.

If you know the answer to that, try this bar bet. Ask a male friend to empty his pockets of pennies. A dozen or so coins spill onto the table.


Announce that in 10 seconds your friend may blindfold you and mix up the coins by moving them around on the table. You bet that without the benefit of vision, you will be able to separate them into two piles, each of which has the same number of tails showing. If you succeed, your friend buys your next drink, and if you fail, you buy his.

What do you do in those 10 seconds? You can look but not touch.

If you have a little more time on your hands and a patient audience, try the following. Put 15 scattered index cards, blank on both sides, and a pen on a table. Ask a spectator to point to the cards she wants you to write the word "wine" on, indicating that you'll write "water" on the others. Spread the cards out and have a photograph of this display taken.


You are left alone for five minutes, while your audience leaves to make coffee, with or without cream. When everyone comes back, it is confirmed, with the help of the photo, that the cards appear just as before. You are blindfolded or trusted to keep your eyes closed, and the index cards are mixed up. Without being able to see them, you must then separate the cards into two piles, in such a way that each pile contains the same number of visible "wine" cards.

What do you do in those five minutes to be able to pull this off? Crimping or bending is not an option; the cards must retain their flatness and be indistinguishable in the dark. If you happen to have written "wine" on seven (or any odd number) of them, at the suggestion of the spectator, the problem seems insurmountable. And it seems no easier if you start with eight or 10 "wine" cards, given that you can't see what's going on.

Solving the cream and coffee conundrum provides the insight required to nail the two problems that follow it above.

Another version is to have a large canister of black marbles and a smaller one of white marbles.


Transfer four marbles from the smaller container to the larger one, perhaps mixing them a little with the black marbles, then transfer any four marbles back. Are there now more white marbles in the large canister than there are black marbles in the small one, or the other way around?

The query sounds perfectly reasonable, but don't be fooled; it's a leading question. There is a third option not mentioned, which turns out to rule the day. In fact, the number of white marbles in the large canister is the same as the number of black marbles in the small one, regardless of how many white marbles were moved back to the smaller tub in the second transfer!

This can be checked by considering each of the five possible cases (zero, one, two, three or four white marbles among the four moved back), but there is a smarter way. First note that because there were four marbles moved each time, the two canisters end up with the same number of marbles in them as they started with. The number of "contaminant" white marbles in the large one at the end have therefore displaced an equal number of black marbles, which must now be in the smaller container.

The same logic works for the cream and coffee problem. Whatever part of a teaspoon of cream ends up in the coffee pot, it has displaced an equal quantity of coffee, which can only be in the cream jug. Forget bookkeeping at the molecular level! Elementary, my dear Watson.

Also, the relative volumes of the vessels considered is irrelevant. Sometimes these problems are presented assuming a same-size scenario, but that's best avoided, as the following anecdote confirms.

The missing link between those conundrums and the coins and index cards ones is a well-known card trick that a friend did for me in a bar about 15 years ago. Bill shuffled exactly half of a deck face-up into the other half face-down, then held the deck under the table before bringing forward two packets and having me check that both contained the same number of face-up cards. They did, but the count went to 11 in each case, yielding a total of only 22 face-up cards, so I knew that something transformational must have taken place while the deck was out of sight.


(He had made the mistake of advertizing that he started with 26 face-up cards. Depending on how much one has had to drink, starting with two equal-sized packets may lead one to expect equal numbers of face-up and face-down cards at the conclusion.)

Here's a better handling that is harder to fathom, based on Martin Gardner's adaptation of key ideas of Bob Hummer's from the 1940s. Take a deck of cards and hand them to Jane. Ask her to give you back about a third of the deck. Hold those cards under the table, pretending that you're "feeling them to get used to the difference between card faces and backs." What you really do is silently count them! Suppose there are 16. Now bring them forward, turn them over and shuffle them face-up into the remainder of the face-down deck. Hold the entire deck under the table and silently count off the top 16 cards while babbling that you're using your sensitive fingers to separate the cards (which is actually true). Bring the resulting two packets forward, discreetly flipping over the smaller 16-card one before it's in view. To the amazement of all, it can be checked that both packets have the same number of face-up cards.

Can you see how this is related to the cream and coffee or marble puzzles?

It's time to spill the beans: For the coin bar bet, what you do in the 10 seconds before you are blindfolded is silently note the number of tails that show among the coins.


In the picture shown there are three out of 11 coins. Once your eyes are covered (or simply closed) and the coins are mixed up, pat the tops, pretending to "get a feel for them." Then focus on any three of them and separate them from the rest. Finally, turn those three over! You can do the flipping openly or under cover of both hands. In any case, the result is two piles that are guaranteed to have the same number of tails showing. You've won the bet -- and that well-earned drink -- assuming your friend isn't complaining too loudly that you cheated. It's a flipping miracle: coin flipping with a certain outcome.

Why does it work in general? A little elementary algebra (gasp!) reveals all: Start with C coins, of which T are tails and C - T are heads, and mix them up, then separate them into:

Pile A, consisting of any T coins, of which some unknown number X are heads, the remaining T - X necessarily being tails.

Pile B, consisting of the other C - T coins.

Given that there are T tails in total, and T - X tails in Pile A, the other T - (T - X) = X tails must be in Pile B.

Flipping over Pile A therefore yields two piles with the same (unknown) number of tails.

Finally, we return to the index cards. Read the description of the problem again, carefully. You have time, and a pen. How can you make the index cards resemble the coins more closely? By writing "water" on the back of every "wine" card, and "wine" on the back of every "water" card! That's what you do during the five minutes you are left alone, being careful to put each card back on the table as you found it. It's time well spent.

If you started with seven "wine" cards, then after the cards are mixed, simply separate any seven cards from the rest and flip them over. When spread out, this pile will have the same number of "wine" cards as the remaining pile.

It's a question of turning "wine" into "water" and "water" into "wine," truly a miracle of biblical proportions!

If you are inclined to try additional bar bets, don't gamble on a fair coin coming up heads half the time on average. The coin image above is courtesy of Mathematical Tourist and inveterate blogger Ivars Peterson of the MAA. He is one of many people who know that some coins hold mysterious secrets.

You can't even be 100-percent sure that coins spilled on a hard surface will land heads or tails every time: Twice in my life I have seen one coin end up balanced on its edge in this situation. Some would argue that this last, frequently overlooked possibility is essentially what happened in the U.S. presidential election in Florida in 2000. The exact balance of votes for Gore vs. Bush there was never determined with certainty, each recount yielding different results, until the Supreme Court stopped the process. Declaring either candidate to be the winner in that state was highly problematic, if unavoidable.

There's not much new under the sun above. The index card problem as presented is from my chapter "Mathemagical Miracles" in the MAA book Expeditions in Mathematics.

Thanks to Spelman College's Dan Bascelli for graphics production and assistance. I took both card photos.