0

You have a string of $20,000$ consecutive bits. Each bit is either a $1$ or a $0$ and has a $0.5$ chance of being either.

Calculate the probability that there is at least one substring of at least $34$ consecutive $1$'s or $0$'s.

its not a binomial so i cant normally approximate it.

gt6989b
  • 54,422
mitzy
  • 1

1 Answers1

0

Hints

Here is an outline of one approach.

  1. What if the substring contains exactly 34 1's, can you find it's likelihood?
  2. What would it be for 34 0's? For either 34 1's, or 34 0's?
  3. What if it were 35, how would this change your answer?
  4. Can you generalize 34 and 35 above to $n$?
  5. Sum from $n = 34$ to $n = 20000$?

Update

Here is an approach.

Pick string of 0's or 1's -- 2 ways to do that

Pick the starting place for your string (any one of $n=20,000$ bits except for the last 33) -- $20,000-33$ ways to do that

Pick the elements in the string, leaving others free -- 2^{n-34}

Total possible strings = 2^n

$$ Prob = \dfrac{2 \cdot (n-33) \cdot 2^{n-34}}{2^n} = \dfrac{n-33}{2^{33}} = p_{34} $$

Notice this overcounts the 35-long strings, subtract $p_{35}$ and now you didn't count the 36-strings, so use inclusion exclusion:

$$ p_{34} - p_{35} + p_{36} \pm + p_{20,000} $$

gt6989b
  • 54,422
  • you don't have to state the obvious. how do you solve this problem so that the calculator doesnt overflow. I cant use normal approximation cause its not binomial. my intuition tells me its something like: 1-(((0.5)^33)(0.5^19967)(19967))+(0.5)^32)(0.5^19968)(19968).....+(0.5^20000)) – mitzy May 28 '15 at 19:04
  • @mitzy lots of people come to this site, it would not be obvious for everyone. Please update the question with a generalized version of your approach and I will be glad to help you to compute the sum. – gt6989b May 28 '15 at 19:07
  • my question is in its purest form. I'm the one who's asking you for help. I'm not sure how to solve this. Can you solve it or not? If you can... just give me a straightforward explanation with an approximation formula or something. – mitzy May 28 '15 at 19:12
  • @mitzy added the details for you – gt6989b May 29 '15 at 21:33