You are on page 1of 1

Dr. A. Q.

Khan Institute of Computer Sciences and Information


Technology Kahuta
Distribution Date: 12/01/2024 Assignment: 3 Submission Date: 17/01/2024.
Class: BSCS IV Course Instructor: Fahim Khan Total Marks: 20
Design and Analysis of Algorithm
Instruction:
 Do not copy and paste anything from the internet. No argument will be accepted in case of
copied assignment.
 Late assignment will not be accepted in any case.
 Submit the Assignment in hard copy format is acceptable.
 Deadline will not be extended.

Q1:

a) Calculate MST for the above graph by using Prim’s Algorithm.


b) How the Cycles are detected for the above weighted undirected graph by using
Kruskal’s algorithm.
c) Calculate MST for the above graph by using Kruskal’s Algorithm.
d) Show that Kruskal’s Algorithm gives O(|E|lg|E|)+O|V|.
e) Show that Prim’s algorithm gives O(n2) running time.

GOOD LUCK

You might also like