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.

3. A palindrome is a word or phrase that reads the same forwards and backwards (e.g. \"A man, a plan a canal: panama,\" and \"Are we not drawn onward, we few, drawn onward to new era How many palindromes (using the 26 letter alphabet have length 14? Length 15? Length n?

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

This is HW for MATH- \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site