Académique Documents
Professionnel Documents
Culture Documents
Q.2 Write a greedy algorithm to solve the problem of fractional knapsack. [07]
Solve the following example:
Capacity of the given knapsack is W=13. There are four objects with weight
and value as given in below table.
Object i 1 2 3 4
vi 10 40 30 52
wi 2 5 7 3
OR
Explain how to apply the divide and conquer strategy for sorting the [07]
elements using merge sort with example. Give algorithm for merge sort
method along with its time complexity.
Q.3 Write down the Krushkal’s Algorithm to find out Minimum Spanning Tree. [07]
Illustrate the steps to find minimum spanning tree for the graph given below
using Krushkal’s algorithm.
OR
Write an algorithm of Bucket Sort Method. Explain it with example. [07]
Q.5 Explain Dijkstra’s algorithm to find minimum distance of all nodes from a [07]
given node. (Greedy algorithm).
OR
Give the algorithm for Binary Search Method using divide and conquer [07]
technique and do the analysis of algorithm.