**M.C.A DEGREE EXAMINATION, JUNE/JULY 2009****SECOND SEMESTER****CA5153 DESIGN AND ANALYSIS OF ALGORITHMS****(REGULATION 2007)****Time: Three hours Maximum: 100 marks****Answer all questions.**

**PART A – [10 X 2 = 20 marks]**

1. What is amortized efficiency?

2. Write the names of the basic asymptotic efficiency classes with their growth functions.

3. Define the internal path length of an extended binary tree.

4. State the Triomino Puzzle problem.

5. What are the differences between dynamic programming and divide-and-conquer techniques?

6. Give two reasons why the memory function approach is unattractive for the problem of computing a binomial coefficient.

7. Write the differences between backtracking and branch-and-bound techniques.

8. Write the three reasons to terminate a search path at the current node in a state-space tree of a branch-and-bound algorithm.

9. What are the two types to show a decision problem is NP-Complete?

10. What is halting problem?**PART B – [5 X 16 = 80 marks]**

**11.**(a) Briefly discuss the sequence of steps typically required in designing and analyzing an algorithm. (10)

(b) Design a recursive algorithm for computing 2n for any nonnegative integer n which is based on the formula 2n = 2n-1 + 2n-1. (6)

Or

**11(ii)**.(a) Write a recursive algorithm for the Tower of Hanoi puzzle. Obtain the recurrence equation. (8)

(b) Solve the recurrence equation which is to be obtained the above by the method of backward substitution. (8)

**12.**(a) Write a Merge sort algorithm and explain with an example using divide-and-conquer technique. (8)

(b) Explain the working of binary search algorithm using divide-and-conquer with an example. (8)

Or

**12(ii).**(a) Write the Quick sort algorithm and illustrate the operation of the algorithm with an example. (8)

(b) Describe the Stassen’s Matrix Multiplication technique. (8)

**13.**(a) Write and explain the dynamic programming algorithm for computing a binomial coefficient. Obtain the time efficiency of the algorithm. (8)

(b) Explain the importance of optimal binary search tree. (8)

Or

**13(ii).**(a) Explain the Warshall’s algorithm for computing the transitive closure of a directed graph. (8)

(b) Design a dynamic programming algorithm and explain for finding an optimal order of multiplying n matrices. (8)

**14.**(a) State and explain the n-Queen problem using backtracking. (8)

(b) Apply the branch-and-bound technique in solving the Traveling Salesman Problem. (8)

Or

**14(ii).**(a) Illustrate the Branch-and-Bound approach of solving assignment problem. (8)

(b) Solve the following instance of the knapsack problem by the branch-and-bound algorithm, with W = 16. (8)

Item Weight Value

1 10 100

2 7 63

3 8 56

4 4 12

**15.(a)** Explain the procedure to solve the Traveling salesman Problem with approximation algorithms. (10)

(b) Give short notes on decision problems, un decidable problem, and NP-Complete problem. (6)

Or

**15 (ii) (a) **Explain how the knapsack problem is solved with approximation algorithm. (8)

(b) Apply the nearest algorithm to the instance defined by the distance matrix below. Start the algorithm at the first city, assuming that the cities are numbered from 1 to 5. (8)

## No comments:

## Post a Comment