I am working on a homework problem involving finding palindromes from the alphabet. I believe I've figured out the first part, but am having trouble applying my method to work with the second part.
The first part of the problem is to find all of the 9 digit palindromes that can be made with all of the letters in the alphabet (26) only using each letter at most twice. I solved this by saying that one letter of 26 was chosen for the middle letter, one of 25 for the 4th and 6th, one of 24 for the 3rd and 7th, one of 23 for the 2nd and 8th, and finally one of 22 for the 1st and 9th. I then multiplied 26 X 25 X 24 X 23 X 22 to get 7893600.
The second part of the question asks to find how many palindromes of length 9 can be made from the alphabet. I am having trouble figuring out how to adapt my approach to first part to make it work for this scenario.
You did the first part alright.
For the second part: There are no restrictions whatsoever for the first five letters. When these have been written down the remaining four letters are determined.