Question: please answer as much as you can, and implement the program using MATLAB. Thank you for any help, I am so lost. Objective: The objective
please answer as much as you can, and implement the program using MATLAB. Thank you for any help, I am so lost.




Objective: The objective of this programming assignment is to implement in your preferred" language an algorithm A to compute the sum 4-1 axi where a and x are a real numbers (0 0) output: a real number equal to X-1 axi sum = 0 for i = 1 ton prod 1 for j 1 to i prod prod sum +prod return sum * X sum Program to implement (28 points) .... answer here State here whether your implementation worked and produced data. Provide here the instructions to compile and execute your program on a Tux machine. collectData() for n = 100 to L (with step 100)// L should be as large as your machine // and your available time allow Start timing // Note current time start ComputeSumPowers (0.25, n) Stop Timing // T(n) = Current Time - start Store the value n and the values T(n)/vn, T(n)?, and T (n). In(n) in a file F Where T(n) is the execution time. // Pay attention do not use n^2. The operator is often not the exponentiation. Rather, it // is the exclusive OR (XOR) n2" ii) (1.5 points) Based on the expressions obtained in the previous question, what would then the shapes of the T(m) T(m) T(m) plots and be, respectively? vn nln(n) .... answer here b) Suppose that for n very large, T(n) ~ Knwhere K is a constant. T(n) T(m) Tn) i) (0.5 point) What would then the values of and be, respectively? (just plug in T(n) nin(n) and simplify the expression you get). vn n2" and T() nln(n) n21 .... answer here ii) (1.5 points) Based on the expressions obtained in the previous question, what would then the shapes of the T(m) Tn) plots be, respectively? vn' .... answer here c) Suppose that for n very large, T(n) Knln(n) where K is a constant. i) (0.5 point) What would then the values of T(n) T(m) and T(n) be, respectively? (just plug in T(n) vn nin(n) and simplify the expression you get). .... answer here ii) (1.5 points) Based on the expressions obtained in the previous question, what would then the shapes of T(m) T(m) T(n) and be, respectively? vn nln(n) answer here 19 n2 the plots n2? d) (4 points) Time complexity of Algorithm A: Report on this table the time complexity you obtained for the silly algorithm in MI:Homework (Refer to your homework) Operations Total Operations Grows as Comparisons fe(n) = = Additions (line 6) fa(n) = - Multiplications fm(n) =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
