Wow, thanks for the reply!
Nope, have not learned generating functions before.
If I am not wrong, the problem allow for string as long as there were 2 consecutive zeros.
However, let me try to apply what I had understand based on your assumptions
If only 1 pair of consecutive...
I am totally new to this area, and have some major trouble understanding how recurrence relations were derived from the problems, what to do and what's not. Really appreciate any guidance!For example: Give a Ternary String (containing only 0s, 1s, or 2s), we have to find out the recurrence...