Linear recurrence solving for tighest possible big O bounds












0












$begingroup$


I am dealing with the following linear recurrence:



X0 = 1



X1 = 2



Xn = 3Xn-1 + 2Xn-2



I have proven that this has an upper bound of O(4n)



However, I have been asked to come up with tighter bounds for this linear recurrence, but I dont know how to begin this. Does this involve solving the recurrence?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Do you know how to solve recurrence of this type? It is fairly straightforward
    $endgroup$
    – Shubham Johri
    Dec 15 '18 at 22:13










  • $begingroup$
    I think the best constant is $frac{3+sqrt{17}}{2} approx 3.55$ instead of $4$.
    $endgroup$
    – Mindlack
    Dec 15 '18 at 22:28










  • $begingroup$
    Do not change your question after it has been answered.
    $endgroup$
    – Joel Reyes Noche
    Dec 18 '18 at 13:13
















0












$begingroup$


I am dealing with the following linear recurrence:



X0 = 1



X1 = 2



Xn = 3Xn-1 + 2Xn-2



I have proven that this has an upper bound of O(4n)



However, I have been asked to come up with tighter bounds for this linear recurrence, but I dont know how to begin this. Does this involve solving the recurrence?










share|cite|improve this question











$endgroup$












  • $begingroup$
    Do you know how to solve recurrence of this type? It is fairly straightforward
    $endgroup$
    – Shubham Johri
    Dec 15 '18 at 22:13










  • $begingroup$
    I think the best constant is $frac{3+sqrt{17}}{2} approx 3.55$ instead of $4$.
    $endgroup$
    – Mindlack
    Dec 15 '18 at 22:28










  • $begingroup$
    Do not change your question after it has been answered.
    $endgroup$
    – Joel Reyes Noche
    Dec 18 '18 at 13:13














0












0








0





$begingroup$


I am dealing with the following linear recurrence:



X0 = 1



X1 = 2



Xn = 3Xn-1 + 2Xn-2



I have proven that this has an upper bound of O(4n)



However, I have been asked to come up with tighter bounds for this linear recurrence, but I dont know how to begin this. Does this involve solving the recurrence?










share|cite|improve this question











$endgroup$




I am dealing with the following linear recurrence:



X0 = 1



X1 = 2



Xn = 3Xn-1 + 2Xn-2



I have proven that this has an upper bound of O(4n)



However, I have been asked to come up with tighter bounds for this linear recurrence, but I dont know how to begin this. Does this involve solving the recurrence?







recurrence-relations






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Dec 18 '18 at 13:13









Joel Reyes Noche

5,65733149




5,65733149










asked Dec 15 '18 at 22:09







user626552



















  • $begingroup$
    Do you know how to solve recurrence of this type? It is fairly straightforward
    $endgroup$
    – Shubham Johri
    Dec 15 '18 at 22:13










  • $begingroup$
    I think the best constant is $frac{3+sqrt{17}}{2} approx 3.55$ instead of $4$.
    $endgroup$
    – Mindlack
    Dec 15 '18 at 22:28










  • $begingroup$
    Do not change your question after it has been answered.
    $endgroup$
    – Joel Reyes Noche
    Dec 18 '18 at 13:13


















  • $begingroup$
    Do you know how to solve recurrence of this type? It is fairly straightforward
    $endgroup$
    – Shubham Johri
    Dec 15 '18 at 22:13










  • $begingroup$
    I think the best constant is $frac{3+sqrt{17}}{2} approx 3.55$ instead of $4$.
    $endgroup$
    – Mindlack
    Dec 15 '18 at 22:28










  • $begingroup$
    Do not change your question after it has been answered.
    $endgroup$
    – Joel Reyes Noche
    Dec 18 '18 at 13:13
















$begingroup$
Do you know how to solve recurrence of this type? It is fairly straightforward
$endgroup$
– Shubham Johri
Dec 15 '18 at 22:13




$begingroup$
Do you know how to solve recurrence of this type? It is fairly straightforward
$endgroup$
– Shubham Johri
Dec 15 '18 at 22:13












$begingroup$
I think the best constant is $frac{3+sqrt{17}}{2} approx 3.55$ instead of $4$.
$endgroup$
– Mindlack
Dec 15 '18 at 22:28




$begingroup$
I think the best constant is $frac{3+sqrt{17}}{2} approx 3.55$ instead of $4$.
$endgroup$
– Mindlack
Dec 15 '18 at 22:28












$begingroup$
Do not change your question after it has been answered.
$endgroup$
– Joel Reyes Noche
Dec 18 '18 at 13:13




$begingroup$
Do not change your question after it has been answered.
$endgroup$
– Joel Reyes Noche
Dec 18 '18 at 13:13










