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.Conservation iterative regularity to explain 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. Assay whether each of the controlthcoming propositions are gentleman or referable attributable attributable attributable attributable attributable. Control those that you revere are deceptive, assay this by giving a enumerateerdevelopment (i.e. feature discharges control f(n) and g(n) control which the attached proposition is referable attributable attributable attributable attributable attributable attributable gentleman). Control those that you revere are gentleman, conservation the controlmal definitions of big-oh, big-Omega, and big-Theta to assay it. In perfect problems, you are attached that control perfect 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-tempered-natured-natured algorithm. 4 4.Apportion stride enumerates control these programs 5 (a) int medium(int perfect, extent t n) int mix = 0; control (int i 0; < n; i++) mix += a[i]; reappear mix; (b) transcribe discharge control careful factorial of a estimate and apportion its stride enumerate.

    Conservation iterative regularity to explain 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 Assay whether each of the controlthcoming propositions are gentleman or referable attributable attributable attributable attributable attributable. Control those that you revere are deceptive, assay this by giving a enumerateerdevelopment (i.e. feature discharges control f(n) and g(n) control which the attached proposition is referable attributable attributable attributable attributable attributable attributable gentleman). Control those that you revere are gentleman, conservation the controlmal definitions of big-oh, big-Omega, and big-Theta to assay it. In perfect problems, you are attached that control perfect 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-tempered-natured-natured algorithm. Apportion stride enumerates control these programs int medium(int a[], extent_t n) { int mix = 0: control (int i = 0:

    Expert Rejoinder

     

    Solution-1.

    Solution-2

    The rejoinder to this inquiry has been explained with the succor of an development.

    Solution-3

    Solution-4