Start
Q1
Question 1: In Prim's algorithm, we start with the root vertex r; it can be any vertex.
Q2
Question 2: You have an adjacency list for G, what is the time compexity to compute Graph transpose G^T?
Q3
Question 3: In strong components algorithm, first of all DFS is run for computing finish times of vertices.
Q4
Question 4: We can use the optimal substructure property to devise a __________ formulation of the edit distance problem.
Selective
Optimum
Iterative
Recursive
Q5
Question 5: Although it requires more complicated data structures, Prim's algorithm for a minimum spanning tree is better than Kruskal's when the graph has a large number of vertices.
Q6
Question 6: According to parenthesis lemma. vertex u is a descendent of v vertex if and only if,
[d[u], f[u]] ⊆ [d[v], f[v]]
[d[u], f[u]] ⊇ [d[v], f[v]]
Unrelated
Disjoint
Q7
Question 7: The __________ given by DFS allow us to determine whether the graph contains any cycles.
Order
Time stamps
BFS traversing
Topological sort
Q8
Question 8: Bellman-Ford allows negative weights edges and negative cost cycles.
Q9
Question 9: In the clique cover problem, for two vertices to be in the same group, they must be adjacent to each other.
Q10
Question 10: The Huffman algorithm finds a(n) __________ solution.
Optimal
Non-optimal
Exponential
Polynomial