Solving a summation of an average case analysis

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











up vote
0
down vote

favorite












I was going over some review material for my Algorithms class that I would eventually take during spring semester and came upon this summation equation. Its an average case analysis of an algorithm that finds Max and Min of an array. What I can't figure out is how the summation goes from the top to the harmonic series. It later uses the series to justify the $theta$ ln n



$sum_i=2^n ((1over i) times 1 + (i-1)over i times 2)$

= $sum_i=2^n (2-1over i)$

= $2(n-1) - sum_i=2^n 1over i$

= $2n - 1 - sum_i=1^n 1over i$







share|cite|improve this question

























    up vote
    0
    down vote

    favorite












    I was going over some review material for my Algorithms class that I would eventually take during spring semester and came upon this summation equation. Its an average case analysis of an algorithm that finds Max and Min of an array. What I can't figure out is how the summation goes from the top to the harmonic series. It later uses the series to justify the $theta$ ln n



    $sum_i=2^n ((1over i) times 1 + (i-1)over i times 2)$

    = $sum_i=2^n (2-1over i)$

    = $2(n-1) - sum_i=2^n 1over i$

    = $2n - 1 - sum_i=1^n 1over i$







    share|cite|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I was going over some review material for my Algorithms class that I would eventually take during spring semester and came upon this summation equation. Its an average case analysis of an algorithm that finds Max and Min of an array. What I can't figure out is how the summation goes from the top to the harmonic series. It later uses the series to justify the $theta$ ln n



      $sum_i=2^n ((1over i) times 1 + (i-1)over i times 2)$

      = $sum_i=2^n (2-1over i)$

      = $2(n-1) - sum_i=2^n 1over i$

      = $2n - 1 - sum_i=1^n 1over i$







      share|cite|improve this question













      I was going over some review material for my Algorithms class that I would eventually take during spring semester and came upon this summation equation. Its an average case analysis of an algorithm that finds Max and Min of an array. What I can't figure out is how the summation goes from the top to the harmonic series. It later uses the series to justify the $theta$ ln n



      $sum_i=2^n ((1over i) times 1 + (i-1)over i times 2)$

      = $sum_i=2^n (2-1over i)$

      = $2(n-1) - sum_i=2^n 1over i$

      = $2n - 1 - sum_i=1^n 1over i$









      share|cite|improve this question












      share|cite|improve this question




      share|cite|improve this question








      edited Jul 19 at 9:53









      BDN

      573417




      573417









      asked Jul 19 at 0:51









      Kamran Raza

      31




      31




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          Because
          $fraci-1icdot 2
          =(1-frac1i)cdot 2
          =2-frac2i
          $.






          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: "69"
            ;
            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: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );








             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2856153%2fsolving-a-summation-of-an-average-case-analysis%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
            0
            down vote



            accepted










            Because
            $fraci-1icdot 2
            =(1-frac1i)cdot 2
            =2-frac2i
            $.






            share|cite|improve this answer

























              up vote
              0
              down vote



              accepted










              Because
              $fraci-1icdot 2
              =(1-frac1i)cdot 2
              =2-frac2i
              $.






              share|cite|improve this answer























                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                Because
                $fraci-1icdot 2
                =(1-frac1i)cdot 2
                =2-frac2i
                $.






                share|cite|improve this answer













                Because
                $fraci-1icdot 2
                =(1-frac1i)cdot 2
                =2-frac2i
                $.







                share|cite|improve this answer













                share|cite|improve this answer



                share|cite|improve this answer











                answered Jul 19 at 1:53









                marty cohen

                69.2k446122




                69.2k446122






















                     

                    draft saved


                    draft discarded


























                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2856153%2fsolving-a-summation-of-an-average-case-analysis%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What is the equation of a 3D cone with generalised tilt?

                    Color the edges and diagonals of a regular polygon

                    Relationship between determinant of matrix and determinant of adjoint?