Generating function of number of assignments with constraints












0














Suppose I have $N$ boxes on a ring. Each box can be assigned number $0$ or $1$. Neighboring boxes can not have both $1$. so the assignment $0000$ is allowed, but the assignment $0110$, $1001$ etc are not allowed (remember the sequence is defined on a ring, so the first element and the last one are adjacent). How to find a generating function $G(q)$ that gives the number of allowed assignments $t_N$ such that
$$G(q)=sum_{N=0}^{infty} t_N q^N$$



Thanks in advance.










share|cite|improve this question



























    0














    Suppose I have $N$ boxes on a ring. Each box can be assigned number $0$ or $1$. Neighboring boxes can not have both $1$. so the assignment $0000$ is allowed, but the assignment $0110$, $1001$ etc are not allowed (remember the sequence is defined on a ring, so the first element and the last one are adjacent). How to find a generating function $G(q)$ that gives the number of allowed assignments $t_N$ such that
    $$G(q)=sum_{N=0}^{infty} t_N q^N$$



    Thanks in advance.










    share|cite|improve this question

























      0












      0








      0







      Suppose I have $N$ boxes on a ring. Each box can be assigned number $0$ or $1$. Neighboring boxes can not have both $1$. so the assignment $0000$ is allowed, but the assignment $0110$, $1001$ etc are not allowed (remember the sequence is defined on a ring, so the first element and the last one are adjacent). How to find a generating function $G(q)$ that gives the number of allowed assignments $t_N$ such that
      $$G(q)=sum_{N=0}^{infty} t_N q^N$$



      Thanks in advance.










      share|cite|improve this question













      Suppose I have $N$ boxes on a ring. Each box can be assigned number $0$ or $1$. Neighboring boxes can not have both $1$. so the assignment $0000$ is allowed, but the assignment $0110$, $1001$ etc are not allowed (remember the sequence is defined on a ring, so the first element and the last one are adjacent). How to find a generating function $G(q)$ that gives the number of allowed assignments $t_N$ such that
      $$G(q)=sum_{N=0}^{infty} t_N q^N$$



      Thanks in advance.







      sequences-and-series combinatorics generating-functions fibonacci-numbers






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Nov 29 '18 at 2:44









      user34104

      1478




      1478






















          1 Answer
          1






          active

          oldest

          votes


















          1














          These numbers have a close relationship to Fibonacci numbers. Indeed, if $f_n$ denotes the number of ${0,1}$ sequences of length $n$ which have no two consecutive $1$'s, then $f_n$ is the $n$th Fibonacci number (starting with $f_0=1,f_1=2$.



          To see the relationship between $t_n$ and $f_n$, consider a ${0,1}$ ring of length $n$ and consider the two possibilities for the first entry:




          • If the first entry is a $1$, then both the second and last entries must be $0$'s. Thus, upon deleting these three entries, we're left with a ${0,1}$ sequence of length $n-3$ which has no two consecutive $1$'s. Furthermore, this process is easily reversed, so there are precisely $f_{n-3}$ rings of this type.

          • If the first entry is a $0$, then we have no restriction on the second and last entries. Hence, removing the first entry, we're left with a ${0,1}$ sequence of length $n-1$ which has no two consecutive $1$'s. Since this process is also reversible, we have precisely $f_{n-1}$ rings of this type.


          Putting this together, we have $t_n=f_{n-1}+f_{n-3}$ for $ngeq 3$. We can also explicitly determine $t_0=1,t_1=2,t_2=3$. Now, let $F(q)=sum_n f_nq^n$ be the generating function for our Fibonacci sequence. We can compute,
          $$
          G(q)=sum_n t_nq^n=t_0+t_1q+t_2q^2+sum_{ngeq 3}(f_{n-1}+f_{n-3})q^n=1+2q+3q^2+q(F(q)-f_0-f_1q)+q^3F(q)=1+q+q^2+(q+q^3)F(q).
          $$






          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',
            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%2f3018084%2fgenerating-function-of-number-of-assignments-with-constraints%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














            These numbers have a close relationship to Fibonacci numbers. Indeed, if $f_n$ denotes the number of ${0,1}$ sequences of length $n$ which have no two consecutive $1$'s, then $f_n$ is the $n$th Fibonacci number (starting with $f_0=1,f_1=2$.



            To see the relationship between $t_n$ and $f_n$, consider a ${0,1}$ ring of length $n$ and consider the two possibilities for the first entry:




            • If the first entry is a $1$, then both the second and last entries must be $0$'s. Thus, upon deleting these three entries, we're left with a ${0,1}$ sequence of length $n-3$ which has no two consecutive $1$'s. Furthermore, this process is easily reversed, so there are precisely $f_{n-3}$ rings of this type.

            • If the first entry is a $0$, then we have no restriction on the second and last entries. Hence, removing the first entry, we're left with a ${0,1}$ sequence of length $n-1$ which has no two consecutive $1$'s. Since this process is also reversible, we have precisely $f_{n-1}$ rings of this type.


            Putting this together, we have $t_n=f_{n-1}+f_{n-3}$ for $ngeq 3$. We can also explicitly determine $t_0=1,t_1=2,t_2=3$. Now, let $F(q)=sum_n f_nq^n$ be the generating function for our Fibonacci sequence. We can compute,
            $$
            G(q)=sum_n t_nq^n=t_0+t_1q+t_2q^2+sum_{ngeq 3}(f_{n-1}+f_{n-3})q^n=1+2q+3q^2+q(F(q)-f_0-f_1q)+q^3F(q)=1+q+q^2+(q+q^3)F(q).
            $$






            share|cite|improve this answer


























              1














              These numbers have a close relationship to Fibonacci numbers. Indeed, if $f_n$ denotes the number of ${0,1}$ sequences of length $n$ which have no two consecutive $1$'s, then $f_n$ is the $n$th Fibonacci number (starting with $f_0=1,f_1=2$.



              To see the relationship between $t_n$ and $f_n$, consider a ${0,1}$ ring of length $n$ and consider the two possibilities for the first entry:




              • If the first entry is a $1$, then both the second and last entries must be $0$'s. Thus, upon deleting these three entries, we're left with a ${0,1}$ sequence of length $n-3$ which has no two consecutive $1$'s. Furthermore, this process is easily reversed, so there are precisely $f_{n-3}$ rings of this type.

              • If the first entry is a $0$, then we have no restriction on the second and last entries. Hence, removing the first entry, we're left with a ${0,1}$ sequence of length $n-1$ which has no two consecutive $1$'s. Since this process is also reversible, we have precisely $f_{n-1}$ rings of this type.


              Putting this together, we have $t_n=f_{n-1}+f_{n-3}$ for $ngeq 3$. We can also explicitly determine $t_0=1,t_1=2,t_2=3$. Now, let $F(q)=sum_n f_nq^n$ be the generating function for our Fibonacci sequence. We can compute,
              $$
              G(q)=sum_n t_nq^n=t_0+t_1q+t_2q^2+sum_{ngeq 3}(f_{n-1}+f_{n-3})q^n=1+2q+3q^2+q(F(q)-f_0-f_1q)+q^3F(q)=1+q+q^2+(q+q^3)F(q).
              $$






              share|cite|improve this answer
























                1












                1








                1






                These numbers have a close relationship to Fibonacci numbers. Indeed, if $f_n$ denotes the number of ${0,1}$ sequences of length $n$ which have no two consecutive $1$'s, then $f_n$ is the $n$th Fibonacci number (starting with $f_0=1,f_1=2$.



                To see the relationship between $t_n$ and $f_n$, consider a ${0,1}$ ring of length $n$ and consider the two possibilities for the first entry:




                • If the first entry is a $1$, then both the second and last entries must be $0$'s. Thus, upon deleting these three entries, we're left with a ${0,1}$ sequence of length $n-3$ which has no two consecutive $1$'s. Furthermore, this process is easily reversed, so there are precisely $f_{n-3}$ rings of this type.

                • If the first entry is a $0$, then we have no restriction on the second and last entries. Hence, removing the first entry, we're left with a ${0,1}$ sequence of length $n-1$ which has no two consecutive $1$'s. Since this process is also reversible, we have precisely $f_{n-1}$ rings of this type.


                Putting this together, we have $t_n=f_{n-1}+f_{n-3}$ for $ngeq 3$. We can also explicitly determine $t_0=1,t_1=2,t_2=3$. Now, let $F(q)=sum_n f_nq^n$ be the generating function for our Fibonacci sequence. We can compute,
                $$
                G(q)=sum_n t_nq^n=t_0+t_1q+t_2q^2+sum_{ngeq 3}(f_{n-1}+f_{n-3})q^n=1+2q+3q^2+q(F(q)-f_0-f_1q)+q^3F(q)=1+q+q^2+(q+q^3)F(q).
                $$






                share|cite|improve this answer












                These numbers have a close relationship to Fibonacci numbers. Indeed, if $f_n$ denotes the number of ${0,1}$ sequences of length $n$ which have no two consecutive $1$'s, then $f_n$ is the $n$th Fibonacci number (starting with $f_0=1,f_1=2$.



                To see the relationship between $t_n$ and $f_n$, consider a ${0,1}$ ring of length $n$ and consider the two possibilities for the first entry:




                • If the first entry is a $1$, then both the second and last entries must be $0$'s. Thus, upon deleting these three entries, we're left with a ${0,1}$ sequence of length $n-3$ which has no two consecutive $1$'s. Furthermore, this process is easily reversed, so there are precisely $f_{n-3}$ rings of this type.

                • If the first entry is a $0$, then we have no restriction on the second and last entries. Hence, removing the first entry, we're left with a ${0,1}$ sequence of length $n-1$ which has no two consecutive $1$'s. Since this process is also reversible, we have precisely $f_{n-1}$ rings of this type.


                Putting this together, we have $t_n=f_{n-1}+f_{n-3}$ for $ngeq 3$. We can also explicitly determine $t_0=1,t_1=2,t_2=3$. Now, let $F(q)=sum_n f_nq^n$ be the generating function for our Fibonacci sequence. We can compute,
                $$
                G(q)=sum_n t_nq^n=t_0+t_1q+t_2q^2+sum_{ngeq 3}(f_{n-1}+f_{n-3})q^n=1+2q+3q^2+q(F(q)-f_0-f_1q)+q^3F(q)=1+q+q^2+(q+q^3)F(q).
                $$







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Nov 29 '18 at 21:47









                munchhausen

                79416




                79416






























                    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.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • 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.


                    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%2f3018084%2fgenerating-function-of-number-of-assignments-with-constraints%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

                    How do I know what Microsoft account the skydrive app is syncing to?

                    Grease: Live!

                    When does type information flow backwards in C++?