Tuesday, December 14, 2010

Gift exchange

Bitkidoku proposes this holiday nut. Six friends want to exchange gifts. Each person will buy one gift. To determine who they will give their gift to, they each put their name in a hat and take turns drawing. If a person draws their own name, they put it back and draw again. If the last person draws their own name, they all start over from the beginning.

How many possible outcomes are there?

4 comments:

RWH said...

Does the path matter, or only the end result?

Steve said...

Only the end result.

By tedious enumeration I calculated a number which Wikipedia reports is a Padovan number, centered square number, Smith number, and also has a property which makes it the solution to this puzzle. I didn't follow that link.

bitkidoku said...

Thanks Steve, I could not have come up with the answer myself, your pointers really helped.

Now I see, when I was thinking about the problem I got into the right track at a point but I was not stubborn enough. I don't believe I could have solved it anyway.

Thanks again Steve, this is a relief.

Steve said...

All I did was scribble a few of the possible outcomes. I still don't know what the general solution is (but thanks to Wikipedia, I know it has a name).