开发三道工序课件.ppt
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《开发三道工序课件.ppt》由用户(晟晟文业)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 开发 工序 课件
- 资源描述:
-
1、1Chapter 15Graphs,Trees,and Networks2Chap.15 15.1 Undirected Graphs15.2 Directed Graphs15.3 Trees15.4 Networks15.5 Graph Algorithms Minimum Spanning Tree Shortest Path3 Chap.15 (Cont.)15.6 Network Class 開發三道工序開發三道工序:4Graph theory 圖論圖論From Wikipedia,the free encyclopedia In mathematics and computer s
2、cience,graph theory is the study of graphs,mathematical structures used to model pair-wise relations between objects from a certain collection.某 collection 的 objects 的兩兩關係5Applications of Graphs 許多實際問題可用graph來表示。例如連接結構的一個網站,可以用有向圖(directed graph):頂點(vertex)是網頁網址,如果有一個網頁B連結到網頁A,便有個連結(edge)在兩者A,B之間。類似
3、的,在travel問題,生物學,computer chip的設計,以及其他許多領域。開發algorithm來處理graph,因此主要應用是在computer science。graph 可延伸為weighted graph(加權圖)。例如,weight能夠代表連結(edge)的長度。615.1 Undirected Graphs7Example:X Y Z T Ans:5 Vertices 6 Edges S8 Collection List Set ArrayList LinkedList SortedSet HashSet TreeSet91011S6 Network Class 開發三道
4、工序:A linked list!X某 collection 的 objects 的兩兩關係Perform a depth-first iteration from S.StackVertex returned by next()Z,T SHashSet TreeSetList Setx v5 Graph Algorithms6 A Network Class6 A Network ClassSqueueVertex returned by next()Z,T SV,TYY Z開發algorithm來處理graph,因此主要應用是在computer science。12 X Y Z TX,Y,
5、T,Z,S has length 4.Shortest path from X to S=?Ans:2 SIn general,how can the smallest path between 2 vertices be determined?We will cover that.1314 X Y Z TX,Y,T,Z,X is a cycle.Y,T,S,Z,T,Y is not a cycle.(repeated edges:YT and TY)SIs Y,Z,T,S,Z,X,Y a cycle?Yes!15 Collection List Set ArrayList LinkedLis
6、t SortedSet HashSet TreeSetThis undirected graph is acyclic.16171815.2 Directed Graphs19 Main StreetState Avenue Park PlaceWest Street East Street South Kihei Road202122X,Zthe direction of the arrow.Graph theory 圖論From Wikipedia,the free encyclopediaV,Zorder is unimportant:HashSet TreeSet6 Network C
7、lass 開發三道工序:5 Graph AlgorithmsAssume the edges are inserted into the graph as follows:TNetwork ClassS,T /Same as T,SCollectionPerform a depth-first iteration from S.Y ZStackVertex returned by next()Y Z232415.3 Trees25 Collection List Set ArrayList LinkedList SortedSet HashSet TreeSet2615.4 Networks2
8、7282930313215.5 Graph Algorithms333435 x v Y Z T SAssume the vertices are entered in alphabetical order.Perform a breadth-first iteration from S.Ans:S,T,Z,Y,V,X 36Y ZS,ZA collection in whichFor a breadth-first iteration of a directed graph,order is unimportant:Z,T SHashSet TreeSetY ZList Set6 Networ
9、k Class 開發三道工序:SAssume the edges are inserted into the graph as follows:Assume the edges are inserted into the graph as follows:order is unimportant:ArrayList LinkedList SortedSetpriority queue(pq):;remove S,T (Same as T,S)Athe algorithm is the same,but“neighbor”takes into accountS37383940 X V Y Z T
展开阅读全文