首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
一种新型单循环排序算法   总被引:2,自引:2,他引:2  
排序是计算机程序设计中一项经常而又重要的操作,研究排序算法具有重要的理论意义和广泛的应用价值。通过对目前常用的几种排序算法的研究,指出它们均为双重循环或多重循环结构设计,借鉴了军队排队列的思想,提出一种只需要单重循环结构即可完成排序过程的新型算法,并进行了编程实现。通过对该算法的时间复杂度、空间复杂度以及稳定性等性能分析,证明该算法对于基本有序的数据排列排序性能优秀,对于数据排列大都是两两错位的排序过程接近最优算法。  相似文献   

2.
Sorting on STAR     
This paper gives timing comparisons for three sorting algorithms written for the CDC STAR computer. One algorithm is Hoare's Quicksort, which is the fastest or nearly the fastest sorting algorithm for most computers. A second algorithm is a vector version of Quicksort that takes advantage of the STAR's vector operations. The third algorithm is an adaptation of Batcher's sorting algorithm, which makes especially good use of vector operations but has a complexity of N (log N)2 as compared to a complexity of N log N for the Quicksort algorithms. In spite of its worse complexity, Batcher's sorting algorithm is competitive with the serial version of Quicksort for vectors up to the largest that can be treated by STAR. Vector Quicksort outperforms the other two algorithms and is generally preferred. These results indicate that unusual instruction sets can introduce biases in program execution time that counter results predicted by worst-case asymptotic complexity analysis.  相似文献   

3.
排序算法是计算机程序设计广泛使用的解决问题的方法.研究排序算法具有重要的理论意义和广泛的应用价值。论述几种常用的内部排序算法,从时间复杂度、空间复杂度及稳定性方面对这些算法进行了比较分析,提出文献中出现的两种冒泡算法版本商榷之处,以供在不同条件下选择适合的排序算法借鉴。并分别提供实现各种算法的c++源代码。  相似文献   

4.
变换存储结构的一种高效排序算法   总被引:2,自引:0,他引:2  
给出变换存储结构的一种高效排序算法 ,该算法的时间复杂度为 O(n) ,且与待排序数据的分布无关 .给出了该排序算法的描述 ,并在时间复杂度和空间复杂度两方面与其他排序算法作了比较  相似文献   

5.
The last decade has seen a surge of research activity on multiobjective optimization using evolutionary computation and a number of well performing algorithms have been published. The majority of these algorithms use fitness assignment based on Pareto-domination: Nondominated sorting, dominance counting, or identification of the nondominated solutions. The success of these algorithms indicates that this type of fitness is suitable for multiobjective problems, but so far the use of Pareto-based fitness has lead to program run times in O(GMN/sup 2/), where G is the number of generations, M is the number of objectives, and N is the population size. The N/sup 2/ factor should be reduced if possible, since it leads to long processing times for large population sizes. This paper presents a new and efficient algorithm for nondominated sorting, which can speed up the processing time of some multiobjective evolutionary algorithms (MOEAs) substantially. The new algorithm is incorporated into the nondominated sorting genetic algorithm II (NSGA-II) and reduces the overall run-time complexity of this algorithm to O(GN log/sup M-1/N), much faster than the O(GMN/sup 2/) complexity published by Deb et al. (2002). Experiments demonstrate that the improved version of the algorithm is indeed much faster than the previous one. The paper also points out that multiobjective EAs using fitness based on dominance counting and identification of nondominated solutions can be improved significantly in terms of running time by using efficient algorithms known from computer science instead of inefficient O(MN/sup 2/) algorithms.  相似文献   

6.
在多目标进化算法中,时间复杂度过高是普遍的问题,特别是三个目标函数以上时,解的等级分配占用了过多运算时间。针对三目标问题,利用帕累托支配关系,对解的等级分配进行研究,发现经典的等级排序及分配方法存在一定冗余操作,需对全部的解先排序后,才能再分配等级并选择下一代,造成部分不必要的运算。为减少该冗余,利用帕累托非支配关系结合差分进化,实现高效三目标进化算法。算法每次迭代对种群中最高等级的个体进行计算,在分配等级同时进行选择后代个体操作,当后代种群生成时便跳出计算,从而减少个体的计算数量,降低运算量,同时给出该方法的相关理论分析和证明过程。然后,针对一系列三目标优化问题,将提出方法与著名排序方法NSGAII,及近年来优秀的ENS方法进行对比实验。仿真实验结果表明,提出方法在时间复杂度和收敛速度上优于经典方法,稍差于ENS方法。在标准测试函数DTLZ1-DTLZ6的性能上,提出方法近似于ENS方法,优于NSGAII算法,从而验证了提出方法的有效性和正确性。  相似文献   

