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.
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.
Copyright © 2021 JogjaFile Inc.
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) .