6.3.1 ??????? (Dijkstra algorithm, 1959) - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

6.3.1 ??????? (Dijkstra algorithm, 1959)

Description:

6.3 6.3.1 (Dijkstra algorithm, 1959) – PowerPoint PPT presentation

Number of Views:144
Avg rating:3.0/5.0
Slides: 7
Provided by: Xin124
Category:

less

Transcript and Presenter's Notes

Title: 6.3.1 ??????? (Dijkstra algorithm, 1959)


1
6.3 ?????
  • 6.3.1 ??????? (Dijkstra algorithm, 1959)
  • ???????????????????????
  • ? dij ?? vi ? vj ?????(??????),????????,?? dij
    ?,?????????,? dji ?? dii 0,s ????,t ????
  • 0????Ts0,????,?????????? Tj?
  • 1?? vs ??,?????? vj1 ??????,? Tj1ds,j1
  • 2??????????????,????,??? vr ?????????????,??????
    ????
  • 3?????????? vr ??,????????????????,? vj2 ??????,?
    Tj2minTj2, Trdr,j2 ,???2??

2
?1 ???????
?
?
10
11
?
31
0
?
15
12
?
?
8
15
13
3
Dijkstra?????????????
  • ????????????
  • ????????????????,????????????????????,???????????
    ???????????????????,??????
  • ???????? Tj ?? vs ? vj ????,?? ?? dij?0,? k
    ??????????,???????? k ??,?????n?1 ???
  • ??????????????,??????,???????????????? n?1
    ???????????? ?,??? vs ?????????
  • ???? vs ? vt ????,?? vt ??????????????????????
  • ?? Dijkstra ?? n?1 ? ,???????????
  • vs ???????????????,????????

4
6.3.2 Warshall-Floyd?? (1962)
  • Warshall-Floyd???????????(?)??????
  • ??????????,????????????
  • ????????????,??????????
  • ????????????
  • ?? ????????????dij,?dii?,??? i??? ???? j,??
    dikmindik, dijdjk, ??? i, k ? j , ??
    ?????(??,???? ik)
  • ?? ??? j1,2,,n ??????,? dik ???? i ? k ????????

5
6.3.2 Floyd-Warshall ?? (1962)
  • for i1 to n do dii?
  • for all eij0
  • for j1 to n do
  • for i1 to n do if i?j then
  • for k1 to n do if k?j then
  • begin
  • dikmindik, dijdjk
  • if dikgtdijdjk then eikj
  • end
  • ?????????,????,?? dii ???0,???????
  • ??,Floyd ????? n(n-1)2 ??????
  • ????????????????
  • ?Floyd ?????????Eeik, eik ??? i ? k
    ????????????

6
??
  • ????????? (6.3.4? ???????)
  • ???????????,???????,???,???,????,????,????,k-????
  • ????????,Floyd???Dijkstra?????,????????Dijkstra???
    ?
  • ??????,?Dijkstra????????????
  • ?????,??????? NP-complete,????? P??
  • ???k-???????????????
  • ??????k-????????????,?????????????,??Dijkst
    ra????????,????
Write a Comment
User Comments (0)
About PowerShow.com