Deck 16: Graphs
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
سؤال
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/40
العب
ملء الشاشة (f)
Deck 16: Graphs
1
Consider a digraph with the following vertices and edges: vertices: 1, 2, 3, 4
Edges: (1,2), (2,1), (3,4)
Which of the following statements are true?
A) The graph has a cycle
B) The graph is connected
C) The graph is acyclic
D) all of the above are true
E) neither a, b, nor c are true.
Edges: (1,2), (2,1), (3,4)
Which of the following statements are true?
A) The graph has a cycle
B) The graph is connected
C) The graph is acyclic
D) all of the above are true
E) neither a, b, nor c are true.
A
Explanation: This graph has a cycle, namely edge (1,2) and (2,1). It is not connected because there is no path between 1 and 4, for example.
Explanation: This graph has a cycle, namely edge (1,2) and (2,1). It is not connected because there is no path between 1 and 4, for example.
2
A(n) ___________________ is a two-dimensional array that can be used to represent a graph.
A) adjacency list
B) adjacency matrix
C) digraph list
D) graph node
E) none of the above
A) adjacency list
B) adjacency matrix
C) digraph list
D) graph node
E) none of the above
B
Explanation: An adjacency matrix is a two-dimensional array that can be used to represent a graph.
Explanation: An adjacency matrix is a two-dimensional array that can be used to represent a graph.
3
A digraph is a __________________________ .
A) graph in which every cycle contains 2 edges.
B) graph in which every cycle contains 3 edges.
C) graph in which there are no cycles.
D) graph in which there are 2 cycles.
E) directed graph.
A) graph in which every cycle contains 2 edges.
B) graph in which every cycle contains 3 edges.
C) graph in which there are no cycles.
D) graph in which there are 2 cycles.
E) directed graph.
E
Explanation: A digraph is another name for a directed graph.
Explanation: A digraph is another name for a directed graph.
4
A graph in which every edge is connected to every other edge is said to be ___________________ .
A) sparse
B) complete
C) full
D) balanced
E) connected
A) sparse
B) complete
C) full
D) balanced
E) connected
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
5
In a(n) _____________________ graph, an edge from node labeled A to a node labeled B is the same as having an edge from B to A.
A) directed
B) undirected
C) sparse
D) tree-like
E) none of the above
A) directed
B) undirected
C) sparse
D) tree-like
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
6
A graph is said to have a(n) ________________, if there exists a path where the first and last vertices are the same, and no edge is repeated.
A) connected component
B) algorithm
C) cycle
D) weight
E) complete component
A) connected component
B) algorithm
C) cycle
D) weight
E) complete component
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
7
A graph is a special kind of tree.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
8
A(n) _______________________ is one implementation of a graph where the graph is implemented as a linked structure, and each node contains a structure that contains links to all other nodes.
A) adjacency list
B) adjacency matrix
C) digraph list
D) graph node
E) none of the above
A) adjacency list
B) adjacency matrix
C) digraph list
D) graph node
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
9
A graph with integer weights or costs associated with edges is sometimes called a(n) _________________.
A) acyclic graph
B) directed graph
C) network
D) adjacency matrix
E) none of the above
A) acyclic graph
B) directed graph
C) network
D) adjacency matrix
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
10
A depth-first traversal of a graph uses which of the following data structures?
A) binary search tree
B) stack
C) queue
D) array
E) none of the above
A) binary search tree
B) stack
C) queue
D) array
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
11
In graph terminology, the nodes are referred to as ____________________.
A) vertices
B) edges
C) parents
D) children
E) none of the above
A) vertices
B) edges
C) parents
D) children
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
12
A spanning tree of a graph is a tree with that always has which of the following properties?
A) It includes some of the edges and some of the vertices of the graph.
B) It includes all of the edges and some of the vertices of the graph.
C) It includes some of the edges and all of the vertices of the graph.
D) It includes all of the edges and all of the vertices of the graph.
E) none of the above
A) It includes some of the edges and some of the vertices of the graph.
B) It includes all of the edges and some of the vertices of the graph.
C) It includes some of the edges and all of the vertices of the graph.
D) It includes all of the edges and all of the vertices of the graph.
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
13
A digraph and an directed graph are the same thing.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
14
Which of the following describes vertices that are adjacent?
A) They are close to one another in the visual representation of the graph.
B) They are far apart in the visual representation of the graph.
C) There is no edge connecting them.
D) There is an edge connecting them.
E) None of the above describes adjacent vertices.
A) They are close to one another in the visual representation of the graph.
B) They are far apart in the visual representation of the graph.
C) There is no edge connecting them.
D) There is an edge connecting them.
E) None of the above describes adjacent vertices.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
15
In an undirected graph, an edge of the form (A, B) is the same as an edge of the form (B, A).
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
16
A connected graph has which of the following properties?
A) For any pair of vertices, there is an edge between them.
B) Every vertex is adjacent to every other vertex.
C) No vertex is adjacent to every other vertex.
D) For any pair of vertices, there is a path between them.
E) There exists a vertex that is adjacent to every other vertex.
A) For any pair of vertices, there is an edge between them.
B) Every vertex is adjacent to every other vertex.
C) No vertex is adjacent to every other vertex.
D) For any pair of vertices, there is a path between them.
E) There exists a vertex that is adjacent to every other vertex.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
17
A breadth-first traversal of a graph uses which of the following data structures?
A) binary search tree
B) stack
C) queue
D) array
E) none of the above
A) binary search tree
B) stack
C) queue
D) array
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
18
A __________________ traversal can be used to determine if a graph is connected.
A) inorder
B) preorder
C) depth-first
D) breadth-first
E) none of the above
A) inorder
B) preorder
C) depth-first
D) breadth-first
E) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
19
A complete graph on n vertices has n(n-1)/2 edges.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
20
An undirected graph is connected if for every pair of vertices, there is an edge between them.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
21
Consider the following undirected graph.
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3), (3,5), (4,5)
Write out an adjacency matrix for this graph.
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3), (3,5), (4,5)
Write out an adjacency matrix for this graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
22
Explain how a breadth-first traversal of a graph works.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
23
Can a tree ever have a cycle? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
24
What data structure is used to support a depth-first traversal of a graph?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
25
An adjacency matrix is one approach to implementing a graph that uses a two-dimensional array.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
26
Consider the following undirected graph.
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3)
Is the graph connected?
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3)
Is the graph connected?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
27
Can an edge be part of more than one cycle in a graph? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
28
What is the maximum number of edges in a directed graph on n vertices? Explain how you arrived at your solution.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
29
What does it mean for a graph to be connected?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
30
A breadth-first traversal uses a stack as a supporting data structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
31
Write out all of the edges in a complete graph on 4 vertices.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
32
Is every tree a graph? Is every graph a tree? Explain.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
33
Consider the following undirected graph.
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3)
Is the graph acyclic?
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3)
Is the graph acyclic?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
34
A spanning tree of a graph does not necessarily include all of the edges of the graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
35
A minimum spanning tree of a weighted graph is a spanning tree in which the sum of the weights of the edges is less than or equal to the sum of the weights for any other spanning tree for the same graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
36
A cycle is a path that starts and ends on the same vertex.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
37
What is a complete graph? How many edges are contained in a complete graph on n vertices?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
38
Consider the following undirected graph.
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3), (3,5), (4,5)
Give a spanning tree for this graph.
vertices: 1, 2, 3, 4, 5
edges: (1,2),(3,4), (2,4), (2, 3), (3,5), (4,5)
Give a spanning tree for this graph.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
39
What is the difference between a directed graph and an undirected graph?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck
40
What is the difference between a spanning tree and a minimum spanning tree?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 40 في هذه المجموعة.
فتح الحزمة
k this deck