???? Graph Structure - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

???? Graph Structure

Description:

Title: Artificial Intelligence AI Author: pluto Last modified by: pluto Created Date: 1/13/2006 11:57:52 AM Document presentation format: – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 30
Provided by: plu84
Category:

less

Transcript and Presenter's Notes

Title: ???? Graph Structure


1
????Graph Structure
  • chapter 9

2
???????
  • ??????????
  • ??????,?????????,?????????,????????

3
  • ?????(Eular)?????
  • ????(Vertices)???????,?(Edge)???????
  • ???????????????,??????????,???????,????????

4
??
  • Graph
  • ???(Vertices)??(Edges)???
  • ?G(V,E)???
  • V????????,E???????
  • ????(Undirected Graph)
  • ?(Edges)???????
  • ?(V1,V2)??(V2,V1)????
  • ????(Directed Graph)
  • ?(Edges)??????
  • ?ltV1,V2gt??ltV2,V1gt?????

5
???? ?(A)? ?????,??(Vertices)??(Edges)
?? V(G)A,B,C,D,E E(G)(A,B),(A,C),(B,A),(B,D)
,(C,A),(C,E),(D,B) ,(D,E) ,(E,C) ,(E,D) ?(B)?
?????,??(Vertices)??(Edges) ?? V(G)A,B,C,D,E E
(G)ltA,Bgt,ltA,Cgt,ltB,Dgt,ltC,Egt,ltD,Egt
6
????????????
  • ???? ( complete graph )
  • ????????,??n???,?????n(n-1)/2??,?????????
  • ????????,??n???,?????n(n-1)??,????????

7
  • ?? ( path )
  • ???,??????????????
  • ??(A)?,A?E????(A,B), (B,E)?(A,C),
    (C,E)?(A,B),(B,D),(D,E)?
  • ????(simple path)
  • ???????(cycle,????)
  • (A,B),(B,D),(D,E),(E,C),(C,A)???????A,??????????

8
  • ????(Path Length)
  • ???? k ???????(Edge)???
  • ??(subgraph)
  • ? G(V,E) ? G(V,E) ???,?V?V?E?E

9
  • ??(Connected)
  • ??????,???Vi???Vj?????,?Vi?Vj????
  • ????(Connected Graph)
  • ????G?,?????????,??????????,?????????
  • ????(Connected Component)
  • ?????????(Maximal Connected Subgraph),??????2?????

10
  • ????(Strongly Connected)
  • ?????(Directed Graph)??,?????ltVi,Vjgt ??????? Vi ?
    Vj ??????????Vj? Vi???(Directed Graph)
  • ??(Adjacent)
  • ???? u,v?V,(u,v)?E,??? u ??? v ??
  • ??????????

11
  • ???(Degree)
  • ????? u ??????? u ?????,??9-3??(A)?A???????2
  • ???G(V,E)
  • ???? ( in - degree )??????v????????????9-3??(B)?,
    A ????????0,?E????????2
  • ???? ( out - degree )?????????,???????v??????????
    ??9-3??(B)?,A????????2,?E????????0

12
??????
  • ??????????????
  • ????(Adjacency Matrix)
  • ????(Adjacency Lists)
  • ??????(Adjacency Multi lists)
  • ????(Indexed Table)

13
????
  • ???G ( V , E ) ?Vn? n gt 1
  • ?? n ???
  • ???????? n n ??????????G ,??????? ( adjacency
    matrix )

??????????????????
14
????
  • ??
  • ??Aij 0 ???E(i,j)???
  • ??Aij 1 ???E(i,j)??
  • ??????????????,AijAij

15
???
???
16
????
  • ???G ( V , E ) ?Vn? n gt 1
  • ?? n ???,??n??????????
  • ?????????????????????

???
17
????
???
18
????
  • ??????(E)??????(????)????????
  • ???????????
  • ?????????????,???????????0?1,??
  • 0 ???????????
  • ????

19
?????
  • ?????(traversal)??,????????
  • ?????????
  • ???????????
  • ???????????
  • ?????? Depth-First-Search,DFS
  • ?????? Breadth-First-Search,BFS

20
??????? DFS
  • ?????????????(Stack)?
  • ????????????,??????????????????
  • ??????????????????????????????,?????????
  • ????????????????????

21
DFS ??
DFS ??? 1 , 2 , 4 , 8 , 5 , 6 , 3 , 7
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
??????? BFS
  • ????????????(Queue)???????????
  • ????????????,??????????????????
  • ???????????????????????????????,?????????
  • ????????????????????

26
BFS ??
BFS ??? 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8
27
(No Transcript)
28
(No Transcript)
29
DFS?BFS???
  • ????????????(spanning tree)
  • ???????????????(connected graph)
  • ????????????
Write a Comment
User Comments (0)
About PowerShow.com