Recurrence relations, trouble understanding the statement

42 Views Asked by At

I have been struggling with the English in some recurrence relations problems, since I am studying it on my own and I'm not in a combinatorial environment. Here is one in which I can't grasp what it is required:

How many ternary sequences of length $n$ have no $1$ appearing immediately to the right of some $0$.

My trouble is with the some. First question: $a_1=1$, why? Which case is allowed here?

Second question: The solution is that if the sequence begins with $00\dots$, there are $3^{n-2}$ posibilities, while if it begins with $01\dots$, there are $a_{n-2}$. So what is the meaning of some here. For the first case, the $n$th zeroes string is $0\dots0$ valid, should not be at least something like $0\dots01\dots0$, for example?

1

There are 1 best solutions below

0
On

On both points, the requirement is evidently that you can find at least one 0 which is not followed by 1.

So the only valid sequence of length 1 is 0. In the case of sequences beginning 00 we have got the required 0, so it does not matter what the remaining $n-2$ digits are. In the case of sequences beginning 01 you have not yet got the required 0, so there are only $a_{n-2}$ possibilities for the remaining digits.