Number of combinations of a ternary sequence with restrictions. If you are given a ternary sequence (a sequence of numbers which only contain $0$, $1$, and $2$'s) which is composed of 15 numbers.  Let's say you must have $6$, $0's$, $5$, $1's$, and $4$, $2's$, then you can arrange this sequence in $\binom{15}{6}$ ways for the $0$'s, then we have $15-6=9$ places left to arrange the $1$'s.  So we can arrange the $1$'s in $\binom{9}{5}$ ways, and finally for the $2$'s we can arrange them in $\binom{4}{4}$ ways.  So in total we can have: $\binom{15}{6}\binom{9}{5}\binom{4}{4}$ ways of arranging this 15 ternary sequence.
However, what if we put a restriction on this sequence.  For example, the first $1$ must be preceded by a $0$ (ex: $2200100101011$).  Or the first $0$ precedes the first $1$ and the first $1$ precedes the first $2$ (ex: 000010201211212).  How would you go about counting the total number of ways now, with these type of restrictions?
 A: To simplify your initial thoughts on ternary arrangements, you have a multiset with three distinct elements and a number of repetitions - in your example, $\{(0,6),(1,5),(2,4)\}$ and the arrangements of the elements are simply the trinomial coefficient
$${15 \choose 6,5,4}=\frac{15!}{6!\,5!\,4!}$$
Then subsequent constraints can often be represented by breaking the possible strong into parts as @lulu mentions. However the examples you describe I would attack in step-by-step insertion method using stars-and-bars assuming that the multiset specification remains the same. 
Thus the first problem starts with $6$ zeroes and $6$ places to allocate the $1$s:
$$ 0\,\,\_\,\,0\,\,\_\,\,0\,\,\_\,\,0\,\,\_\,\,0\,\,\_\,\,0\,\,\_ $$
giving ${10 \choose 5}$ options, then ${15 \choose 4}$ further options to place the $2$s by a similar process (or by "masking" $0$s and $1$s together, same answer).
$$ {10 \choose 5}{15 \choose 4} = \frac{10!}{5!\,5!}\frac{15!}{11!\,4!} = \frac{15!}{11\cdot 5!\,5!\,4!}$$
Similarly the second problem restricts placement of the $2$s into the $1$s, then restricts placing the $1/2$ string into the $0$s.
$${8 \choose 4}{14 \choose 9}$$
