edited by
1,974 views
1 votes
1 votes
How many strings of six lowercase letters from the English alphabet contain
a) the letter a?
b) the letters a and b?
c) the letters a and b in consecutive positions with a preceding b, with all the letters distinct?
d) the letters a and b, where a is somewhere to the left of b in the string, with all the letters distinct?
edited by

2 Answers

1 votes
1 votes

i hope all questions are without repetitions, otherwise we can't solve this !

Total small letters = 26 (a,b,c,....z)

 

a) the letter a?

total 6 positions, fix a at one position ==> 6 choices

now, you have 5 positions, those have 25*24*23*22*21 choices

Total required answer = 6*25*24*23*22*21 = 150 * (24*23*22*21)

 

b) the letters a and b?

 fix a and b in 6 positions ===> can permute it a and b ===> 6P2 = 30 choices

remaining 4 positions ===> 24 * 23 * 22 * 21

Total required answer = 30 * (24*23*22*21)

 

c) the letters a and b in consecutive positions with a preceding b, with all the letters distinct?

consecutive positions ===> make ba as one unit

Only 5 positions,===> Choose one for 'ba' ===> 5 choices

remaining 4 positions ===> 24 * 23 * 22 * 21

Total required answer = 5 * (24*23*22*21)

 

d) the letters a and b, where a is somewhere to the left of b in the string, with all the letters distinct?

First i want to fix b, then a (should be left to b) , after remaining 4 positions have 24*23*22*21 choices.

we have 6 positions ===> 6 choices for b

Number those positions as 1,2,3,4,5,6 from left to right

1) b is at first place ===> a can't place left of b ===> 0

2) b is at second place ==> a have to be first place ===> 1 choices

3) b is at third place ==> a have to be first or second place ===> 2 choices

4) b is at fourth place ==> a have to be first or second or third place ===> 3 choices

5) b is at fifth place ==> a have to be first or second or third or fourth place ===> 4 choices

6) b is at sixth place ==> a have to be first or second or third or fourth or fifth place ===> 5 choices

Total required answer = (0+1+2+3+4+5) * (24*23*22*21) = 15 * (24*23*22*21)

 

 

Observation from the questions :-

d) the letters a and b, where a is somewhere to the left of b in the string, with all the letters distinct?

is equivalent to 

e) the letters a and b? ===> a and b in any order ==> in total permutations (  30 * (24*23*22*21) ), half are a is left side of b and remaining half are b is left side to a.

edited by
0 votes
0 votes

(a) contains the letter a:

        # of six letter strings that doesn't contain 'a' = 256 .

        So the # of strings that contain 'a' = 266 - 256

(b) contains the letters 'a' and 'b' :

       # of strings that doesn't contain letters 'a' and 'b' = 246.

       # of strings that contain either 'a' or 'b' or both = 26- 246.

       # of strings that contain 'a' but not 'b' = C(6,1) * C(25, 5).

       # of strings that contain 'b' but not 'a' = C(6,1) * C(25, 5).

       So, # of strings that contain 'a' and 'b' both = 26- 246 - C(6,1) * C(25, 5) - C(6,1) * C(25, 5).

(c)

The strings can be in one of the below forms:

 ( a b _ _ _ _ ) or  ( _ a b _ _ _ ) or  ( _ _ a b _ _ ) or  ( _ _ _ a b _ )  or  ( _ _ _ _ a b ) .

# of such strings = 5 * (24*23*22*21)

(d)

    The strings can be in one of the below forms:

     _ _ _ _ _ b => C(5, 1) {for placing letter 'a' before 'b'} * 24*23*22*21

      _ _ _ _ b _ => C(4, 1) {for placing letter 'a' before 'b'} * 24*23*22*21

     _ _ _ b _ _ => C(3, 1) {for placing letter 'a' before 'b'} * 24*23*22*21

    _ _ b _ _ _ => C(2, 1) {for placing letter 'a' before 'b'} * 24*23*22*21

    _ b _ _ _ _ => C(1, 1) {for placing letter 'a' before 'b'} * 24*23*22*21

  So, # of such strings = 24*23*22*21* [C(5, 1) + C(4, 1) + C(3, 1) + C(2, 1) + C(1, 1)]

 

 

 

edited by

Related questions

0 votes
0 votes
0 answers
3
0 votes
0 votes
0 answers
4
admin asked May 1, 2020
245 views
Show that the correspondence described in the preamble is a bijection between the set of permutations of $\{1, 2, 3,\dots,n\}$ and the nonnegative integers less than $n!....