How many different ways to fill 100 boxes in a line with black or white balls. (One box can only contain one ball at a time.)
My attempt :
Different ways to fill 1 st box = 2 Different ways to fill 2 nd box = 2 Different ways to fill 3 rd box = 2 ' ' ' ' ' Different ways to fill 99th box = 2 Different ways to fill 100th box = 2
SO by method of counting the answer is $2^{100}$.
This is same as number of subsets a set of 100 elements has?
What is the connection this type of questions and $2^n$ has?
A subset $B$ of a set $A$ can be thought of by the following scheme:
If $x \in A$ then either $x \in B$ or $x\notin B$. So for each element we have these two choices, and we must make such a choice for each element. This is exactly what you did except in this case the choice was black or white.