Data base - PowerPoint PPT Presentation

1 / 24
About This Presentation
Title:

Data base

Description:

Title: Author: user Last modified by: mslee Created Date: 10/29/2002 1:46:31 PM Document presentation format: – PowerPoint PPT presentation

Number of Views:10
Avg rating:3.0/5.0
Slides: 25
Provided by: edut1550
Category:
Tags: base | data | trans

less

Transcript and Presenter's Notes

Title: Data base


1
???????
????
  • ??? 2002/11/11
  • Data base
  • Label Setting Algorithm
  • Label Correcting Algorithm

2
Data Base
3
From To Distance
1 2 6
1 4 3
1 5 2
2 3 2
2 5 2
2 6 1
3 6 3
4 5 1
5 2 3
5 6 5
6
2
1
2
3
2
1
3
2
3
3
4
5
6
1
5
?30???
4
To Distance
2 6
4 3
5 2
3 2
5 2
6 1
6 3
5 1
2 3
6 5
Forward star
(1)Point 1
(2)Point 4
6
2
(3)Point 7
1
2
3
(4)Point 8
2
1
3
2
3
3
(5)Point 9
4
5
6
1
5
?25???
5
Label Setting Algorithm
6
Dijkstras Shortest-Path Algorithm(Label Setting
Algorithm )
  • ??????K??,?????????
  • s t,?? s?t?????
  • Step1
  • ????d(x)??s??x????
  • (x????????)
  • when
  • when
  • ??ys

7
  • Step2
  • ?
  • a(y,x)??y?x????,?y???????x??, a(y,x)???
  • Ex
  • a(s,x)a(x,t)10 , a(s,t)a(x,s)a(t,x)???
  • ?d(x)???????x (?s????y)?y
  • Ex
  • d(s)0 , d(a)5 , d(b)7 , d(c)6 , ya

8
  • Step3
  • ?yt?,???s?t?????
  • ??????Step2

9
????
  • ??????,????????????,??????P(x)????x????P(x)????
  • Ex
  • P(a)s , P(b)a , P(t)b

t
s
b
a
10
??
  • ?????

3
2
4
7
2
2
3
3
11
ys
12
d(s)0
d(1)mind(1) , d(s) a(s,1)min8,044
d(2)mind(2) , d(s) a(s,2)min8,077
d(3)mind(3) , d(s) a(s,3)min8,033
d(4)8
d(t)8
y3
S?3?????3
13
d(s)0
d(1)4
d(2)7
d(3)3(???y)
d(4)mind(4) , d(3) a(3,4)min8,336
d(t)8
y1
S?1?????4
14
d(s)0
d(1)4(???y)
d(2)mind(2) , d(1) a(1,2)min7,437
d(3)3(???y)
d(4)6
d(t)8
y4
S?4?????6
15
d(s)0
d(1)4(???y)
d(2)7
d(3)3(???y)
d(4)6(???y)
d(t) mind(t) , d(4) a(4,t)min8,628
y2
S?2?????7
16
d(s)0
d(1)4(???y)
d(2)7(???y)
d(3)3(???y)
d(4)6(???y)
d(t) mind(t) , d(2) a(2,t)min8,728
y8
S?t?????8
17
Label Correcting Algorithm
18
Label Correcting AlgorithmFord(1946) ,
Moore(1957) , Bellman(1958)
  • ??????n?,??s
  • ???s?k???x???
  • ?k??, ???
  • ?????,?k?????(??)??
  • k??,?????????
  • S?????????????

???
??
??
??
19
K
  • ???K?????????,???????????,????????
  • Ex

2
1
3
???node 1 ?node 3 ?????,?node 3?K?2
20
Algorithm
  • ????
  • k0 , d(s)0 , when
  • Ss , kk1 , go to Step1

21
  • Step1
  • -???S???????????d(x)
  • -d(x)mind(x),d(s)a(s,x)
  • Step2
  • -S j d(j) ?step1???
  • -T(j)S????j?????
  • Step3
  • when klt(n-1) , kk1 , go to
    Step1
  • when klt(n-1) , Stop
  • when kn , Stop

22
??
23
k j T(j) d(x) k update Distanc Label S
0 d(1)0 L0,8, 8, 8 1
1 2,4 2 1 d(2)min8,011 1 Y
4 1 d(4)min8,044 1 Y L0,1, 8,4 2,4
P0,1,0,1
2 3 3 2 d(3)min8,112 2 Y L0,1,2,4 3
P0,1,2,1
3 4 4 3 d(4)min4,213 3 Y L0,1,2,3 4
P0,1,2,3
24
??
  • ?forward star?????????data base
  • ?label setting ? label correcting Algorithm
  • ???1????????

3
2
1
3
1
4
9
5
7
7
3
4
6
10
9
6
5
7
4
7
5
8
6
9
3
2
5
8
Write a Comment
User Comments (0)
About PowerShow.com