Question: Find a generating function for the 0 - 1 strings not containing the string 0 1 0 . Show the number c n of such

Find a generating function for the 0-1 strings not containing the string 010. Show the number cn of such strings obeys the recurrence relation
c0=1
c1=2
c2=4
cn=2cn-1-cn-2+cn-3,n>=3
Provided is just a hint for solution.
If S is a set of strings then
S**=lon+SS**=lon+S**S
Thus
The forbidden substring 010 occurs exactly whenever one of the underlined copies of 00**11** contributes 00**1.(The other copy of 00**11** is not followed by a 1, and cannot contain the beginning of a string 010.) Our desired decomposition thus replaces these copies of 00**11** by
(00**11**-00**1)=00**111**.
Find a generating function for the 0 - 1 strings

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!