How do you find the most possible combinations in a word problem? In a word problem, they say a guy has 14 cats, dogs, and Guiana pigs. What are all the possible combinations the guy could have? I don't understand how to solve this problem. I tried my own ways but none of them work. Can you please help me?
 A: Here's a hint on applying stars and bars to your problem.
The guy has $14$ animals of some combination of type. The animals are the "stars":
$$\star\star\star\star\star\star\star\star\star\star\star\star\star\star$$
You can divide the starts into three groups using $3-1=2$ "bars." Here's one way:
$$\star\star\star | \star\star\star\star\star\star | \star\star\star\star\star$$
If we say that the first, second, and third groups are cats, dogs, and guinea pigs, respectively, then the above situation would count the case of $3$ cats, $6$ dogs, and $5$ guinea pigs.
You can also have something like this:
$$\star\star\star\star\star\star\star || \star\star\star\star\star\star\star$$
There are no stars between the bars, so therefore no dogs! (Which is sad, but I digress.) In other words, he has $7$ cats and $7$ guinea pigs.
Or, a much happier situation:
$$|\star\star\star\star\star\star\star\star\star\star\star\star\star\star|$$
$14$ dogs, and no other types.
It boils down to figuring out the number of places you can put the bars.
Can you take it from here?
A: We can also solve the problem with a little dose  of algebra.

Zero or more cats give $$1+x+x^2+\cdots=\frac{1}{1-x}$$
The same holds for dogs as well as for Guiana pigs. Putting all together gives zero or more cats, dogs and Guiana pigs: $$\left(\frac{1}{1-x}\right)^3$$
Since we want all combinations of $14$ cats, dogs and Guiana pigs, we calculate
\begin{align*}
\color{blue}{[x^{14}]\left(\frac{1}{1-x}\right)^3}&=[x^{14}]\sum_{n=0}^\infty \binom{n+2}{2}x^n=\binom{16}{2}\color{blue}{=120}
\end{align*}

A: This is a stars and bars problem. 
Theorem 1: in this case, we require that we must include at least one of each animal to be chosen from 14,  this is ${n -1 \choose k - 1}$ where $n$ is the number of animals needed (14),  and $k$ the number of types of animals under consideration. There are $\binom{14 - 1}{3 - 1}$ ways of choosing 14 pets, such that at least one cat, at least one dog, and at least 1 Guinea Pig.  

Theorem 2 This variation applies to situation in which we need to include the possibility that one or two of the types of animals might be zero: For example we count the possibility that we end with 6 cats, 0 dogs, and 8 Guinea Pigs;  and we also count the possibility that we end up with 14 cats, no dogs, no Guinea pigs. 
In this case, we use the following formula (again see the link to Theorem 2 given above: ${n+k - 1 \choose n }$, where $n$ is the number of animals sought, and $k$ is the number of types to choose, so in this case, we have  ${ 14 + 3 - 1 \choose 14} = \binom{16}{14}=\binom{16}{2} = \frac{16!}{14!\cdot 2!}$
A: This is how I will model it: each o (of a total of 14) represents one animal and there are two / to divide them into three group; first group will be cats, second one dogs and the last one pigs.
An example demonstration:
ooo/oo/ooooooooo This is 3 cats, 2 dogs and 9 pigs.
You got the idea. So basically, the question is how many permutations of 14 o's and 2 /'s exist. The answer is $\frac{16!}{14!2!}$, which is "16 choose 2".
Notice that this model allows zero number of animals such as 
/o/ooooooooooooo is 0 cats, 1 dog, 13 pigs. If you want at least 1 for each, you then assign 1 to each, leaving $14-3=11$ free assignments and you repeat the idea above as if you have 11 animals in total, in the end you add 1 more to each number because you pre-assigned 1 to each to prevent zero number for each of them.
If the number of animals is $x$ (instead of 14), and number of type of animals is $y$ (instead of 3), the formula reduces to "(x+y-1) choose (y-1)"
