[Math] Almost palindrome

combinatoricspalindrome

A sequence of letters is called almost palindrome if the original sequence and the opposite sequence are different only in two positions. For example, the sequence NATAL is almost palindrome, because your opposite sequence LATAN change only the postitions of letters N and L and fix other positions. How many almost palindromes we can write making a permutation of the letters in word NAATTNRARTRLA?

I belive that we need fix in central position some letter that appear one odd number of times, i.e. T, R or L. But I am not sure!!?

Someone should help me?

Best Answer

Apart from three positions, namely first, middle and last, the remaining letters must appear an even number of times by symmetry. Thus these three positions must be occupied by $L,R,T$ in some order. There will be $3!$ such orders.

The remaining letters, $AAAA, NN, RR, TT$ will form a palindrome, so their configuration will be entirely determined by one half of the configuration. So in how many ways can you form words from $AANRT$?

Multiply those figures to get the total number of near-palindromes. I got $360$.