Professional Documents
Culture Documents
Assignment 4 DS
Assignment 4 DS
Assignment –4
Subject Name: Data Structure Subject Code: KCS-301
Course/Branch: B.Tech IT Semester/Section: Sem III
1. For the following graph compute the adjacency matrix and incident matrix.
2. Explain the Minimum cost spanning tree. Write Kruskal’s algorithm for the
minimum cost spanning tree. Compute the minimum cost spanning tree using
Kruskal’s algorithm.
Q3. Explain Dijkstra’s algorithm. Apply the Dijkstra algorithm below mention graph.
Starting node is P.
Q4. Calculate all pair’s shortest paths using Floyd warshall’s algorithm of the given
graph.
Q5. Differentiate BFS and DFS graph traversal. Show the traversal list of nodes of the given graph
using DFS.