JOINT DISTRIBUTIONS FOR MOVEMENTS OF ELEMENTS IN SATTOLO’S AND THE FISHER-YATES ALGORITHM GUY LOUCHARD, HELMUT PRODINGER, AND STEPHAN WAGNER Abstract. Sattolo’s algorithm creates a random cyclic permutation by interchanging pairs of elements in an appropriate manner; the Fisher-Yates algorithm produces random (not necessarily cyclic) permutations in a very similar way. The distributions of the movements of the elements in these two algorithms have already been treated quite extensively in past works. In this paper, we are interested in the joint distribution of two elements j and k; we are able to compute the bivariate generating functions explicitly, although it is quite involved. From it, moments and limiting distributions can be deduced. Furthermore, we compute the probability that elements i and j ever change places in both algorithms. 1. Introduction Sattolo [8] provides an algorithm to generate a random cyclic permutation as follows: starting with the sequence 12 ...n, a random integer between 1 and n 1 is chosen, say i, and the numbers in positions i and n are interchanged. Then a random integer between 1 and n 2 is chosen, say j , and the numbers in positions j and n 1 are interchanged, and so on. After n 1 iterations, a random cyclic permutation is obtained. Let us give an example, with n = 5 and the random numbers 4, 1, 2, 1: 1234 5 1 23 5 4 52 3 14 5 3 214 35214 The result is the cyclic permutation 1 3 2 5 4 1. The first treatment of this algorithm has been given in [7]— there, moments of the number of moves that element k makes and the distance that element k travels are given. In the example we obtain the numbers 1, 1, 2, 1, 3 for the moves and 3, 1, 2, 1, 5 for the distances (k =1,..., 5). Further developments are provided in papers of Mahmoud and Wilson [4, 9, 10]: Mahmoud determined the limiting distributions for the number of moves as well as for the distances. Assuming that k n α as n →∞, the distribution of the number of moves the element k makes is given by 1+X · Geo( 1 2 ), where X = Ber(α) is a Bernoulli-distributed random variable independent of Geo( 1 2 ). A similar result is given by Mahmoud for the distances—however, normalization is necessary in this case to make the random variables converge. Date : November 17, 2007. 1