(b) State and prove a theorem giving an upper bound on the running time of your algorithm in terms of the most signication operations used. 5. Assume some reasonable space measure for the numbers you consider. Assume that recursive calls take up the largest amount of space. (a) State your assumptions clearly. (b) State and prove a theorem giving a bound on the space required for your algorithms in terms of the most signication operations used. 6. Are there any functions which may be transformed using tail-recursion so that they consume less time and/or space? If so (a) Perform suitable transformations of your algorithms into tail-recursion (b) Prove the correctness of your transformed functions either with respect to the original function or the previous algorithm(s). (c) Prove that the transformation improves running time and/or space over your previously dened algorithm for the same function. 7. Develop an SML function genAmicables which generates a list of all pairs of amicable numbers (m, n) with m < n < valOf(Int.maxInt). Now do the following. Prepare three les: amicables.pdf containing the development of the algorithm for generating a list of amicable numbers along with the relevant proofs of correctness and complexity as stated above. Ask your TA for guidance on the software required for doing this. amicables.sml containg the SML code of the nal algorithm that you have documented in amicables.pdf. amicables.tgz Use the command tar cvfz to create a single le called amicables.tgz which contains the two les amicables.pdf and amicables.sml Ask your TA for guidance on how to do this. Submit the le amicables.tgz as your assignment submission.