To find the number of ternary strings of length 5 containing at least one occurrence of two consecutive identical symbols ("aa", "bb", or "cc"), we can use the complement principle:
Total number of ternary strings of length 5:
Since the alphabet has 3 symbols ({a,b,c}) and each position can take any of the 3 symbols independently:
Total strings=35=243 Number of strings with NO two consecutive identical symbols:
For the 1st position, there are 3 choices.
For the 2nd position, it cannot be equal to the 1st symbol, leaving 2 choices.
For the 3rd position, it cannot be equal to the 2nd symbol, leaving 2 choices.
For the 4th position, it cannot be equal to the 3rd symbol, leaving 2 choices.
For the 5th position, it cannot be equal to the 4th symbol, leaving 2 choices.
Number of strings without consecutive identical symbols=3×24=3×16=48 Number of required strings:
Required strings=243−48=195
Thus, the correct answer is 195.