[Math] Interview puzzle with a deck of cards, some cards upside-down

puzzlerecreational-mathematics

You are sitting in a dark room. It is completely dark. You can't see anything and there is no way that you can make light. Basically, just assume that you are blind for this task.

There is a table in front of you and you feel a deck of cards in your hand. Now the deck is shuffled. But not only shuffled, 18 cards out of the 53 are right-side up and the rest are upside down.

Your task is to separate the deck into 2 piles, which have the same number of right-side up cards.

How would you do it?

Best Answer

This is a classic question.

Split the cards into two piles. The first pile has 18 cards, the second pile has the remaining 35 cards. Say that there are $n$ upside down cards in the first pile, and therefore $18-n$ upside-down cards in the second pile.

Now turn over all the cards in the first pile.