Passwords for a certain computer system are strings of uppercase letters. A valid password must contain an even number of X’s. Determine a recurrence relation for the number of valid passwords of length n. Note: 0 is an even number, so ABBC is a valid password. This counting problem is pretty tricky. Here’s a good way to think about it: to make a good password of length n you can either (a) add any non-X to the end of a good password of length n−1, or (b) add an X to the end of a bad password of length n − 1.
So for 0, we have 25 x 25 x 25 x 25 ways right?
Oh wait...for a password the length of 1, we have 25 ways. Right?
For a password the length of 2, we have 25 x 25 or 125 ways...
Okay scratch what I said before. Does this look right: Password with one slot = 25 Password with two slots = 26 * 25 Password with three slots = 26 * 26 * 25 Password with four slots = 26 * 26 * 26 And so on...
Join our real-time social learning platform and learn together with your friends!