图的赋权路径矩阵与所有点对最短路径问题

2017,53(9)1引言最短路径作为图与网络技术研究中的一个经典问题一直在计算机科学、通信和运筹学、地理信息科学等领域有着十分广泛的应用,对该问题求解算法的设计和改进研究有着重要的理论和应用价值。最短路径是指从图的某顶点出发,沿图的边到达另一顶点所经过的路径中,各边上权值之和最小的一条路径。解决最短路径问题的算法有很多,其中Dijkstra 算法和Floyd 算法是公认的求赋权图中最短路问题的好算法[1]。但是,这两个算法都存在一些不足:(1)Dijkstra 算法用于求解一给定点到其他所有点之间的最短路,但在最短路不唯一的情况下,它不能求出这一点到其他所有点之间的全部

最短路。(2)Floyd 算法用于求赋权图中任意两点之间的最短路,但不能求出这一点到其他所有点之间的全部最短路[1]。

因为一个赋权图对应一个赋权矩阵,所以很多文献借助赋权矩阵运算来求最短路问题[1-15],该方法扩展了线性代数中的矩阵乘法概念及运算,可以把求最短路转化为矩阵的运算,计算简便、有效。但是这些方法重点给出了赋权图中任意两点之间的最短路权值,而要求出这两点之间的全部最短路径仍然很复杂,文献[12-15]讨论了这种算法的计算复杂度。本文引入二维元素矩阵图的赋权路径矩阵与所有点对最短路径问题

高遵海,高颖,程果

GAO Zunhai,GAO Ying,CHENG Guo

武汉轻工大学数学与计算机学院,武汉430023

School of Mathematics and Computer Science,Wuhan Polytechnic University,Wuhan 430023,China

GAO Zunhai ,GAO Ying ,CHENG Guo.Weighted path matrix of graph and all pairs shortest path https://www.360docs.net/doc/d9155459.html,puter Engineering and Applications,2017,53(9):47-50.

Abstract:The concept of two-dimensional element matrix is presented.For the weighted matrix corresponding to a weighted graph,the two-dimensional element initial weighted path matrix and general weighted path matrix are defined.Based on the general multiplication operation of the weighted matrices,the multiplication operation of the paths is de-fined,and then the multiplication operation of the general weighted path matrices is derived,by which all the minimum weights and all the shortest paths of all pairs can be found clearly in the final general weighted path matrix.This algo-rithm is easy to be realized by computer program.It is more intuitive and will not miss any path for large-scale directed graph or undirected graph.

Key words:shortest path problem;two-dimensional elements matrix;weighted path matrix;multiplication of weighted path matrix

摘要:给出了二维元素矩阵的概念,对于赋权图对应的赋权矩阵,定义了二维元素初始赋权路径矩阵和二维元素一般赋权路径矩阵,在通常赋权矩阵“乘法”运算基础上定义了路径“乘法”运算,从而得到了二维元素一般赋权路径矩阵的“乘法”运算,通过其“乘法”运算来求出所有点对的最短距离与对应路径,在得到最短距离的同时也得到对应的路径,结果显示在最终的一般赋权路径矩阵上。该算法易于通过计算机编程实现,对于大规模有向图或无向图,更有优势。

关键词:最短路径问题;二维元素矩阵;赋权路径矩阵;赋权路径矩阵乘法

文献标志码:A 中图分类号:TP301.6doi :10.3778/j.issn.1002-8331.1511-0190

基金项目:国家自然科学基金(No.61179032,No.11301405)。

作者简介:高遵海(1966—),男,博士,教授,研究领域为离散数学,代数理论与应用,E-mail :gaozunhai@https://www.360docs.net/doc/d9155459.html, ;高颖(1992—),

女,硕士研究生,研究领域为运筹学;程果(1980—),男,硕士研究生,研究领域为网络工程。

收稿日期:2015-11-16修回日期:2016-03-04文章编号:1002-8331(2017)09-0047-04

CNKI 网络优先出版:2016-03-25,https://www.360docs.net/doc/d9155459.html,/kcms/detail/11.2127.TP.20160325.2018.058.html

Computer Engineering and Applications 计算机工程与应用

47

万方数据

相关文档
最新文档