0

Consider a set as shown ${1,2,3,4,...,n}$.Then the number of ways so that the subset so chosen will not have two consecutive numbers is $k(n)$,then find $k(3),k(4)$ and $k(5)$.

I don't know how to do such sums related to consecutive numbers.Any ideas?

1 Answers1

1

Let's try to count all such subsets. First, we could all those that don't contain $n$. The number of such subsets is $k(n-1)$.

Next, count those containing $n$. If a subset contains $n$, then it cannot contains $n-1$. So what remains is any such subset of $\{1,2, \dots, n-2\}$. So there are $k(n-2)$ such subsets.

We have found $k(n) = k(n-1) + k(n-2)$. Compute $k(1)$ and $k(2)$. You can now compute $k(n)$ for small integers $n$. If you want a closed-form expression for $k(n)$ for larger $n$, you can use the method is this answer.

Umang
  • 175