1. 1、本文档共76页,可阅读全部内容。
  2. 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
DMA_10.1-2

§10.1: Introduction to Trees A tree is a connected undirected graph with no simple circuits. Theorem: There is a unique simple path between any two of its nodes. An undirected graph without simple circuits is called a forest. You can think of it as a set of trees having disjoint sets of nodes. Rooted Trees A rooted tree is a tree in which one node has been designated the root. Every edge is (implicitly or explicitly) directed away from the root. You should know the following terms about rooted trees: Parent, child, siblings, ancestors, descendents, leaf, internal node, subtree. n-ary trees A rooted tree is called n-ary if every internal vertex has no more than n children. It is full if every internal vertex has exactly n children. A 2-ary tree is called a binary tree. Ordered Rooted Tree A rooted tree where the children of each internal node are ordered. In ordered binary trees, we can define: left child, right child left subtree, right subtree For n-ary trees with n2, can use terms like “leftmost”, “rightmost,” etc. Trees as Models Can use trees to model the following: Saturated hydrocarbons Organizational structures Computer file systems In each case, would you use a rooted or a non-rooted tree? Training Dataset Output: A Decision Tree for “buys_computer” Presentation of Classification Results Visualization of a Decision Tree in SGI/MineSet 3.0 Some Tree Theorems A tree with n nodes has n?1 edges. A full m-ary tree with i internal nodes has n=mi+1 nodes, and ?=(m?1)i+1 leaves. Proof: There are mi children of internal nodes, plus the root. And, ? = n?i = (m?1)i+1. □ Thus, given m, we can compute any of i, n, and ? from any of the others. More Theorems Definition: The level of a node is the length of the simple path from the root to the node. The height of a tree is maximum node level. A rooted m-ary tree with height h is balanced if all leaves are at levels h or h?1. Theorem: There are at most mh leaves in an m-ary tree of height h. Corollary: An m-ary tree w

文档评论(0)

rovend + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档