首页 | 官方网站   微博 | 高级检索  
相似文献
 共查询到19条相似文献,搜索用时 765 毫秒
1.
分“档”快速排序算法研究   总被引:3,自引:0,他引:3  
文章在文献[1]的基础上,提出了一种由分“档”、整体置换和局部快速排序所组成的新排序算法——分“档”快速排序法。算法分析和实验结果都表明:在待排序数据均匀分布或正态分布的情况下,分“档”快速排序算法的时间复杂度可以达到O(n),而附加存储空间开销却仅仅为[(n+1)/2],同时排序速度明显优于Quick Sort[2]、快速分组排序[5]、分“档”统计插入排序[1]和 Proportion  Split Sort[4]等算法。  相似文献   

2.
在量子计算机上求解0/1背包问题   总被引:6,自引:0,他引:6  
胡劲松  陈国良  郭光灿 《计算机学报》1999,22(12):1314-1316
在Grover算法和量子指数搜索算法的基础上,提出了一个量子算法去求解0/1背包问题。这个算法在没有使用任何可以提高搜索效率的经典策略的情况下,能够在O(c^2n/2)步以至少1-1/2^c的概率求解问题规模为n的0/1背包问题。  相似文献   

3.
完全欧几里德距离变换的最优算法   总被引:12,自引:2,他引:12  
陈Leng 《计算机学报》1995,18(8):611-616
欧几里德距离变换(EDT)对由黑白素构成的二值图象中所有象素找出其到最近黑素的距离,应用于图象分析,计算机视觉,在本文之前,该问题的最好复杂度为O(n^2logn)。本文提出了一个复杂度为O(n^2)的算法,使复杂度达到最优,该算法可以并行化,在有r个处理单元的EREWPRAM计算模型上,若rlogr≤22/6n,则时间复杂度为O(n/r)否则为O(nlogr)。  相似文献   

4.
本文给出了满足三角不等式的货郎担问题的并行启发式算法,在SIMD CREV PRAM并行机上该算法使用O(n^3/log^2n)台处理器需O熄log^2n)时间,这里n是给定城市的个数,因而该并行算法是最优的。  相似文献   

5.
基于散列和归并技术的有效并行排序方法   总被引:1,自引:1,他引:1       下载免费PDF全文
本文提出一个在共享存储多处理机系统上实现的快速、有效的并行排序算法:将长度为n的待排序数据划分成p个长度为n/p的子序列,引入散列技术并行地对这p个子序列的数据进行二次散列排序,这一阶段所需的平均时间为O(n/p);最后并行地将p个有序子序列归并成一个长度为n的有序序列,归并阶段所需的时间为O(n-n/
/p)。整个排序算法的并行执行代价为O(np)。本排序方法可以拓以网络并行机群环境。  相似文献   

6.
任意分布数据的基数分配链接排序算法   总被引:18,自引:0,他引:18  
王向阳 《计算机学报》2000,23(7):774-778
文中将映射链接思想引入了基数排序,提出了一种谓之基数分配链接的新排序方法(以下简称为“基数分配链接排序”),给出了该排序算法的描述、时间复杂度分析及用C语言编写程序进行算法比较的实验结果,算法分析和实验结果都表明:基数分配链接排序方法和待排序数据分布无关,其时间复杂度为O(N),并且排序速度明显优于Quick Sort^[1],Flash Sort^[1],Proportion Split Sor  相似文献   

7.
几何算法求解货郎担问题   总被引:5,自引:1,他引:4  
本文提出求解货郎担问题的一种几何算法。它的时间复杂性为:O(n^3/m)次比较,O(n^2)次乘法,其中n,m分别是点集的点数和凸包顶点数。  相似文献   

8.
可重构造的网孔机器上的k-选择   总被引:2,自引:0,他引:2  
对于一个 m ×n(m ≤k)的列有序矩阵,文中在 n × n 可重构造的网孔机器上提出了一个并行 k选择算法,其时间复杂度为 O(log2m + logm log2 n+ log3 n),而对于一般的l元集,文中在相同的模型下提出了一个时间复杂度为 O log2 ln + log ln log2 n+ log3n+ ln log ln 的并行 k选择算法.当时 l≥ O(nlog3n/log logn,该时间复杂度为 O ln log ln .特别地,当l= O(n1+ ε)(ε> 0 为常数),则时间复杂度为 O ln logn .此时达到的加速比为 n/logn.  相似文献   

9.
基于数据分布特性的快速排序   总被引:2,自引:0,他引:2  
文中提出了一种基于数据分析特性的快速排序算法,根据被排数据的分布行性,选择数据比较次数和数据移动次数较少的排序算法,当被排数据存在m个有序序列时,其算法的时间复杂度为O(nlog2m)其中m∈(1,cf√n),c为某一常数,其最佳性能为O(n)。当m≥c(√n)时,保持快速排序的最佳平均性能,使排序运行于较优状态下。  相似文献   

10.
管丽 《软件学报》1996,7(A00):249-253
本文在一个EREW PRAMexclusive read exclusive write paralled random access machine)上提出一个并行快速排序算法,这个算法用K个处理器可将N个项目在平均O(n/k+logn)logn)时间内排序,所以平均来说算法的时间和处理器数量的乘积对任何k≤n/logn是O(nlogn)。  相似文献   

