You are on page 1of 3

MAILAM ENGINEERING COLLEGE

(Approved by AICTE New Delhi, affiliated to Anna University Chennai and accredited
by NBA New Delhi)

MAILAM, Villupuram(Dt), Pin:604 304


Department of Computer Applications
MODEL EXAMINATION
Subject name /Code : Design & Analysis of Algorithm / MC9223
Sem: II

Date : 16.05.2012
Time: 10 AM 1 PM

PART-A

(10 X 2 = 20)

1.
2.
3.
4.

What are various notations used to represent time complexity?


Give the algorithm for N-Queens problem.
List out the order of growth in ascending order.
Determine the order of mangnitude of the worst-case computing time for the backing
procedure that finds all Hamiltonian cycles.
5. Distinguish between deterministic and non-deterministic algorithms.
6. Write the worst case of binary search algorithm.
7. Define Approximation algorithm & Dynamic Programming.
8. Difference between P & NP Problem.
9. Define Promising & Non Promising Node.
10. Define Approximation algorithm & List out its applications.

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)

12. a. Briefly discuss about Nearest- Neighbor


Approximation algorithm.
To
A
B
C
A
..
3
6
From
B
3
..
5
C
6
5
..
D
2
2
6
E
3
3
4

algorithm for the following example using


(16)
D
2
2
6
..
6

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

(ii) Give an algoritham for N-Queens Problem N = 4


(OR)
b(i) Draw & explain Fundamentals of Algorithmic problem solving.
(ii) Write the algorithm for warshalls with suitable example.

Prepared By :

(8)
(8)

Approved By:

Ms. A. Subathra Devi AP/ MCA

Dr. R. Mariappan. HOD/MCA

You might also like