0% found this document useful (0 votes)
16 views

Files

free document
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Files

free document
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Dr.

Mahalingam College of Engineering and Technology, Pollachi – 642 003


Department of Computer Science and Engineering
19CSCN1401- Data Structures and Algorithm Analysis II
Unit III – Part 1

PART A
1. List any 4 applications of graphs.

2. Compare matrix and linked list representation of a graph.


Matrix representation

3. Illustrate Directed acyclic graph.

4. Specify the maximum number of edges in an undirected graph with n vertices.


For undirected graph with n vertices, the maximum number of edges is n(n-1)/2.

5. Compare Graphs and Trees.

6. Construct a complete graph with 5 vertices.

7. Compare DFS and BFS


8. Consider the following specification of a graph G and write its adjacency matrix V(G) =
{1,2,3,4} E(G) = {(1,2),(1,3),(3,3),(3,4)(4,1)}
9. Propose an efficient procedure to determine whether a given undirected graph has
cycles.
10. Given the adjacency matrix of a graph, propose an effective technique to determine
whether the graph is undirected.

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)

4. In the graph given below: (8 marks)


-Identify all the simple paths from A to M
-Find the diameter of G (diameter of G is maximum of distance between any two of its nodes)
-Compute degree of all vertices
-Is the graph connected? Justify.

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)

You might also like