On generating random permutations with arbitrary distributions

Let @@@@ = {R<subscrpt>1</subscrpt>,R<subscrpt>2</subscrpt>,…,R<subscrpt>M</subscrpt>} be an ordered set of M elements where R<subscrpt>i</subscrpt> < R<subscrpt>j</subscrpt> whenever i < j. Let π be the set of permutations of @@@@. We consider the problem of randomly generating the elements of π according to a distribution G(π). Various algorithms including those due to Durstenfeld [D2, K1] and Moses <italic>et al</italic> [M1] 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 the π 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.