arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2011.11144cs.DScs.DM
收藏

时间复杂度为O(n^2)的算法

Searching and Sorting with O(n^2) processors in O(1) time

Taeyoung An, A. Yavuz Oruc

摘要:

并行计算机系统中处理元件(PE)数量的激增,以及更广泛的算法并行化的使用,导致处理器间通信主导VLSI芯片空间。本文提出了一种新的架构,以克服这个问题,使用简单的交叉点开关配对PE,而不是一个复杂的互连网络。基于在\cite{oruc2016self}中描述的循环置换布线思想,这种配对导致$n(n-1)/2$处理元件的线性交叉点阵列和同样多的交叉点。我们证明了这种新的并行架构的多功能性,通过设计快速搜索和排序算法,特别是,我们发现,找到一个最小值,最大值,并搜索一个列表的$n$元素都可以在$O(1)$时间与$O(n)$扇入基本逻辑门,并在$O(\lg n)$时间与$O(1)$扇入。我们进一步表明,排序的$n$元素的列表也可以进行$O(1)$时间使用基本逻辑门与$O(n)$扇入和阈值逻辑门。如果仅使用具有$O(1)$扇入的基本逻辑门,则排序时间增加到$O(\lg n\lg\lg n)$。该算法能在$O(1)$时间内找到$n$元素间的最大值,在$O(\lg n (\lg\lg n))$时间内对$n$元素进行排序.此外,我们展示了其他基本查询可以处理相同的顺序内的时间复杂度。

英文摘要:

The proliferation of number of processing elements (PEs) in parallel computer systems, along with the use of more extensive parallelization of algorithms causes the interprocessor communications dominate VLSI chip space. This paper proposes a new architecture to overcome this issue by using simple crosspoint switches to pair PEs instead of a complex interconnection network. Based on the cyclic permutation wiring idea described in \cite{oruc2016self}, this pairing leads to a linear crosspoint array of $n(n-1)/2$ processing elements and as many crosspoints. We demonstrate the versatility of this new parallel architecture by designing fast searching and sorting algorithms for it. In particular, we show that finding a minimum, maximum, and searching a list of $n$ elements can all be performed in $O(1)$ time with elementary logic gates with $O(n)$ fan-in, and in $O(\lg n)$ time with $O(1)$ fan-in. We further show that sorting a list of $n$ elements can also be carried out in $O(1)$ time using elementary logic gates with $O(n)$ fan-in and threshold logic gates. The sorting time increases to $O(\lg n\lg\lg n)$ if only elementary logic gates with $O(1)$ fan-in are used. The algorithm can find the maximum among $n$ elements in $O(1)$ time, and sort $n$ elements in $O(\lg n (\lg\lg n))$ time. In addition, we show how other fundamental queries can be handled within the same order of time complexities.

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

↑