Keep a safe distance!

How many subsets of { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } \{1,2,3,4,5,6,7,8,9,10\} are there which contains no two consecutive elements?


The answer is 144.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Abhishek Sinha
May 16, 2014

Let A ( n ) A(n) denote the number of subsets of the set { 1 , 2 , , n } \{1,2,\ldots, n\} , containing the element n n and satisfying the given constraint of no two consecutive elements.

Similarly let B ( n ) B(n) denote the number of subsets of the set { 1 , 2 , , n } \{1,2,\ldots, n\} , not containing the element n n and satisfying the given constraint of no two consecutive elements.

Our objective is to find A ( 10 ) + B ( 10 ) A(10)+B(10) .

Now it is easy to see that A ( n ) A(n) and B ( n ) B(n) satisfies the following two recursion equations

A ( n ) = B ( n 1 ) A(n)=B(n-1) and B ( n ) = A ( n 1 ) + B ( n 1 ) B(n)=A(n-1)+B(n-1) , with the initial condition A ( 1 ) = B ( 1 ) = 1 A(1)=B(1)=1 . Using the recursion, we get A ( 10 ) + B ( 10 ) = 144 A(10)+B(10)=144 .

Really nice solution.Also note that it follows the same recurrence relation as the Fibonacci sequence.

Eddie The Head - 7 years ago
Himanshu Arora
May 28, 2014

Let A(n) denote the number of subsets of the set {1,2,....,n} excluding the null set phi and having no consecutive integer elements.

Now, it can be clearly seen that A(n) can be expressed as A(n-1) + A(n-2), because for each of A(n-2) subsets we can form another subset with the nth element.

This gives us a recursive relation. Add 1 in the end for null set. Gives 144.

(PS I am new to computers, please pardon my not using LaTeX.)

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...