# Dividing students into teams-combinatorics

In how many ways can $n$ number of students be divided into two teams such that each team has at least one student.

This is what I did:
Let $x_1$ be the number of students in the one team and $x_2$ be the number of students in the other team.Then number of ways of dividing students is equivalent to

$x_1+x_2=n$ such that $x_1,x_2>=1$.
I let $y_1=x_1-1$ and $y_2=x_2-1$.
Then the number of ways of dividing students are $n-1 \choose 1$=$n-1$

The given answer in the book is $2^{n-1}-1$.
How is this answer obtained.Can someone please show me what's wrong with what I did.

• Possible duplicate of this one – dajoker Oct 24 '14 at 14:18

Let's first say that there is a team $A$ and a team $B$. For each of the $n$ student there is a decision to make: in $A$ or in $B$. This gives at first $2^n$ possibilities but taking into account that both teams are not allowed to be 'empty' $2$ of these possibilities must be dropped. Then we have $2^n-2$ possibilities left. Secondly the teams are not distinguishable wich means that every possibility has in fact been counted twice. We repair this by dividing by $2$ and end up with $2^{n-1}-1$ possibilities.
• In your calculation only the quantities of the teams play a part. Secondly if there are e.g. $3$ students then the outcomes $(x_1,x_2)=(1,2)$ and $(x_1,x_2)=(2,1)$ are (wrongly) looked at as different. The point here is that the students are distinguishable and the teams are not. – drhab Oct 24 '14 at 15:26
One of the students is Alphonse. Let $N$ be the set of non-Alphonses. We need to choose a subset of $N$ to be on Alphonse's team, but we cannot choose all of $N$. The set $N$ has $2^{n-1}-1$ subsets other than $N$.