- #1

SammC

- 17

- 0

**The problem statement**

There are 26 letters in the English Alphabet, how many seven-letter palindromes can be made?

**The attempt at a solution**

There are 26 letters in the alphabet, so there are 26^7 possible

strings of length 7 (order being important for palindromes, i don't

think 26 choose 7 is appropriate).

One way to do this would be to subtract the number of strings that are not palindromes from 26^7, but I have no idea how to get this number.

Another way to do it is to figure out how many palindromes

match the following cases:

7 of the same letter: 26 cases

6 of the same letter: 26*25 cases

5 of the same letter: ? cases

4 of the same letter: (ex: XXYZYXX)

3 of the same letter: (ex: YZXXXZY)

2 of the same letter: (ex: ZYXWXYZ)

Since after the first two cases, there are multiple ways to arrange

all of the letters that work, i get confused. (for example, 5 can be

arranged as XXYXYXX, or XYXXXYX, or YXXXXXY)

I know if I add all the cases together, i'll get the correct answer,

(subtracting overlap), but this gets out of hand very quickly. Is

there another approach that will work?