Graphs and Trees Flashcards

1
Q

Self loop

A

Edge leading to and from the same node

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

Degree

A

Number of edges leading to or from a node

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

When counting the degree of a node, self loops should be counted…

A

Twice

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

Path

A

Edges that can be used to reach a node

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

Length of a path

A

k - 1 (k being the number of nodes)

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

Circuit

A

A path where the start and end nodes are the same

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

Cycle

A

A circuit where you don’t visit the same node (except the start/end node) twice

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

Hamiltonian

A

A circuit including all nodes

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

Root node

A

No edges pointing towards it

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

True or false: A leaf node has both in and outgoing edges

A

False! A leaf node has no outgoing edges.

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

Depth

A

Number of edges to a node from the root

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

True or false: The number of nodes in a tree is exponential to its depth

A

True!

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

Binary tree

A

A tree with no more than 2 subtrees per node

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

In a binary tree, there are no more than _ nodes at any level

A

2 to the power of L (L being the current level)

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

True or false: There are multiple ways to reach each node in a tree

A

False! Each node has a unique path leading to it.

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