Probability of having n more 0's than 1's in a subsequence

85 Views Asked by At

We have a number K>2 and a sequence of m binary values $$b_1, ... b_m $$

Given a subsequence $$b_i, ... b_j, i>j $$ we define:

  • W(i,j) is the number of 1's in the sequence
  • L(i,j) is the number of 0's in the sequence

We want to know the probability that exists unless a subsequence (i,j), i>j where there are K more 1's than 0's: $$W(i,j)- L(i,j) = K $$

We can easily deduce that $$b_i=b_{i+1}=b_j=1$$ since any other subsequence that match, will contain one like this.

Any ideas on calculating the probability?