|Z(4th Sm.)-Computer Sc.
-H/Pr/CC-9P/CBCS/Set-3
2023
COMPUTER SCIENCE HONOURS PRACTICAL
Paper : CC-9P
Full Marks : 30
SET -3
Marks Distribution :
Source Code : 10
Algorithm: 05
Output :
Sessional : 04
Viva voce : 06
Answer any one question.
1. Write a C program to find out the minimum cost path from vertex 'a' to vertex ' using Dijkstra's
algorithm. Output corresponding cost and vertices comprising the desired path from vertex 'a' to
vertex i.
16
20
b47
12
5
13
16 h
e
(2) |Z(4th Sm.)-Computer Sc-HPr/CCIP/CBCS/Se-3
2. For aweighted graph,as given below, write a Cprogram to find out minimum cost spanning tree using
Prim's algorithm. Print vertices forming minimum spanning tree and its total cost.
1 25 19
15
3. Write aC program toapply Kruskal's Algorithm to find out the minimum cost spanning tree from the
graph below. Output the corresponding tree and cost of the tree.
10
4. Write a C program to generate possible shortest paths among all pairs of vertices using Floyd-Warshall's
algorithm. Output vertices comprising shortest paths among cach pair of vertices.
A
2
D
(3) 2(4th Sm.)-Computer Sc-HPr/CC-9P/CBCS/Set-3
s Write a C program to apply DFS algorithm on the following
graph.
A B E) F
6. Write a C program to apply BFS algorithm on the following graph.
D E
F (H)