首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到15条相似文献,搜索用时 125 毫秒
1.
稀疏矩阵情况下Warshall算法的改进   总被引:1,自引:0,他引:1  
围绕二元关系的传递闭包分析比较了著名的Warshall算法,给出了一个加列算法。当关系矩阵是稀疏矩阵时,该算法效率比Warshall算法高。  相似文献   

2.
目前在不含负回路的网络中,对于求解任意两节点之间最短路问题的方法有很多,Floyd算法是最经典的算法之一,但随着节点数量的增加,重复的计算量也随之增大,从而降低了计算效率。为此,文中通过迭代矩阵和下标标注法对Floyd算法进行了改进,改进后的算法既能快速地计算出网络中任意两节点之间的最短路长值,又能更直观地找出最短路径。通过具体实例分析表明,Floyd改进算法减少了重复计算,简化了路径标注方法,提高了计算效率。  相似文献   

3.
为了提高图的最优矩阵的构建效率,文中通过对Floyd算法的研究,进一步提出了对其进行四层优化的方法,通过对图的矩阵中的特殊元素的删除和在计算前的判断减少了不必要的计算,加入贪心算法使其减少中间结果的生成,使中间结果更加接近图的最优矩阵.优化后的Floyd算法在很大程度上提高了执行效率,使其在实际应用中更加可取,经过逐步的优化使改进后的算法在运行时间上平均时间最多减少为原来的四分之一,而且随着图顶点数目的增加,修改后的Floyd算法效率有显著的提高,因此,在实际应用中是一个切实可行的算法.  相似文献   

4.
为了提高图的最优矩阵的构建效率,文中通过对Floyd算法的研究,进一步提出了对其进行四层优化的方法,通过对图的矩阵中的特殊元素的删除和在计算前的判断减少了不必要的计算,加入贪心算法使其减少中间结果的生成,使中间结果更加接近图的最优矩阵。优化后的Floyd算法在很大程度上提高了执行效率,使其在实际应用中更加可取,经过逐步的优化使改进后的算法在运行时间上平均时间最多减少为原来的四分之一,而且随着图顶点数目的增加,修改后的Floyd算法效率有显著的提高,因此,在实际应用中是一个切实可行的算法。  相似文献   

5.
基于求传递闭包的Warshall算法的改进   总被引:7,自引:0,他引:7  
围绕传递闭包分析比较了著名的Warshall算法,给出了一个三角形算法。当关系矩阵是稀疏矩阵时,该算法比Warshall快。  相似文献   

6.
根据数据之间的相似性,提出了一种基于改进Warshall算法的数据聚类方法.该方法在传统Warshall算法的基础上,引入聚类因子λ,构造模糊相似关系的传递闭包.由于相似性的自反性与对称性,该传递闭包就是模糊相似关系的等价闭包,把等价数据分到一类形成聚类.实验结果表明,该方法可得到与传统的K-均值聚类算法相同的聚类结果.  相似文献   

7.
一种基于模糊理论和条件熵的属性近似约简的方法   总被引:3,自引:1,他引:2  
皋军  王建东 《计算机工程与应用》2004,40(21):182-184,212
给出了一种基于信息系统中连续型属性的模糊相似关系的定义以及相对应的关系矩阵,为了降低计算量对Warshall算法进行了改进。从信息论的角度提出了基于条件信息熵的属性新的近似相对约简集的概念和对应的约简算法,分析了算法的复杂度。实例和算法比较说明该算法是有效的。  相似文献   

8.
Dijkstra算法与Floyd算法是求最短路径的最常用、也是最有效的两种方法。通过从多方面对Dijkstra算法与Floyd算法的进行比较、分析,给出这两种算法的差异及Floyd关键部分的程序,并介绍了Dijkstra改进的算法。  相似文献   

9.
本文给出了根据传递扩张原理、关系矩阵、关系复合运算、Warshall算法以及改进的Warshall算法等几种求解二元关系传递闭包方法,并分析了各自的特点,可帮助学生有效掌握求解二元关系传递闭包的运算。  相似文献   

10.
Floyd算法是“数据结构”课程里的一个经典算法,但其原理却难以掌握,影响到该算法的教学效果。本文从求最短路径的基本思想出发,对Floyd算法的原理进行了剖析,并给出了该算法的正确性证明,有助于学生理解和掌握该算法。  相似文献   

11.
Around 1960, Dijkstra, Floyd and Warshall published papers on algorithms for solving single-source and all-sources shortest path problems, respectively. These algorithms, nowadays named after their inventors, are well known and well established. This paper sheds an algebraic light on these algorithms. We combine the shortest path problems with Kleene algebra, also known as Conway’s regular algebra. This view yields a purely algebraic version of Dijkstra’s shortest path algorithm and the one by Floyd/Warshall. Moreover, the algebraic abstraction yields applications of these algorithms to structures different from graphs and pinpoints the mathematical requirements on the underlying cost algebra that ensure their correctness.  相似文献   

12.
This paper considers the generation of the origin–destination (OD) matrix, basic data in any vehicle routing or traveling salesman problem. An OD matrix must be generated by calculating the shortest paths between some nodes. Candidate methods for this are repetitive use of one-to-all shortest path algorithms such as Dijkstra’s algorithm, use of all-to-all shortest path algorithms such as the Floyd–Warshall algorithm, and use of specifically designed some-to-some shortest path algorithms. This paper compares the performance of several shortest path algorithms in computing OD matrices on real road networks. Dijkstra’s algorithm with approximate bucket data structure performed the best for most of the networks tested. This paper also proposes a grouping-based algorithm for OD matrix generation. Although it is an approximation approach, it has several good characteristics: it can find the exact shortest distances for most OD pairs; it guarantees that all the calculated shortest path distance values have corresponding paths; the deviation of any distance from the corresponding true shortest distance is small; and its computation time is short.  相似文献   

13.
针对智能交通系统(ITS)中求解多条准最短路径的问题,提出了一种混合算法。该算法以Floyd算法和A*算法为基础,主要运用遗传算法来求解多条准最短路径。实验的结果表明了该混合算法的可行性和比其他算法的高效性。  相似文献   

14.
Closed semi-rings and the closure of matrices over closed semi-rings are defined and studied. Closed semi-rings are structures weaker than the structures studied by Conway [3] and Aho, Hopcroft and Ullman [1]. Examples of closed semi-rings and closure operations are given, including the case of semi-rings on which the closure of an element is not always defined. Two algorithms are proved to compute the closure of a matrix over any closed semi-ring; the first one based on Gauss–Jordan elimination is a generalization of algorithms by Warshall, Floyd and Kleene; the second one based on Gauss elimination has been studied by Tarjan [11, 12], from the complexity point of view in a slightly different framework. Simple semi-rings, where the closure operation for elements is trivial, are defined and it is shown that the closure of an n × n-matrix over a simple semi-ring is the sum of its powers of degree less than n. Dijkstra semi-rings are defined and it is shown that the rows of the closure of a matrix over a Dijkstra semi-ring, can be computed by a generalized version of Dijkstra's algorithm.  相似文献   

15.
左秀峰  沈万杰 《计算机科学》2017,44(5):232-234, 267
路径分析是网络分析最基本的问题,其核心是对最短路径的求解。Floyd算法是一种求取最短路的经典算法。分析发现,两点间可能存在多条权重相同的最短路径,而这一点Floyd算法没有涉及。以无向联通图为研究对象,设计了基于Floyd求解多重等价最短路算法,并分析计算了一个实际算例。计算结果表明,基于Floyd的多重等价最短路算法可以有效解决多重等价最短路问题。  相似文献   

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

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