书签 分享 收藏 举报 版权申诉 / 144
上传文档赚钱

类型开发三道工序课件.ppt

  • 上传人(卖家):晟晟文业
  • 文档编号:4599299
  • 上传时间:2022-12-23
  • 格式:PPT
  • 页数:144
  • 大小:1.42MB
  • 【下载声明】
    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

    10、 S41Assume the edges are inserted into the graph as follows:S,T (Same as T,S)S,Z T,Y T,Z V,X V,Z X,Y X,ZPerform a breadth-first iteration from S.42 queueVertex returned by next()S T,ZS Z,YT Y,V,XZ V,XY XV X enqueuedequeue43444546For a breadth-first iteration of a directed graph,the algorithm is the

    11、same,but“neighbor”takes into account the direction of the arrow.A B C DStarting at A,the neighbors of A are B and C,but not D.D NEVER gets enqueued,and never gets returned by next().Y,V,TXXV,XV,XYT,YHashSet TreeSetCV,ZTHashSet TreeSetZ,YTcheck Cs neighbors,find;and add it to pq;5 VerticesT,YCollecti

    12、on6 A Network ClassZ,T SA collection in which6 Network Class 開發三道工序:Perform a depth-first iteration from S.HashSet TreeSet4748 Collection List Set ArrayList LinkedList SortedSet HashSet TreeSet4950A Stack!51 X V Y Z T S52Assume the edges are inserted into the graph as follows:S,T /Same as T,S S,Z T,

    13、Y T,Z V,X V,Z X,Y X,ZPerform a depth-first iteration from S.53 StackVertex returned by next()S Z,T S X,V,TZ Y,V,TX V,TY T VTTop Bottom545556order is unimportant:T某 collection 的 objects 的兩兩關係X6 Network Class 開發三道工序:Starting at A,the neighbors of A are B and C,but not D.ArrayList LinkedList SortedSetX

    14、Graph theory 圖論From Wikipedia,the free encyclopedia2 Directed Graphs5 Graph AlgorithmsT,ZSY ZS,ZPerform a depth-first iteration from S.CollectionX,Y,T,Z,X is a cycle.Trees,andB C DAssume the edges are inserted into the graph as follows:Y Z575859606162636465666768692 Directed GraphsV,TYV,XStackVertex

    15、 returned by next()7 2In mathematics and computer science,graph theory is the study of graphs,mathematical structures used to model pair-wise relations between objects from a certain collection.TArrayList LinkedList SortedSetArrayList LinkedList SortedSet某 collection 的 objects 的兩兩關係5 Graph Algorithm

    16、s5 Graph Algorithmsthe direction of the arrow.Assume the edges are inserted into the graph as follows:6 A Network ClassAssume the edges are inserted into the graph as follows:x vV,ZX VT7071727374757677Key Idea C 7 2 A 10 B priority queue(pq):;remove check Cs neighbors,find;and add it to pq;mark C th

    17、e predecessor of B Now,pq:787980818283848586878889For a breadth-first iteration of a directed graph,Perform a depth-first iteration from S.Graph theory 圖論From Wikipedia,the free encyclopediapriority queue(pq):;remove Y ZT,Z5 Graph AlgorithmsThis undirected graph is acyclic.6 Network Class 開發三道工序:Arr

    18、ayList LinkedList SortedSetNetwork Class許多實際問題可用graph來表示。Y ZCollectionY ZY ZIs Y,Z,T,S,Z,X,Y a cycle?Yes!Perform a breadth-first iteration from S.ArrayList LinkedList SortedSet909115.6 A Network Class929394Network Class9596979899100101102103104105106Network Class107108109110A collection in which order is unimportant:A linked list!111112113114115116117118119Network Class120121122123124125126127128129130131132133134135136137138139140141142143144

    展开阅读全文
    提示  163文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:开发三道工序课件.ppt
    链接地址:https://www.163wenku.com/p-4599299.html

    Copyright@ 2017-2037 Www.163WenKu.Com  网站版权所有  |  资源地图   
    IPC备案号:蜀ICP备2021032737号  | 川公网安备 51099002000191号


    侵权投诉QQ:3464097650  资料上传QQ:3464097650
       


    【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。

    163文库