Number of ways to select $K$ people from $N$ people such that at least $r$ people are there in between them

426 Views Asked by At

Number of ways to select $K$ people from $N$ people (who are aligned in a line) such that at least $r$ people are there in between them

Ex: I want to select 3 people from 10 people (who are aligned in a line) such that at least 2 people should be there between the selected people

May I know the resources for learning this type of problems , also what is the solution if people are arranged in circular manner

1

There are 1 best solutions below

4
On BEST ANSWER

Without the distance constraint, the answer would be $\binom{n}k$. Selections of people correspond to sequences of $k$ ones and $n-k$ zeroes.

To account for this new constraint, we need to ensure that there are at least $r$ zeroes in each of the $k-1$ gaps between the ones. So, set aside $r(k-1)$ zeroes, leaving $k$ ones and $n-k-r(k-1)$ zeroes. Arrange these remaining numbers in a line in $\binom{n-r(k-1)}{k}$ ways. Finally, insert $r$ zeroes into each of the $k-1$ regions between ones. This produces a selection where any two ones have at least $r$ zeroes between them, and every such selection is produced uniquely. Therefore, the number of ways is $$ \binom{n-r(k-1)}{k}. $$ Edit: For the circular variant,

  • Set aside $kr$ zeroes, and $1$ one.

  • Arrange the remaining numbers in a line, in $\binom{n-rk-1}{k-1}$ ways

  • Place the one at the beginning of the line.

  • Place $r$ zeroes after each of the $k$ ones.

  • Arrange this list clockwise around the circle, in $n$ ways.

This seems to give a result of $n\binom{n-rk-1}{k-1}$. However, this procedure gives special treatment to the initally removed one, so there is overcounting by a factor of $k$. Therefore, the actual count is $$ \frac{n}k\binom{n-rk-1}{k-1} $$