Motivation: Every Christmas, my family does a secret Santa gift exchange (a derangement of n people), and over the years, the family has gotten bigger and people have gotten married. So we’ve added a rule that spouses can’t get one another in the drawing. We always have the same person give the first gift. Then whoever gets it gives the next gift and so on until everyone gives/gets one, or we start a new cycle if a cycle is completed. I’m interested in the probability of everyone being in 1 cycle.
Define
-Let n=s+2m (single people and married couples)
-“Pairwise restrictions”: For each married couple, (a,b), the derangement cannot have a->b or b->a.
Simpler case, without married couples (m=0, n=s):
-#possible length-n cycles: (n-1)!
-#possible derangements: integer(n!/e)
-Probability of 1 cycle: ≈e/n (assume n>3)
Reasoning for #possible cycles: Assume a valid drawing, then the first person could have gotten n-1 people. The next person can’t get themselves or the previous person (this would end the cycle early), so n-2 possibilities, and so on giving (n-1)!
But when we add in the pairwise restrictions, I’m having trouble coming up with a nice expression for “#possible length-n cycles” and I don’t have a clue how to adjust the formula for “# possible derangements”. Maybe there’s a better approach? I could always do a Monte Carlo simulation or something, but I was hoping for an expression of the probability in terms of n and m.
Anecdotally, it used to take more than 1 cycle most years, but lately there’s been more spouses added and it’s been mostly 1 cycle (very small sample size).
