Questions

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

1. a) What is an algorithm? Explain its characteristics in detail.

b) What is asymptotic notation. Explain different types of asymptotic notations with


examples.

2. a) Give the algorithm for matrix multiplication and find the complexity of algorithm using
step - count method.
b) Difference between Big-Oh and Omega notation with example.

3. a) What is space complexity? Illustrate with an example for fixed and variable part in
space complexity?
b) Write recursive binary search algorithm with an example and analyze time
complexity. List the applications of binary search.

4. a) Show that the following equalities are incorrect with suitable notations
i)10n2+9=O(n) ii) n2logn=Ɵ(n2)
b) Implement an algorithm to generate Fibonacci number sequence and
determine the time complexity of the algorithm using the frequency method.

5. a)What is meant by Divide and Conquer approach? Write the general method of Divide
and Conquer approach.
b) Write Divide and Conquer recursive merge sort algorithm and derive the time
complexity of this algorithm.
6. a) Show the result of running Merge sorting technique on the sequence
38,27,43,3,9,82,10
b) Derive the Best, Worst and Average time complexities of Merge sorting technique.

7. a) 1 Show the result of running Quick sorting technique on the sequence


38,27,43,3,9,82,10
b) Derive the Best, Worst and Average time complexities of Quick sorting technique.

8. a) Solve the recurrence relation using substitution


method
T(n)= { T(1) n=1

aT(n/b)+f(n) n>1 ,where a=5,b=4,and f(n)=cn2 .

b) Apply quick sort algorithm to sort the list. E, X, A, M, P, L, E in alphabetical


order.

You might also like