arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1204.1958cs.DS
收藏

使用对合的并行和顺序原地置换和完美混洗

Parallel and sequential in-place permuting and perfect shuffling using involutions

Qingxuan Yang, John Ellis, Khalegh Mamakani, Frank Ruskey

摘要:

证明了${1,2,...,N}$的任意置换都可以表示为两个对合的乘积。因此,数组元素的任何置换都可以在时间O(1)内并行就地执行。在置换的情况下,是$k$的方式完美洗牌,我们开发了两种方法来有效地计算这样的对合。第一种方法在$N$是$k$的幂时有效;在这种情况下,时间是O(N),空间是$O(\log^2 N)$。第二种方法适用于$N$是$k$的倍数的一般情况;这里时间是$O(N \log N)$,空间是$O(\log^2 N)$。如果是$k=2$,则在具有SADD(人口计数)指令的机器上,第一种方法的空间使用可以减少到$O(\log N)$。

英文摘要:

We show that any permutation of ${1,2,...,N}$ can be written as the product of two involutions. As a consequence, any permutation of the elements of an array can be performed in-place in parallel in time O(1). In the case where the permutation is the $k$-way perfect shuffle we develop two methods for efficiently computing such a pair of involutions. The first method works whenever $N$ is a power of $k$; in this case the time is O(N) and space $O(\log^2 N)$. The second method applies to the general case where $N$ is a multiple of $k$; here the time is $O(N \log N)$ and the space is $O(\log^2 N)$. If $k=2$ the space usage of the first method can be reduced to $O(\log N)$ on a machine that has a SADD (population count) instruction.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