FINAL - Graph Concepts Flashcards

1
Q

Connected graph (undirected)

A

There is a path between every pair of vertices

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

Path

A

A sequence of distinct edges that joins a sequence of vertices

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

Simple path

A

Implies no repeated vertices (and that the term “path” might contain repeated vertices)

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

Connected component

A

A maximal connected subgraph of G

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

Weakly connected graph (directed)

A

Replacing all its directed edges with undirected edges produces a connected graph

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

Connected graph (directed)

A

G contains a directed path from u to v OR from v to u for every pair of vertices u, v

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

Strongly connected graph (directed)

A

G contains a directed path from u to v AND from v to u for every pair of vertices u, v

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

Complete graph

A

Every pair of distinct vertices is connected by a unique edge (edges to/from for a digraph)

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

Spanning tree

A

A subgraph that is a tree and includes all the vertices in G using a minimum number of edges

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

Tree edge

A

GRAY->WHITE, from parent to child (discovery edge), forms a spanning tree/forest

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

Back edge

A

GRAY->GRAY, loops back to an ancestor

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

Forward edge

A

GRAY->BLACK, from ancestor to descendant

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

Cross edge

A

GRAY->BLACK, between two unrelated nodes

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

If G is undirected, a DFS produces only…

A

tree edges and back edges

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

For a directed, connected graph with 2 nodes, how many trees will a DFS produce?

A

It depends on which node is chosen to be the root first!!!!

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

How can I determine if an undirected graph G is connected?

A

Run DFS. If you end up with 1 tree, it is connected!

17
Q

How do you know if your graph has cycles?

A

Run DFS. If you have any back edges, you have cycles (for either digraph or undirected)

18
Q

Strongly connected component

A

A maximal subset of nodes that is strongly connected

19
Q

Tree

A

A graph in which any two vertices are connected by exactly one path

20
Q

Minimum spanning tree

A

A spanning tree whose sum of edge weights is as small as possible