You are on page 1of 3

AMIRAJ COLLEGE OF ENGINEERING AND TECHNOLOGY

DEPARTMENT: Computer Science & Engg.


SUBJECT : Analysis and Design of Algorithm SEM : 5
TOPIC : Question Bank
FACULTY NAME : Foram Patel

Unit-1 :Basics of Algorithms and Mathematics

1. What is an algorithm? Explain characteristics / properties of any algorithm.


2. How to write an algorithm?
3. Write an algorithm to count the sum of n number.
4. Write an algorithm to check whether given number is even or odd?
5. WAA for sorting the elements.
6. WAA to find factorial of n number.
7. WAA to perform multiplication of two matrices.
8. Designing Steps of Algorithm.
9. Explain Linear Inequality and Equality with Example.

Unit-2 : Analysis of Algorithm


1. Find out the frequency count?
Void fun()
{
Int a;
A=0;
For I  1 to n do
{
A=a+i;
}
}

2. Explain Bubble sort algorithm. Derive the algorithmic complexity in Best case,
worst-case and Average case analysis.
3. Sort the letters of word “DESIGN” in alphabetical order using bubble sort
4. Why do we use asymptotic notations in the study of algorithms? Briefly describe
the all asymptotic notations.
5. Explain Forward Substitution and Backward Substitution Method with Example.
6. Explain Selection Sort Algorithm and give its best case, worst case and average
case complexity.
7. Sort the letters of word “EXAMPLE” in alphabetical order using insertion sort.
8. Reorder the following complexity from smallest to largest.
n2, 2n,nlogn,logn,n3
9. Solve T(n) = 9T(n/3)+n , T(n) = 9T(n/3)+n3 , T(n) = 4T(n/2) + logn by mater’s
method.
10. Sort the following elements using heap sort.
14, 12, 9, 8, 7, 10, 18
11. Sort the following elements using bucket sort.
121, 235, 55, 973, 327, 179
12. Sort the following elements using Radix sort.
45, 37, 5, 9,6, 11, 18, 27
13. Sort the following elements using counting sort.
6,0,2,0,1,3,4,6,1,3,2
14 Prove that (n+b) b=Ө (nb), b>0
15 Find big oh notation.1f(n)=6993 2. f(n) = 6n2+135
16 Find theta notation and big omega notation. 1. F(n) = 14*7 +83 2. F(n) = 83n2 + 84n

Unit -3: Divide and Conquer Algorithm

1. Explain Binary search algorithm wit0068 divide and conquer strategy and use the
recurrence tree to show that the solution to the binary search recurrence

T (n) = T (n/2) +Ѳ (1) is T (n) = Ѳ (lgn).

2 Explain the use of Divide and Conquer Technique for Binary Search Method. What is the
complexity of Binary Search Method?

3. Explain Strasson’s algorithm for matrix multiplication with example.

4. Explain how to apply the divide and conquer strategy for sorting the elements using
Quick sort with example. Write algorithm for quick sort method.

5. Write a program/algorithm of Quick Sort Method and analyze it.

6. Sort the following list using quick sort algorithm: <50, 40, 20, 60, 80, 100, 45, 70, 105,
30,90, 75> Also discuss worst and best case of quick sort algorithm.

7. Explain the heap sort in detail. Give its complexity

8. Show how divide and conquer technique is used to compute product of two n digit no
with example

9. Write the quick sort algorithm. Trace the same on data set - 4, 3,1,9,8,2,4,7.

10. Explain how multiplication of large integers can be done efficiently by using divide
and conquer technique?

11. Explain the use of Divide and Conquer Technique for Binary Search Method.
12. Explain “minimax” principle with its use.

13 Explain merge sort with example.

Unit-5 : Greedy Algorithm

1. Explain in brief characteristics of greedy algorithms. Compare Greedy Method with


Dynamic Programming Method.

2. Explain Krushkal’s Algorithm and Prim’s Algorithm to find Minimum Spanning


with example and compute it's time complexity.

3. Explain characteristics of greedy method with suitable example

4. What is a fractional knapsack problem? Design and analyze greedy algorithm to


solve it.

5. Explain Dijkstra’s shortest path algorithm.

6. Explain Dijkstra’s shortest path algorithm with example. If we want to display


intermediate node than what change we should make in the algorithm.

7. 7.What is the optimal Huffman code for the following set of frequencies based on
first Fibonacci number. A:1,B:1,C:2,D:3,E:5,F:8,G:13,H:21.

8. Find Minimum Spanning Tree for the given graph using Prim’s Algo.

(initialization from node A)

You might also like