Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

This logic puzzle has stumped me for some time now:

You are in a dark room with a deck of cards in front of you. 30 cards are face down and the rest are face up. How can you separate the cards into two piles such that each pile has the same number of face-up cards? You are allowed to turn over any amount of cards, but it is too dark to see.

Can this be solved generically for any number of face-up and face-down cards?

share|improve this question
    
Cute problem.${}$ –  Rick Decker Jul 18 '13 at 19:17

2 Answers 2

We don't know how big to make the piles. The only number given in the problem is $30$, so let's try tha‌t: suppose we make a pile with $30$ cards (w‌ithout turning over any card yet). It will have some number of face-down cards, say $k$, and the rest of the cards ($30-k$ of them) will be face-up.

The other pile has the remaining cards. This includes the rest of the original face-down cards‌ (there were $30$ total, and some number $k$ are in the first-pile, so there are $30-k$ here), and some unknown number of face-up cards.

To summarize:‌ the first pile has $k$ face-down cards and $30-k$ face-up cards; the second pile has $30-k$ face-down cards and some number of face-up cards.

Now we want to make the number of face-up cards equal in the two piles. I‌t should be obvious how to achieve that from here. ‌:-)


So yes, the problem can be solved for any number of face-down cards in place of $30$, provided we are told what the number is.‌ We don't need to be told what the number of face-up cards is.

share|improve this answer
    
"I‌t should be obvious how to achieve that from here." Perhaps, but I had to stare at your solution for a while before I realized I should just flip one of the piles :) –  Richard Venable Feb 17 at 23:27
    
@RichardVenable: Yes, it's that long staring followed by the "aha" moment (or rather "oh of course, why didn't I think of this before!" moment) that makes these puzzles so much fun. :) I didn't want to spoil it too much by just stating it blandly. –  ShreevatsaR Feb 18 at 4:16

Hint: It can be solved for any number of face-up cards, as long as you know how many there are.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.