Three-word characters:- Consider the source shown below:
(a) Using base-3 logarithms, compute the entropy of this source.
(b) Assuming that there are three characters 0,1,2 in the code alphabet, find a code for the source that has average length equal to its base-3 entropy.