Maximazing multinomial distribution I have an exercise in probability theory, which I can't solve:
There are 3 factories A B C, which produce 3 types of light bulbs. Factory A / B / C makes 40 / 20 / 40 percent of whole light bulbs. The probability of manufacturing first type of light bulb in factory A / B / C is 0.6 / 0.3 / 0.5. The probability of manufacturing second type of light bulb in factory A/ B / C is 0.3/0.4/0.2. The probability of manufacturing third type of light bulb in factory A / B / C is 0.1/0.3/0.3.
We buy 6 light bulbs. What is the most probable set of light bulbs (number of each type)? What is its probability?
So I figured out it's multinomial distribution with parameteres 6 and probabilities $p_1=0.5$, $p_2=0,22$, $p_3=0.28$, where $p_i$ is probability of buying a light bulb of $i-th$ type. 
Let $X_i$ denote a number of light bulbs of $i-th$ type in the set of 6 light bulbs we bought. To solve first problem we want to maximaze $P(X_1=k_1, X_2=k_2, X_3=k_3) = \frac{6!}{k_1!\cdot k_2! \cdot k_3!}0.5^{k_1} \cdot 0.22^{k_2} \cdot 0.28^{k_3}$
So we can write a function $f(x,y,z)=\frac{6!}{x!\cdot y! \cdot z!} 0.5^{x}\cdot 0.22^{y}\cdot 0.28^{z}$. Since sum of all variables must be 6, we can reduce one variable. Then we want to maximaze function $g(x,y)=\frac{6!}{x!\cdot y!\cdot (6-x-y)!}0.5^{x}\cdot 0.22^{y}\cdot 0.28^{6-x-y}$.
I don't how to do it because of the factorials. And also $k_i$ are natural numbers so i doubt that this aproach is good. I think you can examine this formula with sequences, but there is a lot of work to do then. I think there should be a theorem, which I don't know, that would help, because it was for an exam on some not mathematical (economy sth) studies and they have a small amount of math classes there.

Max $P = \dfrac{6!}{x_1!.x_2!.x_3!.x_4!.x_5!.x_6!.x_7!.x_8!.x_9!}.24^{x_1}.12^{x_2}.04^{x_3}.06^{x_4}.08^{x_5}.06^{x_6}.2^{x_7}.08^{x_8}.12^{x_9}$ 
with
$x_1$ - Type 1 made in Factory A - probability $= .6*.4 = 0.24$
$x_2$ - Type 2 made in Factory A -probability $= .3*.4 = 0.12$
$x_3$ - Type 3 made in Factory A probability $= .1*.4 = 0.04$
$x_4$ - Type 1 made in Factory B probability $= .3*.2 = 0.06$
$x_5$ - Type 2 made in Factory B probability $= .4*.2 = 0.08$
$x_6$ - Type 3 made in Factory B probability $= .3*.2 = 0.06$
$x_7$ - Type 1 made in Factory C probability $= .5*.4 = 0.20$
$x_8$ - Type 2 made in Factory C probability $= .2*.4 = 0.08$
$x_9$ - Type 3 made in Factory C probability $= .3*.4 = 0.12$
$x_1+x_2+x_3+x_4+x_5+x_6+x_7+x_8+x_9=6$ and $x_i \ge 0$
Ran a simulation and found out that the number and itemtypes are
$x_1 = 2, x_2 = 1, x_7 = 2$ and $x_9 = 1$
Most probable with maximum probability $= 0.005971$
