-1

How many n-letter words (made of letters from 25-letter english alphabet) are there, such that number of letters "a" is even? ("a" appears even number of times in a word).

I'm trying to create recursive formula, but with no success.

nonuser
  • 90,026
leller
  • 291
  • If we have a "good" word of length $n-1$, how many letters can we append to make a good word of length $n$? Same question if we have a "bad" word of length $n-1$. – lulu Dec 20 '18 at 13:08
  • What happened to the missing letter? – paw88789 Dec 20 '18 at 15:56
  • The same question, with two other letters instead of 24, is here – Ross Millikan Dec 20 '18 at 16:06
  • This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc. – Did Dec 23 '18 at 21:34

1 Answers1

1

Let $o_n$ be the number of $n$-letter words with an odd number of $a$'s and

let $e_n$ be the number of $n$-letter words with an even number of $a$'s.

Then $o_n+e_n = 25^n$ and $$ e_{n+1} = o_n+ 24e_n$$

that is, if the first letter is $a$ then in the rest of a word must be an odd number of $a$'s and if the first letter is not $a$ then the number of even $a$'s is the same as in an $n$-letter word times 24 (since we have 24 choices for the first number) .

Quantum Chill
  • 152
  • 15
nonuser
  • 90,026