Your proof should follow just from the definition of

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

View Full Document Right Arrow Icon
Your proof should follow just from the definition of Big-Oh. (As usual in problems with Big-Oh, we assume that the functions map nonnegative reals to strictly positive reals.) Prove Theorem 5 on slide 30 of Lecture Notes 2, that is, prove that for any(all) f, g, h, k if f ( n ) is O ( h ( n )) and g ( n ) is O ( k ( n )) then f ( n ) + g ( n ) is O ( h ( n ) + k ( n )). Answer Assume f ( n ) is O ( h ( n )) therefore N 1 , c 1 > 0 such that n N 1 we have f ( n ) c 1 h ( n ). Assume also that g ( n ) is O ( k ( n )) therefore N 2 , c 2 > 0 such that n N 2 we have g ( n ) c 2 k ( n ). We want to show that these assumptions imply that N 3 , c 3 > 0 such that n N 3 we have f ( n ) + g ( n ) c 3 ( h ( n ) + k ( n )). From f ( n ) c 1 h ( n ) and g ( n ) c 2 k ( n ), we can add the sides of these two inequalities obtaining f ( n ) + g ( n ) c 1 h ( n ) + c 2 k ( n ). Now take c 3 = max( c 1 , c 2 ). Therefore c 1 h ( n ) + c 2 k ( n ) c 3 h ( n ) + c 3 k ( n ) = c 3 ( h ( n ) + k ( n )) so f ( n ) + g ( n ) c 3 ( h ( n ) + k ( n )). 1
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
Moreover, to be sure that both f ( n ) c 1 h ( n ) and g ( n ) c 2 k ( n ) we have to have both n N 1 n N 2 . A simple way to ensure this is to have n max( N 1 , N 2 ). To recap, we have shown that there exist c 3 = max( c 1 , c 2 ) and N 3 = max( N 1 , N 2 ) such that for n N 3 we have f ( n ) g ( n ) c 3 h ( n ) k ( n ).
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