Download link:# Algorithms Homework 1a: Foundations (Analysis)
Description
Rate this product
| Problem 1 Asymptotic Analysis | 30 points | ||
|---|---|---|---|
| 1. Prove the following statements: | |||
| m−1 | xi | (10pts) | |
| (i) For any 0 < x < 1, ex = | + Θ(xm), for all m = 1, 2, · · · . | ||
| i! |
i=0
- Solve the following problems in CLRS.
-
(a) Problems 3.1(a,b,c) (Page 71 in 4th edition). (9pts) (b) Problems 4.1(g) (Page 119 in 4th edition) and 4.4(j) (Page 121 in 4th edition) using recursion trees method, and use Master’s theorem to verify your result. State your base case clearly and articulate your solution. (6pts)
- Problems 4.1(h) (Page 119 in 4th edition) and 4.4(h) (Page 121 in 4th edition) using substitution method. State your base case clearly and articulate your solution. (5pts)
In the class, we studied different kinds of algorithms. This problem is about the theoretical analysis of the algorithms presented in the class and their validation using simulation experiments.
- Compute the average running time of Insertion Sort, Merge Sort and the maximum element
algorithms formally. (10pts)
- Implement Insertion Sort, Merge Sort and the maximum element algorithms in Python, val-idate their correctness and simulate their average run-time performance empirically, for dif-
ferent input sizes. (10pts)
(Hint: Random inputs can be generated using random.sample() function.)