 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.

Presentation on theme: "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."— Presentation transcript:

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

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

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.

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.

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)

Download ppt "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."

Similar presentations