# Homework Help: Counting number of consecutive elt's in nit string

1. Nov 1, 2016

### Mr Davis 97

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. Nov 1, 2016

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

3. Nov 2, 2016

### haruspex

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.