Set Theory Consider the alphabet a b and operation suba ab

(Set Theory)

Consider the alphabet {a, b}, and operation sub(a) = ab and sub(b) = a. Given any string w_1 w_2 W_k, let next (w_1 w_2 ... w_k) = sub (w_1)sub(w_2) sub ... (w_k). Beginning with the string a, we can iteratively apply next to make strings which involve a\'s and b\'s and compute the length of the string at each iteration. For instance, the first iteration gives us a of length 1, the second iteration gives us ab of length 2, the third gives aba of length 3, etc... Show that the nth iteration gives us a string of length Fn, the nth Fibonacci number

Solution

1.....................a                -->t1 = 1
2.....................ab              -->t2 = 2
3.....................aba            -->t3 = 3
4.....................abaab        -->t4 = 5
5.....................abaababa   -->t5 = 8

From the above series we can say t1, t2, t3, t4, t5 are in fibo. series

we can also infer that

an = Number of a in n+1 itteration = number of a + number of b = an + bn

bn = Number of b in n+1 itteration = number of a = an

therefore
an+1 = an + bn      //an is number of a in nth iteration
bn+1 = an              //bn is number of b in nth iteration

an+2 = an+1 + bn+1 = an + bn + an << This is number of charecters in n+1 iteration (Tn+1)
bn+2 = an+1 = an + bn <<This is number of charecters in n iteration(Tn)

as we can see

Therefore we proved that Tn = Fn

(Set Theory) Consider the alphabet {a, b}, and operation sub(a) = ab and sub(b) = a. Given any string w_1 w_2 W_k, let next (w_1 w_2 ... w_k) = sub (w_1)sub(w_2

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site