Fast generation of random permutations via networks simulation

被引:9
作者
Czumaj, A [1 ]
Kanarek, P
Kutylowski, M
Lorys, K
机构
[1] Univ Gesamthsch Paderborn, Heinz Nixdorf Inst, D-33095 Paderborn, Germany
[2] Univ Gesamthsch Paderborn, Dept Math & Comp Sci, D-33095 Paderborn, Germany
[3] Univ Wroclaw, Inst Comp Sci, PL-51151 Wroclaw, Poland
[4] Univ Trier, Dept Comp Sci, D-54286 Trier, Germany
关键词
parallel algorithms; random permutation; uniform distribution; switching networks; matching; PRAM; CREW; EREW;
D O I
10.1007/PL00009206
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We consider the problem of generating random permutations with uniform distribution. That is, we require that for an arbitrary permutation pi of n elements, with probability 1/n! the machine halts with the ith output cell containing pi(i), for 1 less than or equal to i less than or equal to n, We study this problem on two models of parallel computations: the CREW PRAM and the EREW PRAM. The main result of the paper is an algorithm for generating random permutations that runs in O(log log n) time and uses O(n (1+o(1))) processors on the CREW PRAM. This is the first o(log n)-time CREW PRAM algorithm for this problem. On the EREW PRAM we present a simple algorithm that generates a random permutation in time O (log n) using n processors and O(n) space. This algorithm outperforms each of the previously known algorithms for the exclusive write PRAMs. The common and novel feature of both our algorithms is first to design a suitable random switching network generating a permutation and then to simulate this network on the PRAM model in a fast way.
引用
收藏
页码:2 / 20
页数:19
相关论文
共 17 条
[1]   ROUTING, MERGING, AND SORTING ON PARALLEL MODELS OF COMPUTATION [J].
BORODIN, A ;
HOPCROFT, JE .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1985, 30 (01) :130-145
[2]   PARALLEL MERGE SORT [J].
COLE, R .
SIAM JOURNAL ON COMPUTING, 1988, 17 (04) :770-785
[3]   UPPER AND LOWER TIME-BOUNDS FOR PARALLEL RANDOM-ACCESS MACHINES WITHOUT SIMULTANEOUS WRITES [J].
COOK, S ;
DWORK, C ;
REISCHUK, R .
SIAM JOURNAL ON COMPUTING, 1986, 15 (01) :87-97
[4]   EXACT LOWER TIME-BOUNDS FOR COMPUTING BOOLEAN FUNCTIONS ON CREW PRAMS [J].
DIETZFELBINGER, M ;
KUTYLOWSKI, M ;
REISCHUK, R .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 1994, 48 (02) :231-254
[5]   ALGORITHM-235 - RANDOM PERMUTATION [G6] [J].
DURSTENFELD, R .
COMMUNICATIONS OF THE ACM, 1964, 7 (07) :420-420
[6]  
Hagerup Torben, 1991, P 18 ANN INT C AUT L, P405
[7]  
Knuth D., 1981, ART COMPUTER PROGRAM
[8]  
MILLER GL, 1985, P 26 IEEE S FDN COMP, P478, DOI DOI 10.1109/SFCS.1985.43
[9]  
MILLER GL, 1989, ADV COMPUTING RES RA, V5, P47
[10]  
MOTWANI R., 1995, Randomized Algorithms