Recurrence relations

Recurrence relations

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. For (b) you can use the Good = Total-Bad trick to count the number of bad passwords of length n − 1.
Recurrence relations

© 2020 customphdthesis.com. All Rights Reserved. | Disclaimer: for assistance purposes only. These custom papers should be used with proper reference.