- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
When Algorithm 1 is used, the matrix of the transitive closure of a relation on a set with n elements can be found using 2n3(n-1) bit operations. p 271 However, the transitive closure can be found by Warshall’s algorithm using only 2n3 bit operations. P 273 Warshall’s algorithm Interior vertices内部节点: If a,x1,x2,…xm-1,b is a path, it’s interior vertices are x1,x2,…xm-1,that is ,all the vertices of the path that occur somewhere other than as the first and last vertices in the path. Warshall’s algorithm is based on the construction of a sequence of zero-one matrices.These matrices are W0, W1, … Wn, where W0=MR is the zero-one matrix of this relation,and Wk=[Wij(k)], where Wij(k) =1 if there is a path from vi to vj such that all the interior vertices of this path are in the set {v1,v2,…vk} and is 0 otherwise. Wn=MR*,since the (i,j)th entry of MR* is 1 iff there is a path from vi to vj with all the interior vertices in the set {v1,v2,…vn} . Example Let R be the relation with the given directed graph.Find the matrices W0,W1,W2,W3 and W4. Solution Let v1=a,v2=b,v3=c, v4=d .W0 is the matrix of the relation.Hence, W2=W1 W4 is the matrix of the transitive closure. LEMMA Let Wk=[Wij(k)] be the zero-one matrix that has a 1 in its(i,j)th posotion iff there is a path from vi to vj with interior vertices fron the set {v1,v2,…vk}.Then Whenever i,j,and k are positive integer not exceeding n. Warshall’s algorithm computes is the sequence of zero-one matrices W0, W1, … Wn=WR*, the total number of bit operations used is 2n3. Theorem: Let R be a binary relation on a nonempty set A. If R is reflexive, then s(R) and t(R) are reflexive. If R is symmetric, then r(R) and t(R) are symmetric. If R is transitive, then r(R) is transitive. Example Let R={(1,2),(3,2)}, R is transitive. s(R)={(1,2),(2,1),(3,2),(2,3)} is not transitive. Hence: st(R) ≠ ts(R) 1) Do the closure operations commute? ? Does st(R) = ts(R)? ? Does rt(R) = tr(R)? ? Does rs(R) = sr(R)? 2) Do the cl
您可能关注的文档
- 成都理工大学政治学院《毛泽东思想概论》题库.pdf
- 从电影拍摄技术的变化看中国的发展.doc
- 毛泽东思想和中国特色社会主义理论体系概论索引.pdf
- 毛概第8章客观题.doc
- 毛概中国改革开放以来存在的问题.doc
- 毛概第五章客观题.doc
- 马克思主义基本原理概论 第五章 资本主义发展的历史进程.doc
- 华东师大马克思主义基本原理概论2007B卷答案.doc
- 华东师范大学马克思主义基本原理概论2007-2008B马原答案.doc
- 华东师范大学马克思主义基本原理概论2007-20081A.doc
- 离散数学课件5.5 Equivalence Relations.ppt
- 离散数学课件5.6 Partial Orderings.ppt
- 离散数学课件6.1graph and graph model.ppt
- 离散数学课件6.2 graph terminology and Special Types of Graphs.ppt
- 离散数学课件6.3 representing graphs and isomorphism.ppt
- 离散数学课件6.4 connectivtity.ppt
- 离散数学课件6.6 shortest path.ppt
- 离散数学课件6.7 planar graph6.8 coloring.ppt
- 离散数学课件7.1 introduction to tree.ppt
- 离散数学课件7.2 applications of tree 7.3 tree traversal.ppt
文档评论(0)