首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 15 毫秒
1.
一种基于统计的排序算法   总被引:2,自引:0,他引:2  
本文提出了一种基于统计的快速排序算法 ,并对该算法的时间复杂度和空间复杂度进行了分析 .该算法要求排序关键字满足一定的约束条件 ,其时间复杂度为 O(n) .对该算法做一些简单的修改 ,还可以将其推广到对一般关键字的排序问题 .  相似文献   

2.
基于数组的桶排序算法   总被引:1,自引:0,他引:1  
经典桶排序算法以链表形式实现"桶",处理均匀数据效率很高,是O(N)算法 .但对极不均匀数据则退化成低效的O(N2)插入排序 .讨论了记录携带附加数据的计数排序算法,将"桶"实现为顺序数组,避免链表的动态内存分配直接提高算法效率,并允许快排等O(N log N)算法处理桶内数据 .对均匀数据仍然保持O(N)时间复杂度,对极端不均匀数据则只退化为O(N log N)的原算法 .对一般非均匀数据,证明数组桶排序算法总体性能高于经典算法 .均匀数据实验表明,桶排序算法明显优于Linux下标准qsort系统调用,且数组桶排序算法效率更高 .而在非均匀的正态数据实验中数组桶算法性能下降明显小于经典桶排序,总体效率仍然优于qsort的直接应用 .  相似文献   

3.
介绍一种新的并行排序算法,该算法以双调归并排序为基础,运用图形硬件的并行体系结构和二叉排序树数据结构的优点,用部分并行代替所有阶段的顺序执行,对双调排序算法进行优化.对该算法进行分析,在理论上n个序列在P个流处理器上的排序,最优的时间复杂度为O((nlogn)/p).实验测试结果表明,优化后的算法比其它基于图形硬件的双调归并排序算法所用时间短.  相似文献   

4.
文章提出了一种LARPBS模型上的并行归并排序算法,利用该算法对长度为N的序列进行排序,使用N~(1+)着(0<着<1)个处理机可以在O((loglogN)~2)时间完成。  相似文献   

5.
快速二维中值滤波算法及其FPGA硬件设计   总被引:1,自引:0,他引:1  
针对数字图像噪声抑制过程中去噪性能要求较高、处理速度要求较快的问题,以常规中值滤波算法为基础,提出用归并插入排序算法来实现5×5快速中值滤波器的方案。通过对滤波窗口中行列像素点以及对角线上的像素点的归并插入排序,得到窗口的中值,在Xilinx的ISE10.0软件开发环境下成功完成该算法硬件设计。相比常规算法,该方案简单易行、运算速度快,能够满足实时性的要求,易在现场可编程门阵列(FPGA )上实现,为实时性要求较高的图像去噪领域提供了可靠的技术支持。  相似文献   

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

8.
针对在数据量动态增加的场景下现有的排序算法管理数据导致算法性能大大降低的问题,提出一种16-bit Trie树排序算法.借助邻居节点上存储的链节点指针完成排序,它不仅可以边构建边排序,且引入动态数组可以提高该算法的空间效率.仿真结果表明,传统Trie树支持数据动态更新,但通过遍历Trie树的方式完成排序耗时较多,快速排...  相似文献   

9.
高庆狮  胡玥 《计算机学报》2005,28(11):1767-1777
提出具有某些相同算法特征的广函数的概念,并且具体讨论了纵横矩阵加工广算法这一类广算法的定义和定理,直接推导出这类广算法的串行、倍增并行、纵横并行、多维并行等各种不同的算法.进一步以Bitonic排序问题和包括一阶递推方程在内的一类一阶递推方程的求解这两种十分不同的问题为例,把它们化成为纵横矩阵加工广函数,就可以自然地得到各自的不同的各种并行算法.并以(m,N)选择问题为例说明,一旦发现它是纵横矩阵加工广函数,就容易得到该问题的常数效率新算法,而不是并行台数增大时,效率趋向于0.  相似文献   

10.
    
Lee and Batcher have designed networks that efficiently merge k separately provided sorted sequences of known lengths totalling n. We show that the design is still possible, and in fact easier to describe, if we do not make use of the lengths, or even the directions of monotonicity, of the individual sequences—the sequences can be provided in a single undelimited concatenation of length n. The depth of the simplest resulting network to sort sequences that are “k-tonic” and of length n is , generalizing Batcher's 1968 results for the extreme values of k (k=2 corresponding to merging, and k=n/2 corresponding to general sorting).The exposition is self-contained and can serve even as an introduction to sorting networks and Batcher's results.  相似文献   

