You are on page 1of 2

DIWALI ASSIGNMENT 1

1. Apply Dijkstras algorithm to find the minimum spanning tree.

2. Apply 0/1 Knapsack algorithm on the following instance :

3. Explain how the following elements get sorted using merge sort algorithm:
129,29,79,171,83,95,99,107,121.
What is the time complexity of this algorithm?
4. Solve the following recurrence relation :

() = {
2 ( ) + 3,
2

1, =1
>1

5. Analyze the complexity of Fractional Knapsack Problem.


6. Consider the following graph :

Which one of the following is not the sequence of edges to MST using Kruskal Algorithm :
(a) (a,b)(d,f)(b,f)(d,c)(d,e)
(b) (d,f)(a,b)(d,c)(b,f)(d,e)

(c) (d,f)(a,b)(b,f)(d,e)(d,c)
(d) (a,b)(d,f)(d,c)(b,f)(d,e)
7. Let G be an undirected connected graph with distinct edge weights. Let emax be the edge
with max weight and emin be the edge with minimum weight. State true or false for the
following statements:
(a) Every Minimum spaning tree must contain emin
(b) If emax is in MST then its removal must disconnect G
(c) No MST contain emax
(d) G has unique MST
8. Consider the following graph. Starting from g, give 4 different Breadth First Traversals.

You might also like