A fun card puzzle

I came across a good brain teaser at this site:

A pack of cards has 52 cards. You are in a dark room with this pack of cards. You have been told that inside the pack there are 42 cards facing down, 10 cards facing up.

You have been asked to reorganize this pack of cards into two decks – so that each deck contains an equal number of cards that face up. Remember, you are in the darkness and can’t see.

How will you do it?

This seems like an impossible logic puzzle, but it turns out there is a neat answer.

One hint is the two decks do not need to contain an equal number of cards. How do you solve it?

A bigger hint

If you could see which cards were face up, the puzzle would be trivial. The answer would be to simply take five face up cards and move them over to a new deck. Then both decks would have five cards that face up.

But the puzzle stipulates it’s dark and you cannot determine a card’s orientation. So you’ll need to be more clever in creating the new deck.

Even though you can’t tell if a card is face up, there is something else you can do. You don’t simply have to move a card over to a new deck. You can also flip the card over to the other side. This changes a card facing into one that faces down, and a card facing down into one that faces up. You won’t know the original or the final orientation, but you’ll know for sure the flip has changed it.

Thus you can move cards to the new deck and you can also choose whether to flip them. Can you solve the puzzle now?

The answer

Take any ten cards from the original deck. Create a new deck by flipping over each card one by one. The two decks will contain the same number of cards facing up.

Why is that?

Verifying this is a relatively simple counting exercise. Suppose, for example, the 10 cards you took consisted of three face up cards and seven face down cards. Since every face down card gets flipped in the new deck, the new deck will therefore consist of 7 face up cards. This exactly matches the original deck which has 7 remaining face up cards (since three face up cards were removed for the new deck).

The idea is this: removing a card and flipping it is a matching action. When you remove a face down card in the original deck, the number of face up cards is unaffected, which is matched by the new deck getting a face up card. When you remove a face up card, the number of face up cards is subtracted by one, which is matched by the new deck getting a face down card. By repeating the matching action ten times (the number of cards facing up in the original deck), you guarantee that both the new deck and the old deck will have the same number of face up cards.

The general proof goes something like this. Of the 10 cards you remove, suppose the number of face up cards removed is x. That leaves the original deck with 10 – x face up cards. Correspondingly the new deck contains those x cards with a face down orientation. Thus the remaining 10 – x are face up cards and the two decks match.

(You can extend the problem too. If the original deck had 15 face up cards, then you create a new deck by choosing 15 cards and flipping them over. The proof is analogous.)

Update: lots of fun comments to this post at Hacker News.

A comment I enjoyed: “The existentialist’s solution: throw all the cards in the trash and make two piles of zero.”



Share this post:

| More

Previous post:

Next post:



  • Joon

    I like that puzzle. When we were younger, I loved to solve things like this. Now, I find that I don’t have the patience for them…sigh.

  • http://www.stefanobernardi.com Stefano Bernardi

    This one’s just awesome! Thanks.

  • John

    My solution was simply to tear each card in half.

  • Lucas

    I solved it without hints on my own in like a minute. I rule!

  • http://digitalstain.blogspot.com Chris Gioran

    Very interesting, thanks.

    A generalization to an arbitrary count of face up/face down cards is this. Assume T total cards, with U of them facing up. Then, after U move-flips, the new pile has say u face up cards and d face down cards. The starting pile has U-d face up cards and it holds that u+d=U or u=U-d. QED.
    In what ways can this be generalized, I wonder?

  • dinesh tewari

    this one was really good. such puzzle are always challenging.thanks presh.

  • cjb

    I read this at work and wasn’t able to finish anything today. I went home and ignored my family while I tried to figure out the answer. It’s now 1.30am and I still can’t get it. Can you please post the answer?

  • http://harold.hotelling.net/ Harold

    Chris, your generalization is nice, but breaks when U is greater than half the deck. For that case, you can remove U cards from the deck and then flip the remaining cards. So with T cards where U are facing up, remove U cards and flip over the smaller stack. If U = T / 2, then you can flip either.

    This is going to make a great magic trick. Especially with some obfuscation thrown in. Take a volunteer and hand them a deck, have them blindfold you and turn you around. Have the volunteer flip over as many cards as they like but they must announce the card out loud, as in “the ace of clubs”. While that’s happening, you just have to count the # of flipped cards. Then have them shuffle the deck. Now have two more volunteers come up. Instead of just separating the deck by taking U cards and flipping one pile, hand cards (still blindfolded) to the two volunteers, alternating at random, until the cards are divided up between them. As you go, flip over the cards going to the volunteer who will get the smaller number. Have the volunteers count the face-up cards in their decks and write down the number, to be revealed together.

  • http://abhisheksainani.blogspot.com Abhishek Sainani

    Wow, this puzzle does have a neat solution! Nice !!

  • Parag

    Answer: Night vision goggles

    Alternatively, have a deck of cards from a casino where two of the opposite corners are cut off, so you can tell which ones are facing up/down just by feeling.

Previous post:

Next post: