in Theory of Computation reshown by
1,006 views
2 votes
2 votes
Let L = {a, bb}
How many strings of length 10 are present in L* ?
in Theory of Computation reshown by
1.0k views

1 Answer

9 votes
9 votes
Best answer

Length 1: only one string - "a"

Length 2: "aa", "bb" - 2 strings

Length 3: "aaa", "bba", "abb"

Length (n) = Length (n-1) + Length(n-2),

as we get a string of length $n$, by appending "a" to a string of length $n-1$ as well as by appending "bb" to a string of length $n-2$. (This works only because 'a' and 'bb' doesn't have a common character). 

So, 

n No. of strings
1 1
2 2
3 3
4 5
5 8
6 13
7 21
8 34
9 55
10 89

We get no. of strings = 89 (10th Fibonacci number) 

selected by
by

4 Comments

@radha there are mistakes 

as instead of 10C8 it should be 9C8, similarly 10C6 should be 8C6

and you left one option for 0 bb

check it, https://gateoverflow.in/31927/tifr-2015-maths-b-10

0
0
Sir I got the the logic for first case since we have bb together so 9 choices but second logic I couldn't get since I have already considered the case where all 10 positions are a's so only 1 way .
0
0
those strings will have 2 bb will never be same as those having 1 bb. there will be no relation with previous.
0
0