# Permutations Help

1. Aug 30, 2006

### ashkash

Here is the problem:

A sequence of letters of the form abcba is an example of a palindrome of five letters.

a. If a letter may appear more than twice, how many palindromes of five letters are there? of six letters?

b. Repeat part a under the condition that no letter appears more than twice.

I do not know how to go about doing this problem. Any help would be appreciated. thanks.

2. Aug 30, 2006

### stefannm

For part a, consider this. For a five letter palindrome, the first letter can be any letter out of 26. Since a letter can appear more than twice, so can the second and third. Does that make sense so far?

How many different letters can the last two be if it is going to be a palindrome? This should give you a good start for this problem. Let me know if you need more help.

stefannm

3. Aug 30, 2006

### StatusX

If you are constructing a palindrome of, say, 6 letters, once you pick the first 3 letters you have determined the entire palindrome, because this pattern must then repeat in reverse order for the final 3 letters. So for every sequence of 3 letters, there is a corresponding palindrome of 6 letters, and vice versa. How many sequences of 3 letters are there?

4. Aug 30, 2006

### ashkash

the last two letters have to be the second and first letter. is that a correct assumption? so now how would I put this in a way so that I know how many palindromes of five letters there are? thanks.

5. Aug 30, 2006

### ashkash

for the number of sequences of 3 letters would it be 26!/3!

6. Aug 30, 2006

### stefannm

I believe the answer would be $$26^3$$, but maybe we should get some clarification. Think of it like a tree. There are 26 possibilities each having 26 possibilities. and again, each of those has 26 possibilities. So for the first three letters the possibilites are
$$26*26*26$$ right?

But the last two letters are decided by the first to so for each of those possibilites only one option can be used, so the final answer should be
$$26*26*26*1*1=26^3$$

7. Aug 30, 2006

### ashkash

that makes sense. and for 6 letters it would be the same as it would be 26*26*26*1*1*1. Is that right?

and for part b, how would I go about that. Would it be 26*26*25*1*1?

8. Aug 30, 2006

### stefannm

Right, there are the same number of palindromes for 5 and 6 letters given those conditions. Kind of an interesting result. I would not have expected that.

You are close, but remember that each letter can only be used twice. Since it is a palindrome, it has to be used at the beginning and end so the there are only 25 possibilities for the second letter and 24 for the third. Make sense?

9. Aug 30, 2006

### ashkash

for part b would it be 26*25*24*1*1?

10. Aug 30, 2006

### stefannm

looks good to me.

11. Aug 30, 2006

### ashkash

thanks for all your help guys.