How many binary numbers of length $n$ do not contain the substring $000$? Denote this number by $Z_n$; find a relationship between $Z_n$, $Z_{n-1}$, and (something else not given) to form an appropriate recurrence relation. (Do not try to find a closed form).
Asked
Active
Viewed 1,944 times
2
-
Welcome to math. SE. Please share your efforts in solving the problem – Shailesh Nov 18 '15 at 01:33
-
2Suppose $n\ge3$. A binary number of length $n$ can either end in $100$, $10$, or $1$ (if it never contains $000$); do you see why? – Akiva Weinberger Nov 18 '15 at 01:35
-
Could you be more specific about what parts of the question you don't understand? – Robert Israel Nov 18 '15 at 01:46
-
2Don't think of them as numbers in binary. Just think of them as a sequence of $1$s and $0$s. This has nothing to do with numeric properties. Then consider Akiva Weinberger's comment. – Paul Sinclair Nov 18 '15 at 02:56
1 Answers
3
Ok so I used Akiva's hint and the answers on How many length n binary numbers have no consecutive zeroes ?Why we get a Fibonacci pattern? (close to this but only two and not three $0$'s in a row) and came out with
____$n-3$____$100$
____$n-2$____$10$
____$n-1$____$1$
$n$ being the number of strings that do not contain $000$
and got $Z_n$ = $Z_{n-1}$ + $Z_{n-2}$ + $Z_{n-3}$ which is correct (confirmed by my teacher) for anyone else struggling with this problem