1 Answer
1






active

oldest

votes


















1












$begingroup$

Write the solution as



$$
x_n = a lambda^n
$$



If you replace that in your original expression you get



$$
a lambda^n = 3 a lambda^{n - 1} + 2 alambda^{n-2}
$$



Which reduces to



$$
lambda^2 = 3 lambda + 2
$$



Solutions are



$$
lambda = frac{3}{2} pm frac{sqrt{13}}{2}
$$



So the solution is



$$
x_n = a left( frac{3}{2} + frac{sqrt{13}}{2} right)^n + bleft( frac{3}{2} - frac{sqrt{13}}{2} right)^n
$$



The constants $a$ and $b$ you can determine by setting $n=0$ and $n=1$ and using the conditions $x_0 = 1$ and $x_1 = 2$






share|cite|improve this answer









$endgroup$













    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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f3042018%2flinear-recurrence-solving-for-tighest-possible-big-o-bounds%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown
























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1












    $begingroup$

    Write the solution as



    $$
    x_n = a lambda^n
    $$



    If you replace that in your original expression you get



    $$
    a lambda^n = 3 a lambda^{n - 1} + 2 alambda^{n-2}
    $$



    Which reduces to



    $$
    lambda^2 = 3 lambda + 2
    $$



    Solutions are



    $$
    lambda = frac{3}{2} pm frac{sqrt{13}}{2}
    $$



    So the solution is



    $$
    x_n = a left( frac{3}{2} + frac{sqrt{13}}{2} right)^n + bleft( frac{3}{2} - frac{sqrt{13}}{2} right)^n
    $$



    The constants $a$ and $b$ you can determine by setting $n=0$ and $n=1$ and using the conditions $x_0 = 1$ and $x_1 = 2$






    share|cite|improve this answer









    $endgroup$


















      1












      $begingroup$

      Write the solution as



      $$
      x_n = a lambda^n
      $$



      If you replace that in your original expression you get



      $$
      a lambda^n = 3 a lambda^{n - 1} + 2 alambda^{n-2}
      $$



      Which reduces to



      $$
      lambda^2 = 3 lambda + 2
      $$



      Solutions are



      $$
      lambda = frac{3}{2} pm frac{sqrt{13}}{2}
      $$



      So the solution is



      $$
      x_n = a left( frac{3}{2} + frac{sqrt{13}}{2} right)^n + bleft( frac{3}{2} - frac{sqrt{13}}{2} right)^n
      $$



      The constants $a$ and $b$ you can determine by setting $n=0$ and $n=1$ and using the conditions $x_0 = 1$ and $x_1 = 2$






      share|cite|improve this answer









      $endgroup$
















        1












        1








        1





        $begingroup$

        Write the solution as



        $$
        x_n = a lambda^n
        $$



        If you replace that in your original expression you get



        $$
        a lambda^n = 3 a lambda^{n - 1} + 2 alambda^{n-2}
        $$



        Which reduces to



        $$
        lambda^2 = 3 lambda + 2
        $$



        Solutions are



        $$
        lambda = frac{3}{2} pm frac{sqrt{13}}{2}
        $$



        So the solution is



        $$
        x_n = a left( frac{3}{2} + frac{sqrt{13}}{2} right)^n + bleft( frac{3}{2} - frac{sqrt{13}}{2} right)^n
        $$



        The constants $a$ and $b$ you can determine by setting $n=0$ and $n=1$ and using the conditions $x_0 = 1$ and $x_1 = 2$






        share|cite|improve this answer









        $endgroup$



        Write the solution as



        $$
        x_n = a lambda^n
        $$



        If you replace that in your original expression you get



        $$
        a lambda^n = 3 a lambda^{n - 1} + 2 alambda^{n-2}
        $$



        Which reduces to



        $$
        lambda^2 = 3 lambda + 2
        $$



        Solutions are



        $$
        lambda = frac{3}{2} pm frac{sqrt{13}}{2}
        $$



        So the solution is



        $$
        x_n = a left( frac{3}{2} + frac{sqrt{13}}{2} right)^n + bleft( frac{3}{2} - frac{sqrt{13}}{2} right)^n
        $$



        The constants $a$ and $b$ you can determine by setting $n=0$ and $n=1$ and using the conditions $x_0 = 1$ and $x_1 = 2$







        share|cite|improve this answer












        share|cite|improve this answer



        share|cite|improve this answer










        answered Dec 15 '18 at 22:28









        caveraccaverac

        14.8k31130




        14.8k31130






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3042018%2flinear-recurrence-solving-for-tighest-possible-big-o-bounds%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Plaza Victoria

            In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

            How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...