week 7 Flashcards
What is a tree
A simple, connected undirected graph with no simple circuits
. connected- There is a unique simple path between any two distinct vertices
What does it mean when a tree of level n is balanced
The leaves are present in level n or level (n-1)
If v is a vertex in a tree how do you find the subtree
make v the root
The subtree containing v is its :
.decendents
. all edges incident to these decendents
What is an m -ary tree
Tree where every internal vertex( vertex with at least one child) has no more than m children
full m -ary tree
tree where internal vertices has exactly m children
What is a rooted tree
A tree that has one vertex designated as the root
2 additional things about trees
If we add an edge to a tree, a cycle is formed
if we remove an edge its no longer connected
2 trees are isopormopgic if
bijection takes:
. roots to roots
. edges to edges and non edges to non edges
what is the length of vertex v
The level from root to vertex v
height of a rooted tree
The maximum amount of levels that can be in the tree
properties of binary trees of height n
.left and right subtrees of root are full binary trees with height <= n-1
. At least one ( not both) has height n-1