Binary Trees by University of new England

# Binary Trees by University of new England - AMTH140 Slide 1...

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

Slide 1 AMTH140 Lecture 17 Binary Trees April 7, 2006 Reading: Lecture Notes § 12.1, § 12.2; Epp § 11.5 Slide 2 Trees A tree is a connected graph which is circuit free. Trees Non-Trees 1

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

View Full Document
Slide 3 Theorem: Any tree with more than one vertex, has at least one vertex of degree 1. Theorem: A tree with n vertices has n - 1 edges. Conversely, a connected graph with n vertices and n - 1 edges is a tree. A vertex of degree one is called a terminal vertex or leaf . A vertex of degree greater than one is called an internal vertex or branch vertex . Slide 4 For one two or three vertices, there is only one tree: One vertex Two vertices Three vertices There are two non-isomorphic trees with 4 vertices: There are three non-isomorphic trees with 5 vertices: 2
Slide 5 Rooted Trees A rooted tree is a tree in which one vertex is distinguished from the others and called the root . root Slide 6 The level of a vertex is the number of edges along the path between it and the root. level 0 level 1 level 2 level 3 The height of a rooted tree is the maximum level of a vertex of the tree. The tree above has height 3. 3

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

View Full Document
Slide 7 The children of a vertex v are the vertices adjacent to and one level further away from the root than v . If w is a child of v then v is called the parent of w . Two children of the same parent are called siblings For vertices v and w if v lies on the path between w and the root, then v is called an ancestor
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 05/25/2010 for the course CPE CPE 360 taught by Professor Jenniferchen during the Spring '10 term at Stevens.

### Page1 / 12

Binary Trees by University of new England - AMTH140 Slide 1...

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

View Full Document
Ask a homework question - tutors are online