首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 109 毫秒
1.
为丰富O(n2)阶排序算法的种类,以更好地服务于教学科研和日常应用,提出了一种新的排序算法-双向选择排序算法.通过数学方法分析得知:该算法的时间复杂度为O(n2),空间复杂度为O(1).通过实验对比得知:在相同条件下,该算法的运行时间平均为冒泡排序的27%、简单选择排序的62%、直接插入排序的88%.  相似文献   

2.
<正>课程核心素养目标(1)根据学习与生活需要,有意识地选用排序算法处理信息,对于简单问题,确定解决问题的需求和数据,使用排序整理数据,解决问题。(信息意识)(2)通过生活中的实例,了解排序算法的原理,对于给定的问题,能将其分解为一系列的实施步骤,使用顺序、分支、循环三种基本控制结构简单描述排序算法实施过程,通过编程验证该过程。(计算思维)  相似文献   

3.
Multisets排序的最优并行算法   总被引:5,自引:0,他引:5  
排序是一个既有十分重要的理论意义又有广泛的实际应用价值的问题 ,其中 ,Multisets排序问题是指对只有k个不同关键字值的n个数据 (记录 )进行排序 ,0 相似文献   

4.
分布排序算法   总被引:2,自引:0,他引:2  
提出了一个分布排序算法。它利用数学公式j=「N·F(Y(i))」+1 (F(Y(i))是数据元素Y(i)的分布函数)进行排序。并给出了算法复杂性证明。该算法排序n个元素序列的期望时间为O(n)。  相似文献   

5.
<正> n 个实数的排序是最经常遇到的问题之一。目前常用的排序方法是“泡沫分类法”,用 ALGOL60书写,形式为for j:=n-1 step-1 until 1 dofor i:=1 until j doif A[i+1]相似文献   

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

