DESIGN AND ANALYSIS OF ALGORITHM
ASSIGNEMENT QUESTION – 2
1 For a given instance of problem obtain the optimal solution for the Knapsack
Problem the capacity of knapsack is W=5
item weight Value
1 2 3
2 3 4
3 4 5
4 5 6
2 Using dynamic programming solve the following instances knapsack weight
W=4 [w1,w2,w3]=[1,2,2] and [p1,p2,p3] = [18,6,6]
3 Find the optimal solution to the knapsack instances using greedy method M
=15,n=7 (p1,p2,----- p7)=(10,5,15,7,6,18,3) (w1,w2-----w7)=(2,3,5,7,1,4,1)
4 Design a 3 stage system with device type D1, D2,D3 the cost are 30,15,20
Respectively the cost of system is to be more than 105 the ratability of each
Device is 0.9, 0.8, and 0.5 respectively.
5 Find the minimum spanning tree using prim’s algorithm for the following graph
6 Solve the graph using kruskal’s method
7 Consider 4 items anf find Knapsack solve using branch and bound and draw
State space tree the capacity of knapsack is 10
item weight Value
1 4 40
2 7 42
3 5 25
4 3 12