September 2022

S M T W T F S
    123
45678910
11121314151617
181920 21222324
2526 27282930 

Style Credit

Expand Cut Tags

No cut tags
Sunday, June 29th, 2008 11:11 pm
Friday night, after the SRVC results were announced, most of us went out drinking. We ended up at a pretentious little place that sold crazy Belgian beers. It was rather more expensive than I'm used to, but worth it. Each bottle was a meal's worth of flavor and substance. And as we sat there getting rather drunk, we fell into a (logic) riddle contest. It was a lot of fun, and not just because I had a lot of luck figuring them out.

One of them completely stumped me, so I spent a good amount of the flight home working on it. I didn't solve it until I had generalized it into a set of equations, but I can see how one could figure it out directly. Since I had some much fun working on it, I thought I'd share.

You're given n coins under a towel and told that m of them are heads up. (The numbers don't matter, beyond the obvious restriction that 0 < m < n.) You can stick your hands under the towel to manipulate them, but you can't in any way sense which ones are heads up. How do you separate them into two piles (possibly of different sizes) such that each pile has the same number of heads? We're looking for a real solution, not something "clever" like 'stand them all on their edges'.

I'll post the solution in the comments.
Monday, June 30th, 2008 07:31 am (UTC)
Create a pile of m coins and flip all of them over.

Like I said, I only came to this based on the equation of heads in each pile. It was obvious that the solution would involve flipping them over in some pattern, so I started working out equations for various combinations. Flipping over all the coins in a pile looked promising because that was the point at which the permutations of possible changes to the number of heads all converged back to a single answer. After that, it was easy to see that the relevant term (how many heads happened to be in one of the piles) canceled itself out if one pile was inverted, and then it was just a matter of solving for the correct pile size.

Having said that, it makes real physical sense. If the pile 1 has m coins and has x heads in it, then pile 2 has m - x. If you flip all the coins in pile 1, then it must now also have m - x heads now. QED.
Monday, June 30th, 2008 09:51 am (UTC)
Pick m coins to make pile 1, and the rest to make pile 2. Pile 1 will have p heads in it, pile 2 will have m - p heads in it.

Now turn over pile 1. Now both piles will have m - p heads.
Monday, June 30th, 2008 09:54 am (UTC)
I figured this out by examining n = 2, n = 3, guessing a solution, trying it for n = 4, and then calculating it through for general n.
Monday, June 30th, 2008 04:50 pm (UTC)
I got the answer in about a minute, but I did have to write down the equations. Making a pile of m coins and flipping all the coins in one pile or the other was my first guess, and the equations confirmed that m was, indeed, the pile size I wanted, and that I should flip the coins in that pile.
Monday, June 30th, 2008 06:34 pm (UTC)
If not able to feel the pattern on the coins, which I can normally do, I'd most likely count the coins and sort them into even piles stacked in two columns. Since there is only a 50-50 chance of heads regardless of what came before, the result should be very close to perfect.

NOW, I'll read the solution and see how close I got. :D
Monday, June 30th, 2008 06:35 pm (UTC)
not as close as I would like. I forgot to flip them. :(
Monday, June 30th, 2008 06:46 pm (UTC)
This is awesome.

It sounds like a perfect CarTalk puzzler. You should send it in to them (if they haven't done it already).