© 1990 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
On Generating Random Permutations with Arbitrary Distributions*
School of Computer Science, Carleton University, Ottawa: K1S 5B6, Canada
Let R = {R1, R2, ..., RM} be an ordered set of M elements where Ri < Rj whenever i < j. Let
be the set of permutations of R. We consider the problem of randomly generating the elements of
according to a distribution G(
). Various algorithms including those due to Durstenfeld3,5 and Moses et al7 are available for the case when the distribution G(
) is a uniform distribution (i.e., where all the elements of
are generated with equal probability). In this paper we consider the case when the distribution G(
) is not necessarily uniform. We present a strategy for specifying the distribution G(
) and propose a technique for generating the elements of
according to the distribution G(
). Applications of the technique to generate almost sorted lists and in the Travelling Salesman Problem have been presented. Finally, simulation results have been included which demonstrate the power of the Random Permutation Generation (RPG) technique.
Received October 1988. revised February 1989.
* Partially supported by the National Sciences and Engineering Research Council of Canada. A preliminary version of this paper was presented at the 1989 ACM Computer Science Conference in Louisville, Kentucky.