There are N people are sitting around a circular table. Let’s call them P1, P2, . . . , PN , in order. P1 is sitting between P2 and PN . P2 is sitting between P1 and P3. P3 is sitting between P2 and P4, and so on.
You need to select a non-empty subset of these people, such that no two adjacent
people are selected. Find the total number of ways in which you can do so.
For example, suppose N = 3, then we have P1, P2 and P3. If we select P1, then
neither P2 nor P3 can be selected. So, the only valid selections are {P1}, {P2}, {P3}.
So there are three possible ways, and hence the answer would be 3. Suppose N = 4, then we have P1, P2, P3 and P4. The possible subsets are {P1}, {P2}, {P3}, {P4}, {P1, P3}, {P2, P4}. So the answer would be 6.
Find the answer for the following values of N:
(a) N = 11
(b) N = 13
(c) N = 15
source:- Q.3 https://www.iarcs.org.in/inoi/2019/zio2019/zio2019-question-paper.pdf
ANS:- (a)198
(b) 520
(c) 1363
This question was from pen & paper test
My failed attempt:-
(a) For N = 11,
the possible subsets are {P1},{P2},....{P11} = 11 +
since P11,P2 are adjacent to P1, the next possible subsets are:- {P1,P3},{P1,P4},...,{P1,P10}
= 8 +
Similarly, P1,P3 are adjacent to P2, the next subsets are:-
{P2,P4},{P2,P5}.....,{P2,11} = 8 +
DOING SAME FOR P3,P4,P5,P6,P7,P8,P9,P10,P10, (each of the individual has 7 subsets)
total subsets of them are :- 7 x 9 + 8 + 8 + 11 = 90.
MY ANS:-90
Two comments:
First, your count for subsets of $2$ is off. When you choose $P_4$, you have already counted pairing that up with $P_1$ and $P_2$, and so you only have $6$ more options, rather than $7$. So, you get $8+8+7+6+5+4+3+2+1=44$ options.
However, an easier way to count this is to say that for *each * person we can pick $8$ others, giving $11\cdot 8 = 88$ options. Of course, now you need to rule out double-counting: first picking $P_1$ and then picking $P_6$ gives you the same subset as first picking $P_6$ and then picking $P_1$. So, you need to divide by $2$. In other words, there are $\frac{88}{2}=44$ possible subsets of size $2$
Second: what about subsets of size $3$? For example, you can pick $P_1$, $P_4$, and $P_8$. You didn't count that subset, or any subset of size $3$. And you also didn't consider subsets of size $4$ or $5$. Now, any subset of size $6$ or larger will be impossible (do you see why?), but you will have to count the subsets of size $3$, $4$, and $5$.
OK, how many subsets of size $3$ are there?
For subsets of $4$:
Subsets of $5$:
Total: