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
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
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.
Assuming that $1 \le k \le n/2$, the desired number is ${{n-k+1}\choose{k}} - {{n-k-1}\choose{k-2}}$, where it's understood that ${{n}\choose{-1}} = 0$.
Let $f(k,n)$ be the number of ways to choose $k$ non-adjacent elements from a circle of $n$ elements, where we assume that $1 \le k \le n/2$. Clearly $f(1,n) = n$, and it's not hard to see that $f(k,2k) = 2$ for all $k$: either you take all of the items in the odd-numbered positions, or you take those in the even-numbered positions. Let $\mathcal A(k,n)$ be the set of $k$-element subsets of $\{0,1,\dots,n-1\}$ having no two adjacent members, where $0$ and $n-1$ are considered adjacent; $f(k,n) = |\mathcal A(k,n)|$.
Suppose that $A \in \mathcal A(k+1,n+1)$. If $n \notin A$ and $\{0,n-1\} \nsubseteq A$, then $A \in \mathcal A(k+1,n)$; conversely, $\mathcal A(k+1,n) \subseteq \mathcal A(k+1,n+1)$. Otherwise, either $n \in A$, or $n \notin A$ and $\{0,n-1\} \subseteq A$.
If $n \in A$, $\{0,n-1\} \cap A = \emptyset$, and $A \setminus \{n\} \in \mathcal A(k,n-1)$; conversely, if $0 \notin A \in \mathcal A(k,n-1)$, then $A \cup \{n\} \in \mathcal A(k+1,n+1)$. If $n \notin A$ and $\{0,n-1\} \subseteq A$, then $A \setminus \{n-1\} \in \mathcal A(k,n-1)$; conversely, if $0 \in A \in \mathcal A(k,n-1)$, then $n-2 \notin A$, so $A \cup \{n-1\} \in \mathcal A(k+1,n+1)$.
It follows from the last two paragraphs that the function $f$ satisfies the recurrence $$f(k+1,n+1) = f(k+1,n) + f(k,n-1),$$
and I claim that $f(k,n) = {{n-k+1}\choose{k}} - {{n-k-1}\choose{k-2}}$, where it's understood that ${{n}\choose{-1}} = 0$. Certainly ${{k+1}\choose{k}}-{{k-1}\choose{k-2}} = 2 = f(k,2k)$ and ${{n}\choose{1}}-{{n-2}\choose{-1}} = n$, so the initial conditions are satisfied, and the following calculation verifies the recurrence: $\begin{align*}f(k+1,n)+f(k,n-1)&= {{n-(k+1)+1}\choose{k+1}} - {{n-(k+1)-1}\choose{(k+1)-2}}\\ &\qquad {}+ {{(n-1)-k+1}\choose{k}} - {{(n-1)-k-1}\choose{k-2}}\\ &={{n-k}\choose{k+1}} - {{n-k-2}\choose{(k-1}} + {{n-k}\choose{k}} - {{(n-k-2}\choose{k-2}}\\ &={{n-k}\choose{k+1}} + {{n-k}\choose{k}} - {{n-k-2}\choose{(k-1}} - {{(n-k-2}\choose{k-2}}\\ &={{n-k+1}\choose{k+1}} - {{n-k-1}\choose{k-1}}\\ &={{(n+1)-(k+1)+1}\choose{k+1}} - {{(n+1)-(k+1)-1}\choose{(k+1)-2}}\\ &=f(k+1,n)+f(k,n-1) \end{align*}$
First, we arrange $k$ distinct elements in a circle in order. Next, put rest elements of $n$-element set in the positions between them (each place at least one).$$ x_1 + x_2 + \cdots + x_k = n-k, $$ where $x_i \ge 1$ for all $i.$ So,the number of different arrangements is equal to the number of integer solutions of equation above. It is, obviously, $$\binom{n-k-1}{k-1}=\frac{k}{n-k} \binom{n-k}{k}.$$
Circle or a straight line doesn't make a difference. The number of way to choose k items from n is always nCk or "n choose k" or n!/(k!(k+n)!)
Read up more here http://en.wikipedia.org/wiki/Combination