1. Design an algorithm to find the sorted array from two sorted arrays of strings (listed in increasing order of their length). For example, for the arrays A = [me, two, cake, taking, success] and B = [h, taken, successful, necessarianism, necessitousness] the output should be SA = [h, me, two, cake, taken, success, successful, necessarianism, necessitousness]. What is the maximum number of comparisons the algorithm would make in sorting the given two arrays A and B? What is the maximum number of comparisons your algorithm makes if the lengths of the two given arrays are m and n, respectively?
2. For each of the following algorithms, indicate (i) a natural size metric for its inputs, (ii) its basic operation, and (iii) whether the basic operation count can be different for inputs of the same size:
a. computing the average of n numbers
b. computing n/n!
c. finding the smallest element in a list of n numbers
d. reverse a list of n numbers
3. Assuming that an algorithm running time T(n) is defined by the function of n, i.e. (where n is the metric indicating an input size). Prove that the algorithm will run 1024 times longer when the input size is increased by four folds.
