Design and Analysis of Algorithms
Design and Analysis of Algorithms
References
1. Cormen, T.H., Leiserson, C.E. Rivest, R.L., & Stein, C.(2015). Introduction to Algorithms.
3rd edition. PHI.
2. Kleinberg, J., & Tardos, E. (2013). Algorithm Design. 1st edition. Pearson Education
India. Additional Resources
Practical List
1. i. Implement Insertion Sort (The program should report the number of comparisons)
ii. Implement Merge Sort (The program should report the number of comparisons)
2. Implement Heap Sort(The program should report the number of comparisons)
3. Implement Randomized Quick sort (The program should report the number of
comparisons)
4. Implement Radix Sort
5. Implement Bucket Sort
6. Implement Randomized Select
7. Implement Breadth-First Search in a graph
8. Implement Depth-First Search in a graph
9. Write a program to determine the minimum spanning tree of a graph using both Prims
and Kruskals algorithm
10. Write a program to solve the weighted interval scheduling problem
11. Write a program to solve the 0-1 knapsack problem
For the algorithms at S.No 1 to 3 test run the algorithm on 100 different inputs of sizes varying
from 30 to 1000. Count the number of comparisons and draw the graph. Compare it with a
graph of nlogn.