Assume that exactly "N" A’s stand on the last 4 positions (so "\ud835\udc41\u2208\\{0,1,2,3,4\\}" ). It follows that there are "4\u2212\ud835\udc41" B’s on the last 4 positions and "4\u2212\ud835\udc41" A’s on the middle 4 positions. Also it follows that there are "\ud835\udc41" C’s on the middle 4 positions and "4-\ud835\udc41" C’s on the first 4 positions.
So there are "\\begin{pmatrix} 4 \\\\N \\end{pmatrix}" ways to place "N" A’s on the last 4 positions. Then there are "4-N" ways to place the rest A’s on the middle 4 positions. Finally, there are "\\begin{pmatrix} 4 \\\\N \\end{pmatrix}" ways to place "N" B’s on the first 4 positions. So if we place "N" A’s on the last 4 positions, "4-N" A’s on the middle 4 positions and "N" B’s on the first 4 positions, then the rest positions can be filled in the only way –C’s on the first and on the middle 4 positions, B’s on the last 4 positions.
Hence the number of words with "N" A’s on the last 4 positions is equal to
"\\begin{pmatrix} 4 \\\\N \\end{pmatrix} \\cdot \\begin{pmatrix} 4 \\\\4-N \\end{pmatrix} \\cdot \\begin{pmatrix} 4 \\\\N \\end{pmatrix} = \\begin{pmatrix} 4 \\\\N \\end{pmatrix}^3"
and the total number is
"\\displaystyle \\sum_{N=0}^4 \\begin{pmatrix} 4 \\\\N \\end{pmatrix}^3 = 1^3 + 4^3 + 6^3+4^3+1^3=1+64+216+64+1=346"
Answer: 346
Comments
Leave a comment