Q:

Number of positive integral solutions of $x_1*x_2*x_3=30$

Find the number of positive integral solutions of $x_1*x_2*x_3=30$      

The prime factors of $30$ are: $2,3,5$. This now we have to put them into 3 groups with any number of elements(even 0 as $x_!,x_2,x_3$ can also be $0$) in each group.     
Case 1: all in 1 group=$\frac{3!}{0!0!3!}=1$
Case 2: 2,1,0 elements in groups=$\frac{3!}{0!1!2!}=3$
Case 2: 1,1,1 elements in groups=$\frac{3!}{1!1!1!3!}=1$      
But the answer is 27 and I have no clue where I have gone wrong.

A:

Approaching via multiplication principle:

pick which $x$-value receives the factor of $2$  (three choices)
pick which $x$-value receives the factor of $3$ (three choices)
pick which $x$-value receives the factor of $5$ (three choices)

As any $(x_1,x_2,x_3)$ triple can be uniquely determined by a sequence of choices to the aforementioned steps, the total number of outcomes is the product of the number of choices, in this case $3\cdot 3\cdot 3=27$

For a more complicated question, look at how many positive integer tuples $(x_1,x_2,x_3,x_4)$ exist where $x_1\cdot x_2\cdot x_3\cdot x_4 = 2^5\cdot 3^3$
Here, we again break up via multiplication principle

Choose how to distribute the factors of $2$ among the $x$ values.  By analogy to stars and bars this is the number of solutions to $\begin{cases}a_1+a_2+a_3+a_4=5\\0\leq a_i~~\forall i\end{cases}$ which is $\binom{5+4-1}{4-1}=\binom{8}{3}$
Choose how to distribute the factors of $3$ among the $x$ values.  Similarly this will be $\binom{3+4-1}{4-1}=\binom{6}{3}$

There are then $\binom{8}{3}\cdot \binom{6}{3}$ different tuples satisfying the conditions

The problem can be made more complicated by allowing the integers to be negative as well.  To handle that, in addition to the other steps in multiplication principle, add the steps: choose whether $x_1$ is positive or negative, choose whether $x_2$ is positive or negative, $\dots$, choose whether $x_{n-1}$ is positive or negative.  Note that the final $x$ term must be positive in the case that the product of the previous terms is positive, or it must be negative if the product of the previous terms is negative.  For the $x_1\cdot x_2\cdot x_3\cdot x_4=2^5\cdot 3^3$ example, if the integers were allowed to be negative as well, this increases the count to a new total of $2^3\binom{8}{3}\binom{6}{3}$

