50 likes | 122 Vues
Learn about trees, tree properties, vertex levels, and common terminologies in graph theory. Explore how selecting different roots affects the tree structure. Understand vertices, levels, height, parent, siblings, ancestors, terminal/internal vertices, subtree definitions, and proofs related to trees.
E N D
b a c 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 c b
a a c b b g g h h j j i i d d f f e e Designate ‘a’ the root What other node could have been chosen the root? b Then the tree would look:
a Terms: c b g h j i d f e Root level = 0 b,g,h,c Level 1 d,e,f,i,j Level 2 Level of a vertex: Length of the simple path from root to vertex. Height of tree: Maximum level in tree
a c b g h j i d f e More terms: Parent of vn: vn-1 Siblings: nodes (vertices) with the same parent 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. The graph consisting of x and its descendants and all edges on a path from x to each descendant. Subtree of T rooted at x:
a b g h j i d f e A tree is connected. (by direct proof) A tree does not contain a cycle. (indirect proof) A tree with n vertices has n-1 edges. (mathematical induction)