Files
Files
PART A
1. List any 4 applications of graphs.
PART B
1. Perform Depth First Traversal of the given graph. Write the algorithm used and explain its
working. (15 marks)
2. Traverse the given graph using a Queue data structure and construct the spanning forest.
Write the algorithm used and explain its working. From the spanning forest infer whether the
graph contains cycles. (15 marks)
3. Consider the directed acyclic graph given below, which represents a task network. Task
network means, the task c cannot be started until the tasks a and b are completed, that the task f
cannot be started until the task d is completed, and so on. In which order could the tasks be
done, so that no task is started until all of the ones it is dependent on have been finished
already? Write and explain the algorithm used for ordering. (15 marks)
5. Determine the topological ordering of the given graph and outline the steps used. (8 marks)
6. Perform BFS and DFS traversal on the given undirected graph. (8 marks)
7. Identify the suitable graph traversal technique for the following scenarios and justify your
answer. (8 marks)
• Finding the least number of hops in transmitting a message from source to destination in a
computer network
• Crawlers in Search Engines
• Solving maze puzzle
• GPS navigation
8. Elaborate on the applications of Depth First Search and Breadth First Search. (7 marks)
9. Sketch an example with minimum 5 nodes for each of the following types of graphs.
• Strongly connected
• Weakly connected
• Not connected
• Directed Acyclic Graph
10. Consider the following road transportation network. City A is connected to City B, C and D.
City B is connected to cities A, C and E. City C is connected to A, B, D and F. City D is connected to
A, C and F. City E is connected to cities B and F. City F is connected to cities C, D and E. (7
marks)
11. Determine if the given graph is connected using a suitable Graph traversal technique.
Outline the procedure used. (7 marks)