Filters
Question type

A(n) __________ spanning tree is the spanning tree with the smallest cost.

Correct Answer

verifed

verified

minimum

Excluding the coloring step, the depth-first search algorithm is O(__________) .


A) |E|
B) |E|2
C) |E||V|
D) |V|

E) C) and D)
F) None of the above

Correct Answer

verifed

verified

A

In the algorithm to find the minimum spanning tree, d[v] (the shortest distance to v) contains only the length of the final edge.

A) True
B) False

Correct Answer

verifed

verified

The collection of trees that may be generated by a depth-first search is called a(n) __________.

Correct Answer

verifed

verified

A(n) __________ sort of the vertices of a DAG (directed acyclic graph) is an ordering of the vertices such that if (u, v) is an edge, then u appears before v.

Correct Answer

verifed

verified

A(n) adjacency __________ uses a two-dimensional array to represent a graph.


A) list
B) matrix
C) stack
D) queue

E) B) and D)
F) All of the above

Correct Answer

verifed

verified

Complete the definition of an operator== member function for the Edge class. The function compares the source and dest fields only to determine equivalence between two Edge objects. bool Edge::operator==(const Edge& other) { __________ }

Correct Answer

verifed

verified

return (this->sou...

View Answer

A naive implementation of Prim's Algorithm that does not utilize priority queues is O(__________) .


A) |E|
B) |V|
C) |E| log |V|
D) |V|2

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

An adjacency list uses less (more) storage when less than (more than) __________ percent of the adjacency matrix would be filled.

Correct Answer

verifed

verified

For a dense graph, the value of |E| is approximately |V|.

A) True
B) False

Correct Answer

verifed

verified

A(n) __________ search algorithm visits an initial vertex, fully explores a single branch and then backtracks to a new vertex (if one exists).

Correct Answer

verifed

verified

The term __________ refers to visiting all the vertices in a graph.


A) traversal
B) disconnection
C) cycle
D) path

E) C) and D)
F) B) and C)

Correct Answer

verifed

verified

Suppose G is an undirected graph consisting of the following sets: 1) V = {0, 1, 2, 3, 4, 5, 6} 2) E = {{0,1},{0,2}, {1,2},{1,3}, {1,4},{2, 5},{2,6}} Starting at vertex 0, a possible visit sequence representing a breadth-first search of G is _________.


A) 0 1 3 4 2 5 6
B) 0 2 6 5 1 4 3
C) 0 1 2 3 4 5 6
D) 0 3 4 5 6 1 2

E) A) and D)
F) A) and B)

Correct Answer

verifed

verified

A vertex is __________ to another vertex if there is an edge to it from that other vertex.

Correct Answer

verifed

verified

The breadth-first search algorithm is O(__________).

Correct Answer

verifed

verified

Back edges that connect a vertex with its ancestors are part of a depth-first search tree.

A) True
B) False

Correct Answer

verifed

verified

A graph that is unconnected has no connected components.

A) True
B) False

Correct Answer

verifed

verified

Suppose an undirected graph G consists of the following sets: 1) V = {New York, Islip, Philadelphia, Chicago, Seattle} 2) E = {{Islip, New York},{New York, Philadelphia},{Philadelphia, Chicago}, {Chicago, Islip},{Chicago, Seattle},{Chicago, New York},{Seattle, New York}} Which of the following paths consisting of vertices in V represents a cycle?


A) Philadelphia -> Chicago -> Seattle -> New York
B) New York-> Philadelphia -> Chicago -> Seattle -> New York
C) Philadelphia -> Chicago -> Seattle -> New York -> Islip -> Chicago
D) New York-> Philadelphia -> Chicago -> New York -> Islip

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

B

The run-time of Dijkstra's algorithm has an upper bound of O(__________) .


A) log |V|
B) |E|
C) |V|
D) |V|2

E) All of the above
F) A) and C)

Correct Answer

verifed

verified

The breadth-first search algorithm stores identified vertices in a __________.


A) queue
B) stack
C) binary tree
D) B tree

E) All of the above
F) B) and D)

Correct Answer

verifed

verified

Showing 1 - 20 of 25

Related Exams

Show Answer