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.
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.