Computer Science And Engineering

Computer Science And EngineeringTheory of Computation / FLATNumerical Answer (NAT)1 Mark
Q6.

Let 𝑆 be the set of all ternary strings defined over the alphabet {𝑎, 𝑏, 𝑐}. Consider all strings in 𝑆 that contain at least one occurrence of two consecutive symbols, that is, “aa”, “bb” or “cc”. The number of such strings of length 5 that are possible is _______. (Answer in integer)