This is HW for MATH Discrete Math for Computing Currently on
This is HW for MATH- \"Discrete Math for Computing\" Currently on chapter Counting.
Please show all work and steps, I want to be able to understand this because similar problem of this style will be on test.
Solution
A palindrome reads same forwards or backwards
So let us first consider palindrome of length 14
Once the first 7 letters are chosen the remaining are chosen automatically since it has to remain the same backwards. So we only need to choose first 7 letters and there is no restriction on which letter to choose. So each letter can be chosen in 26 ways so :26^7 palindromes
Let us first consider palindrome of length 15
Once the first 7 letters are chosen the last seven are chosen automatically since it has to remain the same backwards. So we only need to choose first 7 letters and the eight letter can be any letter since the eighth letter reading backwards is still the eigth letter. There is no restriction on which letter to choose. So each letter can be chosen in 26 ways so :26^8 palindromes
So for general n we have 2 cases
1. n is even n=2m
SO we only need to choose first m letters in 26^m ways
2. n is odd=2m+1
We only need to choose first m letters and then the m+1 th letter
So, 26^{m+1} ways
