In: Statistics and Probability
[02] For n ≥ 1, how many strings of length n using letters
a,b,c are there if the letter a must occur an
even number of times?
Answer:
Given Data
For ,
How many strings of length n using letters a,b,c are there if the letter a must occur an even numberof times.
, letters a, b, c
Condition a must occurs an even no. of times
(0,2,4,6,------)times
Let the string of length is n
1) only used b,c Total length n
Each place we have two options b,c
Total string = 2n
2) Now add a,b,c to make string
a occurs two times
a occurs four times
In general
Total String of length n T(n) =
where
Let n = 1 ,
Strings = { b , c }
Strings = 2
Using formula ,
value of k is possible
T(n) = 2n
= 21
= 2
Let n = 2 ,
Strings = {aa, bc, cb, bb, cc}
Strings = 5
Using formula
= 1
= 4+1
= 5
Let n = 3 ,
Strings = {aab, bcb, baa, aac, aca, caa, bbb, ccc, bbc, bcb, cbb, ccb, cbc, bcc}
Strings = 14
Using formula ,
= 1
= 8 + 6
= 14
The approach of finding the total number of strings of length n using letters a,b, c are there if the letter a must occur an even number of times is:-
First finding total no of strings of length n using only b and c because there are no restrictions on b and c that is equal to 2n.
Then finding total no of strings of length n using a,b,c by considering an iteratively 2 times 4 times .........
until it will less than n.