Consider the set X of strings over the alphabet {a,b} in which all runs of consecutive a's have even length and all runs of consecutive b's have odd length. For example, the string aabaaaabaabbbaaaa us such a string, whereas the string aabbaa is not. How many strings in the set X have length exactly 55?
I have came up with the following information below:
S ---> aA | bB | (lambda sign) S(x) = xA(x) + xB(x) + 1
A ---> aS | bD A(x) = xS(x) + xD(x)
B ---> aA | bC | (lambda sign) B(x) = xA(x) + xC(x) + 1
C ---> aD | bB C(x) = xD(x) + xB(x)
D ---> aD | bD D(x) = xD(x) + xD(x)
S(x) = A(x) + B(x) + 1
A(x) = S(x) + D(x)
B(x) = A(x) + C(x) + 1
C(x) = D(x) + B(x)
D(x) = 2Dx
This the information that me a friend had worked on but we cannot seem to get the total, can someone help?
The quantity i came up with is:
A(55) + B(55) = C(109) + C(110) = C(113)
If i can just compute C(113), i'll have my answer. Can someone help me with getting the answer, i do not know how to compute for the answer using a computer. I normally would use the software Maple
, but i do not have access to this software.