Graphs Flashcards

1
Q

What is a graph?

A

A set of nodes (the points) and edges (lines connecting one point to another).

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

What is a weight?

A

A representation of some kind of cost (such as distance) associated with the edges of a graph.

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

What is a directed graph/digraph?

A

A graph where all of the edges are directed.

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

What is a path through a graph?

A

A sequence of vertices connected by edges (following the arrows if the graph is directed).

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

What is a cycle?

A

A path that begins and ends at the same node.

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

What is a complete graph?

A

A graph where every node is connected to every other node.

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

What is a directed acylic graph?

A

A directed graph which contains no cycles.

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

When should an adjacency matrix be used to represent a graph?

A

When there are a large number of edges.

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

What is an adjacency matrix?

A

Essentially, a table showing where edges exist and what their weights are.

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

When should an adjacency list be used to represent a graph?

A

When there are few edges to the graph - when it is sparse.

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

What does sparse mean?

A

That there are few edges to the graph.

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