11.
The problem of merging k (k⩾2) sorted lists is considered. We give an optimal parallel algorithm which takes O((n log k/p)+log n) time using p processors on a parallel random access machine that allows concurrent reads and exclusive writes, where n is the total size of the input lists. This algorithm achieves O(log n) time using p=n log k/log n processors. Most of the previous log n research for this problem has been focused on the case when k=2. Very recently, parallel solutions for the case when k=2 have been reported. Our solution is the first logarithmic time optimal parallel algorithm for the problem when k⩾2. It can also be seen as a unified optimal parallel algorithm for sorting and merging. In order to support the algorithm, a new processor assignment strategy is also presented  相似文献   

12.
Given a graph G=(V, E) with n vertices and m edges, the k-connectivity of G denotes either the k-edge connectivity or the k-vertex connectivity of G. In this paper, we deal with the fully dynamic maintenance of k-connectivity of G in the parallel setting for k=2, 3. We study the problem of maintaining k-edge/vertex connected components of a graph undergoing repeatedly dynamic updates, such as edge insertions and deletions, and answering the query of whether two vertices are included in the same k-edge/vertex connected component. Our major results are the following: (1) An NC algorithm for the 2-edge connectivity problem is proposed, which runs in O(log n log(m/n)) time using O(n3/4) processors per update and query. (2) It is shown that the biconnectivity problem can be solved in O(log2 n ) time using O(nα(2n, n)/logn) processors per update and O(1) time with a single processor per query or in O(log n logn/m) time using O(nα(2n, n)/log n) processors per update and O(logn) time using O(nα(2n, n)/logn) processors per query, where α(.,.) is the inverse of Ackermann's function. (3) An NC algorithm for the triconnectivity problem is also derived, which takes O(log n logn/m+logn log log n/α(3n, n)) time using O(nα(3n, n)/log n) processors per update and O(1) time with a single processor per query. (4) An NC algorithm for the 3-edge connectivity problem is obtained, which has the same time and processor complexities as the algorithm for the triconnectivity problem. To the best of our knowledge, the proposed algorithms are the first NC algorithms for the problems using O(n) processors in contrast to Ω(m) processors for solving them from scratch. In particular, the proposed NC algorithm for the 2-edge connectivity problem uses only O(n3/4) processors. All the proposed algorithms run on a CRCW PRAM  相似文献   