7.
快速排序在数据部分相等或有序时,时间复杂度最坏为O(n2)。针对于任意类型的分类数据的排序,文章在快速排序的基础上,提出一种新的排序算法,具有快速排序算法的简洁性,但是不使用递归算法,时间复杂度为O(n),空间复杂度为O(1)。通过理论分析和实验表明,该算法的性能明显优于其它排序算法,特别适合于数据量大的场合。  相似文献   

8.
This paper is concerned with an external sorting algorithm with no additional disk space. The proposed algorithm is a hybrid one that uses Quicksort and special merging process in two distinct phases. The algorithm excels in sorting a huge file, which is many times larger than the available memory of the computer. This algorithm creates no extra backup file for manipulating huge records. For this, the algorithm saves huge disk space, which is needed to hold the large file. Also our algorithm switches to special merging process after the first phase that uses Quicksort. This reduces the time complexity and makes the algorithm faster.  相似文献   

9.
祝琴  高学东  武森  陈敏  陈华 《计算机工程》2010,36(22):13-14
针对CABOSFV聚类算法对数据输入顺序的敏感性问题,提出融合排序思想的高属性维稀疏数据聚类算法,通过计算首次聚类中两两高属性维稀疏数据非零属性取值情况确定所需要计算差异度的集合组合,减小了算法复杂度。应用结果表明,该方法能提高CABOSFV聚类的质量。  相似文献   

10.
一种新的分"档"置换插入排序算法   总被引:1,自引:0,他引:1  
近年来,人们提出了众多时间复杂度为O(n)的排序算法.但分析研究结果表明,上述排序方法都不同程度上存在着以下两点不足:(1)附加存储空间开销大,(2)排序效率过分依桢于关键字的均匀分布.基于此,表文提出了一种由分“档”、整体置换和局部直接插入排序所组成的新排序算法——分“档”置换插入排序法.算法分析和实验结果都表明:该排序方法与待排序数据分布无关,其时间复杂度为O(n),而附加存储空间开销少于0.5n,同时排序速度明显优于QuickSort、HeapSort、按字节桶分配链接排序、ProportionSplitSort等算法.  相似文献   

11.
实型数据的非比较分段排序算法   总被引:2,自引:0,他引:2  
实型数据非比较分段排序算法(简称RNCSS)是根据实型数据机内编码的特点提出来的一种快速非比较排序算法,文中给出了算法的分析和关键的源程序段。该算法的时间复杂度为0(N),且附加存储空间极小,特别适合干数据量大的场合。  相似文献   

12.
王馨梅  张翔  张发存  崔杜武 《计算机工程》2004,30(13):52-53,F003
研究并实现了LS-SIMD计算机上基于奇偶比较方法的按行或按列数据并行排序算法,并对算法的计算复杂性和通信复杂性进行了分析。该研究对于扩展LS-SIMD计算机在非数值计算方面的应用有着十分重要的实际意义。  相似文献   

13.
高速化和多媒体化是未来网络的主要发展方向,为了给用户提供可靠的端到端服务质量保证,通常需要在网络的中继节点上引入基于流的队列调度机制。WF^2Q+队列调度算法即是一种性能优异同时又易于实现的公平队列调度算法。文中提出了一种基于统计移位排序结构的WF^2Q+算法高速硬件实现方法,该方法充分利用队列的统计信息,以相对较少的硬件资源实现了统计意义上的快速完全排序。FPGA实现的结果表明,该结构可以应用于端口速率为OC-48的高速IP路由器上。  相似文献   

14.
为使三维形体有较强的立体感,物体因自身遮挡和物体间的相互遮挡产生的线段就必须被消除.在研究了三维几何形体消隐算法中的线消隐算法之后,针对传统的凸多面体线消隐算法存在计算量大、消隐时间长、效率低的缺点进行改进,在原来线消隐算法的基础上加入包围盒的最大最小测试方法和深度优先排序方法.算法使用C++编程实现,实验证明算法的时间复杂度由原来的N2降低为N,大大提高了消隐效率.  相似文献   

