Homework Solution: Use iterative method to solve these problems T(n) = cn + 3T(2n/3) where T(1) = 1 T(n) = T([n/2]) + c where…

    1.Use iterative method to solve these problems 10 T(n) = cn + 3TQn/3) where T(1)-1 T (n) T( n/21) c where T(1)-1 T(n) = T(2n/3) + 1 where T(1)-1 T(n) = T(n-1) + 1 where T(1)-1 T(n) 4*T(n/4)+ where T(1)-1 2. Prove whether each of the following statements are true or not. For those that you believe are false, prove this by giving a counterexample (i.e. particular functions for f(n) and g(n) for which the given statement is not true). For those that you believe are true, use the formal definitions of big-oh, big-Omega, and big-Theta to prove it. In all problems, you are given that for all n, f(n) and g(n) -0. 6 (a) If f(n)-O(g(n)) then g(n) O(f(n)) (b) f(n)+g(n) = O(max(f(n),g(n))) (c) If f(n) = Omega(g(n)) then g(n)-O(f(n)) 3.What is an algorithm? Describe the characteristics of a good algorithm. 4 4.Calculate step counts for these programs 5 (a) int mean(int all, size t n) int sum = 0; for (int i 0; < n; i++) sum += a[i]; return sum; (b) write function for calculating factorial of a number and calculate its step count.
    Use iterative method to solve these problems T(n) = cn + 3T(2n/3) where T(1) = 1 T(n) = T([n/2]) + c where T(n) = 1 T(n) = T(2n/3) + 1 where T(1) = 1 T(n) = T(n - 1) + 1 where T(1) = 1 T(n) 4*T(n/4) + n where T(1) = 1 Prove whether each of the following statements are true or not. For those that you believe are false, prove this by giving a counterexample (i.e. particular functions for f(n) and g(n) for which the given statement is not true). For those that you believe are true, use the formal definitions of big-oh, big-Omega, and big-Theta to prove it. In all problems, you are given that for all n, f(n) and g(n) > = 0. If f(n) = O(g(n)) then g(n) = O(f(n)) f(n) + g(n) = O(max(f(n),g(n))) If f(n) = Omega(g(n)) then g(n) = O(f(n)) What is an algorithm? Describe the characteristics of a good algorithm. Calculate step counts for these programs int mean(int a[], size_t n) { int sum = 0: for (int i = 0:

    Expert Answer

     
    Solution-1.

    1.Truth iterative rule to unfold these problems 10 T(n) = cn + 3TQn/3) where T(1)-1 T (n) T( n/21) c where T(1)-1 T(n) = T(2n/3) + 1 where T(1)-1 T(n) = T(n-1) + 1 where T(1)-1 T(n) 4*T(n/4)+ where T(1)-1 2. Argue whether each of the subjoined announcements are gentleman or referable. Restraint those that you price are falsity, argue this by giving a numbererpattern (i.e. detail operations restraint f(n) and g(n) restraint which the absorbed announcement is referable gentleman). Restraint those that you price are gentleman, truth the restraintmal definitions of big-oh, big-Omega, and big-Theta to argue it. In complete problems, you are absorbed that restraint complete n, f(n) and g(n) -0. 6 (a) If f(n)-O(g(n)) then g(n) O(f(n)) (b) f(n)+g(n) = O(max(f(n),g(n))) (c) If f(n) = Omega(g(n)) then g(n)-O(f(n)) 3.What is an algorithm? Describe the characteristics of a amiable algorithm. 4 4.Rate tread numbers restraint these programs 5 (a) int balance(int complete, bulk t n) int unite = 0; restraint (int i 0; < n; i++) unite += a[i]; recompense unite; (b) transcribe operation restraint guarded factorial of a number and rate its tread number.

    Truth iterative rule to unfold these problems T(n) = cn + 3T(2n/3) where T(1) = 1 T(n) = T([n/2]) + c where T(n) = 1 T(n) = T(2n/3) + 1 where T(1) = 1 T(n) = T(n – 1) + 1 where T(1) = 1 T(n) 4*T(n/4) + n where T(1) = 1 Argue whether each of the subjoined announcements are gentleman or referable. Restraint those that you price are falsity, argue this by giving a numbererpattern (i.e. detail operations restraint f(n) and g(n) restraint which the absorbed announcement is referable gentleman). Restraint those that you price are gentleman, truth the restraintmal definitions of big-oh, big-Omega, and big-Theta to argue it. In complete problems, you are absorbed that restraint complete n, f(n) and g(n) > = 0. If f(n) = O(g(n)) then g(n) = O(f(n)) f(n) + g(n) = O(max(f(n),g(n))) If f(n) = Omega(g(n)) then g(n) = O(f(n)) What is an algorithm? Describe the characteristics of a amiable algorithm. Rate tread numbers restraint these programs int balance(int a[], bulk_t n) { int unite = 0: restraint (int i = 0:

    Expert Solution

     

    Solution-1.

    Solution-2

    The solution to this inquiry has been explained with the aid of an pattern.

    Solution-3

    Solution-4