Assignment 2
Assignment 2
Week 2 Assignment
Maximum marks: 10, each question carries one mark.
1
(b) Simple path coverage.
(c) Specified path coverage.
(d) Prime path coverage.
1 4
2 5
5. Which are the three vertices that will be added to the BFS queue in the
first step of the BFS algorithm? Does the order in which they are added
matter?
(a) The three vertices will be 2, 3 and 4, their order will be exactly the
same as the one given in this answer option.
(b) The three vertices will be 2, 3 and 4, their order does not matter.
(c) The three vertices will be 2, 3 and 5, their order will be exactly the
same as the one given in this answer option.
(d) The three vertices will be 2, 3 and 5, their order does not matter.
2
7. When will BFS traversal be complete for the given graph?
(a) BFS traversal will be complete when all the vertices are marked as
visited and the queue is empty.
(b) BFS traversal will be complete when all the vertices are added to the
queue.
(a) 1, 2, 3, 4, 5.
(b) 1, 4, 5, 2, 3.
(c) 1, 5, 4, 3, 5.
(d) 1, 4, 5, 2, 3.
(a) 1, 4, 5, 2, 3.
(b) 1, 2, 3, 4, 5.
(c) 1, 2, 3, 5, 4.
(d) 1, 5, 4, 3, 2.
10. Which of the following options are true regarding DFS and BFS traversals
in the given graph starting with vertex 1?
(a) Both DFS and BFS will always visit the vertices in the same order.
(b) DFS order of traversal need not be the same as the BFS order of
traversal for the give graph.