Statistics > Computation
[Submitted on 12 Sep 2018 (v1), last revised 5 Jan 2020 (this version, v4)]
Title:Efficient generation of random derangements with the expected distribution of cycle lengths
View PDFAbstract: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 distance with respect to the distribution of cycle lengths) is $O(n^{a}\log{n}^{2})$ with $a \simeq \frac{1}{2}$ and $n$ the length of the derangement. We prove that the sequential importance sampling algorithm generates random derangements in $O(n)$ time with probability $O(1/n)$ of failing.
Submission history
From: J. Ricardo G. Mendonça [view email][v1] Wed, 12 Sep 2018 17:25:19 UTC (22 KB)
[v2] Wed, 19 Sep 2018 11:19:28 UTC (21 KB)
[v3] Fri, 15 Mar 2019 16:25:03 UTC (31 KB)
[v4] Sun, 5 Jan 2020 16:49:52 UTC (32 KB)
Current browse context:
cond-mat.stat-mech
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
Connected Papers (What is Connected Papers?)
CORE Recommender (What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.