{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw4solns - CMPS 101 Summer 2009 Homework Assignment 4...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMPS 101 Summer 2009 Homework Assignment 4 Solutions 1. (3 Points) Consider the function ) ( n T defined by the recurrence formula + < = 3 ) 3 / ( 2 3 1 6 ) ( n n n T n n T a. (1 Points) Use the iteration method to write a summation formula for ) ( n T . Solution: ) 3 / ( 2 ) ( n T n n T + = ) ) 3 / 3 / ( 2 3 / ( 2 n T n n + + = ) 3 / ( 2 3 / 2 2 2 n T n n + + = ) 3 / ( 2 3 / 2 3 / 2 3 3 2 2 n T n n n + + + = etc.. After substituting the recurrence into itself k times, we get ) 3 / ( 2 3 2 ) ( 1 0 k k k i i i n T n n T + = - = . This process terminates when the recursion depth k is chosen so that 3 3 / 1 < k n , which is equivalent to 3 3 / 1 < k n , whence 1 3 3 + < k k n , so 1 ) ( log 3 + < k n k , and hence ) ( log 3 n k = . With this value of k we have 6 ) 2 or 1 ( ) 3 / ( = = T n T k . Therefore ) ( log 1 ) ( log 0 3 3 2 6 3 2 ) ( n n i i i n n T + = - = . b. (1 Points) Use the summation in (a) to show that ) ( ) ( n O n T = Solution: Using the above summation, we have ) ( log 1 ) ( log 0 3 3 2 6 ) 3 / 2 ( ) ( n n i i n n T + - = since   x x for any x ) 2 ( log 0 3 6 ) 3 / 2 ( n n i i + = adding -many positive terms ) 2 ( log 3 6 ) 3 / 2 ( 1 1 n n + - = by a well known formula ) ( 6 3 ) 2 ( log 3 n O n n = + = ) ( 1 ) 2 ( log 3 2 ) 2 ( log 3 3 n o n = < < Therefore ) ( ) ( n O n T = .
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 c. (1 Points) Use the Master Theorem to show that ) ( ) ( n n T Θ = Solution: Let 0 ) 2 ( log 1 3 > - = ε . Then 1 ) 2 ( log 3 = + ε , and ) ( ) 2 ( log ) 2 ( log 3 3 ε ε + + Ω = = n n n . Also for any c in the range 1 3 / 2 < c , and any positive n , we have cn n n = ) 3 / 2 ( ) 3 / ( 2 , so the regularity condition holds. By case (3) of the Master Theorem ) ( ) ( n n T Θ = .
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern