1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Counting number of consecutive elt's in nit string

  1. Nov 1, 2016 #1
    1. The problem statement, all variables and given/known data
    How many strings of length 10 contain either five consecutive 0s or five consecutive 1s?

    2. Relevant equations


    3. The attempt at a solution
    So this problem isn't too bad, and I have a pretty good idea of how to solve it. However, I am not sure whether the problem is referring to exactly five consecutive 0s or 1s or at least five consecutive 0s or 1s. It seems that either way could be interpreted...

    If we do exactly, then we would get 110, while if we get at least, then we have 222 (I think).
     
  2. jcsd
  3. Nov 1, 2016 #2

    Mark44

    Staff: Mentor

    As worded, it's asking for five consecutive 0s or five consecutive 1s. If they intended "at least" five of each, it would have been worded that way. "Five" doesn't mean "at least five."

    BTW, your thread title is "Counting number of consecutive elt's in nit string" -- what's a "nit string"?

    Edit: Now I get it -- you meant "bit string." That's different from a nit string, a string of lice eggs.
     
  4. Nov 2, 2016 #3

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Right, but if a string contains six consecutive 1s then it contains five consecutive. You may be right, but to me it is at least ambiguous.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Counting number of consecutive elt's in nit string
  1. Counting strings (Replies: 1)

Loading...