Download presentation

Presentation is loading. Please wait.

2
A tree is a simple graph satisfying: if v and w are vertices and there is a path from v to w, it is a unique simple path. a b c a b c

3
c b a d e f i j hg Designate ‘a’ the root What other node could have been chosen the root? b Then the tree would look: b d e f a i j hg

4
c b a d e f i j hg Terms: Root level = 0 Level 1b,g,h,c Level 2d,e,f,i,j Height of tree:Maximum level in tree Level of a vertex: Length of the simple path from root to vertex.

5
Parentv n-1 Siblings: nodes (vertices) with the same parent c b a d e f i j hg More terms: of v n : Ancestors: All nodes in the path from the root to the node, except the node itself. Terminal vertex (leaf):A node with no children. Internal vertex (branch vertex):Not a leaf. Subtree of T rooted at x: The graph consisting of x and its descendants and all edges on a path from x to each descendant.

6
b d e f a i j hg A tree is connected. A tree does not contain a cycle. A tree with n vertices has n-1 edges. (by direct proof) (indirect proof) (mathematical induction)

Similar presentations

© 2022 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google