15.
In this paper, we proposed a new efficient sorting algorithm based on insertion sort concept. The proposed algorithm is called Bidirectional Conditional Insertion Sort (BCIS). It is in-place sorting algorithm and it has remarkably efficient average case time complexity when compared with classical insertion sort (IS). By comparing our new proposed algorithm with the Quicksort algorithm, BCIS indicated faster average case time for relatively small size arrays up to 1500 elements. Furthermore, BCIS was observed to be faster than Quicksort within high rate of duplicated elements even for large size array.  相似文献   

16.
多通道视频流传输的排序问题,在视频数据的传输领域有着重要的地位.提出了一种适用于多通道视频流的循环线性2维表排序方法,利用循环2维线性表的查表方式实现多通道的视频流分组进行排序处理.与传统的排序方法相比,它可以有效地消除时延不可控,排序复杂度过高,内存管理复杂等方面的缺陷.运用PC机对传统方法和该方法及其特点进行了测试,测试结果表明:传统排序方法在分组数量增加的条件下,排序时间呈指数式增长,而本文的方法的排序时间呈线性增长.与几种传统排序方法在排序时间的实验统计数据对比表明:在分组数量增加的情况下,该方法可以节约大量的排序时间.  相似文献   

17.
排序有许多经典的算法,如插入排序、交换排序、选择排序等。这些排序算法的性能包括时间复杂度、空间复杂度以及稳定性各有优劣。笔者在这里给出一种全新的排序算法——队与栈排序。这种算法打破传统以交换或移动为主要排序的做法,而是借助栈和队这两种数据结构来实现排序。  相似文献   

18.
This article explores the application of DNA computing in recyclable waste paper sorting. The primary challenge in paper recycling is to obtain raw materials with the highest purity. In recycling, waste papers are segregated according to their various grades, and these are subjected to different recycling processes. Highly sorted paper streams facilitate high quality end products, while saving on processing chemicals and energy. In the industry, different sensors are used in paper sorting systems, namely, ultrasonic, lignin, gloss, stiffness, infra-red, mid-infra red, and color sensors. Different mechanical and optical paper sorting systems have been developed based on the different sensors. However, due to inadequate throughput and some major drawbacks related to mechanical paper sorting systems, the popularity of optical paper sorting systems has increased. The automated paper sorting systems offer significant advantages over the manual systems in terms of human fatigue, throughput, speed, and accuracy. This research has two objectives: (1) to use a web camera as an image sensor for the vision system in lieu of different sensors; and (2) to develop a new DNA computing algorithm based on the theme of template matching techniques for segregating recyclable waste papers according to paper grades. Using the concepts of replication and massive parallelism operations, the DNA computing algorithm can efficiently reduce the computational time of the template matching method. This is the main strength of the DNA computing algorithm in actual inspections. The algorithm is implemented by using a silicon-based computer to verify the success rate in paper grade identification.  相似文献   

19.
针对传统的空时二维参数估计计算复杂、鲁棒性及通用性差、收敛速度慢等缺点,根据空时具有等效性,以空域和时域处理算法可以相互转化为基础,推导出合适的适应度函数,运用改进的粒子群算法同时搜索信号的到达角和频率,用K means聚类算法对搜索结果进行分类,利用粒子群算法计算简单、全局收敛、可并行性等特点提高算法的搜索能力。计算机仿真表明,与传统的方法相比该算法具有较好的统计和收敛性能。  相似文献   

20.
目前,基于基数排序的等价类划分算法有较低的时间复杂度但存在以下不足:属性值跳跃性大时会产生大量空队列;排序后仍需O(|PU|)的时间才实现划分,求出等价类,排序没能发挥应有作用。为此,设计了一种新算法,通过属性值映射避免大量空队列产生,通过增加一个记录等价类长度信息的计数数组,排序后仅需O(|U|)就可实现划分,求出等价类。整个算法时间复杂度为O(|CU|),空间复杂度为O(|U|),为求等价类划分提供了一个新的解决办法。  相似文献   

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

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