Removing arithmetic within recurrences

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












A similar question was asked here: Solving recurrences using substitution method, but I am still somewhat hazy as to how this process works.



Say, for $T(n) = T(lceil n/5 rceil + 36) + n log n$



Statement: we wish to prove that $T(n) le 5 n log n$ for $n ge 0$



Base case, $n = 0$ and $T(0) le 0$



$T(0) = 0$



$T(0) le 0 log 0$



Holds, since $0 log 0 = 0$



Inductive step, for $n > 0$



(Inductive Hypothesis is: $T(n) = 5 n log n$)



$T(n) = T(lceil n/5 rceil + 36) + n log n$



$le 5 , (lceil n/5 rceil + 36) log (lceil n/5 rceil + 36) + n log n$ by Ind. Hyp.



$le 5 , (n/5 + 36) log (n/5 + 36) + n log n$ by property of ceiling



$= (n + 180) log ((n + 180)/5) + n log n$ by algebra



This is the point where it gets hazy. According to the link, what I should do is say that for all $n ge 180$, then



$le (n + n) log ((n + n)/5) + n log n$



$= 2n log (2n/5) + n log n$



$= 2n , [log n + log (2/5)] + n log n$



$= 2n log n + 2n log (2/5) + n log n$



$= 3n log n + kn$ where $k = log (2/5) * 2$



$le 5n log n$



Does this complete the proof? Or am I in error? I still don't understand why I can just set $n ge 180$ and therefore get rid of the irritating arithmetic within the log.







