How many 4 letter strings can be formed from a , b, c where the letter c has to appear at least twice How many $4$ letter strings can be formed from a, b, c where the letter c has to appear at least twice.
I tried to find a similar problem but couldn't get an answer.

Edit:  I have a second, similar question.  How many $4$ letter strings can be formed from a, b, c where every a must be followed by b?
 A: Calculating the number of strings that have c appearing at least twice is equivalent to calculating the total number of possible strings, less the strings where c appears once, then less the strings where c does not appear.
Since there are $3$ choices for each character in the string, there are $3^4=81$ total possible strings.  Then, there are $2^4=16$ strings that c does not appear, and for each of the $4$ positions that c can take if it were to appear once, the remaining three characters will be populated by either a or b.  The total number of these is $4\cdot2^3=32$.
Therefore, the total number of strings where c appears at least twice is $81-16-32=\boxed{33}$.

To answer the question in your comments, we can total all the strings where a appears $0$, $1$, or $2$ times.  It cannot appear $3$ or $4$ times since it won't fit in with the required b.
If a was to appear $0$ times, the four characters in the string can be either b or c for a total of $2^4=16$ strings.
If a was to appear $1$ time, it can appear in only the first, second, and third position.  It cannot appear in the fourth since it needs to be followed by b.  In each of these three cases, the two remaining characters can be either b or c for a total of $3\cdot2^3=24$ strings.
Finally, If a was to appear twice, there is only $1$ valid string, namely abab.
Therefore, the total number of strings where every a is followed by b is $16+24+1=\boxed{41}$.
