[algogeeks] language

2011-02-06 Thread Anand
There is a language with only two elements ie 'a' and 'bc'. How many words can be made out of it if whose Length is n. I think it is n+1. if the len = 3 abc bca if the len is 6 bc aaabca aabcaa abcaaa ba -- You received this message because you are subscribed to the Google Groups

Re: [algogeeks] language

2011-02-06 Thread nphard nphard
For len = 6, isn't bcbcbc also valid? On Sun, Feb 6, 2011 at 9:08 PM, Anand anandut2...@gmail.com wrote: There is a language with only two elements ie 'a' and 'bc'. How many words can be made out of it if whose Length is n. I think it is n+1. if the len = 3 abc bca if the len is 6

Re: [algogeeks] language

2011-02-06 Thread Rajeev Kumar
certainly it is not n+1. for n=1, ans is 'a'.No other word can be formed. On Sun, Feb 6, 2011 at 7:10 PM, nphard nphard nphard.nph...@gmail.comwrote: For len = 6, isn't bcbcbc also valid? On Sun, Feb 6, 2011 at 9:08 PM, Anand anandut2...@gmail.com wrote: There is a language with only two