There are 27720 strings.
Strings of 12 ternary digits, 3 possibilities for each digit in the string, gives a total of 3^12 = 531,441 ternary strings of length 12.
There are
C(12,3) = 12! / (9! 3!) = 12 * 11 * 10/ 3 * 2 = 220 possible combinations of positions for the three 0s.
Of the 9 remaining positions, there are
C(9,4) = 9! / (5! 4!)
= 9 * 8 * 7 * 6/ (4 * 3 * 2 * 1)
= 126 possible combinations of positions for the four 2s.
The remaining 5 places are, of course, occupied by the five 1s.
So there that contain exactly three 0s, five 1s, and 4 2s are 220 * 126= 27720 such strings.
Learn more about strings here: https://brainly.com/question/27128699
#SPJ4