I am asked the following:
Let m, n, and r be non-negative integers.
How many distinct "words" are there consisting of m occurrences of the letter A, n occurrences of the letter B, r occurrences of the letter C, such that no subword of the form CC appears, and no other letters are used?
I have tried various methods but none of which I can get to just account for the total amount of double c's without overlapping.
I came up with this: $ \frac{(n+m+r-2)!}{n!m!(r-2)!} - (n+m+r)$ which works in some cases however the more c's there are the more overlapping occurs and the more inaccurate the answer becomes.
At somepoint $ \frac{(n+m+r)!}{n!m!(r-2)!} = f(n,m,r)$ when r is certain size or larger r would saturate
Can anyone provide me with a hint on how I should proceed?