Trees Flashcards
Leaf
A vertex of degree 1 in a tree
What property does an undirected graph need to be a tree
An undirected graph is a tree if and only if there is exactly one path between every pair of vertices
What are the three equivalent definitions of a tree
A connected simple graph without loops or cycles
A graph with a unique path between every pair of vertices
A connected graph with n - 1 edges for n vertices
Rooted tree
A tree with one designated vertex called the root, from which levels are defined for other vertices
How is the level of a vertex defined in a rooted tree
The level of a vertex is the length of the unique path from the root to that vertex
What is the height of a rooted tree
Number of edges between the start to end vertices
In a rooted tree, what is the parent of a vertex at level e
The parent is the unique neighbour of the vert at level e -1
In a rooted tree, what is a child of a vertex at level 3
A child is a neighbour of the vertex at level e + 1
What is binary tree
A binary tree where every vertex has at most 2 children
What is a full binary tree
A binary tree where every vertex has either 0 or 2 children