11.
In a previous article,(1) Gupta and Hill introduced anadaptive combining tree algorithm for busy-wait barrier synchronization on shared-memory multiprocessors. The intent of the algorithm was to achieve a barrier in logarithmic time when processes arrive simultaneously, and in constant time after the last arrival when arrival times are skewed. Afuzzy (2) version of the algorithm allows a process to perform useful work between the point at which it notifies other processes of its arrival and the point at which it waits for all other processes to arrive. Unfortunately, adaptive combining tree barriers as originally devised perform a large amount of work at each node of the tree, including the acquisition and release of locks. They also perform an unbounded number of accesses to nonlocal locations, inducing large amounts of memory and interconnect contention. We present new adaptive combining tree barriers that eliminate these problems. We compare the performance of the new algorithms to that of other fast barriers on a 64-node BBN Butterfly 1 multiprocessor, a 35-node BBN TC2000, and a 126-node KSR 1. The results reveal scenarios in which our algorithms outperform all known alternatives, and suggest that both adaptation and the combination of fuzziness with tree-style synchronization will be of increasing importance on future generations of shared-memory multiprocessors. At the University of Rochester, this work was supported in part by NSF Institutional Infrastructure grant number CDA-8822724 and ONR research contract number N00014-92-J-1801 (in conjunction with the ARPA Research in Information Science and Technology—High Performance Computing, Software Science and Technology program, ARPA Order No. 8930). At Rice University, this work was supported in part by NSF Cooperative Agreements CCR-8809615 and CCR-912008.  相似文献   

12.
Rainbow Sort is an unconventional method for sorting, which is based on the physical concepts of refraction and dispersion. It is inspired by the observation that light that traverses a prism is sorted by wavelength. At first sight this “rainbow effect” that appears in nature has nothing to do with a computation in the classical sense, still it can be used to design a sorting method that has the potential of running in Θ (n) with a space complexity of Θ (n), where n denotes the number of elements that are sorted. In Section 1, some upper and lower bounds for sorting are presented in order to provide a basis for comparisons. In Section 2, the physical background is outlined, the setup and the algorithm are presented and a lower bound for Rainbow Sort of Ω (n) is derived. In Section 3, we describe essential difficulties that arise when Rainbow Sort is implemented. Particularly, restrictions that apply due to the Heisenberg uncertainty principle have to be considered. Furthermore, we sketch a possible implementation that leads to a running time of O(n+m), where m is the maximum key value, i.e., we assume that there are integer keys between 0 and m. Section 4 concludes with a summary of the complexity and some remarks on open questions, particularly on the treatment of duplicates and the preservation of references from the keys to records that contain the actual data. In Appendix A, a simulator is introduced that can be used to visualise Rainbow Sort.  相似文献   

13.
以往的研究大多针对文件系统,而DBMS存在更多细粒度的更新.本文综合考虑闪存自身的特点、设备种类繁多及不同闪存设备读写特性差别大等,提出了一种基于闪存的DBMS索引结构:LD_B+树.LD_B+树根据工作负载的读写特性动态地调节索引模式使之能够适应于不同种类的闪存设备.LD_B+树采用日志结构组织结点,通过结点转换表和日志缓冲区维护索引结构.模拟实验结果表明,不同闪存设备及工作负载下,LD_B+索引结构比B+树和日志型B+树(BFTL)具有6%-63%的性能提高.  相似文献   

14.
We propose an efficient and accurate randomized approximation algorithm for computing the price of European-Asian options. Our algorithm can be seen as a modification of the approximation algorithm developed by Aingworth et al. (2000) into a randomized algorithm, which improves the accuracy theoretically as well as practically. We also propose a new option named the Saving-Asian option which enjoys advantages of both the European-Asian and American-Asian options. It is shown that our approximation algorithm also works for pricing Saving-Asian options.  相似文献   

15.
Pivot-based algorithms are effective tools for proximity searching in metric spaces. They allow trading space overhead for number of distance evaluations performed at query time. With additional search structures (that pose extra space overhead) they can also reduce the amount of side computations. We introduce a new data structure, the Fixed Queries Array (FQA), whose novelties are (1) it permits sublinear extra CPU time without any extra data structure; (2) it permits trading number of pivots for their precision so as to make better use of the available memory. We show experimentally that the FQA is an efficient tool to search in metric spaces and that it compares favorably against other state of the art approaches. Its simplicity converts it into a simple yet effective tool for practitioners seeking for a black-box method to plug in their applications.  相似文献   

