Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

*JE932* JE – 932

IV Semester B.E. CSE/ISE Degree Examination, June/July 2013


(2K11 Scheme)
CI – 44 : DESIGN AND ANALYSIS OF ALGORITHM
Time : 3 Hours Max. Marks : 100

Instruction : Answer any five complete questions selecting atleast two from
each Part.

PART – A

1. a) What is an Algorithm ? Explain the various stages in the Design and Analysis
Process. 10
b) Write a recursive algorithm to find the number of binary digits in the binary
representation of a positive decimal integer. Derive its time complexity. 10

2. a) Write an algorithm for brute-force string matching. Give its time complexity. 10
b) Give the solutions for the following traveling salesman problem using exhaustive
search technique. 10

3. a) State Master Theorem. Give the complexity of the following recurrence relations.
1) T (n) = 4T (n/2) + n

2) T (n) = 2T n( 2 ) + 1. 6

b) Write a note on divide-and-conquer algorithm for the closest pair problem. 6


c) Explain the recursive procedure to find the product of two large integers. Give
its time complexity. 8

P.T.O.
JE – 932 -2- *JE932*

4. a) Give the variations of decrease and conquer technique. Give example. 5


b) Write a program to sort the array of integers using insertion sort. 5
c) Apply the DFS based algorithm to solve the topological sorting problem for
the following digraph. 10

PART – B

5. a) Explain presort technique used in various algorithms. 10


b) What is an AVL Tree ? Explain various rotations used for balancing with an
example. 10

6. a) Write a program for Horspools string matching algorithm. Explain with an


example. 10
b) What is hashing ? Explain various hash collision resolution techniques. 10
7. a) Solve the all pairs shortest path problem for the digraph with the weight matrix. 10

⎡0 2 ∞ 1 8⎤
⎢6 0 3 2 ∞⎥
⎢ ⎥
⎢∞ ∞ 0 4 ∞⎥
⎢ ⎥
⎢∞ ∞ 2 0 3⎥
⎢⎣ 3 ∞ ∞ ∞ 0 ⎥⎦

b) Write an algorithm for the Knapsack problem. Give its time complexity. 10
*JE932* -3- JE – 932

8. a) Solve the following instances of the single-source shortest paths problem


with vertex ‘a’ as the source. 10

b) Give the Backtracking solution for the following subset-sum problem.


S = {1, 3, 4, 5} and d = 11. 10
———————

You might also like