Ahmedabad Institute of Technology: CE & IT Department
Ahmedabad Institute of Technology: CE & IT Department
CE & IT Department
Analysis and Design of Algorithms (3150703)
Question- Answer Assignment
3 Write an algorithm of Selection Sort Method. Give its best case, worst 7
case and average case complexity.
4 Explain Asymptotic notation. Arrange the growth rate of 2 n , n 2 ,1, log 7
n, n logn, 3 n and n in increasing order of growth.
12 Explain Depth First Traversal Method for Graph with algorithm with 7
example.
14 Find all pair of shortest path using Floyd’s Algorithm for given graph 7
15 Explain in Breif: 7
T(n) = 2 T(n/2) + n2
19 Write sequential search algorithm and analyze it for worst case time 7
complexity. Represent its time complexity using Big-oh (O) notation
20 Write greedy algorithm for activity selection problem. Give its time 7
complexity. For following intervals, select the activities according to
A:3 x 2, B: 2 x 5, C:5 x 4, D: 4 x 3, E: 3 x 3
22 What is a minimum spanning tree? Draw the minimum spanning tree 7
correspond to following graph using Prim’s
algorithm.
23 Find the longest common subsequence for the following two sequences using 7
dynamic programming. Show the complete process.
X = 100101001
Y = 101001
24 Write and explain Dijkastra algorithm with example. 7
30 Find an optimal Huffman code for the following set of frequency. a : 50, b: 20, c: 7
15, d: 30.
Prof. Heena Panjwani & Prof. Neha Prajapati Dr. Ajay N. Upadhayaya
CE & IT Department
Analysis and Design of Algorithms (3150703)
No
san Diego
Prof. Heena Panjwani & Prof. Neha Prajapati Dr. Ajay N. Upadhayaya