Você está na página 1de 1

Oriental Group of Institutes

Mid Sem-I (Jan – June 2011)


Subject- Analysis and design of algorithms
Subject Code- (IT-404)
Branch- Information Technology

Note: - Attempt all questions


Max Marks: 40

Duration: 2 hrs
---------------------------------------------------------------------------------------------------------------------
----------------
1. Explain in what respect, the process of ‘analyzing a problem’ and ‘analyzing
an algorithm’ are essential for developing computer-based solutions of
problems.
2. Show that f1(n)+f2(n) = 0(max(g1(n),g2(n)) where f1(n) = 0(g1(n))and f2(n)
=0(g2(n))
3. If p1/w1≥ p2/w2.........≥ pn/wn prove that knapsack generates an optimal
solution to the given instance of the knapsack problem. also solve the
following knapsack problem using greedy method.
P= (11, 21, 31, 33), W= (2, 11, 22, 15), M=40, n=4
4. Write a divide and conquer algorithm to find nth number of Fibonacci series.
Also give its recurrence relation with time complexity
5. Write an algorithm for quick sort. Also write its best, worst and average case
complexity.
6. Illustrate the divide and conquer quick sort algorithm to sort following
numbers in ascending order.
70, 14, 19, 25, 36, 44, 93, 50, 62, 73, 84, 89
7. Explain Strassen’s matrix multiplication algorithm. Compare it with
conventional matrix multiplication algorithm.
8. What do you mean by optimal merge patterns? Find the weighted external
path length of the tree for the following files 28, 32, 12, 5, 84, 53, 91, 35, 3
and 11.
9. Solve the following recurrence relations
a) T(n) = 3 T(n/2) + n
b) T(n) = T( n )+1

Você também pode gostar