What is the number of series $(x_1,x_2,x_3,x_4,x_5,x_6,x_7) \in \{0,1,2\}^7$ that do not contain the sequence $010$ in any three consecutive places?
Hello! I have the following question in my assignment. I managed to solve it using inclusion- exclusion principle, but it was a very tedious process.
Is there any elegant way to solve this?
if not, for practice I would like to solve it with generating functions as well, but I was not sure how, so a hint on how to look at this question in a generating function approach would be highly appreciated!
Thanks!