Question 890984: Consider strings of length 6 which contain letters only from the set { P,Q,R,S,T} and digits from { 1,3,5,7,9}. for example TPR5Q7 is such a string.Suppose repetition allowed.
A) How many different strings are there?
B) How may of these strings have no P?
C) How may of these strings have at least one P?
D) How may of these strings have exactly two P's and one 7?
Answer by Edwin McCravy(20054) (Show Source):
You can put this solution on YOUR website! Consider strings of length 6 which contain letters only from the set { P,Q,R,S,T} and digits from { 1,3,5,7,9}. for example TPR5Q7 is such a string.Suppose repetition allowed.
A) How many different strings are there?
10 ways to choose the 1st character.
10 ways to choose the 2nd character.
10 ways to choose the 3rd character.
10 ways to choose the 4th character.
10 ways to choose the 5th character.
10 ways to choose the 6th character.
106 = 1000000
B) How many of these strings have no P?
9 ways to choose the 1st character.
9 ways to choose the 2nd character.
9 ways to choose the 3rd character.
9 ways to choose the 4th character.
9 ways to choose the 5th character.
9 ways to choose the 6th character.
96 = 531441.
C) How many of these strings have at least one P?
We subtract the result of B) from the result of A):
1000000 - 531441 = 468559
D) How may of these strings have exactly two P's and one 7?
Choose the positions for the two P's in C(6,2) = 15 ways.
Choose the position for the one 7 as any of the remaining 4 ways.
That leaves 3 remaining positions to fill from the set of 8
characters {Q,R,S,T,1,3,5,9}.
Fill the first remaining position any of these 8 ways.
Fill the second remaining position any of these 8 ways.
Fill the third remaining position any of these 8 ways.
Answer: 15 = 30720 ways.
Edwin
|
|
|