Efficient generation of random derangements with the expected distribution of cycle lengths
J. R. G. Mendon\c{c}a

TL;DR
This paper presents two efficient algorithms for generating random derangements with the correct cycle length distribution, suitable for large samples, and analyzes their performance and mixing times.
Contribution
It introduces two simple, efficient algorithms for generating random derangements with the expected cycle length distribution, including fixed-point-free involutions, and provides theoretical analysis of their performance.
Findings
Algorithms generate samples with the expected cycle length distribution.
The mixing time of the restricted transpositions algorithm is $O(n^{a} ext{log}^2 n)$ with $a oughly 1/2$.
The importance sampling algorithm runs in $O(n)$ time with $O(1/n)$ failure probability.
Abstract
We show how to generate random derangements efficiently by two different techniques: random restricted transpositions and sequential importance sampling. The algorithm employing restricted transpositions can also be used to generate random fixed-point-free involutions only, a.k.a. random perfect matchings on the complete graph. Our data indicate that the algorithms generate random samples with the expected distribution of cycle lengths, which we derive, and for relatively small samples, which can actually be very large in absolute numbers, we argue that they generate samples indistinguishable from the uniform distribution. Both algorithms are simple to understand and implement and possess a performance comparable to or better than those of currently known methods. Simulations suggest that the mixing time of the algorithm based on random restricted transpositions (in the total variance…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
