I was troubling in a question and i found the solution of the same question on this website Mathforum. The Question is -
How many arrangements of six 0's, five 1's, and four 2's are there in which
i) the first 0 precedes the first 1? ii) the first 0 precedes the first 1, precedes the first 2?
The First solution is right I think but 2nd solution is not right I think. Please correct me if i am wrong. I want confirmation. Following Is Given On The Website.
Arrangements of 0's, 1's, and 2's
i) the first 0 precedes the first 1?
This is more difficult than it first appears. We have
6 0's, 5 1's, 4 2's = 15 digits
You must consider several non-overlapping configurations. For example, you could have 0 followed by every possible arrangement of the remaining digits, or 20 followed by every possible arrangement of the remaining digits, or 220 followed etc.
$$\begin{align}&\bbox[pink,0.2ex]{\begin{array}{c:lcl} \text{First positions}& \text{Number and type of remaining digits}\\ \hdashline 0&5\textit{ 0's}, 5\textit{ 1's}, 4\textit{ 2's} &=& 14!/[5!5!4!] \\ 20&5\textit{ 0's}, 5\textit{ 1's}, 3\textit{ 2's} &=& 13!/[5!5!3!] \\ 220&5\textit{ 0's}, 5\textit{ 1's}, 2\textit{ 2's} &=& 12!/[5!5!2!] \\ 2220&5\textit{ 0's}, 5\textit{ 1's}, 1\textit{ 2} &=& 11!/[5!5!1!] \\ 22220&5\textit{ 0's}, 5\textit{ 1's} &=& 10!/[5!5!0!] \\ \end{array}} \\ \text{Total} &= \frac 1{5!5!}[ \frac{14!}{4!} + \frac{13!}{3!} + \frac{12!}{2!} + \frac{11!}{1!} + \frac{10!}{0!}] \\ &= 343980 \end{align}$$
ii) the first 0 precedes the first 1, precedes the first 2?
This time we MUST start with 0 and thereafter simply repeat the above calculation except that we now consider the digits 1 and 2 instead of 0 and 1. So having started with 0, we then have
5 0's, 5 1's, 4 2's
I am now considering the arrangements of the 14 digits AFTER removing the first 0.
$$\begin{align}&\bbox[pink,0.2ex]{\begin{array}{r:lcl} \text{First positions}& \text{Number and type of remaining digits}\\ \hdashline 1&5\textit{ 0's}, 4\textit{ 1's}, 4\textit{ 2's} &=& 13!/[5!4!4!] \\ 01&4\textit{ 0's}, 4\textit{ 1's}, 4\textit{ 2's} &=& 12!/[4!4!4!] \\ 001&3\textit{ 0's}, 4\textit{ 1's}, 4\textit{ 2's} &=& 11!/[3!4!4!] \\ 0001&2\textit{ 0's}, 4\textit{ 1's}, 4\textit{ 2's} &=& 10!/[2!4!4!] \\ 00001&1\textit{ 0}, 4\textit{ 1's}, 4\textit{ 2's} &=& 9!/[1!4!4!] \\ 000001&0\textit{ 0's}, 4\textit{ 1's}, 4\textit{ 2's} &=& 8!/[0!4!4!] \\ \end{array}} \\ \text{Total} &= \frac 1{4!4!}[ \frac{13!}{5!} + \frac{12!}{4!} + \frac{11!}{3!} + \frac{10!}{2!} + \frac{9!}{1!} + \frac{8!}{0!}] \\ &= 140140 \end{align}$$
So the answer is $$\frac{13!}{5!4!4!}+\frac{12}{4!4!4!}+\frac{11!}{3!4!4!}+\frac{10!}{2!4!4!}+\frac{9!}{1!4!4!}+\frac{8!}{0!4!4!}$$