We're only considering lowercase letters, repetition is allowed.
Number of strings of length $4 = 26^4$
Number of strings of length $4$ other than $x = 25^4$
$26^4-25^4 = 66,351$ strings.
This is one solution. But i was thinking of this problem as…
We have $4$ possible positions for $x$. After $x$ is placed, there are $3$ places left. And we have $26^3$ possibilities for those positions.
So, strings that have letter $x = 4\cdot (26^3) = 70304$ strings.
What is wrong with this approach?
Best Answer
You will have to make $4$ cases:-
So, total number of combinations combinations are, $4\cdot25^3+$$4\choose2$$\cdot25^2+$$4\choose3$$\cdot25^1+1=66351$