# Trees - Trees Lecture 8 Discrete Mathematical Structures...

This preview shows pages 1–9. Sign up to view the full content.

Trees Lecture 8 Discrete Mathematical Structures

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Rooted Tree Let A be a set, and let T be a relation on A . T is a rooted tree if there is a vertex v 0 in A with the property that there exists a unique path in T from v 0 to every other vertex in A , but no path from v 0 to v 0 . v 0
Properties of Rooted Tree Let ( T , v 0 ) be a rooted tree. Then (a) There are no cycles in T . (b) v 0 is the only root of T . (c) Each vertex other than the root has in-degree one, and the root has in-degree 0 v 0 v p c More than one path from v 0 to v . (a) v 0 v 0 A cycle from v 0 to v 0 (b) v 0 v k w 1 ? More path to w 1 ? (c)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Drawing a Rooted Tree by Levels Root Inner node Branching node Leaf Level 0 Level 1 Level 2 Level 3 Height=3
Rooted Tree and Family Relations It is easy to describe the family relations T and on the other hand, terms about family relations are used in rooted trees. John John's child John's parent John's ancestors John's descendants John’s siblings

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Some Terms about Rooted Tree Ordered tree: the ordering is assumed on vertices in each level; n -tree: every vertex has at most n offspring; Complete n -tree: every vertes, other than leaves, has exactly n offspring Binary tree: 2-tree
Subtree of a Rooted Tree If ( T , v 0 ) is a rooted tree and v T . Let T ( v ) be the set of v and all its descendants, then T ( v ) and all edges with their two ends in T ( v ) is a tree, with v as its root. (It is called a subtree of ( T , v 0 ) ) Proof: There is a path from v to any other vertex in T ( v ) since they are all the descendants of v; There cannot be more than one path from v to any other vertex w in T ( v ) , otherwise, in ( T , v 0 ), there are more than one path from v 0 to w, both through v There cannot be any cycle in T ( v ), since any cycle in T ( v ) is also in ( T , v 0 )

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
In a ordered binary tree, a subtree is a left subtree or a right subtree. Even if a vertex has only one offspring, its subtree can be identified as left or right by its location in the digraph. Left
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 33

Trees - Trees Lecture 8 Discrete Mathematical Structures...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online