share|cite|improve this question


























    up vote
    3
    down vote

    favorite












    A similar question was asked here: Solving recurrences using substitution method, but I am still somewhat hazy as to how this process works.



    Say, for $T(n) = T(lceil n/5 rceil + 36) + n log n$



    Statement: we wish to prove that $T(n) le 5 n log n$ for $n ge 0$



    Base case, $n = 0$ and $T(0) le 0$



    $T(0) = 0$



    $T(0) le 0 log 0$



    Holds, since $0 log 0 = 0$



    Inductive step, for $n > 0$



    (Inductive Hypothesis is: $T(n) = 5 n log n$)



    $T(n) = T(lceil n/5 rceil + 36) + n log n$



    $le 5 , (lceil n/5 rceil + 36) log (lceil n/5 rceil + 36) + n log n$ by Ind. Hyp.



    $le 5 , (n/5 + 36) log (n/5 + 36) + n log n$ by property of ceiling



    $= (n + 180) log ((n + 180)/5) + n log n$ by algebra



    This is the point where it gets hazy. According to the link, what I should do is say that for all $n ge 180$, then



    $le (n + n) log ((n + n)/5) + n log n$



    $= 2n log (2n/5) + n log n$



    $= 2n , [log n + log (2/5)] + n log n$



    $= 2n log n + 2n log (2/5) + n log n$



    $= 3n log n + kn$ where $k = log (2/5) * 2$



    $le 5n log n$



    Does this complete the proof? Or am I in error? I still don't understand why I can just set $n ge 180$ and therefore get rid of the irritating arithmetic within the log.







    share|cite|improve this question
























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      A similar question was asked here: Solving recurrences using substitution method, but I am still somewhat hazy as to how this process works.



      Say, for $T(n) = T(lceil n/5 rceil + 36) + n log n$



      Statement: we wish to prove that $T(n) le 5 n log n$ for $n ge 0$



      Base case, $n = 0$ and $T(0) le 0$



      $T(0) = 0$



      $T(0) le 0 log 0$



      Holds, since $0 log 0 = 0$



      Inductive step, for $n > 0$



      (Inductive Hypothesis is: $T(n) = 5 n log n$)



      $T(n) = T(lceil n/5 rceil + 36) + n log n$



      $le 5 , (lceil n/5 rceil + 36) log (lceil n/5 rceil + 36) + n log n$ by Ind. Hyp.



      $le 5 , (n/5 + 36) log (n/5 + 36) + n log n$ by property of ceiling



      $= (n + 180) log ((n + 180)/5) + n log n$ by algebra



      This is the point where it gets hazy. According to the link, what I should do is say that for all $n ge 180$, then



      $le (n + n) log ((n + n)/5) + n log n$



      $= 2n log (2n/5) + n log n$



      $= 2n , [log n + log (2/5)] + n log n$



      $= 2n log n + 2n log (2/5) + n log n$



      $= 3n log n + kn$ where $k = log (2/5) * 2$



      $le 5n log n$



      Does this complete the proof? Or am I in error? I still don't understand why I can just set $n ge 180$ and therefore get rid of the irritating arithmetic within the log.







      share|cite|improve this question














      A similar question was asked here: Solving recurrences using substitution method, but I am still somewhat hazy as to how this process works.



      Say, for $T(n) = T(lceil n/5 rceil + 36) + n log n$



      Statement: we wish to prove that $T(n) le 5 n log n$ for $n ge 0$



      Base case, $n = 0$ and $T(0) le 0$



      $T(0) = 0$



      $T(0) le 0 log 0$



      Holds, since $0 log 0 = 0$



      Inductive step, for $n > 0$



      (Inductive Hypothesis is: $T(n) = 5 n log n$)



      $T(n) = T(lceil n/5 rceil + 36) + n log n$



      $le 5 , (lceil n/5 rceil + 36) log (lceil n/5 rceil + 36) + n log n$ by Ind. Hyp.



      $le 5 , (n/5 + 36) log (n/5 + 36) + n log n$ by property of ceiling



      $= (n + 180) log ((n + 180)/5) + n log n$ by algebra



      This is the point where it gets hazy. According to the link, what I should do is say that for all $n ge 180$, then



      $le (n + n) log ((n + n)/5) + n log n$



      $= 2n log (2n/5) + n log n$



      $= 2n , [log n + log (2/5)] + n log n$



      $= 2n log n + 2n log (2/5) + n log n$



      $= 3n log n + kn$ where $k = log (2/5) * 2$



      $le 5n log n$



      Does this complete the proof? Or am I in error? I still don't understand why I can just set $n ge 180$ and therefore get rid of the irritating arithmetic within the log.









      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 26 at 7:41









      Yuval Filmus

      181k12171331




      181k12171331










      asked Aug 26 at 6:30









      R. Rengold

      1434




      1434




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          The link doesn't say what you say it does. I don't see the number 180 appearing anywhere on that link. And that link doesn't say the purpose is to prove $T(n) le 5 n log n$ for all $n ge 0$; it says to prove that $T(n) = O(n log n)$. Check the definition of big-O notation; it doesn't require proving $T(n) le c n log n$ for all $n ge 0$; it suffices to prove it for all $n ge 180$ (or for all $n ge n_0$ for any other constant $n_0$ of your choice).






          share|cite|improve this answer




















            Your Answer




            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "419"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f96630%2fremoving-arithmetic-within-recurrences%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            2
            down vote













            The link doesn't say what you say it does. I don't see the number 180 appearing anywhere on that link. And that link doesn't say the purpose is to prove $T(n) le 5 n log n$ for all $n ge 0$; it says to prove that $T(n) = O(n log n)$. Check the definition of big-O notation; it doesn't require proving $T(n) le c n log n$ for all $n ge 0$; it suffices to prove it for all $n ge 180$ (or for all $n ge n_0$ for any other constant $n_0$ of your choice).






            share|cite|improve this answer
























              up vote
              2
              down vote













              The link doesn't say what you say it does. I don't see the number 180 appearing anywhere on that link. And that link doesn't say the purpose is to prove $T(n) le 5 n log n$ for all $n ge 0$; it says to prove that $T(n) = O(n log n)$. Check the definition of big-O notation; it doesn't require proving $T(n) le c n log n$ for all $n ge 0$; it suffices to prove it for all $n ge 180$ (or for all $n ge n_0$ for any other constant $n_0$ of your choice).






              share|cite|improve this answer






















                up vote
                2
                down vote










                up vote
                2
                down vote









                The link doesn't say what you say it does. I don't see the number 180 appearing anywhere on that link. And that link doesn't say the purpose is to prove $T(n) le 5 n log n$ for all $n ge 0$; it says to prove that $T(n) = O(n log n)$. Check the definition of big-O notation; it doesn't require proving $T(n) le c n log n$ for all $n ge 0$; it suffices to prove it for all $n ge 180$ (or for all $n ge n_0$ for any other constant $n_0$ of your choice).






                share|cite|improve this answer












                The link doesn't say what you say it does. I don't see the number 180 appearing anywhere on that link. And that link doesn't say the purpose is to prove $T(n) le 5 n log n$ for all $n ge 0$; it says to prove that $T(n) = O(n log n)$. Check the definition of big-O notation; it doesn't require proving $T(n) le c n log n$ for all $n ge 0$; it suffices to prove it for all $n ge 180$ (or for all $n ge n_0$ for any other constant $n_0$ of your choice).







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Aug 26 at 6:40









                D.W.♦

                95.5k11110258




                95.5k11110258



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcs.stackexchange.com%2fquestions%2f96630%2fremoving-arithmetic-within-recurrences%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    What does second last employer means? [closed]

                    One-line joke