1

Given a sequence of $0$s and $1$s think of it as blocks of $0$s and $1$s. Like $0001101001$ is a sequence of blocks $000$,$11$,$0$,$1$,$00$,$1$

  • How may ways can one pick $t$ bits from a $0/1$ sequence such that no two of the bits are consecutive and each is from a separate block?

  • How many ways can one pick $t$ bits from a $0/1$ sequence such that each is from a separate block but no two of them are from consecutive blocks?


If there are $B$ blocks in the string then $^{B}C_t$ gives the number of ways you can pick $t$ bits such that each is from a separate block - this is because once the $t$ blocks are chosen it doesn't matter which of its elements is picked.

user6818
  • 1,325

1 Answers1

1

Let $r$ be the number of bits and $s$ be the number of blocks.

To answer your second question, you can use the stars and bars technique outlined in this question. You have $s$ blocks and you want to distinguish $t$ or them, so go through your blocks in order, and when you pick one, you disqualify the next one. So $t-1$ blocks end up being disqualified, and the number of ways to distinguish $t$ of your blocks is $\binom{s-t+1}{t}$.

For the first question, I don't think it has a nice closed answer because it depends on the length of each block. If each block only has one entry, then it's the same as the other question, but with multiple entries in each block, it depends on whether or not you choose the last bit in the block...

NoName
  • 2,975