Sie sind auf Seite 1von 3

Assignment 5: Greedy Algorithm

1. Explain in brief characteristics of greedy algorithms. Compare Greedy Method with


Dynamic Programming Method.

2. Write the Prims Algorithm to find out Minimum Spanning Tree. Apply the same and find
MST for the graph given below.

3. Mention applications of minimum spanning tree. Generate minimum spanning tree from the
following graph using Prims algorithm. (Start at vertex a)

4. Consider the following undirected weighted graph. Find minimum spanning tree for the
same using Kruskals algorithm.
5. Generate minimum spanning tree of fig, A using Kruskals algorithm.

6. Following are the details of various jobs to be scheduled on multiple processors such that no
two processes execute at the same on the same processor.

Show schedule of these jobs on minimum number of processors using greedy approach.
Derive an algorithm for the same.
What is the time complexity of this algorithm?

7. Using greedy algorithm find an optimal schedule for following jobs with n=7 profits:
(P1,P2,P3,P4,P5,P6,P7) = (3,5,18,20,6,1,38) and deadline:(d1,d2,d3,d4,d5,d6,d7) =
(1,3,3,4,1,2,1)

8. Write Huffman code algorithm and Generate Huffman code for following

9. Explain Dijkstras algorithm to find minimum distance of all nodes from a given node.
(Greedy algorithm)
Assignment 6: Exploring Graphs

1. Explain: Acyclic Directed Graph, Articulation Point, Dense Graph, Breadth First Search
Traversal, Depth First Search Traversal, Sparse graph, Preconditioning.

2. Differentiate BFS and DFS.

3. Write an algorithm to find out the articulation points of an undirected graph. Find out
articulation points for the following graph. Consider vertex A as the starting point.

Das könnte Ihnen auch gefallen