【正文】
g rapidly in recent years, graph theory research also have been greatly developed, and the shortest path problem is a typical problem in graph theory, it has been applied in geographical information science, puter science, and many other fields. And in the transportation network of the shortest route between two cities in is a typical example of the shortest path problem.Due to the shortest path problem is widely used in various aspects, and the researchers on the indepth study of the shortest path, makell suggest some algorithm and the algorithm of the shortest path problem between the parison, finally the algorithm is applied to the modeling of the actual problem again.Key words: puter graph traffic road network The shortest path前言 最短路徑問題是圖論以及運籌學(xué)中的一個非常重要的問題,在生產(chǎn)實踐,運輸及工程建筑等方面有著十分廣泛的應(yīng)用。本文從Floyd算法以及Dijkstra算法兩種算法入手,概述了這兩種方法的原理,提出了求解最短路徑問題的算法思想,并且對兩種算法進(jìn)行分析比較,提出改進(jìn)的方法。圖1就是一個圖。若={,}則稱連接和;點和稱為的頂點,和是鄰接的頂點;如果兩條邊有公共的一個頂點,則稱這兩邊是鄰接的。 簡單圖定義:沒有環(huán)且沒有重邊的圖稱之為簡單圖。 有向圖定義:一個有向圖G是一個有序二元組(V,A),V={,...,}是頂點集,A={}稱為G的弧集,為有序二元組。圖2就是一個有向圖。 簡單有向圖定義:沒有環(huán)和重弧的有向圖稱為簡單有向圖。 途徑,跡,路定義:設(shè)圖G=(V,E),若它的某些頂點與邊可以排成一個非空的有限交錯序列(,,...,),這里該途徑中邊互不相同,則稱為跡;如果頂點互不相同,則稱之為路。 連通圖定義:圖G中如果存在一條從頂點到的途徑,則稱和是連通的。 有向途徑定義:設(shè)有一個有向圖G=(V,A),G中某些頂點與弧組成的非空有限