16.
FERNN: An Algorithm for Fast Extraction of Rules from Neural Networks   总被引:4,自引:0,他引:4  
Before symbolic rules are extracted from a trained neural network, the network is usually pruned so as to obtain more concise rules. Typical pruning algorithms require retraining the network which incurs additional cost. This paper presents FERNN, a fast method for extracting rules from trained neural networks without network retraining. Given a fully connected trained feedforward network with a single hidden layer, FERNN first identifies the relevant hidden units by computing their information gains. For each relevant hidden unit, its activation values is divided into two subintervals such that the information gain is maximized. FERNN finds the set of relevant network connections from the input units to this hidden unit by checking the magnitudes of their weights. The connections with large weights are identified as relevant. Finally, FERNN generates rules that distinguish the two subintervals of the hidden activation values in terms of the network inputs. Experimental results show that the size and the predictive accuracy of the tree generated are comparable to those extracted by another method which prunes and retrains the network.  相似文献   

17.
Algorithms for parallel memory,II: Hierarchical multilevel memories   总被引:1,自引:0,他引:1  
In this paper we introduce parallel versions of two hierarchical memory models and give optimal algorithms in these models for sorting, FFT, and matrix multiplication. In our parallel models, there areP memory hierarchies operating simultaneously; communication among the hierarchies takes place at a base memory level. Our optimal sorting algorithm is randomized and is based upon the probabilistic partitioning technique developed in the companion paper for optimal disk sorting in a two-level memory with parallel block transfer. The probability of using/times the optimal running time is exponentially small in (log ) logP.A summarized version of this research was presented at the 22nd Annual ACM Symposium on Theory of Computing, Baltimore, MD, May 1990. This work was done while the first author was at Brown University. Support was provided in part by a National Science Foundation Presidential Young Investigator Award with matching funds from IBM, by NSF Research Grants DCR-8403613 and CCR-9007851, by Army Research Office Grant DAAL03-91-G-0035, and by the Office of Naval Research and the Defense Advanced Research Projects Agency under Contract N00014-91-J-4052 ARPA Order 8225. This work was done in part while the second author was at Brown University supported by a Bellcore graduate fellowship and at Bellcore.  相似文献   

18.
We present a new contrast enhancing color to grayscale conversion algorithm which works in real-time. It incorporates novel techniques for image sampling and dimensionality reduction, sampling color differences by Gaussian pairing and analyzing color differences by predominant component analysis. In addition to its speed and simplicity, the algorithm has the advantages of continuous mapping, global consistency, and grayscale preservation, as well as predictable luminance, saturation, and hue ordering properties.  相似文献   

19.
20.
Algorithms for parallel memory,I: Two-level memories   总被引:1,自引:0,他引:1  
We provide the first optimal algorithms in terms of the number of input/outputs (I/Os) required between internal memory and multiple secondary storage devices for the problems of sorting, FFT, matrix transposition, standard matrix multiplication, and related problems. Our two-level memory model is new and gives a realistic treatmentof parallel block transfer, in which during a single I/O each of theP secondary storage devices can simultaneously transfer a contiguous block ofB records. The model pertains to a large-scale uniprocessor system or parallel multiprocessor system withP disks. In addition, the sorting, FFT, permutation network, and standard matrix multiplication algorithms are typically optimal in terms of the amount of internal processing time. The difficulty in developing optimal algorithms is to cope with the partitioning of memory intoP separate physical devices. Our algorithms' performances can be significantly better than those obtained by the wellknown but nonoptimal technique of disk striping. Our optimal sorting algorithm is randomized, but practical; the probability of using more than times the optimal number of I/Os is exponentially small inl(logl) log(M/B), whereM is the internal memory size.A summarized version of this research was presented at the 22nd Annual ACM Symposium on Theory of Computing, Baltimore, MD, May 1990. This work was done while the first author was at Brown University. Support was provided in part by a National Science Foundation Presidential Young Investigator Award with matching funds from IBM, by NSF Research Grants DCR-8403613 and CCR-9007851, by Army Research Office Grant DAAL03-91-G-0035, and by the Office of Naval Research and the Defense Advanced Research Projects Agency under Contract N00014-91-J-4052 ARPA Order 8225. This work was done in part while the second author was at Brown University supported by a Bellcore graduate fellowship and at Bellcore.  相似文献   

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

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