We consider the uniform generation of random derangements, i.e., permutations without any fixed point. By using a rejection algorithm, we improve the straight-forward method of generating a random permutation until a derangement is obtained. This and our procedure are both linear with respect to the number of calls to the random generator, but we obtain an improvement of more than 36%. By using probability generating functions we perform an exact average analysis of the algorithm, showing that our approach is rather general and can be used to analyze random generation procedures based on the same rejection technique. Moreover, emphasis is given to combinatorial sums and a new interpretation of a known infinite lower triangular array is found.

An analysis of a simple algorithm for random derangements / D. Merlini;R. Sprugnoli;M. C. Verri. - STAMPA. - (2007), pp. 139-150.

An analysis of a simple algorithm for random derangements

MERLINI, DONATELLA;SPRUGNOLI, RENZO;VERRI, MARIA CECILIA
2007

Abstract

We consider the uniform generation of random derangements, i.e., permutations without any fixed point. By using a rejection algorithm, we improve the straight-forward method of generating a random permutation until a derangement is obtained. This and our procedure are both linear with respect to the number of calls to the random generator, but we obtain an improvement of more than 36%. By using probability generating functions we perform an exact average analysis of the algorithm, showing that our approach is rather general and can be used to analyze random generation procedures based on the same rejection technique. Moreover, emphasis is given to combinatorial sums and a new interpretation of a known infinite lower triangular array is found.
2007
9812770984
10th Italian Conference on Theoretical Computer Science,, ICTCS 2007
139
150
D. Merlini;R. Sprugnoli;M. C. Verri
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in FLORE sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificatore per citare o creare un link a questa risorsa: https://hdl.handle.net/2158/647373
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact