1. Anna University Question Bank
(Regulation 2013)
DESIGN AND ANALYSIS OF ALGORITHMS
UNIT I
INTRODUCTION
Notion of an Algorithm – Fundamentals of Algorithmic Problem Solving – Important Problem Types –
Fundamentals of the Analysis of Algorithmic Efficiency –Asymptotic Notations and their properties.
Analysis Framework – Empirical analysis - Mathematical analysis for Recursive and Non-recursive
algorithms - Visualization
PART A QUESTIONS
1. Write an algorithm to find the number of binary digits in the binary representation of a positive
decimal integer. (R 13 APR/MAY 2015)
2. Write down the properties of asymptotic notations. (R 13 APR/MAY 2015)
3. Design a brute force algorithm for computing the value of a polynomial p(x)=anxn
+an-1xn-1
+…+a1x…
a0 at a given x0 and determine its worst-case efficiency class. (R 13 APR/MAY 2015)
4. The (log n)th smallest number of n unsorted numbers can be determined in O(n) average-case
time. (True/False). (R 13 NOV/ DEC 2015)
5. Write the recursive Fibonacci algorithm and its recurrence relation. (R 13 NOV/ DEC 2015)
6. Give the mathematical notation to determine if a convex direction is towards left or right and
write the algorithm. (R 13 NOV/ DEC 2015)
7. Prove that any comparison sort algorithm requires Omega(nlog n) comparison in the worst case.
(R 13 NOV/ DEC 2015)
8. State how binomial coefficient is computed? (R 13 NOV/ DEC 2015)
9. Give the Euclid’s algorithm for computing gcd(m,n). (R 13 MAY/JUN 2016)
10. Compare the order of growth of n(n-1)/2 and n2. (R 13 MAY/JUN 2016)
11. Design an algorithm to compute the area and circumference of a circle. (R 13 NOV/ DEC 2016)
12. Define recurrence relation. (R 13 NOV/ DEC 2016)
13. What is an Algorithm? (R 13 APR/MAY 2017)
1
2. 14. Write an algorithm to compute the greatest common divisor of two numbers. (R 13 APR/MAY
2017)
15. How to measure an algorithm’s running time? (R 13 NOV/ DEC 2017)
16. What do you mean by “Worst case-efficiency” of an algorithm? (R 13 NOV/ DEC 2017)
17. Define Theta Notation. (R 08 NOV/ DEC 2013)
18. Compute the average case complexity of linear search algorithm. (R 08 NOV/ DEC 2015)
PART B QUESTIONS
1. Derive a loose bound on the following equation: (R 13 APR/MAY 2015) (8)
F(x)=35X8
-22X7
+14X5
-2X4
-4X2
+X-15
2. Find the closest asymptotic tight bound by solving the recurrence equation T(n)=8T(n/2)+n2
with (T(1)=1) using Recursion Tree Method. [Assume that T(1) £ ø (1)]. (R 13 NOV/ DEC 2015) (8)
3. Suppose W satisfies the following recurrence equation and base case (where c is a constant):
W(n) = c.n+W(n/2) and W(1)=1. What is the asymptotic order of W(n). (R 13 NOV/ DEC 2015) (6)
4. Write the insertion sort algorithm and estimate its running time. (R 13 NOV/ DEC 2015) (8)
5. Give the definition and Graphical Representation of O-Notation. (R 13 MAY/JUN 2016) (8)
6. Give the algorithm to check whether all the elements in a given array of n elements are distinct.
Find worst case complexity of the same. (R 13 MAY/JUN 2016) (8)
7. Give the recursive algorithm for finding the number of binary digits in n’s binary representation,
where n isa a positive decimal integer. Find the recurrence relation and complexity. (R 13
MAY/JUN 2016) (16)
8. Use the most appropriate notation to indicate the time efficiency class of sequential search
algorithm in the worst case, best case and the average case. (R 13 NOV/ DEC 2016) (8)
9. State the general plan for analyzing the time efficiency of non-recursive algorithms and explain
with an example. (R 13 NOV/ DEC 2016) (8)
10. Solve the following recurrence relations : (R 13 NOV/ DEC 2016) (16)
2
3. 11. Briefly explain the mathematical analysis of recursive and non-recursive algorithm. (R 13
APR/MAY 2017) (13)
12. Explain briefly Big Oh Notation, Omege Notation and Theta Notations. Give examples. (R 13
APR/MAY 2017) (13)
13. Discuss the steps in Mathematical analysis for recursive algorithms. Do the same for finding the
factorial of a number. (R 13 NOV/ DEC 2017) (13)
14. What are the Rules of Manipulate Big-Oh Expression and about the typical growth rates of
algorithms? (R 13 NOV/ DEC 2017) (13)
15. List and brief the asymptotic notations. (R 08 APR/ MAY 2011) (6)
16. Explain in detail about asymptotic notation. (R 08 MAY/JUN 2013) (6)
17. Show how to implement a stack using two queues. Analyze the running time of the stack
operations. (R 13 NOV/ DEC 2015) (10)
18. State the relationship among the complexity class algorithm with the help of neat diagrams. (R
13 NOV/ DEC 2015) (4)
19. Write a routine for random number generation algorithm. (R 08 MAY/JUN 2013) (6)
20. Explain Asymptotic complexity classes. (R 10 NOV/ DEC 2011) (8)
21. Define Big Oh notation. (R 10 NOV/ DEC 2011) (6)
22. Give the methods for Establishing Lower Bound. (R 13 NOV/ DEC 2017) (13)
3