# 2007 Anna University Chennai B.Sc Computer Science DESIGN OF ALGORITHMS Question paper

** University Question Papers **

**
**2007 Anna University Chennai B.Sc Computer Science DESIGN OF ALGORITHMS Question paper

Computer Technology

DESIGN OF ALGORITHMS

(Common to B.Sc. Information Technology)

PART A – (10 X 2 = 20 marks)

1. What do you mean by algorithm validation?

2. Compare direct and indirect recursive algorithms.

3. Show the binary decision tree for binary search. (assume no. of elements=14)

4. Write an algorithm for finding maximum and minimum in a straight forward

method.

5. State the principle of optimality.

6. Show the diagrammatic representation of graph with negative cycle.

7. Distinguish between preemptive and non- preemptive schedule.

8. Define articulation point. Give example.

9. What is the total number of nodes in 8-queens state space tree?

10. What is Branch-and –Bound method?

PART B- (5 X 16 = 80 marks)

11. (i) Find an optimal solution to the knapsack instance n-7, m=15 (6)

(p1, p2, p3 …….. p7) = (10,5,15,7,6,18,3) and

(w1,w2,w3,……w7) = (2,3,5,7,1,4,1)

(ii) Write an algorithm to find the shortest path from one node to every other node

in the graph. Illustrate with an example. (10)

12. (a) (i) What is algorithm? Explain the criteria to be satisfied in every algorithm. (6)

(ii) Devise an recursive algorithm to compute the following binomial coefficient.

Analyse its worst-case and best-case performance. (10)

n n!

--- = -----------

m m! (n-m)!

(b) (i) How do we analyze the performance of an algorithm? Give an example. (8)

(ii) Explain the various asymptotic notations used in algorithm. (8)

13. (a) (i) Write a recursive binary search algorithm. Analyze its time complexity. (8)

(ii) Sort the following numbers using merge sort. (8)

310,285,179,652,351,423,867,254,450,220

Or

(b) (i) Write an algorithm for Quick sort. Give an example. (10)

(ii) Compare the performance analysis of merge sort and Quick sort. (6)

14. (a) (i) Explain the use of Traveling Salesman problem with an example. (10)

Or

(ii) Write a note on flow shop scheduling (6)

(b) (i) Write an algorithm to count the number of lead nodes in a binary tree?

What is its time complexity? (6)

(ii) Explain Depth First Search algorithm. (8)

(iii) Define spanning tree (2)

15. (a) Discuss the use of backtracking in solving 8-queens problem. Analyze its

Performance measures. (16)

or

(b) (i) Write down the control abstraction for LC- search (6)

(ii) Explain the method of solving knapsack problem using Branch-and-Bound

Technique.