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L(u0)=d(u0,u0)=0L(v)=(vV{u0})(u,v)uvL(v)4(u,v)L(v)L(u)+f(u,v)L(v)=L(u)+f(u,v)(L(u)L(v))(a)L(v)L(u)+f(u,v)L(v)(b)L(v)L(u)+f(u,v)L(v)A*S3.A*VU0V0SL(Ui)U0UiJ(Ui,V0)UiV036RESULTNO[Uj]U0UjUjUjVNODEUSE[Ui]Ui01F(Ui,Uj)UiUjU0L(U0)=0L(Ui)=UiVNODEUSE[U0]=0U0-UiI=0{Ui}-SNODEUSE[Uj]=1UjV-SS={U0}UiUi-XHCSUj1L(Uj)L(Ui)+F(Ui,Uj)L(Uj)=L(Ui)+F(Ui,Uj)RESULTNO(Uj)=UiF(UiUj)UiUjUiUjUjU0UjL(Uj)UjUi2J(Uj,V0)=J(Uj,V0)SQRT((UjV0)2+(UjV0)2)UjV0L(Uj)+J(Uj,V0)UjV-S-UiS+{Ui}-SL(Uj)+J(Uj,V0)UiNODEUSE[Ui]=0Ui=V0?62-5L(V0)U0V0RESULTNO(V0)U051(00)2(4-2)3(80)4(42)5(100)6(162)7(18-2)8(260)518Dijkstra1-4-2-3-7-5-6-8A*1-3-5-84.A*A*DijkstraDijkstramsDijkstraA*2.71.5322.51.931.5-21.2-2.51.4-21.23.52.5-31.5-1.41-2.52-32A*DijkstraDijkstra37126()6DijkstraABS31A*AB13A*[1],,:,1995.[2],,Dijkstra,,2001.[3],,(2),:,1997:pp.159-281.[4],,.ImprovementontheShortestPathAlgorithmofDigitalTrafficMapLinZhou1(1SchoolofCommunicationandElectronicsofWujiangVocationalTechnologyCollege,NanjingUniversityofPost&Telecommunications,Wujiang215200,China)Abstract:Thispaperdiscussestheproblemsonthedesignandtherealizationofthesystem.Itemphasizesonthemeansofgatheringdata,storingdataandthedesignoftheshortestpathalgorithm.BasedOnthis,thepaperoffersusthewaytoimprovethealgorithm,andgivesusanoptimizedalgorithmcalledA*algorithm.ItcomparestheDijkstraalgorithmwiththeA*algorithmonefficiencyfinally.Keywords:ShortestPath;DijkstraAlgorithm;A*AlogrithmBrickIvan