Deck 10: Graphs
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/25
Play
Full screen (f)
Deck 10: Graphs
1
For an undirected graph, symmetric entries are required.
True
2
In a breadth first search, the nodes that are lower down in the picked-up graph are visited before nodes that are higher up in the graph.
False
3
Edges can be represented by an array of lists called weighted lists.
False
4
Any graph that is connected and contains no cycles can be viewed as a tree by picking one of its vertices as the root.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
5
If the set of vertices is empty, the set of edges must also be empty.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
6
A(n) ____________________ is data structure that consists of a set of vertices (or nodes) and a set of edges between the pairs of vertices.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
7
____________________ represent paths or connections between vertices.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
8
The edges of a graph are ____________________ if the existence of an edge from A to B does not necessarily guarantee that there is a path in both directions.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
9
A graph that contains undirected edges is known as a(n) ____________________ graph.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
10
Directed ____________________ are represented as lines with an arrow on one end.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
11
The edges of a graph may have values associated with them known as their ____________________.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
12
A graph with weighted edges is known as a(n) ____________________ graph.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
13
A(n) ____________________ is a sequence of vertices in which each successive vertex is adjacent to its predecessor.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
14
An undirected graph is called a(n) ____________________ if there is a path from every vertex to every other vertex.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
15
The ____________________ matrix uses a two-dimensional array to represent the graph.
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
16
A(n) ____ is one in which |E| is close to but less than |V|2.
A) dense graph
B) sparse graph
C) adjacency matrix
D) matrix graph
A) dense graph
B) sparse graph
C) adjacency matrix
D) matrix graph
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
17
A(n) ___ is one in which |E| is much less than |V|2.
A) dense graph
B) matrix graph
C) adjacency graph
D) sparse graph
A) dense graph
B) matrix graph
C) adjacency graph
D) sparse graph
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
18
In a(n) ____ search, we visit the start node first, then all nodes that are adjacent to it next, then all nodes that can be reached by a path from the start node containing two edges, three edges, and so on.
A) depth-first
B) binary
C) breadth-first
D) linear
A) depth-first
B) binary
C) breadth-first
D) linear
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
19
The following is an algorithm for a(n) ____.
Take an arbitrary start vertex, mark it identified and place it in a queue.
While the queue is not empty
Take a vertex, u, out of the queue and visit u.
For all vertices, v, adjacent to this vertex u
If v has not been identified or visited
Mark it identified
Insert vertex v into the queue.
We are now finished visiting u.
A) depth-first search
B) linear search
C) breadth-first search
D) binary search
Take an arbitrary start vertex, mark it identified and place it in a queue.
While the queue is not empty
Take a vertex, u, out of the queue and visit u.
For all vertices, v, adjacent to this vertex u
If v has not been identified or visited
Mark it identified
Insert vertex v into the queue.
We are now finished visiting u.
A) depth-first search
B) linear search
C) breadth-first search
D) binary search
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
20
The following is an algorithm for a(n) ____.
Mark the current vertex, u, visited and enter it in the discovery order list
For each vertex, v, adjacent to the current vertex, u
If v has not been visited
Set parent of v to u.
Recursively apply this algorithm starting at v.
Mark u finished and enter u into the finish order list.
A) breadth-first search
B) linear search
C) binary search
D) depth-first search
Mark the current vertex, u, visited and enter it in the discovery order list
For each vertex, v, adjacent to the current vertex, u
If v has not been visited
Set parent of v to u.
Recursively apply this algorithm starting at v.
Mark u finished and enter u into the finish order list.
A) breadth-first search
B) linear search
C) binary search
D) depth-first search
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
21
A(n) ____ is a subset of the edges of a graph such that there is only one edge between each vertex, and all of the vertices are connected.
A) adjacency matrix
B) spanning tree
C) maze
D) iterator
A) adjacency matrix
B) spanning tree
C) maze
D) iterator
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
22
The cost of a(n) ____ is the sum of the weights of the edges.
A) spanning tree
B) depth-first search
C) adjacency matrix
D) breadth-first search
A) spanning tree
B) depth-first search
C) adjacency matrix
D) breadth-first search
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
23
The following algorithm is known as ____.
Initialize S with the start vertex, s, and V-S with the remaining vertices.
For all v in V-S

A) Dijkstra's algorithm
B) Kim's algorithm
C) Prim's algorithm
D) Topological sort algorithm
Initialize S with the start vertex, s, and V-S with the remaining vertices.
For all v in V-S

A) Dijkstra's algorithm
B) Kim's algorithm
C) Prim's algorithm
D) Topological sort algorithm
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
24
|V| means the ____ of V.
A) cardinality
B) edge
C) matrix
D) graph
A) cardinality
B) edge
C) matrix
D) graph
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck
25
The ____ of a graph is the ratio of |E| to |V|2.
A) cardinality
B) density
C) edge
D) vertex
A) cardinality
B) density
C) edge
D) vertex
Unlock Deck
Unlock for access to all 25 flashcards in this deck.
Unlock Deck
k this deck