Combinatorics – Choose K Items from N in a Circle

combinatorics

In how many ways can we choose k items from n distinct items put in a circle.

Then further extension of the question, if I want to find out the number of ways to choose k items from n distinct items in a circle such that no 2 are together.

Thanks

Best Answer

The problem is simpler to think about if we first imagine that the objects are in a line, not in a circle. Perhaps if I were a harmonic analyst I would find it easier to think in circles.

We analyze the line problem, and then make a simple adjustment to solve the circle problem.

Let $L(n,k)$ be the number of ways of choosing $k$ objects from a line of $n$ objects, no two of them adjacent.

There are two possibilities (i) the first (leftmost) object in the line is among the chosen ones and (ii) the first object is not among the chosen ones.

In case (i), the second object cannot be chosen, which leaves $L(n-2,k-1)$ possibilities for the remaining $k-1$. In case (ii), we need to choose $k$ objects from $n-1$, giving $L(n-1,k)$ possibilities. We have obtained the recurrence $$L(n,k)=L(n-2,k-1)+ L(n-1,k).$$ With the obvious initial conditions, the solution of this recurrence is given by $$L(n,k)=\binom{n-k+1}{k}.$$ It is not hard to check that the above is a solution of the recurrence. There should be a bijective argument that makes it obvious, you choose the people and pad the choice with a blank seat to the right, most of the time, but I can't quite make it work. Annoying! Boring old induction does work, however.

Now let's adapt this to the circle, by bending the line and connecting the ends. Let $C(n,k)$ be the number of allowed choices.

Some of the choices that were counted in $L(n,k)$ now become "bad." They are the arrangements in a line in which we chose both endpoints. Everything else is fine.

Now count the bad line choices. We chose both endpoints, so could not choose the next to end points, so needed to choose $k-2$ points from $n-4$. There are $L(n-4,k-2)$ ways to do that. Putting things together, we get $$C(n,k)=\binom{n-k+1}{k}-\binom{n-k-1}{k-2}$$ (if $k$ satisfies the obvious constraint).

It was obvious!: For the line, think of the following operation. Imagine $n-k+1$ chairs laid out in a row, and choose any $k$ of them. Now for every chosen chair except the rightmost one, add a chair immediately to the right of the chosen chair. Then we get an acceptable arrangement.

Conversely, given any acceptable arrangement, remove the chair immediately to the right of every chosen chair except the rightmost one. In this way we obtain a choice of $k$ chairs from $n-k+1$ chairs. It follows that obviously $$L(n,k)=\binom{n-k+1}{k}$$ and the fussing with a recurrence for $L(n,k)$ was unnecessary. But I am leaving the original solution intact, to show that clean solutions do not come instantly, at least not to me.

Related Question