Professional Documents
Culture Documents
Answer All Questions: 4 Semester - B.E. / B.Tech Second Internal Assessment: 28-02-13
Answer All Questions: 4 Semester - B.E. / B.Tech Second Internal Assessment: 28-02-13
Date
: 28-02-13
Branch
Max. Marks
: CSE
: 50
(8)
(ii) Suppose you have 6 containers whose weights are 50, 10, 30, 20, 60, 5 and a ship whose
capacity is 100. Use the above algorithm to find an optimal solution to this instance of the
container loading problem
7. (a) Explain the multistage graph problem with an example
(16)
(OR)
(b).Write and Explain the algorithm for Optimal Binary Search Tree with an example.
(16)
8. (a) Explain how dynamic programming is applied to solve Traveling salesman problem
(16)
(OR)
(b)(i) Write the algorithm to compute the 0/1 knapsack problem using dynamic programming
and explain it.
(8)
(ii) Solve the following instance of the 0/1, knapsack problem given the knapsack capacity is
W=5
(8)
Items Weight Value
1
2
3
4
2
1
3
2
12
10
20
15