13.
The computation model on which the algorithms are developed is the reconfigurable array of processors with wider bus networks (abbreviated to RAPWBN). The main difference between the RAPWBN model and other existing reconfigurable parallel processing systems is that the bus width of each network is bounded within the range [2,[/spl radic/(N)]]. Such a strategy not only saves the silicon area of the chip as well as increases the computational power enormously, but the strategy also allows the execution speed of the proposed algorithms to be tuned by the bus bandwidth. To demonstrate the computational power of the RAPWBN, the channel-assignment problem is derived in this paper. For the channel-assignment problem with N pairs of components, we first design an O(T + [N//spl omega/]) time parallel algorithm using 2N processors with a 2N-row by 2N-column bus network, where the bus width of each bus network is /spl omega/-bit for 2 /spl les/ /spl omega/ /spl les/ [/spl radic/N] and T = [log/sub /spl omega//N] + 1. By tuning the bus bandwidth to the natural log N-bit and the extended N/sup 1/c/-bit (N/sup 1/c/ > log N) for any constant c and c /spl ges/ 1, two more results which run in O(log N/log log N) and O(1) time, respectively, are also derived. When compared to the algorithms proposed by Olariu et al. [17] and Lin [14], it is shown that our algorithm runs in the equivalent time complexity while significantly reducing the number of processors to O(N).  相似文献   

14.
The data compression based on dictionary techniques works by replacing phrases in the input string with indexes into some dictionary. The dictionary can be static or dynamic. In static dictionary compression, the dictionary contains a predetermined fixed set of entries. In dynamic dictionary compression, the dictionary changes its entries during compression. We present parallel algorithms for two parsing strategies for static dictionary compression. One is the optimal parsing strategy with dictionaries that have the prefix properly, for which our algorithm requires O(L+log n) time and O(n) processors, where n is the number of symbols in the input string, and L is the maximum length of the dictionary entries, while previous results run in O(L+log n) time using O(n2) processors or in O(L+log2 n) time using O(n) processors. The other is the longest fragment first (LFF) parsing strategy, for which our algorithm requires O(L+log n,) time and O(n log L) processors, while a previous result obtained an O(L log n) time performance on O(n/log n) processors. For both strategies, we derive our parallel algorithms by modifying the on-line algorithms using a pointer doubling technique  相似文献   

15.
Consider a set P of points in the plane sorted by the x-coordinate. A point p in P is said to be a proximate point if there exists a point q on the x-axis such that p is the closest point to q over all points in P. The proximate point problem is to determine all the proximate points in P. Our main contribution is to propose optimal parallel algorithms for solving instances of size n of the proximate points problem. We begin by developing a work-time optimal algorithm running in O(log log n) time and using n/loglogn Common-CRCW processors. We then go on to show that this algorithm can be implemented to run in O(log n) time using n/logn EREW processors. In addition to being work-time optimal, our EREW algorithm turns out to also be time-optimal. Our second main contribution is to show that the proximate points problem finds interesting, and quite unexpected, applications to digital geometry and image processing. As a first application, we present a work-time optimal parallel algorithm for finding the convex hull of a set of n points in the plane sorted by x-coordinate; this algorithm runs in O(log log n) time using n/logn Common-CRCW processors. We then show that this algorithm can be implemented to run in O(log n) time using n/logn EREW processors. Next, we show that the proximate points algorithms afford us work-time optimal (resp, time-optimal) parallel algorithms for various fundamental digital geometry and image processing problems  相似文献   

16.
A parallel algorithm for Euclidean distance transform (EDT) on linear array with reconfigurable pipeline bus system (LARPBS) is presented. For an image with n/spl times/n pixels, the algorithm can complete EDT transform in O(n log n/c(n) log d(n)) time using n/spl middot/d(n)/spl middot/c(n) processors, where c(n) and d(n) are parameters satisfying 1/spl les/c(n)/spl les/n, and 1相似文献   

17.
We present a parallel recognition algorithm for bipartite-permutation graphs. The algorithm can be executed in O(log n) time on the CRCW PRAM if O(n3/log n) processors are used, or O(log2 n) time on the CREW PRAM if O(n3/log2 n) processors are used. Chen and Yesha (1993) have presented another CRCW PRAM algorithm that takes O(log2n) time if O(n 3) processors are used. Compared with Chen and Yesha's algorithm, our algorithm requires either less time and fewer processors on the same machine model, or fewer processors on a weaker machine model. Our algorithm can also be applied to determine if two bipartite-permutation graphs are isomorphic  相似文献   

18.
Parallel algorithms for relational coarsest partition problems   总被引:2,自引:0,他引:2  
Relational Coarsest Partition Problems (RCPPs) play a vital role in verifying concurrent systems. It is known that RCPPs are P-complete and hence it may not be possible to design polylog time parallel algorithms for these problems. In this paper, we present two efficient parallel algorithms for RCPP in which its associated label transition system is assumed to have m transitions and n states. The first algorithm runs in O(n1+ϵ) time using m/nϵ CREW PRAM processors, for any fixed ϵ<1. This algorithm is analogous to and optimal with respect to the sequential algorithm of P.C. Kanellakis and S.A. Smolka (1990). The second algorithm runs in O(n log n) time using m/n CREW PRAM processors. This algorithm is analogous to and nearly optimal with respect to the sequential algorithm of R. Paige and R.E. Tarjan (1987)  相似文献   

19.
Nested dissection is a very popular direct method for solving sparse linear systems that arise from finite difference and finite element methods. Worley and Schreiber [16] give a fine grain algorithm for a square array of processors. Their algorithm uses O(N2) processors, each with O(N) memory, to factor an N2 by N2 sparse matrix whose graphs is an N × N mesh. The efficiency of their method is between 1/46 and 1/12. George et al. [6] [8] give a medium grain algorithm for hypercube architecture, while George et al. [7] give an algorithm for shared memory machines. These papers present a column oriented approach which can exploit O(N) parallelism and yield efficiencies up to 50%. Lucas [11] also gives a column oriented scheme which achieves up to 75% efficiency and O(N) parallelism. In this paper, we present a medium to fine grain algorithm for a P × P array of processors with local memory. This algorithm can exploit up to O(N2) parallelism. The efficiency of the fine grain version is comparable to [16] while as a medium grain algorithm achieves about 49% efficiency. The strength of the method is due to three factors: its ability to pipeline much of the computation, overlapping computation and communication, and the use of level 3 BLAS like primitives. In addition to its high efficiency its memory requirement is optimal, only O(N2 log N/P2) words memory is needed per processor.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号