Correct : 195
Correct Answer:
195
Explanation:
To find the number of ternary strings of length 5 that contain at least one occurrence of two consecutive identical symbols ("aa", "bb", or "cc"), it is most efficient to use the principle of complementary counting.
We will calculate the total number of possible ternary strings of length 5 and subtract the number of strings that do not contain any consecutive identical symbols.
1. Calculate Total Ternary Strings of Length 5:
Since the alphabet is {a, b, c}, there are 3 choices for each of the 5 positions.
Total Strings = 3 × 3 × 3 × 3 × 3 = 35 = 243
2. Calculate Strings with NO Consecutive Identical Symbols:
Let's choose characters position by position ensuring no adjacent characters match:
• Position 1: Any of the 3 characters ({a, b, c}) can be chosen → 3 choices
• Position 2: Must be different from Position 1 → 2 choices
• Position 3: Must be different from Position 2 → 2 choices
• Position 4: Must be different from Position 3 → 2 choices
• Position 5: Must be different from Position 4 → 2 choices
Invalid Strings = 3 × 2 × 2 × 2 × 2 = 3 × 24 = 48
3. Subtract to Find Valid Strings:
Subtract the invalid combinations from the total sample space:
Valid Strings = Total Strings - Invalid Strings
Valid Strings = 243 - 48 = 195
Similar Questions
Total Unique Visitors