1 / 5

Designate ‘a’ the root

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.

marnie
Download Presentation

Designate ‘a’ the root

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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

  2. 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:

  3. 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

  4. 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:

  5. 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)

More Related