The number of ways to distribute n ball in two boxes such that no box remains empty when

combinationscombinatorics

Find the number of ways to distribute $n$ balls in two boxes such that no box remains empty when

  1. both boxes are different
  2. both are identical

ANSWER

  1. I solved first part by using logic that each ball will have two options (Box 1, Box 2), and $n$ balls will have $2^n$ ways. But this will include 2 cases in which either box 1 or 2 is not filled. Therefore, it's answer will be $2^n – 2$.

  2. What change will occur by identical boxes? According to me it's answer must be same as in (1), but in textbook the answer is $2^{n-1} – 1$.

Please explain me what changes will occur by using identical boxes!

Best Answer

The first case makes an ordering out of the boxes. In other words, your result is an ordered pair, i.e. cutting $7$ objects, $(3,4) \ne (4,3)$.

If you cannot distinguish the boxes, the result is a set, and $\{3,4\} = \{4,3\}$ so the first answer for this case is a massive overcount, but by how much?