You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.
A correspondent writes:
Subject: Random Permutations (Secret Santa)
My office Secret Santa this year contained a 2-cycle, which I thought must occur with low probability given the large number of people involved.
I enjoyed reading your series on random permutations and was wondering if you know the answer to the following:
What is the probability that a random permutation in contains exactly one 2-cycle?
I reread my series and figured it out. Does anyone want to try?
I think the best way to try this is to just guess at first. What do you intuitively think happens to the probability as ? Does it approach , , something else...?
@Sridhar Ramesh is not allowed to do this puzzle until other people have tried it. :wink:
John Baez said:
A correspondent writes:
Subject: Random Permutations (Secret Santa)
My office Secret Santa this year contained a 2-cycle, which I thought must occur with low probability given the large number of people involved.
I enjoyed reading your series on random permutations and was wondering if you know the answer to the following:
What is the probability that a random permutation in contains exactly one 2-cycle?
I reread my series and figured it out. Does anyone want to try?
Fun puzzle, thank you for sharing! I solved this generatingfunctionologically, which was nice because I really enjoy generating functions but don't have a lot of opportunity to play with them. I'm happy to share that solution if you/anyone is interested, but I sort of assume you had a more creative solution in mind? (Although I haven't read your series, so I don't know what techniques you're using.)
Anyway, here is an answer, which agrees with the right answer at least for :
If you confirm you had something else in mind, I will probably spend some time looking for it. I guess regardless it would be fun to see if I can find a direct combinatorial justification for this... feels very strongly like
which makes sense.
Is your answer really a probability between and ? It seems to approach as . Am I confused?
John Baez said:
Is your answer really a probability between and ? It seems to approach as . Am I confused?
Oh, it needs to be divided by then. I was counting the number of such permutations.
Sorry, totally read the question wrong
(funnily enough, I just multiplied by at the end to get this answer... so I really ended up solving the question you actually asked.)
Neat. Okay, then I think we may I agree. I used a method that only gave me the limit of your (corrected) answer as , since my correspondent mentioned "the large number of people involved." And this limit was
John Baez said:
Neat. Okay, then I think we may I agree. I used a method that only gave me the limit of your (corrected) answer as , since my correspondent mentioned "the large number of people involved." And this limit was
Cool! I don't really know what tools exist to extract limiting behavior from generating functions... let me try to figure it out. (You could also just take the limit of my closed form, but it's probably more fun/reproducible to do it from the generating function.)
Well, I think it's pretty easy to take your formula, and then take the limit of that, and see why it (almost) matches the answer in my spoiler.
John Baez said:
Well, I think it's pretty easy to take your formula, and then take the limit of that, and see why it (almost) matches the answer in my spoiler.
Yeah but I know how to take limits already, it's more fun for me to see how to do it from the generating function. Because I imagine there are times when it's hard to extract a closed form from a generating function, but easier to compute the limit. That's certainly the case with lots of other statistics of sequences
Okay. There's bunch of amazing stuff about the limits of this and related problems, which I learned about while studying this material. I explain it starting here.
One example of how cool this stuff is. The following two are equal:
Here 'huge' means I'm taking the limit we're discussing now, and I'm assuming the raindrops are described by a Poisson process (the simplest sort of random behavior one could expect here).
John Baez said:
One example of how cool this stuff is. The following two are equal:
- The probability that N raindrops land on your head in a minute, if on average one lands on your head every k minutes.
- The probability that a random permutation of a huge finite set has N cycles of length k.
wow, this is very cool
By the way, my explanations were not as simple as they could probably become. I was just learning stuff and making stuff up as I went. I should polish this stuff some more.
Ok, there are definitely techniques for computing limits directly from the generating function. Applying them, I get the limit
which is also what I get just from computing the limit of the closed form above, but I'm glad I did it the long way.
Actually, it turns out Wilf introduces these techniques in the context of answering questions of the form "what is the probability a permutation has X?" And there is an extremely general theorem in Wilf (4.7.3) which answers all questions of the form "given some sequences and , with the ascending so that converges, what is the probability that a random permutation has -cycles for each ?" I.e., as long as you care about a sufficiently sparse set of cycle lengths there is a closed form for the probability. Maybe this theorem is in your posts, but regardless it's very fun-looking stuff.
For anyone who wants the answer on a silver platter, here is a less cryptic spoiler that gives it all away:
Riley Shahar said:
Actually, it turns out Wilf introduces these techniques in the context of answering questions of the form "what is the probability a permutation has X?" And there is an extremely general theorem in Wilf (4.7.3) which answers all questions of the form "given some sequences and , with the ascending so that converges, what is the probability that a random permutation has -cycles for each ?" I.e., as long as you care about a sufficiently sparse set of cycle lengths there is a closed form for the probability. Maybe this theorem is in your posts, but regardless it's very fun-looking stuff.
It's funny that I hadn't seen that in Wilf - thanks! It feels related to the Cycle Length Lemma that I discussed in Part 11 of my series. It may secretly be the same thing. The Cycle Length Lemma is a recipe for calculating the expected value of a product of falling powers of the numbers of cycles of length for some chosen set of numbers , assuming is big enough (but it can be finite).
I gave a "categorified" proof of this already known lemma, expressing it as an equivalence of groupoids.
Cool! Definitely adding this series to my list of hopefully-not-too-difficult math things to read :)
It would not be difficult if I'd explained it well... not sure I managed that.