How many bit strings of length $7$ either begin with two $1's$ or end with three $1's$?












0












$begingroup$


So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways



Second case (end with three $1's$): $2*2*2*2=16$



And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$










share|cite|improve this question









$endgroup$












  • $begingroup$
    Need to subtract the overlap (starts 11, ends 111), you have those twice.
    $endgroup$
    – vonbrand
    Apr 17 '14 at 0:40


















0












$begingroup$


So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways



Second case (end with three $1's$): $2*2*2*2=16$



And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$










share|cite|improve this question









$endgroup$












  • $begingroup$
    Need to subtract the overlap (starts 11, ends 111), you have those twice.
    $endgroup$
    – vonbrand
    Apr 17 '14 at 0:40
















0












0








0





$begingroup$


So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways



Second case (end with three $1's$): $2*2*2*2=16$



And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$










share|cite|improve this question









$endgroup$




So for the first case (beginning with 2 $1's$) there are: $2*2*2*2*2=32$ ways



Second case (end with three $1's$): $2*2*2*2=16$



And then we can just sum it $32+16=48$ different bit string of length 7 that begin with 2 $1's$ or end with 3 $1's$







combinatorics discrete-mathematics






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Apr 17 '14 at 0:11









athertonatherton

6561126




6561126












  • $begingroup$
    Need to subtract the overlap (starts 11, ends 111), you have those twice.
    $endgroup$
    – vonbrand
    Apr 17 '14 at 0:40




















  • $begingroup$
    Need to subtract the overlap (starts 11, ends 111), you have those twice.
    $endgroup$
    – vonbrand
    Apr 17 '14 at 0:40


















$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40






$begingroup$
Need to subtract the overlap (starts 11, ends 111), you have those twice.
$endgroup$
– vonbrand
Apr 17 '14 at 0:40












2 Answers
2






active

oldest

votes


















1












$begingroup$

Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).



For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.



So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.



If these cases are not disjoint, then your answer is $44$.






share|cite|improve this answer









$endgroup$





















    1












    $begingroup$

    You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
    The correct answer is thus $44$.






    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%2f757111%2fhow-many-bit-strings-of-length-7-either-begin-with-two-1s-or-end-with-three%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1












      $begingroup$

      Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).



      For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.



      So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.



      If these cases are not disjoint, then your answer is $44$.






      share|cite|improve this answer









      $endgroup$


















        1












        $begingroup$

        Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).



        For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.



        So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.



        If these cases are not disjoint, then your answer is $44$.






        share|cite|improve this answer









        $endgroup$
















          1












          1








          1





          $begingroup$

          Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).



          For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.



          So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.



          If these cases are not disjoint, then your answer is $44$.






          share|cite|improve this answer









          $endgroup$



          Your use of the phrase "either" is ambiguous. Can a String starting with two $1$'s not end with three $1$'s? If so, then your count is $2 * 2 * (2^{3} - 1)$ (characters 3-4 can have either $0$ or $1$, characters $5-7$ we remove the case of $111$. So there are $2^{3} - 1$ ways then to form binary strings of length $3$ that are not $111$).



          For your second case, I assume that the string doesn't start with $11$. And so there are $2^{2} - 1$ ways of placing the first two characters. The last three are fixed, and so we have $2^{2} * (2^{2} - 1)$ ways of forming your string.



          So by rule of sum, you add disjoint cases: $2^{5} - 2^{2} + 2^{4} - 2^{2} = 40$.



          If these cases are not disjoint, then your answer is $44$.







          share|cite|improve this answer












          share|cite|improve this answer



          share|cite|improve this answer










          answered Apr 17 '14 at 0:18









          ml0105ml0105

          11.5k21538




          11.5k21538























              1












              $begingroup$

              You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
              The correct answer is thus $44$.






              share|cite|improve this answer









              $endgroup$


















                1












                $begingroup$

                You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
                The correct answer is thus $44$.






                share|cite|improve this answer









                $endgroup$
















                  1












                  1








                  1





                  $begingroup$

                  You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
                  The correct answer is thus $44$.






                  share|cite|improve this answer









                  $endgroup$



                  You are double-counting those strings which both begin with two $1$'s and end with three $1$'s. You need to subtract these $4$ strings from your total of $48$.
                  The correct answer is thus $44$.







                  share|cite|improve this answer












                  share|cite|improve this answer



                  share|cite|improve this answer










                  answered Apr 17 '14 at 0:14









                  jwsiegeljwsiegel

                  1,333510




                  1,333510






























                      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%2f757111%2fhow-many-bit-strings-of-length-7-either-begin-with-two-1s-or-end-with-three%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

                      Quarter-circle Tiles

                      build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

                      Mont Emei