Let $n \geqslant 1$ be an integer. For any non-empty subset $A$ of $\{1,2, \ldots, n\}$, we denote $P(A)$ as the product of all elements of $A$. For example, for $A=\{2,4,7\}$, we have $P(A)=$ 56. Determine the sum of $\frac{1}{P(A)}$ as $A$ ranges over all non-empty subsets of $\{1,2, \ldots, n\}$.
We have the identity $\left(1+x_{1}\right)\left(1+x_{2}\right) \cdots\left(1+x_{n}\right)=1+\sum x_{i}+\sum_{i<j} x_{i} x_{j}+\cdots$. By taking $x_{i}=\frac{1}{a_{i}}$, we obtain

$$
\sum_{k \geqslant 0} \sum_{a_{1}<\cdots<a_{k}} \frac{1}{a_{1} a_{2} \cdots a_{k}}=\left(1+\frac{1}{1}\right) \cdots\left(1+\frac{1}{n}\right)=\frac{2}{1} \times \frac{3}{2} \times \frac{4}{3} \cdots \times \frac{n+1}{n}=n+1
$$

Thus, $1+\sum_{A} \frac{1}{P(A)}=n+1$ and therefore $\sum_{A} \frac{1}{P(A)}=n$.