Abstract

Given n items, a parallel algorithm for generating the n! permutations is presented. This algorithm is designed to run on a linear array consisting of n identical processing elements (PEs for short). These PEs are numbered and referred to as PE(i) for 1 < i < n. Each PE is responsible for producing one component of each permutation. Every PE(i) contains six registers, namely: C(i), T(i), K(i), Y(i), Z(i) and X(i). A permutation takes constant time from the preceding one. For generating the required n ! permutations, our algorithm requires n! + n 1 time steps in which n 1 initial time steps are included. Here, a time step is defined as the maximal elapsed time (considering all PEs) to do the following three tasks: (1) PI!.(i) receives two data from PE(i + 1); (2) PE( i) executes the design algorithm once; (3) PE( i) sends the i th component of a certain permutation to output terminal. This ith component is stored in the register C(i). In the literature, there are many methods used to produce the n! permutations sequentially, e.g. the methods of lexicographic order, inversion vectors, rotations, minimal changes, random generations, and by reversing a certain suffix of current permutation, see [6,7]. A parallel algorithm is given in [2] to generate the permutations. However, this algorithm is not optimal (in the sense that the number of PE times the time complexity does not match the optimal sequential running time) and each PE needs a stack of size n. The parallel algorithm in [l] uses an arbitrary number of independent PEs, each producing a part of consecutive permutations. This algorithm is optimal, but each PE requires storage size O(n) and has to deal with large integers. The parallel algorithm in [3] running on a SIMD computer is complicated because it requires a table to handle a binary tree. An efficient parallel algorithm for generating all the n! permutations is presented in [5] which is executed on vector processors. This algorithm requires a large memory size. In contrast, our algorithm requires O(n!) time steps and runs on a linear array in which each PE contains only constant storage size and the elapsed time of a time step is independent of n.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.