Professional Documents
Culture Documents
Mailam Engineering College: MAILAM, Villupuram (DT), Pin:604 304
Mailam Engineering College: MAILAM, Villupuram (DT), Pin:604 304
(Approved by AICTE New Delhi, affiliated to Anna University Chennai and accredited
by NBA New Delhi)
Date : 16.05.2012
Time: 10 AM 1 PM
PART-A
(10 X 2 = 20)
1.
2.
3.
4.
PART B
(5 X 16 = 80)
11. a(i) What are NP Hard & NP complete Problems? Explain in details.
(11)
(ii) Explain in detail about Twice-around- the tree algorithm.
(5)
(OR)
b. Illustrate the relationship between P, NP, NP hard and NP-Complete with neat
diagram. Explain it in detail.
(16)
E
3
3
4
6
..
(OR)
b. Briefly explain the knapsack problem and apply in Approximation algorithm (16)
ITEM
WEIGHT
VALUE
1
2
$ 25
Capacity W = 5
2
3
$ 20
3
1
$ 17
4
5
1
1
$ 45
$ 50
13 a. Write an algorithm of Optimal Binary Search Tree in detail for the following
example.
(16)
Key :
int
float
double
char
Prob. :
2
4
6
5
(OR)
b. (i) For 0/1 knapsack problem using Dynamic programming, when
(w1,w2,w3,w4) = (10,15,6,9) and (v1,v2,v3,v4) = (2,3,1,1). W=5
(10)
(ii). Write a short notes on Binomial Coefficient.
(6)
14. a(i) Give recursive backtraking algoritham for sum of subsets problem and compute
time compalexity for it. { 1, 2, 3, 4, 8, 9} D = 13.
(8)
(ii) Discuss the binary search algorithm for the following example
5, 8, 4, 6, 1, 2, 3, 6,7, 9. Search Key Value is 2 & 10.
(8)
(OR)
(b) How the time complexity of travaling salesperson problem is improved by branch
and method Explain with following example.
V
W
X
Y
Z
V
..
..
..
..
..
15. a(i) Discuss & Solve the assignment problem & write the algorithm.
(16)
Job
A
B
C
D
J1
18
13
38
19
J2
26
23
19
26
J3
17
14
18
24
J4
11
26
15
10
Prepared By :
(8)
(8)
Approved By: