How many sequence of length twelve are there consisting of eight ones and four zeros, such that there are no...












1












$begingroup$


I'm working through this problem and I haven't been able to make any progress. The textbook provides the answer of $ {9 choose 4}$ but I'm not sure as to how they got this result.










share|cite|improve this question









$endgroup$

















    1












    $begingroup$


    I'm working through this problem and I haven't been able to make any progress. The textbook provides the answer of $ {9 choose 4}$ but I'm not sure as to how they got this result.










    share|cite|improve this question









    $endgroup$















      1












      1








      1





      $begingroup$


      I'm working through this problem and I haven't been able to make any progress. The textbook provides the answer of $ {9 choose 4}$ but I'm not sure as to how they got this result.










      share|cite|improve this question









      $endgroup$




      I'm working through this problem and I haven't been able to make any progress. The textbook provides the answer of $ {9 choose 4}$ but I'm not sure as to how they got this result.







      combinatorics






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Jan 10 at 3:26









      C. GrantC. Grant

      1655




      1655






















          3 Answers
          3






          active

          oldest

          votes


















          3












          $begingroup$


          • If you write the $8$ $1's$ horizontally beside each other, the number of possible places to put zeros between them or at the left-most or right-most position is $color{blue}{9}$

          • The number of ways to choose $4$ of these $9$ places to put exactly one $0$ is $color{blue}{binom{9}{4}}$






          share|cite|improve this answer









          $endgroup$





















            2












            $begingroup$

            Consider the two atoms: $xto01$ and $yto1$. If we arrange $4$ $x$s and $5$ $y$s, we get all the allowable strings suffixed with a $1$. For example:
            $$xxxyyxyyyleftrightarrow010101110111color{#AAA}{1}$$
            $$yyxyyyxxxleftrightarrow110111101010color{#AAA}{1}$$
            $$yxyxyxyxyleftrightarrow101101101101color{#AAA}{1}$$



            So the number of possible strings is the number of ways to arrange the $4$ $x$s and $5$ $y$s: $binom{9}{4}$.






            share|cite|improve this answer











            $endgroup$





















              0












              $begingroup$

              Here is a more sophisticated way to solve this, using DFAs. We can construct a state machine accepting the language of all strings without two consecutive zeroes as follows:




              • There are two states, $q_0$ and $q_1$.

              • The initial state is $q_1$.

              • At state $q_0$, there is a $1$-transition leading to $q_1$.

              • At state $q_1$, there is a $0$-transition leading to $q_0$, and a $1$-transition leading to $q_1$.


              The transition matrix ("transfer matrix") corresponding to this DFA is as follows, where $0$-transitions are indicated by the variable $x$ and $1$-transitions are indicated by the variable $y$:
              $$
              begin{pmatrix}
              0 & x \
              y & y
              end{pmatrix}
              $$

              The number of words of length $n$, counted according to the number of $0$s and $1$s, is
              $$
              begin{pmatrix} 1 & 1 end{pmatrix}
              begin{pmatrix}
              0 & x \
              y & y
              end{pmatrix}^n
              begin{pmatrix} 0 \ 1 end{pmatrix}
              $$

              For example, when $n = 12$ we get
              $$
              7x^6y^6 + 56x^5y^7 + 126x^4y^8 + 120x^3y^9 + 55x^2y^{10} + 12xy^{11} + y^{12}.
              $$

              The coefficient of $x^4y^8$ is what you wanted.





              Why do we need this very elaborate method? Since it works whenever your constraint can be described by a succinct DFA. For example, you can answer questions of the form "how many strings of length 100 have exactly 50 zeroes and 50 ones, and no copies of 000 or 1101?"



              The calculation will amount to a dynamic programming algorithm. Using DFAs is just a principled way of designing the dynamic programming recurrence.






              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%2f3068197%2fhow-many-sequence-of-length-twelve-are-there-consisting-of-eight-ones-and-four-z%23new-answer', 'question_page');
                }
                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                3












                $begingroup$


                • If you write the $8$ $1's$ horizontally beside each other, the number of possible places to put zeros between them or at the left-most or right-most position is $color{blue}{9}$

                • The number of ways to choose $4$ of these $9$ places to put exactly one $0$ is $color{blue}{binom{9}{4}}$






                share|cite|improve this answer









                $endgroup$


















                  3












                  $begingroup$


                  • If you write the $8$ $1's$ horizontally beside each other, the number of possible places to put zeros between them or at the left-most or right-most position is $color{blue}{9}$

                  • The number of ways to choose $4$ of these $9$ places to put exactly one $0$ is $color{blue}{binom{9}{4}}$






                  share|cite|improve this answer









                  $endgroup$
















                    3












                    3








                    3





                    $begingroup$


                    • If you write the $8$ $1's$ horizontally beside each other, the number of possible places to put zeros between them or at the left-most or right-most position is $color{blue}{9}$

                    • The number of ways to choose $4$ of these $9$ places to put exactly one $0$ is $color{blue}{binom{9}{4}}$






                    share|cite|improve this answer









                    $endgroup$




                    • If you write the $8$ $1's$ horizontally beside each other, the number of possible places to put zeros between them or at the left-most or right-most position is $color{blue}{9}$

                    • The number of ways to choose $4$ of these $9$ places to put exactly one $0$ is $color{blue}{binom{9}{4}}$







                    share|cite|improve this answer












                    share|cite|improve this answer



                    share|cite|improve this answer










                    answered Jan 10 at 3:37









                    trancelocationtrancelocation

                    13.6k1829




                    13.6k1829























                        2












                        $begingroup$

                        Consider the two atoms: $xto01$ and $yto1$. If we arrange $4$ $x$s and $5$ $y$s, we get all the allowable strings suffixed with a $1$. For example:
                        $$xxxyyxyyyleftrightarrow010101110111color{#AAA}{1}$$
                        $$yyxyyyxxxleftrightarrow110111101010color{#AAA}{1}$$
                        $$yxyxyxyxyleftrightarrow101101101101color{#AAA}{1}$$



                        So the number of possible strings is the number of ways to arrange the $4$ $x$s and $5$ $y$s: $binom{9}{4}$.






                        share|cite|improve this answer











                        $endgroup$


















                          2












                          $begingroup$

                          Consider the two atoms: $xto01$ and $yto1$. If we arrange $4$ $x$s and $5$ $y$s, we get all the allowable strings suffixed with a $1$. For example:
                          $$xxxyyxyyyleftrightarrow010101110111color{#AAA}{1}$$
                          $$yyxyyyxxxleftrightarrow110111101010color{#AAA}{1}$$
                          $$yxyxyxyxyleftrightarrow101101101101color{#AAA}{1}$$



                          So the number of possible strings is the number of ways to arrange the $4$ $x$s and $5$ $y$s: $binom{9}{4}$.






                          share|cite|improve this answer











                          $endgroup$
















                            2












                            2








                            2





                            $begingroup$

                            Consider the two atoms: $xto01$ and $yto1$. If we arrange $4$ $x$s and $5$ $y$s, we get all the allowable strings suffixed with a $1$. For example:
                            $$xxxyyxyyyleftrightarrow010101110111color{#AAA}{1}$$
                            $$yyxyyyxxxleftrightarrow110111101010color{#AAA}{1}$$
                            $$yxyxyxyxyleftrightarrow101101101101color{#AAA}{1}$$



                            So the number of possible strings is the number of ways to arrange the $4$ $x$s and $5$ $y$s: $binom{9}{4}$.






                            share|cite|improve this answer











                            $endgroup$



                            Consider the two atoms: $xto01$ and $yto1$. If we arrange $4$ $x$s and $5$ $y$s, we get all the allowable strings suffixed with a $1$. For example:
                            $$xxxyyxyyyleftrightarrow010101110111color{#AAA}{1}$$
                            $$yyxyyyxxxleftrightarrow110111101010color{#AAA}{1}$$
                            $$yxyxyxyxyleftrightarrow101101101101color{#AAA}{1}$$



                            So the number of possible strings is the number of ways to arrange the $4$ $x$s and $5$ $y$s: $binom{9}{4}$.







                            share|cite|improve this answer














                            share|cite|improve this answer



                            share|cite|improve this answer








                            edited Jan 10 at 7:29

























                            answered Jan 10 at 4:11









                            robjohnrobjohn

                            270k27313642




                            270k27313642























                                0












                                $begingroup$

                                Here is a more sophisticated way to solve this, using DFAs. We can construct a state machine accepting the language of all strings without two consecutive zeroes as follows:




                                • There are two states, $q_0$ and $q_1$.

                                • The initial state is $q_1$.

                                • At state $q_0$, there is a $1$-transition leading to $q_1$.

                                • At state $q_1$, there is a $0$-transition leading to $q_0$, and a $1$-transition leading to $q_1$.


                                The transition matrix ("transfer matrix") corresponding to this DFA is as follows, where $0$-transitions are indicated by the variable $x$ and $1$-transitions are indicated by the variable $y$:
                                $$
                                begin{pmatrix}
                                0 & x \
                                y & y
                                end{pmatrix}
                                $$

                                The number of words of length $n$, counted according to the number of $0$s and $1$s, is
                                $$
                                begin{pmatrix} 1 & 1 end{pmatrix}
                                begin{pmatrix}
                                0 & x \
                                y & y
                                end{pmatrix}^n
                                begin{pmatrix} 0 \ 1 end{pmatrix}
                                $$

                                For example, when $n = 12$ we get
                                $$
                                7x^6y^6 + 56x^5y^7 + 126x^4y^8 + 120x^3y^9 + 55x^2y^{10} + 12xy^{11} + y^{12}.
                                $$

                                The coefficient of $x^4y^8$ is what you wanted.





                                Why do we need this very elaborate method? Since it works whenever your constraint can be described by a succinct DFA. For example, you can answer questions of the form "how many strings of length 100 have exactly 50 zeroes and 50 ones, and no copies of 000 or 1101?"



                                The calculation will amount to a dynamic programming algorithm. Using DFAs is just a principled way of designing the dynamic programming recurrence.






                                share|cite|improve this answer









                                $endgroup$


















                                  0












                                  $begingroup$

                                  Here is a more sophisticated way to solve this, using DFAs. We can construct a state machine accepting the language of all strings without two consecutive zeroes as follows:




                                  • There are two states, $q_0$ and $q_1$.

                                  • The initial state is $q_1$.

                                  • At state $q_0$, there is a $1$-transition leading to $q_1$.

                                  • At state $q_1$, there is a $0$-transition leading to $q_0$, and a $1$-transition leading to $q_1$.


                                  The transition matrix ("transfer matrix") corresponding to this DFA is as follows, where $0$-transitions are indicated by the variable $x$ and $1$-transitions are indicated by the variable $y$:
                                  $$
                                  begin{pmatrix}
                                  0 & x \
                                  y & y
                                  end{pmatrix}
                                  $$

                                  The number of words of length $n$, counted according to the number of $0$s and $1$s, is
                                  $$
                                  begin{pmatrix} 1 & 1 end{pmatrix}
                                  begin{pmatrix}
                                  0 & x \
                                  y & y
                                  end{pmatrix}^n
                                  begin{pmatrix} 0 \ 1 end{pmatrix}
                                  $$

                                  For example, when $n = 12$ we get
                                  $$
                                  7x^6y^6 + 56x^5y^7 + 126x^4y^8 + 120x^3y^9 + 55x^2y^{10} + 12xy^{11} + y^{12}.
                                  $$

                                  The coefficient of $x^4y^8$ is what you wanted.





                                  Why do we need this very elaborate method? Since it works whenever your constraint can be described by a succinct DFA. For example, you can answer questions of the form "how many strings of length 100 have exactly 50 zeroes and 50 ones, and no copies of 000 or 1101?"



                                  The calculation will amount to a dynamic programming algorithm. Using DFAs is just a principled way of designing the dynamic programming recurrence.






                                  share|cite|improve this answer









                                  $endgroup$
















                                    0












                                    0








                                    0





                                    $begingroup$

                                    Here is a more sophisticated way to solve this, using DFAs. We can construct a state machine accepting the language of all strings without two consecutive zeroes as follows:




                                    • There are two states, $q_0$ and $q_1$.

                                    • The initial state is $q_1$.

                                    • At state $q_0$, there is a $1$-transition leading to $q_1$.

                                    • At state $q_1$, there is a $0$-transition leading to $q_0$, and a $1$-transition leading to $q_1$.


                                    The transition matrix ("transfer matrix") corresponding to this DFA is as follows, where $0$-transitions are indicated by the variable $x$ and $1$-transitions are indicated by the variable $y$:
                                    $$
                                    begin{pmatrix}
                                    0 & x \
                                    y & y
                                    end{pmatrix}
                                    $$

                                    The number of words of length $n$, counted according to the number of $0$s and $1$s, is
                                    $$
                                    begin{pmatrix} 1 & 1 end{pmatrix}
                                    begin{pmatrix}
                                    0 & x \
                                    y & y
                                    end{pmatrix}^n
                                    begin{pmatrix} 0 \ 1 end{pmatrix}
                                    $$

                                    For example, when $n = 12$ we get
                                    $$
                                    7x^6y^6 + 56x^5y^7 + 126x^4y^8 + 120x^3y^9 + 55x^2y^{10} + 12xy^{11} + y^{12}.
                                    $$

                                    The coefficient of $x^4y^8$ is what you wanted.





                                    Why do we need this very elaborate method? Since it works whenever your constraint can be described by a succinct DFA. For example, you can answer questions of the form "how many strings of length 100 have exactly 50 zeroes and 50 ones, and no copies of 000 or 1101?"



                                    The calculation will amount to a dynamic programming algorithm. Using DFAs is just a principled way of designing the dynamic programming recurrence.






                                    share|cite|improve this answer









                                    $endgroup$



                                    Here is a more sophisticated way to solve this, using DFAs. We can construct a state machine accepting the language of all strings without two consecutive zeroes as follows:




                                    • There are two states, $q_0$ and $q_1$.

                                    • The initial state is $q_1$.

                                    • At state $q_0$, there is a $1$-transition leading to $q_1$.

                                    • At state $q_1$, there is a $0$-transition leading to $q_0$, and a $1$-transition leading to $q_1$.


                                    The transition matrix ("transfer matrix") corresponding to this DFA is as follows, where $0$-transitions are indicated by the variable $x$ and $1$-transitions are indicated by the variable $y$:
                                    $$
                                    begin{pmatrix}
                                    0 & x \
                                    y & y
                                    end{pmatrix}
                                    $$

                                    The number of words of length $n$, counted according to the number of $0$s and $1$s, is
                                    $$
                                    begin{pmatrix} 1 & 1 end{pmatrix}
                                    begin{pmatrix}
                                    0 & x \
                                    y & y
                                    end{pmatrix}^n
                                    begin{pmatrix} 0 \ 1 end{pmatrix}
                                    $$

                                    For example, when $n = 12$ we get
                                    $$
                                    7x^6y^6 + 56x^5y^7 + 126x^4y^8 + 120x^3y^9 + 55x^2y^{10} + 12xy^{11} + y^{12}.
                                    $$

                                    The coefficient of $x^4y^8$ is what you wanted.





                                    Why do we need this very elaborate method? Since it works whenever your constraint can be described by a succinct DFA. For example, you can answer questions of the form "how many strings of length 100 have exactly 50 zeroes and 50 ones, and no copies of 000 or 1101?"



                                    The calculation will amount to a dynamic programming algorithm. Using DFAs is just a principled way of designing the dynamic programming recurrence.







                                    share|cite|improve this answer












                                    share|cite|improve this answer



                                    share|cite|improve this answer










                                    answered Jan 11 at 9:21









                                    Yuval FilmusYuval Filmus

                                    49k472148




                                    49k472148






























                                        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%2f3068197%2fhow-many-sequence-of-length-twelve-are-there-consisting-of-eight-ones-and-four-z%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

                                        Bressuire

                                        Cabo Verde

                                        Gyllenstierna