I've tried to treat a string as five consecutive choices with each choice being a selection of a character in the given alphabet. To avoid overcounting strings that both start and end with 'e', I have two separate cases:
- String only begins with 'e' and doesn't end with 'e'
- String only ends with 'e' and doesn't start with 'e'
The total number of strings that can be arranged for Case 1 is:
1 (string starts with the letter 'e') * $8^3$ (3 consecutive choices made for the following three letters, each with 8 possibilities) * $7$ (the alphabet excluding the letter 'e' to avoid strings that begin and end with 'e')
Since reversing the order of the choices made is essentially the process for calculating all possibilities for Case 2, my answer for the total number of strings is $2(7)(8^3)$, which falls short of the correct answer provided by my textbook.
I have a feeling that I overcompensated for strings that both begin and end with 'e', I'm just not sure where I did so in my calculations.
Total number of strings without restrictions: $8^5$
Total number of strings that start with an e: $8^4$
Total number of strings that end with an e: $8^4$
Total number of strings that start with an e and end with an e: $8^3$.
Can you take it from here?