Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

R.M.K.

COLLEGE OF ENGINEERING AND TECHNOLOGY


R.S.M NAGAR, PUDUVOYAL-601206

4th Semester B.E. / B.Tech


Second Internal Assessment Feb 2013
Sub. Title : Design and Analysis of Algorithms
Sub. Code : CS 2251
Time
: 100 Minutes

Date

: 28-02-13

Branch
Max. Marks

: CSE
: 50

Answer all questions


Part A (5 x 2 = 10)
1. What is multistage graph?
2. Compare dynamic programming with Greedy algorithms.
3. Define Optimal Binary Search Tree.
4. What is traveling salesperson problem?
5. What is Knapsack problem?

Part B ((2*16 = 32 & 1*8 = 8):: 40 Marks)


6. (a).Write and explain the algorithm to solve All pairs shortest paths algorithm with an example (8)
(OR)
(b) (i) Write the container loading greedy algorithm and explain it.

(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

You might also like