- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
数据结构陈越CS_DS06b Connected Components
* §2 Elementary graph Operations 3. Connected Components (1) Is the graph connected? ? Call dfs(0) or bfs(0) —— O( e ) ? Check if there is any vertices missing —— O( n ) Tp = O( n + e ) (2) List the connected components of G void connected ( void ) { /* determine the connected components of a graph */ int i ; for ( i = 0; i n; i++ ) if ( !visited[ i ] ) { dfs ( i ) ; /* bfs can be used with no change in Tp */ printf ( “\n” ); } /* end if */ } O( n ) O( ei1 + ei2 + ... ) = O( e ) Tp = O( n + e ) §2 Elementary graph Operations 4. Spanning Tree —— a tree which consists of V( G ) and a subset of E( G ) 〖Example〗 A complete graph and three of its spanning trees 【Remarks】 ? E( G ) = T + N where T is for tree edges and N for non-tree edges. ? T consists of the edges traversed by the search program. We can add a piece of code to collect these edges into a linked list T. §2 Elementary graph Operations 【Remarks】 ? dfs and bfs give different spanning trees. 0 2 1 3 0 2 1 3 ? Adding an edge in N to a spanning tree, we obtain a cycle. ? If we introduce the edges in N into the spanning tree one at a time, then we obtain a cycle basis —— that is, all the cycles are independent, and all other cycles in G can be constructed as a linear combination of the cycles in the basis. ? A spanning tree is a minimal subgraph. That is, G’ ? G such that V( G’ ) = V( G ), G’ is connected, and E( G’ ) is minimal. ? G is connected ? e ? n ? 1, and G is connected and e = n ? 1 ? G is a tree. ? e = n ? 1 for a spanning tree. §2 Elementary graph Operations 5. Biconnected Components and Articulation Points ? ? ? ? ? Articulation point Biconnected graph ? v is an articulation point if G’ = DeleteVertex( G, v ) has at least 2 connected components. ? G is a biconnected graph if G is connected and has no articulation points. ? A biconnected component is a maximal biconnected subgraph. 〖Example〗 0 1 2 3 4 8 7 5
您可能关注的文档
最近下载
- 养老院门卫管理制度.pdf VIP
- 电力设施保护条例实施细则.pdf VIP
- 统编语文三年级上册第七单元《口语交际:身边的“小事” 》.pptx VIP
- 2024年中央纪委国家监委驻中国邮政集团有限公司招聘笔试参考题库附带答案详解.pdf VIP
- 《大学生创新创业基础》 第六章 市场调查与营销策略.pptx
- 建筑防水工程施工质量监理实施细则hg.doc VIP
- 环境材料概论 课件全套 第1--9章 绪论、吸附材料 ---环境材料的绿色设计.pptx
- 中职英语英语教学计划.docx VIP
- HGT2226-2019普通工业沉淀碳酸钙.pdf VIP
- 3肖仰华-大规模知识图谱构建与应用.pdf VIP
文档评论(0)