On Wed, 24 Nov 2004 07:49:18 -0500, Jerry Grossman wrote: >This problem has been floating around for a few years. I heard >it from Gary Thompson, Grove City College (Pennsylvania). >I don't think anyone has the general solution (with n people). >You can use a computer to brute force your way to the answer >for small values of n. In particular, the answer for n=10 is >160127/2116800, which is about 0.075645786. > >If anyone has any information about solutions, I'd very much >like to hear about it. > >Jerry Grossman >Oakland University >
Let's denote n? the number of true shuffles from n elements, i.e., the number of permutations from n elements, in which no element sits in its original place.
1? = 0 obviously
2? = 1 12 not OK 21 OK
3? = 2 123 132 213 231 OK 312 OK 321
4? = 9 1234 1243 1324 1342 1423 1432 2134 2143 OK 2314 2341 OK 2413 OK 2431 3124 3142 OK 3214 3241 3412 OK 3421 OK 4123 OK 4132 4213 4231 4312 OK 4321 OK
Take all permutations and subtract the unacceptable permutations, when exactly 1 element sits in its place: C(4,1) = 4 possibilities multiplied by the number of possibilities, when remaining 3 elements make a true shuffle, i.e., 3?. Then subtract the unacceptable permutations, when exactly 2 elements sit in their places: C(4,2) = 6 possibilities multiplied by the number of possibilities, when remaining 2 elements make a true shuffle, i.e., 2?. Then subtract the unacceptable permutations, when exactly 3 elements sit in their places: C(4,3) = 4 possibilities multiplied by the number of possibilities, when remaining 1 element makes a true shuffle, i.e., 1?. Obviously zero. When 3 elements sit in their places, the 4th element must also sit in its place, i.e., no acceptable possibilities. Then subtract the one unacceptable possibility, when all elements sit in their original places.
If we define 0? = 1 (just like 0! = 1, by vacuity), then we can write
n!/n? approaches e very fast. In fact, for all n > 0, we can write n? = [n!/e + 0.5], where [x] is the integer part of x. [x + 0.5] obviously means rounding x to the nearest integer. We also have the recurrence formulas
n? = n*(n-1)? + (-1)^n with the seed 0? = 1
n? = (n-1)*[(n-1)? + (n-2)?] with the seed 0? = 1 and 1? = 0
By the condition of the problem, either the last (10th) element sits in its original place and the other 9 elements make a true shuffle (9? possibilities) or it does not sit in its original place and then all 10 elements make a true shuffle (10? possibilities). The desired probability is then
Perhaps your ratio is for a similar problem. For example, you can ask, if 10 people randomly draw from a hat containing their names, what is the probability that nobody will draw his own name?
P = 10?/10! = 1334961/3628800 = 0.367879464... ~ 1/e
>---- Original message ---- >>Date: 23 Nov 04 20:51:41 -0500 (EST) >>From: John <firstname.lastname@example.org> >>Subject: a gift exchange >>To: email@example.com >> >>Ten friends organize a gift exchange. The ten names are put in a >>hat, and the first person draws one. If they pick their own name, >>they return it to the bag and draw again, until they have a name >>that is not their own. Then the second person draws, again >>returning their own name if they draw it. This continues down the >>line. What is the probability that when the 10th person draws, only >>their own name will be left in the bag? >> >>Any help!!!