How can a recurrence relation count subsets containing no consecutive integers?
To determine the number of subsets of the set of the first positive integers () that contain no two consecutive integers, we define this count as .
A subset of this type is formed in one of two mutually exclusive ways:
* It is a valid subset of , which accounts for all valid subsets that do not include the integer .
* It is formed by adjoining the integer to a valid subset of , which ensures that is not included, thereby maintaining the condition of no consecutive integers.
This logic leads to the recurrence relation:
With the initial values (the null set) and (the null set and the set ), this relation generates the sequence , , , and so on. This approach allows for the calculation of the total count for any using generating functions or iterative computation.1