(1) An information source produces binary triplets {000, 111, 010, 101, 001, 110, 100, 011} with corresponding probabilities {1/4, 1/4, 1/8, 1/8, 1/16, 1/16, 1/16, 1/16}. A binary code assigns a codeword of length $\log_2 p_k$ to triplet $k$. Let $X$ be the length of the string assigned to the output of the information source.
(a) Show the mapping from $S$ to $S_X$, the range of $X$.
(b) Find the probabilities for the various values of $X$.