离散数学课件 七章 树trees.docVIP

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  4. 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  5. 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  6. 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  7. 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
离散数学课件 七章 树trees

第7章 树trees 分类 根树 有序树 定位树 无向树 标号{a,b} 无 有 无 有 无 有 无 有 N=1 N=2 N=3 §7.1 树 定义1: T是集合A上一个二元关系,T称为树tree,如果存在v0∈A,任意v∈A,v≠v0,到v0都有唯一一条路径,(v0, v0)(T. T叫做根树,记做(T,v0)。 A中元素称为T的顶点vertex,T中元素称为边,v0称为根root。 定理1. 设(T,v0)是树,则 (a)T中没有回路。 (b)只有一个根v0。 (c)任意v∈A,v≠v0,v有入度1,v0入度是0。 证明: 定义2 层次level v0的层次为0,v0的子女offspring层次为1,v0是子女的父母parent。 vi的层次为k,vi的子女offspring层次为k+1,vi是子女的父母parent, T的最大层次称为高度height。 无子女的顶点叫叶leaf。 vi的子女叫同胞sibling,同胞如有长幼,从左到右,老大,老二,老三等,组成线性序,T称为有序树,ordered tree 定理2. 设(T,v0)是根树,则 (a)T反自反。 (b)T反对称。 (c)(a,b)∈T,(b,c)∈T ( (a,c)(T。 定义3: n-树:每个顶点至多n个子女。 二叉树:2-树。 完全n-树:每个非叶顶点恰有n个子女。 定义4 A rooted binary tree is a rooted tree in which every node has at most two children. A full binary tree (sometimes proper binary tree or 2-tree) is a tree in which every node other than the leaves has two children. A perfect binary tree is a full binary tree in which all leaves are at the same depth or same level.[1] (This is ambiguously also called a complete binary tree.) A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.[2] An infinite complete binary tree is a tree with levels, where for each level d the number of existing nodes at level d is equal to 2d. The cardinal number of the set of all nodes is . The cardinal number of the set of all paths is . A balanced binary tree is a tree where the depth of all the sub-trees differs by at most 1. 定理3. 设(T,v0)是根树,v∈T,则T(v)是T的子树,T(v)的根是v。 Homework P248-249 18,19,20,21,26,28 §7.2标识树labeled trees 中缀表达式central operator expression(3-2×x)+((x-2))+(3+x)) 定位树positional tree 定义 Positional n-tree is a n-tree whose vertex potentially has exactly n offspring ordered by1,2,…,n, but some of the offsprings may be missing. 定位3-树 每个顶点的子女都有一定位置。 定位2-树 左右子树 普通二叉树。 问题7.2.1 n个节点的定位二叉树有多少个? 如何枚举? 定位二叉树的计算机表示 Computer Representation of Binary Positional Trees Index Left Data Right 1 2 start 0 2 6 + 3

文档评论(0)

qu1968103 + 关注
实名认证
文档贡献者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档