1

How many bit strings of length 28

  • Have at least one consecutive 000?
  • Doesn't have consecutive 000's?

I'm using a TI-nspire calculator. Can I do it with the nCr function?

I tried to do it but I did not find a way.

Thank you.

I saw this post and this one, but they did not help me.

1 Answers1

2

Let $a_n$ be a bit string of length n without 000, then it can be

$a_{(n-3)}$ with 100 added at end,

or $a_{(n-2)}$ with 10 added at end,

or $a_{(n-1)}$ with 1 added at end.

So $a_n = a_{(n-1)} +a_{(n-2)} + a_{(n-3)}$

starting with $a_0 = 1, a_1=2, a_2 = 4$


The ending of any successful chain can be categorised as 1(111,101,011,001) 10(110,010) or 100.

1 can be added to any successful chain of length (n-1) no matter what it ended with.

10 can be added to any successful chain of length (n-2) no matter what it ended with.

100 can be added to any successful chain of length (n-3) no matter what it ended with.