Trees Flashcards

1
Q

Leaf

A

A vertex of degree 1 in a tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What property does an undirected graph need to be a tree

A

An undirected graph is a tree if and only if there is exactly one path between every pair of vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the three equivalent definitions of a tree

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Rooted tree

A

A tree with one designated vertex called the root, from which levels are defined for other vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How is the level of a vertex defined in a rooted tree

A

The level of a vertex is the length of the unique path from the root to that vertex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the height of a rooted tree

A

Number of edges between the start to end vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In a rooted tree, what is the parent of a vertex at level e

A

The parent is the unique neighbour of the vert at level e -1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In a rooted tree, what is a child of a vertex at level 3

A

A child is a neighbour of the vertex at level e + 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is binary tree

A

A binary tree where every vertex has at most 2 children

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a full binary tree

A

A binary tree where every vertex has either 0 or 2 children

How well did you know this?
1
Not at all
2
3
4
5
Perfectly