edited by
1,937 views
4 votes
4 votes

solution :   Let ,

  , K =  string  with 4 consecutive A of length 6 => 4*1*1*1*1*4 + 4*4*1*1*1*1 + 1*1*1*1*4*4   +  1*4*1*1*1*1 + 1*1*1*1*4*1=  56

                                                            +

A = String  with 5 consecutive A  of length 6 => 4*1*1*1*1*1  +  1*1*1*1*1*4 =  8

                                                   +

B =  String  with 6 consecutive A  of length 6 => 1*1*1*1*1*1 =>  1

65   answer .

is there any other approach  because if question is  like : 2 consecutive a  then making cases  will become tedious 

edited by

1 Answer

2 votes
2 votes
there are three case:-

1. - - AAAA :- 5*5=25

2.AAAA--    :- 5*5=25

3.-AAAA-   :- 5*5=25

duplicate case:- 2. AAAA  A _  ,3. A AAAA :- 5

                          1. _ AAAAA 3. _ AAAAA :- 5

Total := 75-10