7.
<正> 一、引言 排序是计算机软件工程中一个重要课题,往往一个程序运行时其中相当多的时间要花费在排序上,因此,为了提高计算机的工作效率,研究出更为有效的排序算法则是软件工作者面临的一项任务,现已有多种排序方法,如插入排序、选择排序、堆排序、希尔(shell)排序、快速排序、合并排序等,特别是其中的快速排序法,不仅平均速度最快(它的平均排序时间  相似文献   

8.
伴随着社会的发展,数据也变得越来越庞大.面对海量的资料,如果信息没有进行排序,就会大大增加工作难度.本文对三种排序算法(冒泡排序、选择排序、直接插入排序)进行设计,并利用C语言实现这三种算法.  相似文献   

9.
一种基于HASH变换的循环散列分档排序算法   总被引:1,自引:1,他引:1  
在数据排序问题中,各种分段快速排序算法[3~11]只有对特定的数据分布类型或者符合ΔM相似文献   

10.
1 基于二叉树的位排序算法(binary_tree bit sort简称为DBS算法) 设待排序的一组数据的排序码为k_1,k_2,…,k_n,二叉树中任一结点的左子女表示0,在子女表示1,则DBS算法的排序过程如下:  相似文献   

11.
A particle swarm optimization (PSO) algorithm combined with the random-key (RK) encoding scheme (named as PSORK) for solving a bi-objective personnel assignment problem (BOPAP) is presented. The main contribution of this work is to improve the f1_f2 heuristic algorithm which was proposed by Huang et al. [3]. The objective of the f1_f2 heuristic algorithm is to get a satisfaction level (SL) value which is satisfied to the bi-objective values f1, and f2 for the personnel assignment problem. In this paper, PSORK algorithm searches the solution of BOPAP space thoroughly. The experimental results show that the solution quality of BOPAP based on the proposed method is far better than that of the f1_f2 heuristic algorithm.  相似文献   

12.
We show the essential ability of sparse signal reconstruction of different compressive sensing strategies,which include the L1 regularization,the L0 regularization(thresholding iteration algorithm and OMP algorithm),the Lq(0 < q ≤ 1) regularizations,the Log regularization and the SCAD regularization.Taking phase diagram as the basic tool for analysis,we find that(i) the solutions of the L0 regularization using hard thresholding algorithm and OMP algorithm are similar to those of the L1 regularization;(ii) the Lq regularization with the decreasing value of q,the Log regularization and the SCAD regularization can attain sparser solutions than the L1 regularization;(iii) the L1/2 regularization can be taken as a representative of the Lq(0 < q < 1) regularizations.When 1/2 < q < 1,the L1/2 regularization always yields the sparsest solutions and when 0 < q < 1/2 the performance of the regularizations takes no significant difference.The results of this paper provide experimental evidence for our previous work.  相似文献   

13.
In this paper we consider the problem of scheduling a collection of independent tasks on multiple processors (denote the number of processors by p) so that the maximum completion time is minimized. We present two new algorithms, the LPT-MinHeight (LPTMH) algorithm and the Split-LPT(SLPT) algorithm. Both algorithms are based on the LPT(Largest Processing Time first) algorithm. The worst case imbalance for the LPTMH algorithm never exceeds 1/(e − 1) ≤ 0.582, while the worst case imbalance for the SLPT algorithm is (p − 1)/(p + 1) < 1. The SLPT bound is equal to the bound for a previously published algorithm while the LPTMH bound is the best known so far. Both LPTMH and SLPT take much less running time than competing algorithms. Results of experiments show that the SLPT algorithm performs better on the average than the LPTMH algorithm and as well as other known algorithms.  相似文献   

14.
In this paper we present a polynomial time algorithm for solving the problem of partial covering of trees with n1 balls of radius R1 and n2 balls of radius R2 (R1 < R2) to maximize the total number of covered vertices. The solutions provided by this algorithm in the particular case R1 = R – 1, R2 = R can be used to obtain for any integer δ > 0 a factor (2+1/δ) approximation algorithm for solving the following augmentation problem with odd diameter constraints D = 2R + 1: Given a tree T, add a minimum number of new edges such that the augmented graph has diameter ≤ D. The previous approximation algorithm of Ishii, Yamamoto, and Nagamochi (2003) has factor 8.  相似文献   

15.
We present the first in-place algorithm for solving Klee's measure problem for a set of n axis-parallel rectangles in the plane. Our algorithm runs in O(n3/2logn) time and uses O(1) extra words in addition to the space needed for representing the input. The algorithm is surprisingly simple and thus very likely to yield an implementation that could be of practical interest. As a byproduct, we develop an optimal algorithm for solving Klee's measure problem for a set of n intervals; this algorithm runs in optimal time O(nlogn) and uses O(1) extra space.  相似文献   

16.
The well-known Transport Control Protocol (TCP) is a crucial component of the TCP/IP architecture on which the Internet is built, and is a de facto standard for reliable communication on the Internet. At the heart of the TCP protocol is its congestion control algorithm. While most practitioners believe that the TCP congestion control algorithm performs very well, a complete analysis of the congestion control algorithm is yet to be done. A lot of effort has, therefore, gone into the evaluation of different performance metrics like throughput and average latency under TCP. In this paper, we approach the problem from a different perspective and use the competitive analysis framework to provide some answers to the question “how good is the TCP/IP congestion control algorithm?” We describe how the TCP congestion control algorithm can be viewed as an online, distributed scheduling algorithm. We observe that existing lower bounds for non-clairvoyant scheduling algorithms imply that no online, distributed, non-clairvoyant algorithm can be competitive with an optimal offline algorithm if both algorithms were given the same resources. Therefore, in order to evaluate TCP using competitive analysis, we must limit the power of the adversary, or equivalently, allow TCP to have extra resources compared to an optimal, offline algorithm for the same problem. In this paper, we show that TCP is competitive to an optimal, offline algorithm provided the former is given more resources. Specifically, we prove first that for networks with a single bottleneck (or point of congestion), TCP is ${\mathcal{O}}(1)The well-known Transport Control Protocol (TCP) is a crucial component of the TCP/IP architecture on which the Internet is built, and is a de facto standard for reliable communication on the Internet. At the heart of the TCP protocol is its congestion control algorithm. While most practitioners believe that the TCP congestion control algorithm performs very well, a complete analysis of the congestion control algorithm is yet to be done. A lot of effort has, therefore, gone into the evaluation of different performance metrics like throughput and average latency under TCP. In this paper, we approach the problem from a different perspective and use the competitive analysis framework to provide some answers to the question “how good is the TCP/IP congestion control algorithm?” We describe how the TCP congestion control algorithm can be viewed as an online, distributed scheduling algorithm. We observe that existing lower bounds for non-clairvoyant scheduling algorithms imply that no online, distributed, non-clairvoyant algorithm can be competitive with an optimal offline algorithm if both algorithms were given the same resources. Therefore, in order to evaluate TCP using competitive analysis, we must limit the power of the adversary, or equivalently, allow TCP to have extra resources compared to an optimal, offline algorithm for the same problem. In this paper, we show that TCP is competitive to an optimal, offline algorithm provided the former is given more resources. Specifically, we prove first that for networks with a single bottleneck (or point of congestion), TCP is O(1){\mathcal{O}}(1)-competitive to an optimal centralized (global) algorithm in minimizing the user-perceived latency or flow time of the sessions, provided we allow TCP O(1){\mathcal{O}}(1) times as much bandwidth and O(1){\mathcal{O}}(1) extra time per session. Second, we show that TCP is fair by proving that the bandwidths allocated to sessions quickly converge to fair sharing of network bandwidth.  相似文献   

17.
The computation of shortest paths on a polyhedral surface is a common operation in many computer graphics applications. There are two best known exact algorithms for the “single source, any destination” shortest path problem. One is proposed by Mitchell et al. (1987) [1]. The other is by Chen and Han (1990) [11]. Recently, Xin and Wang (2009) [9] improved the CH algorithm by exploiting a filtering theorem and achieved a practical method that outperforms both the CH algorithm and the MMP algorithm whether in time or in space.In this paper, we apply the improved CH algorithm to different versions of shortest path problems. The contributions of this paper include: (1) For a surface point p∈△v1v2v3, we present an unfolding technique for estimating the distance value at p using the distances at v1,v2 and v3. (2) We show that the improved CH algorithm can be naturally extended to the “multiple sources, any destination” version. Also, introducing a well-chosen heuristic factor into the improved CH algorithm will induce an exact solution to the “single source, single destination” version. (3) At the conclusion of multi-source shortest path algorithms, we can use the distance values at vertices to approximately compute the geodesic-distance-based offsets, the Voronoi diagram and the Delaunay triangulation in O(n) time. (4) By importing a precision parameter λ, we obtain a precision controlled approximant which varies from the improved CH algorithm to Dijkstra’s algorithm as λ increases from 0 to 1. Thus, an interesting relationship between them can be naturally established.  相似文献   

18.
Abstract. In this paper two problems on the class of k -trees, a subclass of the class of chordal graphs, are considered: the fast reordering problem and the isomorphism problem. An O(log 2 n) time parallel algorithm for the fast reordering problem is described that uses O(nk(n-k)/\kern -1ptlog n) processors on a CRCW PRAM proving membership in the class NC for fixed k . An O(nk(k+1)!) time sequential algorithm for the isomorphism problem is obtained representing an improvement over the O(n 2 k(k+1)!) algorithm of Sekharan (the second author) [10]. A parallel version of this sequential algorithm is presented that runs in O(log 2 n) time using O((nk((k+1)!+n-k))/log n) processors improving on a parallel algorithm of Sekharan for the isomorphism problem [10]. Both the sequential and parallel algorithms use a concept introduced in this paper called the kernel of a k -tree.  相似文献   

19.
In this paper, an iterative algorithm is presented to solve the Sylvester and Lyapunov matrix equations. By this iterative algorithm, for any initial matrix X1, a solution X* can be obtained within finite iteration steps in the absence of roundoff errors. Some examples illustrate that this algorithm is very efficient and better than that of [ 1 ] and [2].  相似文献   

20.
Most of the work that appears in the two-dimensional orthogonal graph drawing literature deals with graphs whose maximum degree is four. In this paper we present an algorithm for orthogonal drawings of simple graphs with degree higher than four. Vertices are represented by rectangular boxes of perimeter less than twice the degree of the vertex. Our algorithm is based on creating groups / pairs of vertices of the graph. The orthogonal drawings produced by our algorithm have area at most (m-1) ( m / 2 +2) . Two important properties of our algorithm are that the drawings exhibit a small total number of bends (less than m ), and that there is at most one bend per edge. Received January 15, 1997; revised February 1, 1998.  相似文献   

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

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