9.1 (Graphs) Flashcards

1
Q

What is a collection of dots and lines?

A

graph

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

What are the dots in a graph called?

A

vertices (nodes)

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

What are the lines in a graph called?

A

edges

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

Each edge connects a pair of ________.

A

vertices

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

There is at most ____ edge between any two vertices

A

1

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

What is an edge that only goes in one direction?

A

directed edge

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

What is an edge that can go in both directions?

A

undirected edge

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

What is a path that begins and ends at the same node?

A

cycle

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

What is a graph that doesn’t contain any cycles?

A

acyclic graph

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

What is a graph that’s connected if every node is reachable from every other node?

A

connected graph

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

What is a graph that’s complete if every node has an edge to every other edge? (grows as O(n^2)

A

complete graph

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

A node is reachable only if?

A

a path exists between the two nodes

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

Vertices that are all connected to a vertex with an edge are called?

A

neighbors

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

A graph is considered _______ if it has numbers associated with edges

A

weighted

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

What are weighted graphs useful for?

A

mapping between locations, traffic, distance, time, etc.

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

Mathematically, a graph G is a pair (___, ___)

17
Q

V is the set of _______.

18
Q

E is the set of _______.

19
Q

A graph is _____ if it has relatively few edges

20
Q

A graph is ______ if it has a lot of edges

21
Q

Which graph algorithm explores a graph level-by-level using a queue?

A

Breadth-First-Search

22
Q

Which graph algorithm explores as deeply as possible using a stack (or recursion)?

A

Depth-First-Search

23
Q

Which graph algorithm is useful for finding the shortest path between points in weighted graphs?

24
Q

What is Breadth-First-Search useful for?

A

finding the shortest path in unweighted graphs

25
What is Depth-First-Search useful for?
cycle detection and topological sorting
26
What is Dijkstra useful for?
applications like Google Maps
27
Which graph algorithm finds a minimum spanning tree and makes the least possible weight between any two nodes?
kruskal