Deck 14: 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
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
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/60
Play
Full screen (f)
Deck 14: Graphs
1
A ______ is the subset of vertices visited during a traversal that begins at a given vertex.
A)circuit
B)multigraph
C)digraph
D)connected component
A)circuit
B)multigraph
C)digraph
D)connected component
D
2
A graph is ______ if each pair of distinct vertices has a path between them.
A)complete
B)disconnected
C)connected
D)full
A)complete
B)disconnected
C)connected
D)full
C
3
A ______ order is a list of vertices in a directed graph without cycles such that vertex x precedes vertex y if there is a directed edge from x to y in the graph.
A)graphical
B)topological
C)hierarchal
D)spatial
A)graphical
B)topological
C)hierarchal
D)spatial
B
4
A graph consists of ______ sets.
A)two
B)three
C)four
D)five
A)two
B)three
C)four
D)five
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
5
Two vertices that are joined by an edge are said to be ______ each other.
A)related to
B)bordering
C)utilizing
D)adjacent to
A)related to
B)bordering
C)utilizing
D)adjacent to
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
6
A self edge is also called a ______.
A)cycle
B)loop
C)circuit
D)multigraph
A)cycle
B)loop
C)circuit
D)multigraph
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
7
A graph is ______ if it has at least one pair of vertices without a path between them.
A)complete
B)disconnected
C)connected
D)full
A)complete
B)disconnected
C)connected
D)full
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
8
In a graph,a vertex is also known as a(n)______.
A)node
B)edge
C)path
D)cycle
A)node
B)edge
C)path
D)cycle
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
9
If there is a directed edge from vertex x to vertex y,which of the following can be concluded about x and y?
A)y is a predecessor of x
B)x is a successor of y
C)x is adjacent to y
D)y is adjacent to x
A)y is a predecessor of x
B)x is a successor of y
C)x is adjacent to y
D)y is adjacent to x
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
10
A ______ can have duplicate edges between vertices.
A)spanning tree
B)connected graph
C)complete graph
D)multigraph
A)spanning tree
B)connected graph
C)complete graph
D)multigraph
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
11
A path is a sequence of ______ in a graph.
A)vertices
B)edges
C)subgraphs
D)cycles
A)vertices
B)edges
C)subgraphs
D)cycles
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
12
Which of the following is true about a simple cycle?
A)it can pass through a vertex more than once
B)it can not pass through a vertex more than once
C)it begins at one vertex and ends at another
D)it passes through only one vertex
A)it can pass through a vertex more than once
B)it can not pass through a vertex more than once
C)it begins at one vertex and ends at another
D)it passes through only one vertex
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
13
The ______ of a weighted graph have numeric labels.
A)vertices
B)edges
C)paths
D)cycles
A)vertices
B)edges
C)paths
D)cycles
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
14
All ______ begin and end at the same vertex and do not pass through any other vertices more than once.
A)paths
B)simple paths
C)cycles
D)simple cycles
A)paths
B)simple paths
C)cycles
D)simple cycles
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
15
A graph-traversal algorithm stops when ______.
A)it first encounters the designated destination vertex
B)it has visited all the vertices that it can reach
C)it has visited all the vertices
D)it has visited all the vertices and has returned to the vertex that it started from
A)it first encounters the designated destination vertex
B)it has visited all the vertices that it can reach
C)it has visited all the vertices
D)it has visited all the vertices and has returned to the vertex that it started from
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
16
A subset of a graph's vertices and edges is known as a ______.
A)bar graph
B)line graph
C)subgraph
D)circuit
A)bar graph
B)line graph
C)subgraph
D)circuit
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
17
An iterative DFS traversal algorithm uses a(n)______.
A)list
B)array
C)queue
D)stack
A)list
B)array
C)queue
D)stack
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
18
An iterative BFS traversal algorithm uses a(n)______.
A)list
B)array
C)queue
D)stack
A)list
B)array
C)queue
D)stack
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
19
The edges in a ______ indicate a direction.
A)graph
B)multigraph
C)digraph
D)spanning tree
A)graph
B)multigraph
C)digraph
D)spanning tree
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
20
A complete graph has a(n)______ between each pair of distinct vertices.
A)edge
B)path
C)cycle
D)circuit
A)edge
B)path
C)cycle
D)circuit
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
21
A ______ is a special cycle that passes through every vertex in a graph exactly once.
A)multigraph
B)tree
C)spanning tree
D)circuit
A)multigraph
B)tree
C)spanning tree
D)circuit
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
22
Adjacent vertices are joined by an edge.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
23
A(n)______ begins at a vertex v,passes through every vertex exactly once,and terminates at v.
A)multigraph
B)spanning tree
C)Euler circuit
D)Hamilton circuit
A)multigraph
B)spanning tree
C)Euler circuit
D)Hamilton circuit
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
24
A connected graph has an edge between every pair of vertices.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
25
A graph's edges cannot begin and end at the same vertex.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
26
A connected undirected graph that has n vertices must have at least ______ edges.
A)n
B)n - 1
C)n / 2
D)n * 2
A)n
B)n - 1
C)n / 2
D)n * 2
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
27
A(n)______ begins at a vertex v,passes through every edge exactly once,and terminates at v.
A)multigraph
B)spanning tree
C)Euler circuit
D)Hamilton circuit
A)multigraph
B)spanning tree
C)Euler circuit
D)Hamilton circuit
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
28
In a digraph,there can be only one edge between a pair of vertices.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
29
The sum of the weights of the edges of a path can be called all of the following EXCEPT ______.
A)length
B)weight
C)height
D)cost
A)length
B)weight
C)height
D)cost
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
30
A tree with n nodes must contain ______ edges.
A)n
B)n - 1
C)n - 2
D)n / 2
A)n
B)n - 1
C)n - 2
D)n / 2
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
31
The adjacency matrix for an undirected graph is symmetrical.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
32
A connected undirected graph that has n vertices and more than n - 1 edges ______.
A)cannot contain a cycle
B)must contain at least one cycle
C)can contain at most two cycles
D)must contain at least two cycles
A)cannot contain a cycle
B)must contain at least one cycle
C)can contain at most two cycles
D)must contain at least two cycles
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
33
A connected undirected graph that has n vertices and exactly n - 1 edges cannot contain a cycle.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
34
A connected undirected graph that has n vertices and exactly n - 1 edges ______.
A)cannot contain a cycle
B)must contain at least one cycle
C)can contain at most two cycles
D)must contain at least two cycles
A)cannot contain a cycle
B)must contain at least one cycle
C)can contain at most two cycles
D)must contain at least two cycles
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
35
All complete graphs are connected.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
36
All paths begin and end at the same vertex.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
37
A ______ is an undirected connected graph without cycles.
A)tree
B)multigraph
C)digraph
D)connected component
A)tree
B)multigraph
C)digraph
D)connected component
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
38
A simple cycle only passes through one vertex.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
39
A simple path may pass through the same vertex more than once.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
40
An Euler circuit exits if and only if each vertex touches ______.
A)two edges
B)three edges
C)an even number of edges
D)an odd number of edges
A)two edges
B)three edges
C)an even number of edges
D)an odd number of edges
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
41
What is a self edge?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
42
Why is backtracking necessary in Depth First Search?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
43
Does the complete graph with 6 vertices contain an Euler circuit? Explain.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
44
What is a planar graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
45
What is a spanning tree?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
46
What is a weighted graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
47
Define a complete graph.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
48
What are the two most common implementations of a graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
49
What is a minimum spanning tree?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
50
How is the cost of a spanning tree calculated?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
51
Is it possible for a spanning tree to be a complete graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
52
What is a simple cycle?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
53
What is the shortest path between two vertices in a weighted graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
54
Suppose we have a weighted graph with n vertices,and at least n edges.Explain is wrong with the following approach for finding the minimum spanning tree:
while(the number of edges in the graph >= n)
find the edge with the highest weight and delete it from the graph
while(the number of edges in the graph >= n)
find the edge with the highest weight and delete it from the graph
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
55
If we are given the adjacency matrix of a weighted (undirected)graph,how can we use it to determine the number of edges in the graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
56
Define a path between two vertices.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
57
What is a cycle?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
58
What is a simple path?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
59
What are two differences between a directed graph and an undirected graph?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
60
How is the depth-first search (DFS)strategy of graph traversal different from the breadth-first search (BFS)strategy?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck