Graphs Flashcards

1
Q

What is a graph?

A

This is a collection of distinct vertices and edges.

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

What is a subgraph?

A

This is a portion of a graph, which is also a graph itself.

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

What is the difference between a directed graph and an undirected graph?

A

A directed graph represents one-way connections, while an undirected graph represents two-way connections.

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

What is a path?

A

This is a sequence of edges between two nodes.

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

What is the length of a path?

A

This is the number of edges a path comprises.

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

What is a cycle?

A

This is a path that begins and ends at the same vertex.

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

What is an acyclic graph?

A

This is a graph which has no cycle.

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

What is a weighted graph?

A

This is a graph which has weights on its edges.

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

What is a connected graph?

A

This is a graph which has a path between each pair of distinct nodes.

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

What is a completed graph?

A

This a graph that not only has a path, but an edge between each pair of distinct vertices.

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

What are neighbors?

A

In an undirected graph, these are nodes connected by an edge. In a directed graph, these are only the nodes that are related by a one-way connection.

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

How many edges at most, can a directed graph with n vertices have?

A

n(n-1) vertices

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

How many vertices, at most, can a directed graph with n vertices have?

A

n(n-1]/2 vertices

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

What is a sparse graph?

A

This is a graph that has relatively few edges; O(n) edges

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

What is a dense graph?

A

This is a graph that has relatively many edges O(n^2) edges.

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

What is a topological order?

A

This is a graph where, when there is a directed edge between two nodes a and b, node a precedes node b.

17
Q

What is a depth-first traversal?

A

This is a type of traversal where we go as deep as possible into the graph before searching the paths of other nodes.

18
Q

What is a breadth-first traversal?

A

This is a type of traversal that visits the neighbors of a node before visiting neighbors’ neighbors.

19
Q

What is the origin vertex?

A

This is the vertex where a traversal begins.