## NPTEL Design and Analysis of Algorithms Week 3 Assignment Answers 2024

1. Which of the following statements is not true about breadth-first search (BFS) in an undirected graph starting at a vertex v?

- BFS identifies all vertices reachable from v.
- Using an adjacency list instead of an adjacency matrix can improves the worst case complexity to O(n + m).
- BFS can be used to identify the furthest vertex from v in any graph, in terms of number of edges.
- BFS cannot be used to check for cycles in the graph.

Answer :-For Answer Click Here

2. An undirected graph G has 300 nodes and the minimum degree of any vertex is 3. Which of the following is the most precise statement we can make about m, the number of edges in G?

- m is at least 900.
- m is at least 450.
- m is at least 300.
- m is at least 100.

Answer :-For Answer Click Here

3. Suppose we obtain the following BFS tree rooted at node D for an undirected graph with vertices {A,B,C,D,E,F,G,H}.

Which of the following cannot be an edge in the original graph?

- (F,G)
- (B,E)
- (A,G)
- (E,H)

Answer :-For Answer Click Here

4. We are interested in topological orderings of the following DAG which satisfy the constraint that exactly one of the following conditions holds: (a) 9 appears after 7, or (b) 2 appears before 4. How many such orderings are there?

- 18
- 15
- 9
- 6

Answer :-

5. An intricate 3D artwork requires 10 different items, labelled {A,B,C,D,E,F,G,H,I,J} to be stuck in place. The layout requires the following constraints to be met.

- A must be stuck on top of F
- B must be stuck on top of E and I
- C must be stuck on top of F
- D must be stuck on top of J
- E must be stuck on top of D
- F must be stuck on top of B and G
- G must be stuck on top of E and I
- H must be stuck on top of A and C
- I must be stuck on top of J

Each piece requires a day to dry after sticking. A piece can be stuck on top of another piece only if the earlier piece has dried.

What is the minimum number of days required to complete assembling the artwork?

- 10
- 8
- 7
- 5

Answer :-For Answer Click Here