Loading [MathJax]/extensions/tex2jax.js

Problem #319

Super Strings

Consider all strings of length n made up of characters 'a' , 'b' and 'c'.

An be the number of strings such that the substring "abc" occurs exactly once.

Bn be the number of strings such that one of the substrings "aacc","bcab" and "cbba" occurs exactly once and the other two do not occur at all.

Find

The answer can be expressed as a/b such that a and b are co-prime.

Report a+b.

Contributed by Rudransh Aggarwal

Solved by 5 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.