In: Advanced Math
5. Ternary strings. A ternary string is a word
from the alphabet {0,1,2}{0,1,2}. For example, 022101022101 is a
ternary string of length 6.
(a) Enumerate all ternary strings of length 2.
(b) Generalize: how many ternary strings have length r?
(c) A ternary string of length 6 is to be made. How many ways can
we choose how many 0's, 1's, and 2's to include in the
string?
(d) A ternary string of length 6 is to have two 0's, a 1, and three
2's. How many strings have this property?
(e) What is the probability that a ternary string of length 6 has
two 0's, a 1, and three 2's?